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 %e
and /etc/acpi/brightness:
#!/bin/bash
set -e
glob used to match your device under /sys/class/backlight/
because digit suffix may change after driver updates, etc.
dev=/sys/class/backlight/amdgpu_bl*/
change if you want a different number of brightness levels
levels=16
case "$1" in
video/brightnessup)
chg=1
;;
video/brightnessdown)
chg=-1
;;
*)
echo Unexpected event >&2
exit 1
;;
esac
if ! compgen -G "$dev" > /dev/null; then
echo No backlight found >&2
exit 1
fi
dev=($dev)
if [[ ${#dev[@]} -ne 1 ]]; then
echo Multiple backlights found >&2
exit 1
fi
dev=${dev[0]%/}
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
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 > Shortcuts > Power Management > Decrease/Increase Screen Brightness.
Annoyingly, this must be done for every user.
I assume other DEs have similar ability to configure those keys.