I had the same problem and kernel parameters did not work for me. I wanted the keys to behave more like direct hardware buttons, so they worked regardless of login status, and also on tty screens. I got most of the solution via a third party site linked from this question, the various answers and comments on this question, and the Arch Wiki. In summary, this listens to ACPI events with a system service, and sets the brightness directly.
Install the acpid package:
apt install acpid
Create /etc/acpi/events/brightness:
event=video/brightness(up|down)
action=/etc/acpi/brightness.sh %e
and /etc/acpi/brightness.sh:
#!/bin/bash
set -e
edit this to match your device under /sys/class/backlight/
dev=amdgpu_bl0
change if you want a different number of brightness levels
levels=16
case "$1" in
video/brightnessup)
chg=1
;;
video/brightnessdown)
chg=-1
;;
*)
exit 1
;;
esac
dev="/sys/class/backlight/$dev"
[[ -e "$dev" ]]
bri="$dev/brightness"
read -r cur < "$bri"
read -r max < "$dev/max_brightness"
max_levels=$(( max + 1 ))
if (( levels < 1 )); then
levels=1
elif (( levels > max_levels )); then
levels=$max_levels
fi
incr=$(( max_levels / levels ))
new=$(( cur + ( incr * chg ) ))
if (( new > max )); then
new=$max
elif (( new < 0 )); then
new=0
fi
if (( new != cur )); then
echo $new > "$bri"
fi
and make it executable:
chmod +x /etc/acpi/brightness.sh
Restart and enable the service:
systemctl restart acpid && systemctl enable acpid
The final piece is to stop the double binding of the keys. In KDE Plasma, you can just disable the default bindings in System Settings > Shortcuts > Power Management > Decrease/Increase Screen Brightness. I assume other DEs have similar ability to ignore those keys.
Fnkeys doesn't work (while disabling wifi works) so it's like the pop up from right click blocks someFnfunctionality but when I right click for example at chromium then it works just fine. Can you tell me the behavior when you right click on your desktop to see if it's somehow connected? – Thanos Apostolou Jun 01 '16 at 13:10