Fix backlight

This commit is contained in:
Geoffrey Frogeye 2023-12-16 22:39:11 +01:00
parent a3552634b6
commit a46e7d7bca
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
8 changed files with 17 additions and 66 deletions

View file

@ -1,2 +0,0 @@
[Service]
ExecStartPre=/bin/sh -c 'setleds +num < /dev/%I'

View file

@ -1,5 +0,0 @@
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "Backlight" "intel_backlight"
EndSection

View file

@ -1,28 +1,5 @@
# Xorg configuration
- name: Check if there is Intel backlight
ansible.builtin.stat:
path: /sys/class/backlight/intel_backlight
register: intel_backlight
when: display_server == 'x11'
- name: Install Intel video drivers (Arch based)
community.general.pacman:
name: xf86-video-intel
# state: "{{ intel_backlight.stat.exists }}"
state: present
become: true
when: display_server == 'x11' and intel_backlight.stat.exists and arch_based
# TODO With software role? Would permit other distributions
- name: Configure Xorg Intel backlight
ansible.builtin.copy:
src: xorg/intel_backlight.conf
dest: "{{ item }}/20-intel_backlight.conf"
become: true
when: display_server == 'x11' and intel_backlight.stat.exists
loop: "{{ xorg_common_config_dirs }}"
- name: Configure Xorg joystick behaviour
ansible.builtin.copy:
src: xorg/joystick.conf
@ -48,23 +25,3 @@
vars:
using_panfrost: "{{ 'panfrost' in (modules.content | b64decode) }}"
notify: panfrost config changed
# Numlock on boot
- name: Set numlock on boot
ansible.builtin.copy:
src: getty.service
dest: /etc/systemd/system/getty@.service.d/override.conf
become: true
notify:
- systemd changed
when: auto_numlock
- name: Unset numlock on boot
ansible.builtin.file:
path: /etc/systemd/system/getty@.service.d/override.conf
state: absent
become: true
notify:
- systemd changed
when: not auto_numlock