pop-os / pop

A project for managing all Pop!_OS sources
https://system76.com/pop
2.43k stars 84 forks source link

AMD backlight controls no longer work on Linux 6.1.11 and 6.2.0 #2819

Open ricmzn opened 1 year ago

ricmzn commented 1 year ago

Distribution:

Pop!_OS 22.04

Related Application and/or Package Version:

linux-generic:
  Installed: 6.2.0.76060200.202302191831~1677858327~22.04~3cea1be

nvidia-driver-525:
  Installed: 525.85.05-1pop0~1676919314~22.04~a968599

Issue/Bug Description:

Since updating to Linux 6.1.11 a few days ago, and even after updating to 6.2.0 today, backlight controls no longer work on my system, which means the integrated display is stuck at full brightness. Gnome still sees the backlight device, but the slider has no effect on the physical brightness of the display. /sys/class/backlight/amdgpu_bl0 is also present, and the brightness file there correctly follows the Gnome slider value. Writing directly to the file also has no effect (the value can be read back again, but the screen is still at max brightness).

Steps to reproduce:

Not applicable, it seems to be system-dependent. Reverting to Linux 5.19 (via the Ubuntu HWE kernel branch) restores backlight control (but breaks the Nvidia driver because it's too old). I don't have a previous Pop kernel version ready to install (and oldkern has been overwritten with a broken version), but 6.0.12 had working backlight controls.

Expected behavior:

Changing backlight values (through gnome or sysfs) should cause the screen to brighten or dim as requested.

Other Notes:

Affected kernel versions: 6.1.11 and 6.2.0 Unaffected kernel versions: 5.19.0 (Ubuntu HWE branch) and 6.0.12 (what I was running prior to the upgrade)

I'm using the kernel-provided amdgpu driver with the Pop-provided Nvidia driver.

The issue happens on all three graphics modes (Integrated, Hybrid, Nvidia). There is no nvidia backlight device in sysfs in any mode, only amdgpu_bl0, which seems correct as the internal display is physically connected to the AMD GPU.

I have seen an workaround mentioned in #2227, but it does not apply to my system (no Nvidia backlight device, and the AMD backlight value is being written to, just not respected by hardware). I also had working backlight from drivers 510 through 525, and I still have it on the latest driver with an older kernel.

Other attempted fixes:

System specs: Dell G15 5515 (Laptop) with BIOS 1.7.1 Ryzen 7 5800H Nvidia RTX 3060 Max-Q

Newer BIOS updates from Dell only seem to contain CVE fixes, not related to Linux compatibility.

Kernelstub configuration:

    OS:..................Pop!_OS 22.04
    Root partition:....../dev/dm-1
    Root FS UUID:........bfb1fbcc-9265-4a5b-b24d-daf57b1055e7
    ESP Path:............/boot/efi
    ESP Partition:......./dev/nvme0n1p1
    ESP Partition #:.....1
    NVRAM entry #:.......-1
    Boot Variable #:.....0000
    Kernel Boot Options:.splash loglevel=0 systemd.show_status=false quiet
    Kernel Image Path:.../boot/vmlinuz-6.2.0-76060200-generic
    Initrd Image Path:.../boot/initrd.img-6.2.0-76060200-generic
    Force-overwrite:.....False

Possibly related issues: #1976, #2026

ricmzn commented 1 year ago

Anyone have tips for bisecting the kernel patch that caused this? I can try compiling and running a few versions this week or in the weekend.

ricmzn commented 1 year ago

I have found and installed old Pop kernel packages from my apt cache, and can confirm that 6.0.12 still has working backlight controls.

blazing-panda commented 1 year ago

I run into the same Issues on my Lenovo Thinkbook 16p2 with an integrated AMD graphic cards and a discrete NVIDIA RTX 3060. Can't adjust brightness for neither.

ricmzn commented 1 year ago

The issue is still present on 6.2.6 using default settings, however I found an upstream bug report with a workaround: https://bugzilla.kernel.org/show_bug.cgi?id=216138 (adding acpi_backlight=nvidia_wmi_ec to the kernel command line), which works on my laptop.

abhinav-0401 commented 1 year ago

Even on other distributions with kernel 6.2.x, the issue is still there. Are there any fixes in sight or any patches?

adrianoasg commented 10 months ago

This brightness problem is really annoying! Nobody tests this? Now the Nvidia 545 Driver has come out and made everything worse! Before this driver in Pop Os 22.04 using any kernel up to 6.5, all you had to do was disable AMD's VGA in the BIOS and you could change the brightness, now that's not the case. Congratulations to those involved!

leviport commented 10 months ago

@adrianoasg We can't possibly test every piece of hardware in the world. I understand it's frustrating, but please keep it civil, and keep in mind that we have a code of conduct.

adrianoasg commented 10 months ago

Sorry, I'm sorry if I offended anyone! I've been having problems with AMD and Nvidia drivers for a year now and no one has resolved it yet, since I bought the laptop. I just wanted to show my indignation! As I am not fluent in English I used a translator so words may have been taken out of context. I was able to resolve this issue by switching back to the Nvidia Driver 470. Unfortunately I still have to disable the onboard AMD VGA. This is a problem for battery usage. Configuration Laptop Dell G15 Ryzen 5800H processor, vga rtx 3060.

Fcommander181 commented 2 months ago

i have lenovo Ideapad gaming 3 with Ryzen 5 4600h and nvidia gtx 1650ti when i've installed pop os i can't adjust brightness but when i've used the steps below it worked !

if you have amd integrated gpu i guess you should check cmdline by typing this command :

use this command : cat /proc/cmdline

if you find acpi_backlight="something" just delete it by using this

command : sudo kernelstub -d "acpi_backlight='something

NB : i mean by something : the option you have (video,vendor,native,none)

after that use this command :

sudo kernelstub -a "amdgpu.backlight=0"

then reboot . i hope it would work because it worked for me