Three simple bash scripts that can be used to control screen brightness using xrandr.
Solution to issue raised by Giorgos Saridakis:
https://askubuntu.com/questions/1230937/ubuntu-20-04-brightness-adjust-not-working
Credit to Renato Miotto their solution is the basis for these scripts.
I was having this issue on my installation of Kubuntu 21.10 on my Alienware m15 laptop.
I have the Set script to run at login to set the brightness to how I had it last (mostly so if im in a dark room I am not blinded). I then have the other scripts mapped to the brightness up and down buttons on my keyboard. This fixes the broken feature of the default power management package that Kubuntu uses.
Hopefully this can save you some time having to create something similar and fix the problem to a mostly satisfactory level.