Brightness control problem after suspend/sleep

Hello everyone.

I installed EndeavourOS today and everything works out of the box, but my only issue (so far) is keyboard brightness control. It works until I put system to sleep. After waking it up I have no problem with brightness up, but every time I try to lower it, screen switches off instantly. To turn it back on I have to use brightness up keyboard shortcut. I know that brightness actually lowers because after switching screen back on (with brightness up key) screen is dimmed by one step (5%).
I’ve been distro hopping in last few days so I know this exact same problem also exist in other distros - Linux Mint 20.1 (5.12.9 kernel), MX 19.4 and openSUSE tumbleweed.

some system info:
inxi -Fxz
System:
  Kernel: 5.12.9-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0 
  Desktop: KDE Plasma 5.22.0 Distro: EndeavourOS base: Arch Linux 
Machine:
  Type: Laptop System: LENOVO product: 81YQ v: IdeaPad 5 15ARE05 
  serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: No DPK serial: <filter> UEFI: LENOVO 
  v: E7CN40WW date: 01/29/2021 
Battery:
  ID-1: BAT0 charge: 38.4 Wh (60.3%) condition: 63.7/70.0 Wh (90.9%) volts: 15.8 
  min: 15.2 model: Celxpert L19C4PF1 status: Unknown 
CPU:
  Info: 8-Core model: AMD Ryzen 7 4800U with Radeon Graphics bits: 64 
  type: MT MCP arch: Zen 2 rev: 1 cache: L2: 4 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 57518 
  Speed: 1397 MHz min/max: 1400/1800 MHz boost: enabled Core speeds (MHz): 
  1: 1397 2: 1572 3: 1397 4: 1396 5: 1397 6: 1397 7: 1479 8: 1397 9: 1397 
  10: 1397 11: 1397 12: 1649 13: 1464 14: 1698 15: 1397 16: 1397 
Graphics:
  Device-1: AMD Renoir vendor: Lenovo driver: amdgpu v: kernel bus-ID: 03:00.0 
  Device-2: Syntek Integrated Camera type: USB driver: uvcvideo bus-ID: 1-3:3 
  Display: x11 server: X.org 1.20.11 driver: loaded: amdgpu,ati 
  unloaded: fbdev,modesetting,vesa resolution: <missing: xdpyinfo> 
  Message: Unable to show advanced data. Required tool glxinfo missing. 
Audio:
  Device-1: AMD vendor: Lenovo driver: snd_hda_intel v: kernel bus-ID: 03:00.1 
  Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor vendor: Lenovo 
  driver: N/A bus-ID: 03:00.5 
  Device-3: AMD Family 17h HD Audio vendor: Lenovo driver: snd_hda_intel 
  v: kernel bus-ID: 03:00.6 
  Sound Server-1: ALSA v: k5.12.9-arch1-1 running: yes 
  Sound Server-2: JACK v: 0.125.0 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: yes 
  Sound Server-4: PipeWire v: 0.3.30 running: no 
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel bus-ID: 01:00.0 
  IF: wlan0 state: up mac: <filter> 
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-3:2 
  Report: This feature requires one of these tools: hciconfig/bt-adapter 
Drives:
  Local Storage: total: 476.94 GiB used: 6.98 GiB (1.5%) 
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB512HBJQ-000L2 size: 476.94 GiB 
Partition:
  ID-1: / size: 210.15 GiB used: 6.89 GiB (3.3%) fs: ext4 dev: /dev/nvme0n1p6 
  ID-2: /boot/efi size: 96 MiB used: 94.1 MiB (98.0%) fs: vfat 
  dev: /dev/nvme0n1p1 
Swap:
  ID-1: swap-1 type: partition size: 2 GiB used: 0 KiB (0.0%) 
  dev: /dev/nvme0n1p7 
Sensors:
  System Temperatures: cpu: 72.1 C mobo: N/A gpu: amdgpu temp: 44.0 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 323 Uptime: 1h 40m Memory: 15.06 GiB used: 2.94 GiB (19.5%) 
  Init: systemd Compilers: gcc: 11.1.0 Packages: 936 Shell: Bash v: 5.1.8 
  inxi: 3.3.03
