On 2023-02-25 14:07, Marco Calistri wrote:
Il 24/02/23 18:34, Carlos E. R. ha scritto:
El 2023-02-19 a las 12:56 -0000, Marco Calistri escribió:
Not enough scripting skill may be.
I can help with that.
Besides that I want something "less experimental", something like "plug and play", since I already tested several solutions which have failed.
Inviato da Outlook per Android
Try (/usr/lib/systemd/system-sleep/mine-brightness):
#!/bin/bash
LOGGER=/usr/bin/logger
# $1: "pre" is hibernating. "post" is recovering.
case $1 in post) $LOGGER -t mine-brightness -p daemon.info "Restoring brightness after hibernating/suspend." echo -n 1 > /sys/class/backlight/acpi_video0/brightness ;; esac
I have not tested this.
If the script runs, you will see that message in the journal and/or syslog.
/usr/lib/systemd/system-sleep/mine-brightness must be marked executable, I understand.
Hi Carlos,
Thanks for the script, I'm testing it.
But, don't I need to enable it as a systemd service?
First attempt, just after creating the script and entering in suspend mode, without exiting or rebooting the system, has failed: brightness set to max!
Logger has wrote the following into my journal:
feb 25 09:55:29 linux-turion64.ddns.net mine-brightness[5433]: Restoring brightness after hibernating/suspend.
Then it is working as expected. You just have to write the brightness you want it to set. It is your own line you posted previously: echo -n 1 > /sys/class/backlight/acpi_video0/brightness Experiment with different numbers till you get the brightness you prefer. It does nothing on reboot. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)