I recently re-installed Ubuntu 21.10 on my laptop and found that Fn+F5/F6 don't work for adjusting the display brightness. I've had this problem before and usually just run
xrandr --output DP-2 --brightness <brightness>
Now this returns
xrandr: Failed to get size of gamma for output default
warning: output DP-2 not found; ignoring
xrandr: Need crtc to set gamma on.
The so I ran xrandr --verbose
to get the possible output names, but it only has info for 'Screen 0', no actual display names. It also threw the error
xrandr: Failed to get size of gamma for output default
I tried both solutions to this question but they did not work.
I also got the error from xrandr
xrandr: Need crtc to set gamma on.
, but couldn't really find any concrete way to fix this.
After more research I found that the current brightness is stored in /sys/class/backlight/acpi_video0/brightness
, which seems really great because then I could just write a script that modifies that directly.
Unfortunately, I've discovered that not only does rewriting the brightness file do nothing to the actual brightness, pressing Fn+F5/F6 decrements/increments the value stored in that file. So somehow whichever program is actually controlling the brightness is not reading that file, but I'm out of ideas on how to fix it at this point.