and journalctl after sleep, wake up and adjusting brightness:
journalctl --since "3 minutes ago" 
-- Journal begins at Wed 2021-06-09 19:36:13 BST, ends at Thu 2021-06-10 00:41:22 BST. --
Jun 10 00:38:46 eldresso-eos plasmashell[1107]: libkcups: Create-Printer-Subscriptions last error: 1282 Błędny deskryptor pliku
Jun 10 00:38:46 eldresso-eos plasmashell[1107]: libkcups: Request failed 1282 -1
Jun 10 00:38:53 eldresso-eos kwin_x11[1024]: kwin_core: XCB error: 152 (BadDamage), sequence: 27154, resource id: 14711793, major code: 143 (DAMAGE), minor code: 2 (Destroy)
Jun 10 00:39:48 eldresso-eos systemd-logind[527]: Lid closed.
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.8285] manager: sleep: sleep requested (sleeping: no  enabled: yes)
Jun 10 00:39:48 eldresso-eos kded5[1020]: bluedevil: About to suspend
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.8287] device (p2p-dev-wlan0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.8292] manager: NetworkManager state is now ASLEEP
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.8293] device (wlan0): state change: activated -> deactivating (reason 'sleeping', sys-iface-state: 'managed')
Jun 10 00:39:48 eldresso-eos kded5[1020]: plasma-nm: Unhandled active connection state change:  3
Jun 10 00:39:48 eldresso-eos dbus-daemon[509]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service' requested by ':1.3' (uid=0 pid=512 comm="/usr/bin/NetworkMan>
Jun 10 00:39:48 eldresso-eos systemd[1]: Starting Network Manager Script Dispatcher Service...
Jun 10 00:39:48 eldresso-eos dbus-daemon[509]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jun 10 00:39:48 eldresso-eos systemd[1]: Started Network Manager Script Dispatcher Service.
Jun 10 00:39:48 eldresso-eos audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 10 00:39:48 eldresso-eos kernel: audit: type=1130 audit(1623281988.838:99): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? r>
Jun 10 00:39:48 eldresso-eos kernel: wlan0: deauthenticating from 18:35:d1:a2:8e:e1 by local choice (Reason: 3=DEAUTH_LEAVING)
Jun 10 00:39:48 eldresso-eos wpa_supplicant[887]: wlan0: CTRL-EVENT-DISCONNECTED bssid=18:35:d1:a2:8e:e1 reason=3 locally_generated=1
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.9758] device (wlan0): supplicant interface state: completed -> disconnected
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.9759] device (wlan0): state change: deactivating -> disconnected (reason 'sleeping', sys-iface-state: 'managed')
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Withdrawing address record for fe80::a3b4:18d3:dc25:d891 on wlan0.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Leaving mDNS multicast group on interface wlan0.IPv6 with address fe80::a3b4:18d3:dc25:d891.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Interface wlan0.IPv6 no longer relevant for mDNS.
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.9912] dhcp4 (wlan0): canceled DHCP transaction
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.9912] dhcp4 (wlan0): state changed bound -> terminated
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Interface wlan0.IPv4 no longer relevant for mDNS.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.16.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Withdrawing address record for 192.168.0.16 on wlan0.
Jun 10 00:39:48 eldresso-eos NetworkManager[512]: <info>  [1623281988.9938] device (wlan0): set-hw-addr: set MAC address to 3A:83:BD:8E:3A:9B (scanning)
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Joining mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.16.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: New relevant interface wlan0.IPv4 for mDNS.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Registering new address record for 192.168.0.16 on wlan0.IPv4.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Withdrawing address record for 192.168.0.16 on wlan0.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Leaving mDNS multicast group on interface wlan0.IPv4 with address 192.168.0.16.
Jun 10 00:39:48 eldresso-eos avahi-daemon[508]: Interface wlan0.IPv4 no longer relevant for mDNS.
Jun 10 00:39:49 eldresso-eos NetworkManager[512]: <info>  [1623281989.0020] device (wlan0): state change: disconnected -> unmanaged (reason 'sleeping', sys-iface-state: 'managed')
Jun 10 00:39:49 eldresso-eos NetworkManager[512]: <info>  [1623281989.0039] device (wlan0): set-hw-addr: reset MAC address to A8:7E:EA:00:5C:DF (unmanage)
Jun 10 00:39:49 eldresso-eos systemd[1]: Reached target Sleep.
Jun 10 00:39:49 eldresso-eos systemd[1]: Starting Suspend...
Jun 10 00:39:49 eldresso-eos kded5[1020]: plasma-nm: Not emitting connection deactivated notification as we're about to suspend
Jun 10 00:39:49 eldresso-eos kded5[1020]: plasma-nm: Network connectivity limited, scheduling notification
Jun 10 00:39:49 eldresso-eos wpa_supplicant[887]: nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
Jun 10 00:39:49 eldresso-eos wpa_supplicant[887]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Jun 10 00:39:49 eldresso-eos systemd-sleep[105086]: Suspending system...
Jun 10 00:39:49 eldresso-eos kernel: PM: suspend entry (deep)
Jun 10 00:39:49 eldresso-eos PackageKit[1225]: get-updates transaction /19_aecbccdd from uid 1000 finished with success after 184ms
Jun 10 00:40:15 eldresso-eos kernel: Filesystems sync: 0.008 seconds
Jun 10 00:40:15 eldresso-eos kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
Jun 10 00:40:15 eldresso-eos kernel: OOM killer disabled.
Jun 10 00:40:15 eldresso-eos kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

