Il 18/02/23 13:20, Carlos E. R. ha scritto:
On 2023-02-18 16:46, Marco Calistri wrote:
Il 18/02/23 11:44, Andrei Borzenkov ha scritto:
On 18.02.2023 04:31, Marco Calistri wrote:
Hello,
I've been able to set a specific brightness intensity at evry boot, by using an /etc/init.d/after.local script,
Showing this script may provide some hints. Also why do you need it? Normally the brightness is expected to be set using desktop environment configuration and preserved across reboot. Here this expected condition do not occurs, due that I use such script: echo -n 1 > /sys/class/backlight/acpi_video0/brightness
...
You need to find out what and when changes the brightness. It could also be your desktop environment. Well, for the boot my issue is resolved but for the after suspend mode it is not and from what I see by Google it is a very common issue among Linux users.
You can hook another script at restore from suspend or hibernation. See https://lists.opensuse.org/archives/list/users@lists.opensuse.org/message/SM... for the idea.
Notice that if your desktop restores brightness itself, it may be after that script runs. So perhaps add a delay.
Another place that can change brightness is laptop-mode tools — I'm unsure of the name, though.
I tried to review your script but I cannot adapt it to my specific case. I also tried to set systemd backlight restore to 0 into kernel parameters without success. It will keep in this state which is not ideal and I hope that one day somebody will provide a valid solution because it is really an annoying fail! Linux should just let the stuff as it is, without touching nothing, but evidently it likes to mess it up! 😬 Regards, -- Marco Calistri Build: openSUSE Tumbleweed 20230217 Kernel: 6.1.12-1-default - XFCE: (4.18.1)