You are not logged in.
Updated the following packages:
systemd-libs (245.6-8 -> 245.7-1)
systemd (245.6-8 -> 245.7-1)
systemd-sysvcompat (245.6-8 -> 245.7-1)
The kernel is not changed, which is 5.7.10. mesa and xf86-video-amdgpu are to the latest version.
VGA and backlight driver are:
$ lspci
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R3 Graphics] (rev 40)
$ ls /sys/class/backlight/
amdgpu_bl0
At the reboot, the backlight is not restored. What's interesting is that systems service is not showing any error, but it keeps not restoring the backlight,
$ systemctl status systemd-backlight@backlight:amdgpu_bl0.service
● systemd-backlight@backlight:amdgpu_bl0.service - Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0
Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static; vendor preset: disabled)
Active: active (exited) since Fri 2020-07-31 08:26:17 CEST; 8min ago
Docs: man:systemd-backlight@.service(8)
Process: 277 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=0/SUCCESS)
Main PID: 277 (code=exited, status=0/SUCCESS)
Is it a systemd bug? I'm pretty sure if I disable the service and set up brillo, it will work as expected.
Offline
As I thought, downgrading the 3 packages to the previous version is working.
Offline
i have same issue also with those systemd upgrades with amd backlight. i also tried to force with kernel parameter but no luck. other than downgrade any known workaround for this ?
Offline
Also happening on
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso [1002:15d8] (rev c2)
It used to be like yours (not failing as a service, but failing in its function).
amdgpu_bl0: Saved brightness <SOME 4 FIGURE NUMBER HERE> too high; decreasing to 255.
I just rebooted on Linux 5.8 and I saw it fail for the first time. Maybe it was a race condition though...
● systemd-backlight@backlight:amdgpu_bl0.service - Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0
Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
Active: failed (Result: exit-code) since Tue 2020-08-04 05:41:00 EEST; 5min ago
Docs: man:systemd-backlight@.service(8)
Process: 331 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=1/FAILURE)
Main PID: 331 (code=exited, status=1/FAILURE)
Αυγ 04 05:41:00 systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
Αυγ 04 05:41:00 systemd-backlight[331]: amdgpu_bl0: Saved brightness 25443 too high; decreasing to 255.
Αυγ 04 05:41:00 systemd-backlight[331]: amdgpu_bl0: Failed to write system 'brightness' attribute: No such device or address
Αυγ 04 05:41:00 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Main process exited, code=exited, status=1/FAILURE
Αυγ 04 05:41:00 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Failed with result 'exit-code'.
Αυγ 04 05:41:00 systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.
hi
Offline
This is interesting... https://wiki.archlinux.org/index.php/AS … #Backlight
hi
Offline
Thanks for the tip, this works https://wiki.archlinux.org/index.php/AS … #Backlight!
Last edited by navarroaxel (2020-08-15 21:13:58)
Offline
I got my system to restore backlight settings by appending the kernel parameter "acpi_backlight=video" (see Backlight:Kernel command-line options)
This worked, but it did have the unintended consequence of making my backlight FN keys work automatically (so that there was a conflicting behavior as I had assigned a keybind to these). I commented out the keybind (in my Sway config), and now everything is working as intended.
Last edited by Mortimer Houghton (2020-08-17 01:49:08)
Offline
This is interesting... https://wiki.archlinux.org/index.php/AS … #Backlight
Thanks!
I come for exactly that.
Offline
Seems like the patch is on its way to get merged. Don't know if it will get backported (I hope...)
https://lore.kernel.org/lkml/CADnq5_OaT … gmail.com/
hi
Offline
Did this patch actually land in Linux 5.9? (the "Applied, thanks!" suggests so)
Because now I get this:
Οκτ 19 11:01:45 systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
Οκτ 19 11:01:45 systemd-backlight[331]: amdgpu_bl0: Failed to write system 'brightness' attribute: No such device or address
Οκτ 19 11:01:45 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Main process exited, code=exited, status=1/FAILURE
Οκτ 19 11:01:45 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Failed with result 'exit-code'.
Οκτ 19 11:01:45 systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.
Of course the service works normally if I restart it so it seems that the brightness or (probably) the amdgpu_bl0 node doesn't exist when the service runs. Why?
Last edited by jpegxguy (2020-10-19 09:29:50)
hi
Offline
I am in the same situation of wondering if the change got included in 5.9 kernel.
Restarting systemd-backlight@backlight\:amdgpu_bl0 restores my backlight setting when run manually, but not on startup as it should.
I also suspect it has not been created at the time the service has run. It should be possible to delay or make it wait on.
● systemd-backlight@backlight:amdgpu_bl0.service - Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0
Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
Active: failed (Result: exit-code) since Sat 2020-10-31 14:33:25 EDT; 23s ago
Docs: man:systemd-backlight@.service(8)
Process: 947 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=1/FAILURE)
Main PID: 947 (code=exited, status=1/FAILURE)Oct 31 14:33:25 Ideapad5 systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
Oct 31 14:33:25 Ideapad5 systemd-backlight[947]: amdgpu_bl0: Failed to write system 'brightness' attribute: No such device or address
Oct 31 14:33:25 Ideapad5 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Main process exited, code=exited, status=1/FAILURE
Oct 31 14:33:25 Ideapad5 systemd[1]: systemd-backlight@backlight:amdgpu_bl0.service: Failed with result 'exit-code'.
Oct 31 14:33:25 Ideapad5 systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.
Offline
jpegxguy,
I came up with a work around. The screen starts at full brightness then restores once this new systemd service runs.
cat /usr/lib/systemd/system/fix-brightness.service
[Unit]
Description= run this last so it works right[Service]
Type=idle
ExecStart=/home/drew/fix-brightness.sh[Install]
WantedBy=multi-user.target
cat fix-brightness.sh
#! /bin/bash
systemctl start systemd-backlight@backlight\:amdgpu_bl0
systemctl enable fix-brighness makes it run on reboot.
idle means run it last, which I think is mainly intended or debug. There should be a after= that works as well, but I don't know enough about systemd to figure that out.
Offline
Did this patch actually land in Linux 5.9? (the "Applied, thanks!" suggests so)
It was applied to 5.8.6 and it looks like it wasnt for next (5.9)
EDIT:
Need to correct myself. patch is in 5.9. But for some reason it still doesn't work
EDIT2:
It only happens for me with kernel option "quiet". So no silent boot for me.
Check your
journalctl -b -u systemd-backlight@backlight:amdgpu_bl0.service
If it tells you
amdgpu_bl0: Failed to write system 'brightness' attribute: No such device or address
systemd tries to restore before the backlight system is up. I could workaround this by booting without "quiet" option
Last edited by Tids (2020-11-17 13:13:45)
Offline
systemd tries to restore before the backlight system is up. I could workaround this by booting without "quiet" option
Exactly
This bug still exists in kernel 5.9
Hasn't someone found a solution?
Offline
try configuring Early KMS , it often solves race conditions like this.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
try configuring Early KMS , it often solves race conditions like this.
I added amdgpu to modules
Now it looks like this:
MODULES=(amdgpu)
Then I regenerated initframs:
mkinitcpio -P
After reboot, the problem still remains
Offline
It's a shame.
https://github.com/systemd/systemd/issues/17826
https://bugzilla.kernel.org/show_bug.cgi?id=203905
Last edited by digitalone (2020-12-19 21:54:24)
Offline
i just found out that the bug with backlight restoration on boot does not occur when you add
fbcon=nodefer
to the kernel params. So something must be wrong with the deferred takeover
Offline
OpenSuse has a temporary fix on this issue.
Offline
I just tried with fbcon=nodefer passed to the kernel, and it does work!
But then of course, I don't get the manufacturer logo pleasantly showing up, just a couple of black screens with varying brightness.
I wanted to say that I my solution until now had been to set
Restart=on-failure
RestartSec=5s
in a service override for systemd-backlight@backlight\:amdgpu_bl0.service, but I had also tried
BindsTo=sys-devices-pci0000:00-0000:00:08.1-0000:04:00.0-backlight-amdgpu_bl0.device
After=sys-devices-pci0000:00-0000:00:08.1-0000:04:00.0-backlight-amdgpu_bl0.device
to no avail.
Interesting posts over in the openSUSE bugzilla, but that requires patching amdgpu, and we don't even know if it's the best way to solve the problem.
hi
Offline
Without a kernel patch, the choice is between
1) fbcon=nodefer: no error, but no manufacturer logo
2) manufacturer logo. but visible boot error on first run of the backlight restore service.
you don't need the RestartSec=5s that I have there. Basically it fails only the first time. The Restart=on-failure is just another way of accomplishing what the dummy service mentioned here is doing: rerunning the service, which succeds the second time.
For now I'll keep the pretty logo. the error message goes away when getty appears anyhow, so it's only visible for some milliseconds. Of course, I'd rather it wasn't there at all.
Last edited by jpegxguy (2021-03-03 03:29:44)
hi
Offline
Or you can disable systemd backlight restoration service and enable a specific service for brillo.
Offline
It's possible to prevent the error while keeping the logo by printing something to console just before restoring brightness. This is what i used:
[Unit]
Description=Print something to console to fix brightness
DefaultDependencies=no
Before=systemd-backlight@backlight:amdgpu_bl0.service
[Service]
Type=oneshot
ExecStart=/bin/echo
StandardOutput=tty
[Install]
WantedBy=systemd-backlight@backlight:amdgpu_bl0.service
Offline
I did it with this
cat /etc/systemd/system/startup-brightness.service
[Unit]
Description=Set lower brightness on startup
After=systemd-backlight@backlight:amdgpu_bl0.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'echo 25 > /sys/class/backlight/amdgpu_bl0/brightness'
ExecStart=systemctl start --now systemd-backlight@backlight:amdgpu_bl0
[Install]
WantedBy=systemd-backlight@backlight:amdgpu_bl0.service
WantedBy=multi-user.target
Offline
Hi, I'm using 5.14.0-rc1-1-mainline while testing for a different issue https://bbs.archlinux.org/viewtopic.php?id=266358
(miffe's repo)
And on this version so far I haven't seen systemd-backlight fail during system boot. Try it as well
hi
Offline