LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   desktop suspends? but reboots on resume as a result of runlevel 0 on resume? (https://www.linuxquestions.org/questions/slackware-14/desktop-suspends-but-reboots-on-resume-as-a-result-of-runlevel-0-on-resume-4175671977/)

dimm0k 03-25-2020 08:26 PM

desktop suspends? but reboots on resume as a result of runlevel 0 on resume?
 
I have an rsnapshot server that I want to put to sleep and woken up only at nights when I do backups or when I need to restore, which can be done by issuing a wol packet to wake the server up. when I issue pm-suspend the screen goes black and according to pm-suspend.log everything looks to have gone to sleep successfully. that said, I'm not sure it entirely is since the HDD lights are still on... regardless if I issue a wol packet to the server I do see the server resuming, but as soon as it's done it enters into a complete system restart! any ideas?

Code:

Initial commandline parameters:
Wed Mar 25 20:29:45 EDT 2020: Running hooks for suspend.
Running hook /usr/lib64/pm-utils/sleep.d/00logging suspend suspend:
Linux defiant 4.4.208 #2 SMP Wed Jan 8 15:24:28 CST 2020 x86_64 Intel(R) Atom(TM) CPU D525  @ 1.80GHz GenuineIntel GNU/Linux
Module                  Size  Used by
cfg80211              527818  0
rfkill                18649  1 cfg80211
ipt_REJECT              1725  1
nf_reject_ipv4          3313  1 ipt_REJECT
xt_tcpudp              2811  3
xt_conntrack            3736  11
nf_log_ipv4            4511  2
nf_log_common          3678  1 nf_log_ipv4
xt_LOG                  1689  2
xt_limit                2287  5
nf_nat_irc              1955  0
nf_conntrack_irc        4817  1 nf_nat_irc
nf_nat_ftp              2218  0
nf_conntrack_ftp        7612  1 nf_nat_ftp
iptable_nat            2251  0
nf_conntrack_ipv4      8649  12
nf_defrag_ipv4          1857  1 nf_conntrack_ipv4
nf_nat_ipv4            5968  1 iptable_nat
nf_nat                15259  3 nf_nat_ftp,nf_nat_irc,nf_nat_ipv4
nf_conntrack          77304  8 nf_nat_ftp,nf_nat_irc,nf_nat,nf_nat_ipv4,xt_conntrack,nf_conntrack_ftp,nf_conntrack_irc,nf_conntrack_ipv4
iptable_filter          1994  1
ip_tables              15807  5 iptable_filter,iptable_nat
x_tables              23892  7 ip_tables,xt_tcpudp,xt_limit,xt_conntrack,xt_LOG,iptable_filter,ipt_REJECT
ipv6                  328720  26
fuse                  85328  1
i915                1200377  1
gpio_ich                5795  0
i2c_dev                6291  0
ppdev                  6350  0
evdev                  12463  2
video                  30072  1 i915
e1000e                178380  0
drm_kms_helper        119954  1 i915
drm                  326102  3 i915,drm_kms_helper
i2c_algo_bit            6154  1 i915
coretemp                6780  0
ptp                    12228  1 e1000e
fb_sys_fops            1730  1 drm_kms_helper
psmouse              115114  0
hwmon                  4199  1 coretemp
xhci_pci                5235  0
i2c_i801              16974  0
syscopyarea            3458  1 drm_kms_helper
xhci_hcd              118937  1 xhci_pci
sysfillrect            3950  1 drm_kms_helper
pps_core                7902  1 ptp
sysimgblt              2608  1 drm_kms_helper
serio_raw              5146  0
i2c_core              48117  6 drm,i915,i2c_i801,i2c_dev,drm_kms_helper,i2c_algo_bit
snd_hda_codec_via      13161  1
snd_hda_codec_generic    61252  1 snd_hda_codec_via
fjes                  21479  0
lpc_ich                14738  0
parport_pc            21686  0
parport                39075  2 ppdev,parport_pc
snd_hda_intel          30347  0
snd_hda_codec        109240  3 snd_hda_codec_via,snd_hda_codec_generic,snd_hda_intel
uhci_hcd              23516  0
8250_fintek            3214  0
snd_hda_core          53305  4 snd_hda_codec_via,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
ehci_pci                4285  0
snd_hwdep              6656  1 snd_hda_codec
ehci_hcd              44178  1 ehci_pci
intel_agp              11809  0
intel_gtt              14002  3 i915,intel_agp
agpgart                31989  3 drm,intel_agp,intel_gtt
button                  5943  1 i915
shpchp                26680  0
snd_pcm                93314  3 snd_hda_codec,snd_hda_intel,snd_hda_core
snd_timer              22518  1 snd_pcm
snd                    69793  7 snd_hwdep,snd_timer,snd_hda_codec_via,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
soundcore              6812  1 snd
tpm_tis                11588  0
tpm                    36644  1 tpm_tis
processor              29285  0
loop                  21505  0
ext4                  581370  4
mbcache                8563  1 ext4
jbd2                  93010  1 ext4
              total        used        free      shared  buff/cache  available
Mem:        4033208      62436    3835592        896      135180    3681088
Swap:      8000332          0    8000332
/usr/lib64/pm-utils/sleep.d/00logging suspend suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/00powersave suspend suspend:
/usr/lib64/pm-utils/sleep.d/00powersave suspend suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/01grub suspend suspend:
/usr/lib64/pm-utils/sleep.d/01grub suspend suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/49bluetooth-generic suspend suspend:
/usr/lib64/pm-utils/sleep.d/49bluetooth-generic suspend suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/49bluetooth-ibm suspend suspend:
/usr/lib64/pm-utils/sleep.d/49bluetooth-ibm suspend suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/55NetworkManager suspend suspend:
Having NetworkManager put all interaces to sleep...method return time=1585182586.180172 sender=:1.0 -> destination=:1.5 serial=159 reply_serial=2
Done.
/usr/lib64/pm-utils/sleep.d/55NetworkManager suspend suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/75modules suspend suspend:
/usr/lib64/pm-utils/sleep.d/75modules suspend suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/90clock suspend suspend:
/usr/lib64/pm-utils/sleep.d/90clock suspend suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/94cpufreq suspend suspend:
/usr/lib64/pm-utils/sleep.d/94cpufreq suspend suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/95led suspend suspend:
/usr/lib64/pm-utils/sleep.d/95led suspend suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend:
Kernel modesetting video driver detected, not using quirks.
/usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler suspend suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/99video suspend suspend:
kernel.acpi_video_flags = 0
/usr/lib64/pm-utils/sleep.d/99video suspend suspend: success.

Wed Mar 25 20:29:46 EDT 2020: performing suspend
Wed Mar 25 20:32:21 EDT 2020: Awake.
Wed Mar 25 20:32:21 EDT 2020: Running hooks for resume
Running hook /usr/lib64/pm-utils/sleep.d/99video resume suspend:
/usr/lib64/pm-utils/sleep.d/99video resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:
/usr/lib64/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/95led resume suspend:
/usr/lib64/pm-utils/sleep.d/95led resume suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/94cpufreq resume suspend:
/usr/lib64/pm-utils/sleep.d/94cpufreq resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/90clock resume suspend:
/usr/lib64/pm-utils/sleep.d/90clock resume suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/75modules resume suspend:
Reloaded unloaded modules.
/usr/lib64/pm-utils/sleep.d/75modules resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/55NetworkManager resume suspend:
Having NetworkManager wake interfaces back up...method return time=1585182742.286289 sender=:1.0 -> destination=:1.6 serial=182 reply_serial=2
Done.
/usr/lib64/pm-utils/sleep.d/55NetworkManager resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/49bluetooth-ibm resume suspend:
/usr/lib64/pm-utils/sleep.d/49bluetooth-ibm resume suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/49bluetooth-generic resume suspend:
/usr/lib64/pm-utils/sleep.d/49bluetooth-generic resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/01grub resume suspend:
/usr/lib64/pm-utils/sleep.d/01grub resume suspend: not applicable.

Running hook /usr/lib64/pm-utils/sleep.d/00powersave resume suspend:
/usr/lib64/pm-utils/sleep.d/00powersave resume suspend: success.

Running hook /usr/lib64/pm-utils/sleep.d/00logging resume suspend:
/usr/lib64/pm-utils/sleep.d/00logging resume suspend: success.

Wed Mar 25 20:32:23 EDT 2020: Finished.

a snippet from /var/log/messages that leads me to believe suspend and resume are working? but something after is switching the runlevel causing the reboot...
Code:

Mar 25 20:32:21 defiant kernel: [ 1287.324225] PM: resume of devices complete after 25476.675 msecs
Mar 25 20:32:21 defiant kernel: [ 1287.381596] Restarting tasks ... done.
Mar 25 20:32:21 defiant init: Switching to runlevel: 0

the only post I came across describing anything similar is https://www.linuxquestions.org/quest...of-3-a-440716/, but that trailed off with no answer. this system is a Slackware64 system that started with 13.37 and was successfully upgraded to 14.0, then to 14.1 and now 14.2. I had tried suspend/resume under 13.37, but never got it working and haven't tried in between the versions leading up to 14.2. kernel is the generic 4.4.208 with initrd.gz built. any suggestions?

business_kid 03-26-2020 08:47 AM

I had something like this. The problem for me was too many things watching the power. I issued a resume in acpid, but XFCE4's power manager was also getting in on the act. So first it did a suspend from one, resumed, and then suspended from the other.

Solution was to disable the XFCE4 Power manager, as disabling acpid wasn't an option.

dimm0k 03-26-2020 03:26 PM

Quote:

Originally Posted by business_kid (Post 6104553)
I had something like this. The problem for me was too many things watching the power. I issued a resume in acpid, but XFCE4's power manager was also getting in on the act. So first it did a suspend from one, resumed, and then suspended from the other.

Solution was to disable the XFCE4 Power manager, as disabling acpid wasn't an option.

hrmm, interesting however as this is somewhat of a headless server I have not used anything X related apps so everything has been purely from the console...

business_kid 03-27-2020 03:46 AM

If you've systemd, of course, that complicates the situation wonderfully. I have Slackware64 with sysVinit

allend 03-27-2020 08:11 AM

I have a box at home that I use as a jump box. It starts automatically at 9:00PM and runs before automatically shutting down at 12:10AM. (Back in the day when we were allowed out of the house, I could log in remotely and pick up a connection to a work server.)
This is done using 'rtcwake' run as a cron job. From the root crontab on the jump box:
Code:

10 0 * * * /usr/sbin/rtcwake -m off --date 21:00:00
Your hardware would need to support this.

dimm0k 04-06-2020 01:46 PM

Quote:

Originally Posted by allend (Post 6104937)
I have a box at home that I use as a jump box. It starts automatically at 9:00PM and runs before automatically shutting down at 12:10AM. (Back in the day when we were allowed out of the house, I could log in remotely and pick up a connection to a work server.)
This is done using 'rtcwake' run as a cron job. From the root crontab on the jump box:
Code:

10 0 * * * /usr/sbin/rtcwake -m off --date 21:00:00
Your hardware would need to support this.

decided to go this route, which definitely does work for my purposes of automatically turning on a few minutes before starting the backup tasks. only issue now is I can't get the system to go into sleep or hibernate, only freeze. that will be another exercise for another time. anyway, thank you for this!


All times are GMT -5. The time now is 10:58 PM.