You are not logged in.
Hi I have writted the next unit, with the help of the wiki:
File found in /etc/systemd/system/on-turn-on-system.service
[Unit]
Description="Services that start when the system is turned on"
[Service]
Type=oneshot
ExecStart="light -I"
[Install]
WantedBy=multi-user.target The idea is to change screen brightness from the last session with light -I, but when the system is starting it says:
Failed to start "Services that start when the system is turned on"
Also I have granted execution privilegies:
-rwxr-xr-x 1 root root 154 Feb 9 20:18 /etc/systemd/system/on-turn-on-system.serviceWhat is wrong? What can I do?
Offline
What is wrong? What can I do?
The ExecStart line should have the full path to an executable listed and it shouldn't have quotation marks. The unit file itself doesn't need to be executable. Check the systemd journal to find out why it's failing.
The backlight level should be restored automagically by systemd but there's a bug in the amdgpu driver that stops this from working.
I use this workaround:
# systemctl edit systemd-backlight@backlight:amdgpu_bl0.serviceThen enter
[Service]
ExecStart=
ExecStart=/bin/cp /var/brightness /sys/class/backlight/amdgpu_bl0
ExecStop=
ExecStop=/bin/cp /sys/class/backlight/amdgpu_bl0/brightness /varChange that to match the directory name under /sys/class/backlight/ in your system.
I also had to mask systemd-backlight@backlight:acpi_video0.service, YMMV.
There is an alternative solution in the ArchWiki but I prefer my hack :-)
Jin, Jîyan, Azadî
Offline
For the moment I have set a default number to always change the light when I turn on the laptop in a rule (/etc/udev/rules.d/81-backlight.rules):
# Set backlight level to 300
SUBSYSTEM=="backlight", ACTION=="add", KERNEL=="intel_backlight", ATTR{brightness}="300"I have found that my system uses /sys/class/backlight/intel_backlight/ and I have checked the maximum value (4882) so I putted the 300 in the rule.
I ha found this solution in the wiki but I don't find the systemd-backlight@.service.
Last edited by lazaro92 (2021-02-12 19:47:18)
Offline
I don't find the systemd-backlight@.service
$ pacman -F systemd-backlight@.service
core/systemd 247.3-1 [installed]
usr/lib/systemd/system/systemd-backlight@.service
$So check
pacman -Qk systemdIf the file really is missing then reinstall the systemd package.
If the unit file is present then check
systemctl status systemd-backlight.sliceAnd also interrogate the journal.
Jin, Jîyan, Azadî
Offline