Disable Automatic Brightness Adjustment

Hello,

I’ve been having an “issue” lately that has been quite annoying to fix, however, haven’t been able to find a solution for it.

I’ve got this laptop which is running an integrated amd vega (8 I think) gpu.

Lately, it’s been pretty common to have my screen brightness to adjust by itself, which is kind of annoying even though I might want to have it full bright or no brightness at all and it just keeps changing the brightness level all the time.

I’m running KDE Plasma.

LSPCI:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir Device 24: Function 7
01:00.0 Network controller: MEDIATEK Corp. MT7921K (RZ608) Wi-Fi 6E 80MHz
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
03:00.0 Non-Volatile memory controller: Sandisk Corp Device 5014
04:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne (rev c1)
04:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller
04:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
04:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
04:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] ACP/ACP3X/ACP6x Audio Coprocessor (rev 01)
04:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller

I can find the sys folder where it is located, however there isn’t any file that allows me to change adaptive brightness or something. (neither on kde system settings).

Is there any way to figure out how to disable this automatic change of brightness? Would finding which device manages it and add that functionality, if possible, to the blacklist be a good approach?

Thanks in advance.

Plasma should lower brightness after some inactivity and raise back when active again ie. when you move your mouse. If that’s what you are experiencing open system settings and go to “power saving” tab, you can disable screen dimming there.

No. Whenever I’m coding, for example, the brightness keeps changing sometimes.

Also, whenever I close my lid / put the pc do AC Power it takes some time for kde to actually register it.

Seems like just another Windoze-induced KDE-feature!
Most certainly not a bug…

:clown_face:

If this is not some kde bug, this sounds like your laptop has ambient light sensor and can adjust the brightness depending on the light conditions in your environment.

Your lspci shows too little details, but check if you have something like this in your sysfs (This is the output from my laptop with ALS)

/sys/bus/iio/devices/iio:device0/in_illuminance_raw

The folder /sys/bus/iio does not exist on my system.

I was able to find this though.

Since this is related to amdgpu backlight, I supose it won’t affect my keyboards backlight (?)

What does this show?

systemctl status systemd-backlight@backlight:amdgpu_bl0
systemctl status systemd-backlight@backlight:amdgpu_bl0
● 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 Wed 2023-01-25 16:16:36 WET; 18h ago
       Docs: man:systemd-backlight@.service(8)
    Process: 764 ExecStart=/usr/lib/systemd/systemd-backlight load backlight:amdgpu_bl0 (code=exited, status=0/SUCCESS)
   Main PID: 764 (code=exited, status=0/SUCCESS)
        CPU: 12ms

jan 25 16:16:36 EduLaptop systemd[1]: Starting Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0...
jan 25 16:16:36 EduLaptop systemd[1]: Finished Load/Save Screen Backlight Brightness of backlight:amdgpu_bl0.
1 Like

So did you try using acpi_backlight=video as a kernel parameter?

On the grub cmdline default?

Yes depending on whether you have grub or systemd-boot? If grub yes and then update grub.

Ok, grub updated. I will restart the machine and see if the problem persists during today & tomorrow.

So you added it to /etc/default/grub command line and then ran sudo grub-mkconfig -o /boot/grub/grub.cfg ?

1 Like

Do I have to add it to CMDLINE or CMDLINE_DEFAULT? (I added to cmdline default)

I tried to change my brightness and it’s not changing… no matter if it’s on 0% or 100%

You add it to this line, save the file and then run the update grub command. But you need to reboot also.
Example:

GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES amd_pstate=passive loglevel=3'

That’s where I edited it. I can’t change my brightness since I changed that config

(removing acpi_backlight=video from the grub cmdline allowed me to change the brightness. Do I need to install any extra packages from the AUR?)

No… backlighting should work from the hardware without any extra packages. I didn’t know if you had it working or not. Some hardware requires a certain kernel parameter. If it’s working for you then you don’t need to do anything. It either works or it doesn’t. It’s hard to follow these threads when other users jump in on the same issue. It’s hard to know if your issue is resolved unless you say it’s working or not. If it is then you should mark what solved it.

Well, the issue is not solved since my main problem is that the brightness adapts automatically and changes its value. That’s what I’m trying to fix.

My laptops do that too. They have an auto adjustment. I just set it where i want when using it. I don’t use my laptops often so i don’t know if it’s really an issue for me. I’m not sure i understand what your issue is with it?

Edit: There are numerous backlight control applications or packages in the AUR if that is what you are looking for? I just adjust mine with the controls that are on the laptops. I really don’t have any issue with it! :man_shrugging:

I just want to disable the auto adjustment. I want to leave that adjustment completely manual.