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.
-- Cheers, Carlos E. R. (from openSUSE 15.4 x86_64 at Telcontar)
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. Now I'll try to reboot... Regards, -- Marco Calistri Build: openSUSE Tumbleweed 20230223 Kernel: 6.1.12-1-default - XFCE: (4.18.1)