The brightness goes to 100%, but the system do not records this. It sees like the brightness is at the same level like before sleep (which is not true).
It is my conclusion, because when pushing the brightness buttons, it goes one level up or down from my initial, before sleep one, and the brightness jumps now directly down, without intermediary steps and sets accordingly.
Also, when this happens, in terminal if I try to adjust the brightness with kscreen-doctor sometimes I can not, only if I set with kscreen-doctor first to 100% (probably to sincronize the system with the reality, than after that to the lowered one which I use.
I have tried to adjust the brightness with kscreen-doctor or qtbus when waking up the laptop, it works from konsole, lowering the brightness to 10% the qdbus command bellow, but it has no effect running it at wake up from a file placed in /lib/systemd/system-sleep/. The model of the file I have found on internet:
Код: Выделить всё
#!/bin/sh
case $1/$2 in
pre/*)
;;
post/*)
rm /home/user/my.file
qdbus-qt6 org.kde.org_kde_powerdevil /org/kde/Solid/PowerManagement/Actions/BrightnessControl setBrightness 1000
;;
esac
The script is runing, because it also removes a file. So rm is working but not the adjustment to the desired brightness. I thought that maybe it is run too early, so I tried to insert a sleep 5 command before, but this makes the screen to light up 5 seconds later, but without the brightness being applied.
If I do not use the above file, it always wakes at 100%, BUT, if I use the above file, most of the time the laptop returns to its initial, before sleep brightness (AND NOT to the one which was set up in the script - 10%).
So, what am I missing, what to do, to make laptop screen brightness to set up on wake-up ALWAYS to the previous setting, before sleep, or to a predefined one?