There are currently a number of issues with kernel 5.12. Try linux-lts (5.10) and see if that helps.

1 Like

Just tried it. Unfortunately it haven’t fixed my problem

Hello, @eldresso! I had symilar problem on my laptop.
Check output of this command in terminal:
systemctl --failed

If you get something like

● systemd-backlight@backlight:acpi_video0.service loaded failed failed Load/Save Screen Backlight Brightness of backlight:acpi_video0

go to this topic to find solution:

1 Like

Just to note we never actually resolved the problem.

@aleksmn I went throught the topic you linked. TL;DR still haven’t found fix

long version

no changes to acpi_backlight

works before sleep, problems after wake up

$ systemctl --failed
  UNIT                                            LOAD   ACTIVE SUB    DESCRIPTION                                                   
● systemd-backlight@backlight:acpi_video0.service loaded failed failed Load/Save Screen Backlight Brightness of backlight:acpi_video0

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
$ systemctl status systemd-backlight@backlight:acpi_video0.service
× systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: failed (Result: exit-code) since Thu 2021-06-10 12:12:53 BST; 57s ago
       Docs: man:systemd-backlight@.service(8)
    Process: 866 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:acpi_video0 (code=exited, status=1/FAILURE)
   Main PID: 866 (code=exited, status=1/FAILURE)
        CPU: 4ms

Jun 10 12:12:53 eldresso-eos systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:acpi_video0...
Jun 10 12:12:53 eldresso-eos systemd-backlight[866]: Failed to get backlight or LED device 'backlight:acpi_video0': No such device
Jun 10 12:12:53 eldresso-eos systemd[1]: systemd-backlight@backlight:acpi_video0.service: Main process exited, code=exited, status=1/FAILURE
Jun 10 12:12:53 eldresso-eos systemd[1]: systemd-backlight@backlight:acpi_video0.service: Failed with result 'exit-code'.
Jun 10 12:12:53 eldresso-eos systemd[1]: Failed to start Load/Save Screen Backlight Brightness of backlight:acpi_video0.
acpi_backlight=video

same behaviour as default

$ systemctl --failed
  UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
$ systemctl status systemd-backlight@backlight:acpi_video0.service
● systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: active (exited) since Thu 2021-06-10 11:46:28 BST; 3min 27s ago
       Docs: man:systemd-backlight@.service(8)
    Process: 891 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:acpi_video0 (code=exited, status=0/SUCCESS)
   Main PID: 891 (code=exited, status=0/SUCCESS)
        CPU: 3ms
acpi_backlight=vendor

brightness control doesn’t work at all

$ systemctl --failed
  UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
$ systemctl status systemd-backlight@backlight:acpi_video0.service
○ systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: inactive (dead)
       Docs: man:systemd-backlight@.service(8)
acpi_backlight=native

same behaviour as default

$ systemctl --failed
  UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.
