Portál AbcLinuxu, 15. května 2025 05:30
/usr/sbin/rtcwake -m mem -s 43200Ako na to (je tam len textova instalacia, ziaden desktop) ? Vdaka
# /etc/systemd/system/suspend-sedation.service
[Unit]
Description=Hibernate after suspend
Conflicts=hibernate.target hybrid-sleep.target
Before=sleep.target
StopWhenUnneeded=true
[Service]
Type=oneshot
RemainAfterExit=yes
Environment="ALARM_SEC=43200"
Environment="WAKEALARM=/sys/class/rtc/rtc0/wakealarm"
ExecStart=/usr/sbin/rtcwake --seconds $ALARM_SEC --auto --mode no
ExecStop=/usr/sbin/rtcwake --auto --mode disable
[Install]
WantedBy=sleep.target
Logind by mel pri zmacknuti tlacitka vyvolat ten sleep.target , takze se to ten unit spusti. Pokud ne, viz "man 5 logind.conf" a tam "HandlePowerKey=", coz se da zmenit v /etc/systemd/logind.conf .
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.