I tested a solution that works fine for me.
One solution is to add a script file in /etc/pm/power.d/
Just creates a file
sudo vi /etc/pm/power.d/run_after_pwrmanagmt.sh
Then writes this code into this file :
case "${1}" in
true) #battery_mode
xinput set-int-prop 12 277 8 2 3 0 0 1 3 2
echo 4000 > /sys/class/backlight/intel_backlight/brightness
;;
false) #ac_mode
xinput set-int-prop 12 277 8 2 3 0 0 1 3 2
echo 4000 > /sys/class/backlight/intel_backlight/brightness
esac
Now, you need to give execution rights to this file by typing
sudo chmod +x /etc/pm/power.d/run_after_pwrmanagmt.sh
Now it should work fine, just test to plug/unplug your computer.
Note that you can do similar things after a suspend (/etc/pm/sleep.d/run_after_sleep.sh), that's how I found out this solution... You will find information on the web...
Note that xinput is just a command for my trackpad to set the middle button working... You should skip the two lines xinput if not needed (or adapt ).
For the value 4000, it may be diffrent for each screen, you should first see what is your max value with the command cat /sys/class/backlight/intel_backlight/max_brightness
Hope this helps, and that the moderator will not delete this post since this is an answer and not a question.
Thanks