[Pm-utils] How to suspend/hibernate when all VTs are locked (vlock -san)

Gregor Zattler telegraph at gmx.net
Sun Jan 10 12:57:42 PST 2010


Hi pm-utils developers,

here (Toshiba Portégé A600-Y13, pm-utils 1.26 on pretty uptodate
debian sid/unstable) pm-action does no action when all virtual
consoles are locked via vlock -san

Use case: I want my system to suspend/hibernate from a cron job
if idle and load is low.  The screen is then allready locked via
xautolock --> vlock -san.  So for instance I can start a kernel
compile and leave the system.  After some idle time the screen
gets locked and only when the kernel compile finished the load
drops so the cronjob suspends the machine.

But nothing happens.  When I do for instance:

$ sudo rm /var/run/pm-utils/locks/pm-suspend.lock ; ( sleep 25 ; sudo pm-suspend ) &  vlock -san 


One minute later the system still runs.  I unlock the screen and
the next lines on the terminal show: 

rm: cannot remove `/var/run/pm-utils/locks/pm-suspend.lock': No such file or directory
[3] 30698
vlock-new: could not disallocate console: Device or resource busy

It's the same when I exchange the pm-suspend command with 
"s2ram -f"   or   "echo 3 >/proc/acpi/sleep"   respectively,
which both  work well when the consoles are not locked.

Do you have an idea how to suspende/hibernate when the consoles
are locked?  

I below is the log file of this pm-suspend command.


Thanx, Gregor
P.S.: I'm on the list, whichs archive I scanned for an answer to
my question.


>>>>>> /var/log/pm-suspend.log >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Initial commandline parameters: 
So 10. Jan 20:54:21 CET 2010: Running hooks for suspend.
/usr/lib/pm-utils/sleep.d/000kernel-change suspend suspend: success.
/usr/lib/pm-utils/sleep.d/00auto-quirk suspend suspend: Adding quirks from HAL: --quirk-dpms-on --quirk-dpms-suspend --quirk-vbe-post --quirk-vbemode-restore --quirk-vbestate-restore --quirk-vga-mode-3 
success.
/usr/lib/pm-utils/sleep.d/00logging suspend suspend: Linux shi 2.6.32-trunk-686 #1 SMP Thu Jan 7 05:05:10 UTC 2010 i686 GNU/Linux
Module                  Size  Used by
i915                  217023  1 
drm_kms_helper         17183  1 i915
drm                   107511  3 i915,drm_kms_helper
i2c_algo_bit            3497  1 i915
i2c_core               12612  3 i915,drm,i2c_algo_bit
uinput                  4796  1 
ppdev                   4058  0 
lp                      5570  0 
parport                22554  2 ppdev,lp
xt_limit                1088  8 
xt_tcpudp               1743  10 
ipt_LOG                 3570  8 
ipt_MASQUERADE          1134  0 
xt_DSCP                 1451  0 
ipt_REJECT              1517  1 
nf_conntrack_irc        2499  0 
nf_conntrack_ftp        4260  0 
xt_state                 927  6 
acpi_cpufreq            4907  0 
cpufreq_userspace       1444  0 
cpufreq_stats           1940  0 
cpufreq_conservative     4018  0 
cpufreq_powersave        602  0 
iptable_nat             3519  0 
nf_nat                 10456  2 ipt_MASQUERADE,iptable_nat
nf_conntrack_ipv4       7597  9 iptable_nat,nf_nat
nf_conntrack           37775  7 ipt_MASQUERADE,nf_conntrack_irc,nf_conntrack_ftp,xt_state,iptable_nat,nf_nat,nf_conntrack_ipv4
nf_defrag_ipv4           779  1 nf_conntrack_ipv4
iptable_mangle          2325  0 
iptable_filter          1790  1 
ip_tables               7690  3 iptable_nat,iptable_mangle,iptable_filter
x_tables                8335  9 xt_limit,xt_tcpudp,ipt_LOG,ipt_MASQUERADE,xt_DSCP,ipt_REJECT,xt_state,iptable_nat,ip_tables
ext2                   46157  1 
fuse                   43554  1 
loop                    9721  0 
snd_hda_codec_realtek   162851  1 
snd_hda_intel          15075  3 
snd_hda_codec          44938  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               4054  1 snd_hda_codec
snd_pcm_oss            28479  0 
snd_mixer_oss          10461  1 snd_pcm_oss
snd_pcm                47362  4 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_seq_midi            3480  0 
snd_rawmidi            12313  1 snd_seq_midi
joydev                  6767  0 
arc4                     974  2 
ecb                     1405  2 
snd_seq_midi_event      3684  1 snd_seq_midi
zaurus                  1880  0 
cdc_ether               2633  1 zaurus
iwlagn                 62191  0 
snd_seq                35303  2 snd_seq_midi,snd_seq_midi_event
usbnet                  9459  2 zaurus,cdc_ether
psmouse                44409  0 
cdc_acm                11459  0 
cdc_wdm                 6452  0 
iwlcore                67290  1 iwlagn
pcspkr                  1207  0 
serio_raw               2916  0 
snd_timer              12258  3 snd_pcm,snd_seq
snd_seq_device          3673  3 snd_seq_midi,snd_rawmidi,snd_seq
mii                     2714  1 usbnet
toshiba_acpi            4365  0 
mac80211              121381  2 iwlagn,iwlcore
cfg80211               86910  3 iwlagn,iwlcore,mac80211
tpm_infineon            5400  0 
tpm                     8137  1 tpm_infineon
tpm_bios                3573  1 tpm
processor              25803  3 acpi_cpufreq
evdev                   5609  12 
snd                    33551  15 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore               3450  1 snd
rfkill                 10196  2 toshiba_acpi,cfg80211
snd_page_alloc          4973  2 snd_hda_intel,snd_pcm
battery                 3782  0 
ac                      1640  0 
ext3                   93828  1 
jbd                    31965  1 ext3
mbcache                 3762  2 ext2,ext3
aes_i586                6816  2 
aes_generic            25738  1 aes_i586
xts                     1701  1 
gf128mul                5106  1 xts
dm_crypt                9059  1 
dm_mod                 45854  9 dm_crypt
sg                     15932  0 
sd_mod                 25717  3 
sr_mod                 10770  0 
crc_t10dif              1012  1 sd_mod
cdrom                  26487  1 sr_mod
uhci_hcd               15945  0 
sdhci_pci               4493  0 
sdhci                  12075  1 sdhci_pci
intel_agp              20145  1 
video                  14605  1 i915
output                  1204  1 video
agpgart                19516  3 drm,intel_agp
mmc_core               38095  1 sdhci
led_class               1757  2 iwlcore,sdhci
button                  3598  1 i915
e1000e                 97409  0 
ahci                   26446  2 
libata                113728  1 ahci
ehci_hcd               27222  0 
scsi_mod              101061  4 sg,sd_mod,sr_mod,libata
usbcore                97898  8 zaurus,cdc_ether,usbnet,cdc_acm,cdc_wdm,uhci_hcd,ehci_hcd
nls_base                4541  1 usbcore
thermal                 9206  0 
fan                     2586  0 
thermal_sys             9378  4 processor,video,thermal,fan
             total       used       free     shared    buffers     cached
Mem:       1903864    1855336      48528          0     249712     969336
-/+ buffers/cache:     636288    1267576
Swap:      1843192       6928    1836264
success.
/usr/lib/pm-utils/sleep.d/00powersave suspend suspend: success.
/usr/lib/pm-utils/sleep.d/49bluetooth suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/55NetworkManager suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/75modules suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/90clock suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/94cpufreq suspend suspend: success.
/usr/lib/pm-utils/sleep.d/95anacron suspend suspend: success.
/usr/lib/pm-utils/sleep.d/95led suspend suspend: not applicable.
/usr/lib/pm-utils/sleep.d/98smart-kernel-video suspend suspend: success.
/usr/lib/pm-utils/sleep.d/99laptop-mode suspend suspend: success.
/usr/lib/pm-utils/sleep.d/99video suspend suspend: disabled.
/etc/pm/sleep.d/action_wpa suspend suspend: success.
So 10. Jan 20:54:21 CET 2010: performing suspend
<<<<<< /var/log/pm-suspend.log <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<




More information about the Pm-utils mailing list