$ systemctl status systemd-backlight@backlight:acpi_video0.service
○ systemd-backlight@backlight:acpi_video0.service - Load/Save Screen Backlight Brightness of backlight:acpi_video0
     Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
     Active: inactive (dead)
       Docs: man:systemd-backlight@.service(8)
1 Like

I’ve got :arrow_double_down: machine:

inxi -MCGz
Machine:   Type: Laptop System: LENOVO product: 82A2 v: Yoga Slim 7 14ARE05 serial: <filter> 
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN serial: <filter> UEFI: LENOVO v: DMCN38WW date: 01/18/2020 
CPU:       Info: 8-Core model: AMD Ryzen 7 4800U with Radeon Graphics bits: 64 type: MT MCP cache: L2: 4 MiB 
           Speed: 1397 MHz min/max: 1400/1800 MHz Core speeds (MHz): 1: 1397 2: 1397 3: 1397 4: 1397 5: 1397 6: 1397 7: 1397 
           8: 2283 9: 1381 10: 1397 11: 1293 12: 1397 13: 1397 14: 1364 15: 1397 16: 1397 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Renoir driver: amdgpu v: kernel 
           Device-2: Chicony Integrated Camera type: USB driver: uvcvideo 
           Display: wayland server: X.org 1.20.11 driver: loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa 
           

and the two services in charge of screen and keyboard backlight seem to be:

systemd-backlight@backlight:amdgpu_bl0.service 
systemd-backlight@leds:platform::kbd_backlight.service
$ 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)
Active: active (exited) since Thu 2021-06-10 08:48:03 CEST; 6h ago
Docs: man:systemd-backlight@.service(8)
Process: 972 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=0/SUCCESS)
Main PID: 972 (code=exited, status=0/SUCCESS)
CPU: 7ms

$ systemctl status systemd-backlight@leds:platform::kbd_backlight.service

● systemd-backlight@leds:platform::kbd_backlight.service - Load/Save Screen Backlight Brightness of leds:platform::kbd_backlight
Loaded: loaded (/usr/lib/systemd/system/systemd-backlight@.service; static)
Active: active (exited) since Thu 2021-06-10 08:48:02 CEST; 5h 57min ago
Docs: man:systemd-backlight@.service(8)
Process: 728 ExecStart=/usr/lib/systemd/systemd-backlight load leds:platform::kbd_backlight (code=exited, status=0/SUCCESS)
Main PID: 728 (code=exited, status=0/SUCCESS)
CPU: 6ms

I have disabled

systemd-backlight@backlight:acpi_video0.service

and things seem to be running fine.
Perhaps something you might want to investigate further.

2 Likes

Sorry to hear, this is obviously not easy to fix problem… For me ‘acpi_backlight=video’ was enough.

1 Like

@pebcak I have been searching for solution and found this

then found your reply here.
So i followed it

$ ls /sys/class/backlight
amdgpu_bl0

I disabled/masked acpi_video0.service systemctl mask systemd-backlight@backlight:acpi_video0.service and rebooted.
I got rid of error that was showing after systemctl --failed, but it didn’t fix my issue, even that systemctl status systemd-backlight@backlight:acpi_video0.service gives me no errors

● 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: active (exited) since Thu 2021-06-10 14:25:37 BST; 16min ago
       Docs: man:systemd-backlight@.service(8)
    Process: 2762 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=0/SUCCESS)
   Main PID: 2762 (code=exited, status=0/SUCCESS)
        CPU: 7ms

Jun 10 14:25:37 eldresso-eos systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
Jun 10 14:25:37 eldresso-eos systemd[1]: Finished Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.

edit:
only backlight services I have running are systemd-backlight@backlight:amdgpu_bl0.service and system-systemd\x2dbacklight.slice
Keyboard backlight works fine

edit2:
should I try changing grub options with amdgpu_bl0 like I did with acpi_video0 or it doesn’t work this way?

I am afraid I would’nt know that. I haven’t had to do any of the kernel boot parameters stuff. You could have a look at the following passage from Archwiki and see if it is related to you you issue somehow:

https://wiki.archlinux.org/title/Backlight#Backlight_is_always_at_full_brightness_after_a_reboot_with_amdgpu_driver