Change brightness

Hello,

I want to be able to use XF86MonBrightnessUp and XF86MonBrightnessDown to adjust brightness levels on my laptop.

System Information:

  • Kernel: 6.5.4-arch2-1
  • Device: HP Pavilion Aero Laptop 13
  • GPU: AMD ATI Radeon Vega Series
  • OS: EndeavourOS Linux x86_64
  • Window Manager: i3wm

Here is what I have tried so far:

According to arch wiki, xbacklight only works with intel GPU, and running it manually gives me No outputs have backlight property.

bindsym XF86MonBrightnessUp exec xbacklight +10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"
bindsym XF86MonBrightnessDown exec xbacklight -10 && notify-send "Brightness - $(xbacklight -get | cut -d '.' -f 1)%"

This was commented out in the default i3 config but it just displays the brightness notification but does not change the brightness at all.

bindsym XF86MonBrightnessUp exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_up
bindsym XF86MonBrightnessDown exec --no-startup-id ~/.config/i3/scripts/volume_brightness.sh brightness_down

brightnessctl doesn’t seem to work either.

bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-

looks like running brightnessctl manually does something but I can’t tell the difference.

$ brightnessctl set 5
Updated device 'amdgpu_bl1':
Device 'amdgpu_bl1' of class 'backlight':
	Current brightness: 25 (10%)
	Max brightness: 255

xrandr seems to be the most promising, it changes the brightness, but anything above 1 makes the screen whiter more than brighter.

xrandr --output eDP --brightness 1.5

Notes

you might find this helpful

$ ls -l /sys/class/backlight
lrwxrwxrwx 1 root root 0 Sep 26 18:06 amdgpu_bl1 -> ../../devices/pci0000:00/0000:00:08.1/0000:03:00.0/drm/card1/card1-eDP-1/amdgpu_bl1

Also I am running EndeavourOS on an external SSD and I have Windows 11 installed on my internal drive. I also updated BIOS before installing EndeavourOS, but my volume keys seem to be working perfectly.

Try adjusting the volume_brightness.sh script as described in this post:

1 Like

Thanks for your reply, as stated before brightnessctl does not work either

The suggestion was not to use brightnessctl, rather it is to amend the volume_brightness.sh script. Making an adjustment to this script resolved the issue you are having for another user. You can read through this thread if you would like to check it out:

I have tried it and unfortunately it still doesn’t seem to work.

Did you add your account to the video group? That’s often needed to adjust brightness.

1 Like

I tried that too, no luck

There were some changes by Redhat to the 6.2 kernel. acpilight takes advantage of them, and from reading the gitlab page, some laptops may have issues with xbacklight.

So acpilight might be worth a try. Else you might have a ghost/demon in your laptop. Especially since the setting seems to only stick around for a short while.

I think you might be right, this person had similar issues with the kernel that I am having. I will try changing to LTS kernel and see if that solves the problem.

Also switching to acpilight did something. With xorg-backlight, dunst notification only showed % with no value, but with acpilight it shows 0% if set to min and 100% if set to max, but shows nothing if set to a value in between.

Good, but still strange. There might be a hardware incompatibility.

Search the Arch wiki for your laptop brand/model and see if it has a page of tips and settings/advice. Many do.

I still have no luck even with LTS kernel. I have noticed that the keybindings changes the brightness values but the actual brightness seems to not change.

Also, there is no information about my specific laptop on the Arch wiki.

Try adding the device name in the prompt;
I was trying all sorts of different things to try and fix the buttons, but the solution for me was really simple.

bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl --device=intel_backlight set "5%+"

Hope this helps.

Thanks for the input but it didn’t work

I FINALLY DID IT!!!

Passing kernel parameter amdgpu.backlight=0 in /etc/default/gruband running sudo grub-mkconfig -o /boot/grub/grub.cfg fixed the issue.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.