You are not logged in.

#1 2020-07-31 06:53:21

digitalone
Member
Registered: 2011-08-19
Posts: 281

Cannot restore backlight on AMD VGA after systemd upgrade

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

#2 2020-07-31 07:03:59

digitalone
Member
Registered: 2011-08-19
Posts: 281

Re: Cannot restore backlight on AMD VGA after systemd upgrade

As I thought, downgrading the 3 packages to the previous version is working.

Offline

#3 2020-08-03 00:11:03

glenb77
Member
Registered: 2014-10-02
Posts: 52

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#4 2020-08-04 02:50:46

jpegxguy
Member
From: Earth
Registered: 2018-06-18
Posts: 22

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#5 2020-08-04 02:52:21

jpegxguy
Member
From: Earth
Registered: 2018-06-18
Posts: 22

Re: Cannot restore backlight on AMD VGA after systemd upgrade


hi

Offline

#6 2020-08-15 14:35:36

navarroaxel
Member
Registered: 2018-11-04
Posts: 21

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#7 2020-08-17 01:45:02

Mortimer Houghton
Member
Registered: 2014-09-28
Posts: 71

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#8 2020-08-17 07:12:48

koroki
Member
Registered: 2013-08-03
Posts: 38

Re: Cannot restore backlight on AMD VGA after systemd upgrade

jpegxguy wrote:

Thanks!

I come for exactly that.

Offline

#9 2020-08-18 08:03:17

jpegxguy
Member
From: Earth
Registered: 2018-06-18
Posts: 22

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#10 2020-10-19 09:29:24

jpegxguy
Member
From: Earth
Registered: 2018-06-18
Posts: 22

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#11 2020-10-31 18:47:39

drew_klx300
Member
Registered: 2020-10-31
Posts: 2

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#12 2020-10-31 19:20:38

drew_klx300
Member
Registered: 2020-10-31
Posts: 2

Re: Cannot restore backlight on AMD VGA after systemd upgrade

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

#13 2020-11-17 11:30:48

Tids
Member
Registered: 2016-02-04
Posts: 5

Re: Cannot restore backlight on AMD VGA after systemd upgrade

jpegxguy wrote:

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

Board footer

Powered by FluxBB