Being aware of that this is partially a known issue, since each is individual and different, the problem is as following:
On my Lenovo Laptop with Linux Mint the backlight cannot be set using Fn+F6/F7. These keys are not detected at all, neither by xev
nor by acpi_listen
. However other key combinations like Fn+F3 for volume up is detected by both commands. So it is a more low-level issue, I am afraid.
On the other hand, this works well:
echo 10000 | sudo tee /sys/class/backlight/intel_backlight/brightness
and as well- with the GUI slider in
mate-power-preferences
works perfectly. xdotool key 232
orxdotool key XF86MonBrightnessDown
More detailed:
- I tried many boot combinations (yes I updated GRUB and did reboot, as described in this troubleshooting wiki.ubuntu.com Debugging/Backlight)
- I tried adding files in /usr/share/X11/xorg.conf.d/ as recommended (
80-backlight.conf
using both "Backlight" "ideapad" and "intel_backlight", or20-intel.conf
)
uname -a
yields: Linux Lenovo-V14-G2-ITL 5.8.0-53-generic #60~20.04.1-Ubuntu SMP Thu May 6 09:52:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
These are the available backlights (which can be written using cat)
$ ls /sys/class/backlight/
ideapad intel_backlight
This is my current configuration
$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.8.0-53-generic root=/dev/mapper/vgmint-root ro pcie_aspm=force acpi_osi=Linux acpi_backlight=vendor quiet splash
I tried these (as well individually and with many combinations, only visible effect is that the output of ls /sys/class/backlight/
is changing)
GRUB_CMDLINE_LINUX="pcie_aspm=force acpi_osi=linux acpi_backlight=vendor video.use_native_backlight=1"
xev
doesn't register your keypresses, I don't think there's much you can do. I guess you have two options: 1) Figuring out whyxev
does not register these keys; or 2) use different keys to bind a command (I had best experiences withxbacklight
).xev
not registering keypress might be more common than I thought, see e.g. here: unix.stackexchange.com/a/584299/58056xdotool key 232
works well! And xmodmap -pke shows the brightness keys but how do I get the scancodes? With getkeycodes I see that there is not an entry for keycode=232 (so there is no scancode associated with it?)