Score:1

Screen Backlight not turning back on after resume (and cannot change display brightness in ubuntu 20.04)

cn flag

I have a HP Zbook Fury 15 G7 with Nvidia RTX5000 GPU. I installed Ubuntu 20.04 LTS

When I resume after suspend, the screen of the laptop display stays black (but pixels are being drawn and updated, it's just extremely dim) the secondary display works fine.

When I press the screen brightness buttons, Ubuntu shows the widget so it's seemingly changing the brightness, but it is not. When inspecting

/sys/class/backlight/

I found that there is no entry for the Nvidia GPU, ls /sys/class/backlight/

intel_backlight

When I press the screen brightness buttons, the value changes accordingly there

$ cat /sys/class/backlight/intel_backlight/actual_brightness 
252

press buttons

$ cat /sys/class/backlight/intel_backlight/actual_brightness 
131

The main problem for me is that upon resume, the screen brightness is set at zero for the NVidia card, it resumes fine, but the screen remains black, I can see the login screen very (unusable) dim, If i connect a second screen it pops up fine...

I'm actually hoping that fixing this problem will fix my suspend/resume.

  • I tried downgrading nvidia to 460 (back on 470 now)
  • I tried the nouveau driver but it constantly glitches, and does not fix the brightness nor sleep problem
  • I tried using the intel card, but for some reason that does not fix the problem

[BIG EDIT]

I did some more testing:

I added

Option "RegistryDwords" "EnableBrightnessControl=1"

to usr/share/X11/xorg.conf.d/10-nvidia.conf

I booted with

BOOT_IMAGE=/boot/vmlinuz-5.11.0-37-generic root=UUID=hidden ro quiet splash acpi_backlight=native vt.handoff=7

then I have no /sys/class/backlight entry (besides intel_backlight) buttons change /sys/class/backlight/intel_backlight/actual_brightness but xbacklight -set 50 does not work (no error, no change of /sys/class/backlight/intel_backlight/actual_brightness

changing grub parameters to

BOOT_IMAGE=/boot/vmlinuz-5.11.0-37-generic root=UUID=hidden ro quiet splash acpi_backlight=video vt.handoff=7

I suddenly have

$ ls /sys/class/backlight 
acpi_video0/     acpi_video1/     intel_backlight/

using the brightness keys changes both acpi_video0

$ cat /sys/class/backlight/acpi_video0/actual_brightness 
98

pressing button on keyboard>>>

$ cat /sys/class/backlight/acpi_video0/actual_brightness 
37
$ cat /sys/class/backlight/acpi_video1/actual_brightness 
38
$ cat /sys/class/backlight/acpi_video1/actual_brightness

for some reason there is an offset of 1 between acpi_video0 and acpi_video1 but it is not always reproduceablea nor is it alway +1 or -1 (rounding error?)

$ cat /sys/class/backlight/intel_backlight/actual_brightness 
255

intelbacklight stays fixed at 255

changing grub again

BOOT_IMAGE=/boot/vmlinuz-5.11.0-37-generic root=UUID=hidden ro quiet splash acpi_backlight=vendor vt.handoff=7

yields same behaviour as "acpi_backlight=native"

changing grub again

BOOT_IMAGE=/boot/vmlinuz-5.11.0-37-generic root=UUID=hidden ro quiet splash acpi_backlight=video video.use_native_backlight=1 vt.handoff=7

reboot, didn't work I removed

Option "RegistryDwords" "EnableBrightnessControl=1"

from usr/share/X11/xorg.conf.d/10-nvidia.conf

reboot changed the video.use_native_backlight=1 to video.use_native_backlight=0 didn't work reboot

looking at the /sys/class/backlight directory I found that acpi_video0 is actually the nvidia card... it's just not listening

$ ll /sys/class/backlight
total 0
drwxr-xr-x  2 root root 0 Sep 30 14:53 ./
drwxr-xr-x 83 root root 0 Sep 30 14:53 ../
lrwxrwxrwx  1 root root 0 Sep 30 14:53 acpi_video0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video0/
lrwxrwxrwx  1 root root 0 Sep 30 14:53 acpi_video1 -> ../../devices/pci0000:00/0000:00:02.0/backlight/acpi_video1/
lrwxrwxrwx  1 root root 0 Sep 30 14:53 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card1/card1-eDP-1/intel_backlight/

I tried switching to the terminal (Ctrl-Alt-F3) running xbacklight -set 50 returns an XRANDR error but I guess related to the fact that I'm not in X

reboot

BOOT_IMAGE=/boot/vmlinuz-5.11.0-37-generic root=UUID=hidden ro quiet splash acpi_backlight=none video.use_native_backlight=1 vt.handoff=7

is back again missing the /sys/class/backlight/ device links

I did run update-grub after each /etc/default/grub edit, and I verified the boot params with cat /proc/cmdline after each boot

I found out that using xrandr I can change the brightness of the display (of any display) but I also found out in this nvidia post that this is not actually changing the backlight brightness, but rather the pixel gamma before being sent to the display. This means it can never solve my problem (display backlight turned off on resume) at least not for the main laptop display, the secondary display just works fine

the events are being written to the "acpi video device" but the nvidia GPU is not picking them up

$ acpi_listen 
video/brightnessdown BRTDN 00000087 00000000 K
video/brightnessup BRTUP 00000086 00000000 K
David avatar
cn flag
This link says HP certainly supports Ubuntu. https://h20195.www2.hp.com/v2/GetPDF.aspx/4aa7-8456enw.pdf
cn flag
You're right, thanks for the link. All my hardware but the fingerprint sensor and the IR-camera are supported... but I cannot get support for it from them.
cn flag
when using ubuntu-studios kernel 5.4.0-91-lowlatency, sleep at least works, still cannot change the display brightness though.
br flag
Exactly the same here, Lenovo Legion 5 16" AMD integrated graphics with NVIDIA running the external displays. Really wish i could have got a machine without NVIDIA graphics... 5.13.0-22-generic and 4.70 nvidia drivers.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.