Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 199806
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Alon Bar-Lev (RETIRED) <alonbl@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Daniel Schömer <daniel.schoemer@gmx.net>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
a.patch Fix use of "command -v xauth" to "command xauth" patch Daniel Schömer 2007-11-20 17:57 0000 478 bytes Details | Diff
b.patch Exchange arguments on function get_env_var_of_process patch Daniel Schömer 2007-11-24 09:46 0000 623 bytes Details | Diff
hibernate-ok.log Output of hibernate --verbosity=4 after appling b.patch text/plain Daniel Schömer 2007-11-24 09:47 0000 101.80 KB Details
hibernate-not-ok.log Output of hibernate --verbosity=4 text/plain Daniel Schömer 2007-11-24 10:47 0000 14.14 KB Details
hibernate-not-ok_no-pause-audio.log Output of "hibernate --verbosity=4" with PauseAudio disabled text/plain Daniel Schömer 2007-11-24 19:28 0000 20.51 KB Details
hibernate-ok_no-x_except-lock-gnome-screensaver.log Output of "hibernate --verbosity=4" without any X and service related options, except LockGnomeScreenSaver yes text/plain Daniel Schömer 2007-11-24 21:03 0000 79.96 KB Details
common.conf Hibernate config for attachment 136921 text/plain Daniel Schömer 2007-11-24 21:04 0000 3.97 KB Details
hibernate-not-ok_no-x_except-lock-gnome-screensaver-and-xstatus.log Output of "hibernate --verbosity=4" without any X and service related options, except LockGnomeScreenSaver yes and XStatus gnome text/plain Daniel Schömer 2007-11-24 21:31 0000 21.25 KB Details
common.conf Hibernate config for attachment 136924 text/plain Daniel Schömer 2007-11-24 21:32 0000 3.97 KB Details
common.conf Working hibernate configuration text/plain Daniel Schömer 2007-11-24 22:53 0000 3.97 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 199806 depends on: Show dependency tree
Bug 199806 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-11-20 17:56 0000
Hibernation aborts, if I'm logged out and GDM is waiting for someone to login.
The output of "hibernate -v3" indicates to me an authentication error against
X11.

In shell-function FindXServer() at line 179 of /usr/sbin/hibernate I found

  xhost=`command -v xhost 2>/dev/null`

This only prints the path of the xhost executable and return 0. It does not
acutally run xhost (see COMMAND(1P) and bash documentation). After removing the
'-v', function FindXServer() finds my X server and hibernation works even from
GDM.

Reproducible: Always

Steps to Reproduce:
(I assume a working sys-power/suspend s2disk system)
1. Install sys-power/hibernate-script-1.97-r2, gnome-base/gdm,
gnome-extra/zenity
2. Run GDM without loggin in
3. Configure hibernate to "LockGnomeScreenSaver yes" and "XStatus gnome"
4. Run "hibernate -v3" from console

Actual Results:  
hibernate: Trying method in suspend2.conf...
hibernate: Trying method in disk.conf...
hibernate: Trying method in ususpend-disk.conf...
hibernate: Including configuration from common.conf
Using '/etc/init.d' as init.d directory.
/usr/sbin/hibernate: line 810: /proc/XAUTHORITY/environ: No such file or
directory
/usr/sbin/hibernate: line 810: /proc/HOME/environ: No such file or directory
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [05] Executing XStatusSuspendBegin ...
hibernate: [10] Executing EnsureUSuspendCapable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [15] Executing PauseAudio ...
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(zenity:18638): Gtk-WARNING **: cannot open display: :0
hibernate: Suspend aborted by user.
/usr/share/hibernate/scriptlets.d/xstatus: line 101: echo: write error: Broken
pipe
hibernate: [15] Executing XStatusProgress ...
hibernate: [11] Executing XHacksResumeHook1 ...
hibernate: [05] Executing XStatusProgressKill ...
hibernate: [01] Executing XStatusReportErrors ...
hibernate: [01] Executing NoteLastResume ...
hibernate: [01] Executing LockFilePut ...


Expected Results:  
hibernate: Trying method in suspend2.conf...
hibernate: Trying method in disk.conf...
hibernate: Trying method in ususpend-disk.conf...
hibernate: Including configuration from common.conf
Using '/etc/init.d' as init.d directory.
hibernate: Could not find xhost program. Disabling X scriptlets.
hibernate: [01] Executing CheckLastResume ...
hibernate: [01] Executing CheckRunlevel ...
hibernate: [01] Executing LockFileGet ...
hibernate: [01] Executing NewKernelFileCheck ...
hibernate: [10] Executing EnsureUSuspendCapable ...
hibernate: [11] Executing XHacksSuspendHook1 ...
hibernate: [15] Executing PauseAudio ...
hibernate: [30] Executing ServicesStop ...
Executing /etc/init.d/lircd stop
 * Service lircd stopping
 * Service irexec-user stopping
 * Service irexec-user stopped
 * Service lircd stopped
Executing /etc/init.d/fcron stop
 * Service fcron stopping
 * Service fcron stopped
Executing /etc/init.d/nscd stop
 * Service nscd stopping
 * Service nscd stopped
hibernate: [59] Executing RemountXFSBootRO ...
hibernate: [89] Executing SaveKernelModprobe ...
Saved /proc/sys/kernel/modprobe is /sbin/modprobe
hibernate: [91] Executing LockGnomeScreensaver ...
Locking daniel's gnome-screensaver on display :0 using authority file
/home/daniel/.Xauthority
hibernate: [91] Executing ModulesUnloadBlacklist ...
Unloading blacklisted modules listed /etc/hibernate/blacklisted-modules
Unloading blacklisted module lirc_serial (and dependencies)
Unloading lirc_serial ...
Removing modules with rmmod.
Unloading blacklisted module lirc_dev (and dependencies)
Unloading lirc_dev ...
Module version for ipw2100 is
Module version for ipw2200 is
Module version for snd_bt_sco is
Module version for ndiswrapper is
hibernate: [95] Executing XHacksSuspendHook2 ...
xhacks: changing console from 1 to 15
hibernate: [98] Executing CheckRunlevel ...
hibernate: [99] Executing DoUSuspend ...
hibernate: Running /usr/sbin/s2disk ...
hibernate: [91] Executing GentooModulesAutoload ...
Loading modules listed /etc/modules.autoload.d/kernel-2.6
Loading fscher
Loading usbnek4k
hibernate: [90] Executing ModulesLoad ...
Loading module lirc_serial (from auto)...
Loading module lirc_dev (from auto)...
hibernate: [89] Executing RestoreKernelModprobe ...
hibernate: [85] Executing XHacksResumeHook2 ...
xhacks: changing console back to 1
hibernate: [70] Executing ClockRestore ...
hibernate: [59] Executing RemountXFSBootRW ...
hibernate: [30] Executing UnlockGnomeScreensaver ...
Unlocking daniel's gnome-screensaver on display :0 using authority file
/home/daniel/.Xauthority
hibernate: [30] Executing ServicesStart ...
Executing /etc/init.d/nscd start
 * Service nscd starting
 * Service nscd started
Executing /etc/init.d/fcron start
 * Service fcron starting
 * Service fcron started
Executing /etc/init.d/irexec-user start
 * Service irexec-user starting
 * Service lircd starting
 * Service lircd started
 * Service irexec-user started
hibernate: [20] Executing MiscLaunchAuxFunc1 ...
Executing /bin/sh /etc/conf.d/local.start...
hibernate: [11] Executing XHacksResumeHook1 ...
hibernate: [01] Executing NoteLastResume ...
hibernate: [01] Executing LockFilePut ...

------- Comment #1 From Daniel Schömer 2007-11-20 17:57:34 0000 -------
Created an attachment (id=136510) [details]
Fix use of "command -v xauth" to "command xauth"

------- Comment #2 From Alon Bar-Lev (RETIRED) 2007-11-24 07:17:58 0000 -------
You just disabled all X behavior.
hibernate: Could not find xhost program. Disabling X scriptlets.

Please attach the output of hibernate with --verbosity=4

------- Comment #3 From Daniel Schömer 2007-11-24 09:42:48 0000 -------
from tty1 while nobody logged into X

# sudo hibernate --verbosity=4
hibernate: Trying method in suspend2.conf...
hibernate: Trying method in disk.conf...
hibernate: Trying method in ususpend-disk.conf...
hibernate: Including configuration from common.conf
Using '/etc/init.d' as init.d directory.
/usr/sbin/hibernate: line 810: /proc/XAUTHORITY/environ: No such file or
directory
/usr/sbin/hibernate: line 810: /proc/HOME/environ: No such file or directory
+ tee -a -i /var/log/hibernate.log
++ date
+ echo 'Starting suspend at Sat' Nov 24 10:32:53 CET 2007
+ EXIT_CODE=0
+ '[' 'tee -a -i /var/log/hibernate.log' = cat ']'
+ '[' -n 1 ']'
+ DoWork
+ tee -a -i /var/log/hibernate.log
+ trap ctrlc_handler INT HUP
+ local ret
+ local CHAIN_UP_TO
+ local bit
+ CHAIN_UP_TO=0
++ SortSuspendBits
++ sort -n
++ /bin/echo -ne
'98XStatusProgressKill\n95XStatusProgress\n90XStatusProgress\n80XStatusProgress\n70XStatusProgress\n60XStatusProgress\n50XStatusProgress\n40XStatusProgress\n30XStatusProgress\n20XStatusProgress\n05XStatusSuspendBegin\n95XHacksSuspendHook2\n11XHacksSuspendHook1\n30ServicesStop\n15PauseAudio\n91ModulesUnloadBlacklist\n91LockGnomeScreensaver\n99DoUSuspend\n10EnsureUSuspendCapable\n59RemountXFSBootRO\n01NewKernelFileCheck\n89SaveKernelModprobe\n98CheckRunlevel\n01CheckRunlevel\n01CheckLastResume\n01LockFileGet\n'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
++ awk 'BEGIN{print substr("01CheckLastResume", 1, 2)}'
+ new_CHAIN_UP_TO=01
+ '[' -n 01 ']'
+ CHAIN_UP_TO=01
+ bit=CheckLastResume
+ vecho 1 'hibernate: [01] Executing CheckLastResume ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing CheckLastResume ...
+ '[' -n '' ']'
+ CheckLastResume
+ '[' -f /var/run/hibernate-last-resume ']'
+ local last_resume now
+ read last_resume
hibernate: [01] Executing CheckLastResume ...
++ date +%s
+ now=1195896773
+ '[' 1195896773 -gt 1195896756 ']'
+ rm -f /var/run/hibernate-last-resume
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
++ awk 'BEGIN{print substr("01CheckRunlevel", 1, 2)}'
+ new_CHAIN_UP_TO=01
+ '[' -n 01 ']'
+ CHAIN_UP_TO=01
+ bit=CheckRunlevel
+ vecho 1 'hibernate: [01] Executing CheckRunlevel ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing CheckRunlevel ...
+ '[' -n '' ']'
+ CheckRunlevel
+ '[' -z '' ']'
hibernate: [01] Executing CheckRunlevel ...
++ /sbin/runlevel
++ awk '{print $2}'
+ RUNLEVEL=3
+ case "${RUNLEVEL}" in
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
++ awk 'BEGIN{print substr("01LockFileGet", 1, 2)}'
+ new_CHAIN_UP_TO=01
+ '[' -n 01 ']'
+ CHAIN_UP_TO=01
+ bit=LockFileGet
+ vecho 1 'hibernate: [01] Executing LockFileGet ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing LockFileGet ...
+ '[' -n '' ']'
+ LockFileGet
+ local other_pid
+ '[' -f /var/run/hibernate-script.pid ']'
+ echo 24570
+ LOCKFILE_IN_USE=1
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
hibernate: [01] Executing LockFileGet ...
++ awk 'BEGIN{print substr("01NewKernelFileCheck", 1, 2)}'
+ new_CHAIN_UP_TO=01
+ '[' -n 01 ']'
+ CHAIN_UP_TO=01
+ bit=NewKernelFileCheck
+ vecho 1 'hibernate: [01] Executing NewKernelFileCheck ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing NewKernelFileCheck ...
+ '[' -n '' ']'
+ NewKernelFileCheck
+ '[' -f /var/run/suspend2-new-kernel ']'
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
hibernate: [01] Executing NewKernelFileCheck ...
++ awk 'BEGIN{print substr("05XStatusSuspendBegin", 1, 2)}'
+ new_CHAIN_UP_TO=05
+ '[' -n 05 ']'
+ CHAIN_UP_TO=05
+ bit=XStatusSuspendBegin
+ vecho 1 'hibernate: [05] Executing XStatusSuspendBegin ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[05]' Executing XStatusSuspendBegin ...
+ '[' -n '' ']'
+ XStatusSuspendBegin
+ '[' -z gnome ']'
+ XSTATUS_PROGRESS=10
+ XStatusProgressStart_gnome 'Preparing to suspend...'
+ trap XStatusProgressPIPEhandler_gnome PIPE
++ /bin/sh -c 'echo $PPID'
hibernate: [05] Executing XStatusSuspendBegin ...
+ pid_to_kill=24751
+ '[' -n '' ']'
+ eval 'exec 8> >(XStatusProgressStart_gnomeZenityHelper "Preparing to
suspend...")'
++ exec
+ echo 10
+ ZENITY_OPEN=1
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
++ awk 'BEGIN{print substr("10EnsureUSuspendCapable", 1, 2)}'
+++ XStatusProgressStart_gnomeZenityHelper 'Preparing to suspend...'
+++ trap zenity_hup_handler HUP
+++ zenity --progress --auto-close --title=Hibernate '--text=Preparing to
suspend...'
+ new_CHAIN_UP_TO=10
+ '[' -n 10 ']'
+ CHAIN_UP_TO=10
+ bit=EnsureUSuspendCapable
+ vecho 1 'hibernate: [10] Executing EnsureUSuspendCapable ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[10]' Executing EnsureUSuspendCapable ...
hibernate: [10] Executing EnsureUSuspendCapable ...
+ '[' -n '' ']'
+ EnsureUSuspendCapable
++ command -v s2disk
+ USUSPEND_PROG_PATH=/usr/sbin/s2disk
+ '[' s2disk = s2ram ']'
+ test -f /sys/power/state
+ test -c /dev/snapshot
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
++ awk 'BEGIN{print substr("11XHacksSuspendHook1", 1, 2)}'
+ new_CHAIN_UP_TO=11
+ '[' -n 11 ']'
+ CHAIN_UP_TO=11
+ bit=XHacksSuspendHook1
+ vecho 1 'hibernate: [11] Executing XHacksSuspendHook1 ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[11]' Executing XHacksSuspendHook1 ...
hibernate: [11] Executing XHacksSuspendHook1 ...
+ '[' -n '' ']'
+ XHacksSuspendHook1
+ '[' x = x1 ']'
+ '[' x = x1 ']'
+ '[' -n '' ']'
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n '' ']'
+ for bit in '`SortSuspendBits`'
+ local new_CHAIN_UP_TO
++ awk 'BEGIN{print substr("15PauseAudio", 1, 2)}'
+ new_CHAIN_UP_TO=15
+ '[' -n 15 ']'
+ CHAIN_UP_TO=15
+ bit=PauseAudio
+ vecho 1 'hibernate: [15] Executing PauseAudio ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[15]' Executing PauseAudio ...
hibernate: [15] Executing PauseAudio ...
+ '[' -n '' ']'
+ PauseAudio
+ local auuser
++ ps aux
++ grep -w '[q]uodlibet'
++ awk '{print $1}'
++ sort
++ uniq
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(zenity:24769): Gtk-WARNING **: cannot open display: :0
+++ kill -INT 24751
+++ exit 0
++ ctrlc_handler
++ SUSPEND_ABORT=1
++ ps aux
++ grep -w '[x]mms'
++ awk '{print $1}'
++ uniq
++ sort
++ ps aux
++ grep -w '[b]eep-media-player'
++ awk '{print $1}'
++ sort
++ uniq
++ ps aux
++ grep -w '[a]marok'
++ awk '{print $1}'
++ sort
++ uniq
+ return 0
+ ret=0
+ '[' 0 -ge 2 ']'
+ '[' 0 -gt 0 ']'
+ '[' -n 1 ']'
+ vecho 0 'hibernate: Suspend aborted by user.'
+ local v
+ v=0
+ shift
+ '[' x = x1 ']'
+ '[' 0 -le 4 ']'
+ echo hibernate: Suspend aborted by user.
hibernate: Suspend aborted by user.
+ EXIT_CODE=3
+ break
++ SortResumeBits
++ /bin/echo -ne
'01XStatusReportErrors\n05XStatusProgressKill\n15XStatusProgress\n20XStatusProgress\n30XStatusProgress\n40XStatusProgress\n50XStatusProgress\n60XStatusProgress\n70XStatusProgress\n80XStatusProgress\n90XStatusProgress\n95XStatusResumeBegin\n85XHacksResumeHook2\n11XHacksResumeHook1\n30ServicesStart\n91GentooModulesAutoload\n90ModulesLoad\n20MiscLaunchAuxFunc1\n30UnlockGnomeScreensaver\n70ClockRestore\n59RemountXFSBootRW\n89RestoreKernelModprobe\n01NoteLastResume\n01LockFilePut\n'
++ sort -rn
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("95XStatusResumeBegin", 1, 2)}'
+ THIS_POS=95
+ '[' -z 95 ']'
+ bit=XStatusResumeBegin
+ '[' 95 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("91GentooModulesAutoload", 1, 2)}'
+ THIS_POS=91
+ '[' -z 91 ']'
+ bit=GentooModulesAutoload
+ '[' 91 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("90XStatusProgress", 1, 2)}'
+ THIS_POS=90
+ '[' -z 90 ']'
+ bit=XStatusProgress
+ '[' 90 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("90ModulesLoad", 1, 2)}'
+ THIS_POS=90
+ '[' -z 90 ']'
+ bit=ModulesLoad
+ '[' 90 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("89RestoreKernelModprobe", 1, 2)}'
+ THIS_POS=89
+ '[' -z 89 ']'
+ bit=RestoreKernelModprobe
+ '[' 89 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("85XHacksResumeHook2", 1, 2)}'
+ THIS_POS=85
+ '[' -z 85 ']'
+ bit=XHacksResumeHook2
+ '[' 85 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("80XStatusProgress", 1, 2)}'
+ THIS_POS=80
+ '[' -z 80 ']'
+ bit=XStatusProgress
+ '[' 80 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("70XStatusProgress", 1, 2)}'
+ THIS_POS=70
+ '[' -z 70 ']'
+ bit=XStatusProgress
+ '[' 70 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("70ClockRestore", 1, 2)}'
+ THIS_POS=70
+ '[' -z 70 ']'
+ bit=ClockRestore
+ '[' 70 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("60XStatusProgress", 1, 2)}'
+ THIS_POS=60
+ '[' -z 60 ']'
+ bit=XStatusProgress
+ '[' 60 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("59RemountXFSBootRW", 1, 2)}'
+ THIS_POS=59
+ '[' -z 59 ']'
+ bit=RemountXFSBootRW
+ '[' 59 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("50XStatusProgress", 1, 2)}'
+ THIS_POS=50
+ '[' -z 50 ']'
+ bit=XStatusProgress
+ '[' 50 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("40XStatusProgress", 1, 2)}'
+ THIS_POS=40
+ '[' -z 40 ']'
+ bit=XStatusProgress
+ '[' 40 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("30XStatusProgress", 1, 2)}'
+ THIS_POS=30
+ '[' -z 30 ']'
+ bit=XStatusProgress
+ '[' 30 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("30UnlockGnomeScreensaver", 1, 2)}'
+ THIS_POS=30
+ '[' -z 30 ']'
+ bit=UnlockGnomeScreensaver
+ '[' 30 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("30ServicesStart", 1, 2)}'
+ THIS_POS=30
+ '[' -z 30 ']'
+ bit=ServicesStart
+ '[' 30 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("20XStatusProgress", 1, 2)}'
+ THIS_POS=20
+ '[' -z 20 ']'
+ bit=XStatusProgress
+ '[' 20 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("20MiscLaunchAuxFunc1", 1, 2)}'
+ THIS_POS=20
+ '[' -z 20 ']'
+ bit=MiscLaunchAuxFunc1
+ '[' 20 -gt 15 ']'
+ continue
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("15XStatusProgress", 1, 2)}'
+ THIS_POS=15
+ '[' -z 15 ']'
+ bit=XStatusProgress
+ '[' 15 -gt 15 ']'
+ vecho 1 'hibernate: [15] Executing XStatusProgress ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[15]' Executing XStatusProgress ...
hibernate: [15] Executing XStatusProgress ...
+ '[' -n '' ']'
+ XStatusProgress
+ '[' -z gnome ']'
+ XSTATUS_PROGRESS=20
+ XStatusProgressUpdate_gnome
+ '[' -n 1 ']'
+ echo 20
/usr/share/hibernate/scriptlets.d/xstatus: line 101: echo: write error: Broken
pipe
++ XStatusProgressPIPEhandler_gnome
++ ZENITY_OPEN=
++ XStatusProgressKill_gnome
++ '[' -n '' ']'
++ exec
++ '[' -p '' ']'
++ '[' -n '' ']'
++ ZENITY_OPEN=
+ '[' x20 = x100 ']'
+ return 0
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("11XHacksResumeHook1", 1, 2)}'
+ THIS_POS=11
+ '[' -z 11 ']'
+ bit=XHacksResumeHook1
+ '[' 11 -gt 15 ']'
+ vecho 1 'hibernate: [11] Executing XHacksResumeHook1 ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[11]' Executing XHacksResumeHook1 ...
hibernate: [11] Executing XHacksResumeHook1 ...
+ '[' -n '' ']'
+ XHacksResumeHook1
+ '[' -n '' ']'
+ return 0
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("05XStatusProgressKill", 1, 2)}'
+ THIS_POS=05
+ '[' -z 05 ']'
+ bit=XStatusProgressKill
+ '[' 05 -gt 15 ']'
+ vecho 1 'hibernate: [05] Executing XStatusProgressKill ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[05]' Executing XStatusProgressKill ...
hibernate: [05] Executing XStatusProgressKill ...
+ '[' -n '' ']'
+ XStatusProgressKill
+ '[' -z gnome ']'
+ XSTATUS_PROGRESS=30
+ XStatusProgressKill_gnome
+ '[' -n '' ']'
+ exec
+ '[' -p '' ']'
+ '[' -n '' ']'
+ ZENITY_OPEN=
+ return 0
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("01XStatusReportErrors", 1, 2)}'
+ THIS_POS=01
+ '[' -z 01 ']'
+ bit=XStatusReportErrors
+ '[' 01 -gt 15 ']'
+ vecho 1 'hibernate: [01] Executing XStatusReportErrors ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing XStatusReportErrors ...
hibernate: [01] Executing XStatusReportErrors ...
+ '[' -n '' ']'
+ XStatusReportErrors
+ '[' -z gnome ']'
+ '[' -z '' ']'
+ return 0
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("01NoteLastResume", 1, 2)}'
+ THIS_POS=01
+ '[' -z 01 ']'
+ bit=NoteLastResume
+ '[' 01 -gt 15 ']'
+ vecho 1 'hibernate: [01] Executing NoteLastResume ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing NoteLastResume ...
hibernate: [01] Executing NoteLastResume ...
+ '[' -n '' ']'
+ NoteLastResume
+ '[' -f /var/run/hibernate-last-resume ']'
+ date +%s
+ return 0
+ for bit in '`SortResumeBits`'
++ awk 'BEGIN{print substr("01LockFilePut", 1, 2)}'
+ THIS_POS=01
+ '[' -z 01 ']'
+ bit=LockFilePut
+ '[' 01 -gt 15 ']'
+ vecho 1 'hibernate: [01] Executing LockFilePut ... '
+ local v
+ v=1
+ shift
+ '[' x = x1 ']'
+ '[' 1 -le 4 ']'
+ echo hibernate: '[01]' Executing LockFilePut ...
hibernate: [01] Executing LockFilePut ...
+ '[' -n '' ']'
+ LockFilePut
+ '[' -z 1 ']'
+ local lockfile_pid
+ read lockfile_pid
+ IsANumber 24570
+ case "$1" in
+ return 0
+ '[' 24570 -eq 24570 ']'
+ rm -f /var/run/hibernate-script.pid
+ return 0
+ return 3
+ eval 'EXIT_CODE=${PIPESTATUS[0]}'
++ EXIT_CODE=3
+ PluginTermination
+ local i
+ for i in '$TERMINATION_HANDLERS'
+ Swsusp2Termination
+ return 0
+ return 0
+ tee -a -i /var/log/hibernate.log
++ date
+ echo 'Resumed at Sat' Nov 24 10:32:53 CET 2007
+ exit 3

------- Comment #4 From Daniel Schömer 2007-11-24 09:44:46 0000 -------
I got the meaning of "command -v xhost" totally wrong. Sorry for that. After a
second look on these lines in the output

  /usr/sbin/hibernate: line 810: /proc/XAUTHORITY/environ: No such file or
directory
  /usr/sbin/hibernate: line 810: /proc/HOME/environ: No such file or directory

I found a maybe-bug in calling function "get_env_var_of_process". In it's
definition, $1 is the pid, $2 the variable name.

After appling the following patch, everything seems fine the following patch,
everything seems fine and I get a progress bar in GDM.

--- /usr/sbin/hibernate.orig    2007-09-30 15:54:58.000000000 +0200
+++ /usr/sbin/hibernate 2007-11-24 10:28:19.000000000 +0100
@@ -222,8 +206,8 @@
            # Ensure the process still exists, and we aren't hallucinating.
            [ -d "/proc/$xpid/" ] || continue

-           xauth="`get_env_var_of_process XAUTHORITY $xpid`"
-           xhome="`get_env_var_of_process HOME $xpid`"
+           xauth="`get_env_var_of_process $xpid XAUTHORITY`"
+           xhome="`get_env_var_of_process $xpid HOME`"
            xuser=`/bin/ls -ld /proc/$xpid/ | awk '{print $3}'`
            [ -z $xauth ] && [ -n $xhome ] && [ -f $xhome/.Xauthority ] &&
xauth=$xhome/.Xauthority


(from tty1 while nobody logged into X)
# sudo hibernate --verbosity=4
(output to large, appending as file "hibernate-ok.log")

------- Comment #5 From Daniel Schömer 2007-11-24 09:46:42 0000 -------
Created an attachment (id=136868) [details]
Exchange arguments on function get_env_var_of_process

------- Comment #6 From Daniel Schömer 2007-11-24 09:47:14 0000 -------
Created an attachment (id=136870) [details]
Output of hibernate --verbosity=4 after appling b.patch

------- Comment #7 From Daniel Schömer 2007-11-24 09:49:59 0000 -------
Should we change the summary to "sys-power/hibernate-script-1.97-r2 - Searching
for running X11 fails from GDM, wrong call to function get_env_var_of_process
in /usr/sbin/hibernate"?

------- Comment #8 From Alon Bar-Lev (RETIRED) 2007-11-24 10:27:46 0000 -------
Please *ATTACH* the failed result.
Thanks.

------- Comment #9 From Daniel Schömer 2007-11-24 10:47:44 0000 -------
Created an attachment (id=136872) [details]
Output of hibernate --verbosity=4

------- Comment #10 From Alon Bar-Lev (RETIRED) 2007-11-24 19:05:14 0000 -------
Do you have PauseAudio in your configuration?
If you do, can you please try to disable it?

------- Comment #11 From Daniel Schömer 2007-11-24 19:28:39 0000 -------
Created an attachment (id=136908) [details]
Output of "hibernate --verbosity=4" with PauseAudio disabled

I had "PauseAudio yes" in configuration. After disabling it, hibernate still
aborts if nobody is logged into an X session (no matter if hibernate is called
from console or the GDM Greeter). Appling "b.patch" still solves the problem
for me.

------- Comment #12 From Alon Bar-Lev (RETIRED) 2007-11-24 20:09:11 0000 -------
Why do you aborted suspend?
Does it hang?
+ vecho 0 'hibernate: Suspend aborted by user.'
+ local v
+ v=0
+ shift
+ '[' x = x1 ']'
+ '[' 0 -le 4 ']'
+ echo hibernate: Suspend aborted by user.
hibernate: Suspend aborted by user.
+ EXIT_CODE=3
+ break

------- Comment #13 From Daniel Schömer 2007-11-24 20:28:33 0000 -------
I never aborted suspend myself! It aborts just by itself.

------- Comment #14 From Alon Bar-Lev (RETIRED) 2007-11-24 20:29:58 0000 -------
Strange!
Can you please disable all options related to X and services, leave just:
LockGnomeScreenSaver yes

------- Comment #15 From Daniel Schömer 2007-11-24 21:03:23 0000 -------
Created an attachment (id=136921) [details]
Output of "hibernate --verbosity=4" without any X and service related options,
except LockGnomeScreenSaver yes

Without any X or service related options, except LockGnomeScreenSaver yes,
hibernation works for me. (from GDM Greeter; never had problems from within X
session)

------- Comment #16 From Daniel Schömer 2007-11-24 21:04:20 0000 -------
Created an attachment (id=136922) [details]
Hibernate config for attachment 136921 [details]

------- Comment #17 From Alon Bar-Lev (RETIRED) 2007-11-24 21:08:39 0000 -------
Great!
Now start to enable each individual feature so we can start solving these one
by one.

Thanks!

------- Comment #18 From Daniel Schömer 2007-11-24 21:31:16 0000 -------
Created an attachment (id=136924) [details]
Output of "hibernate --verbosity=4" without any X and service related options,
except LockGnomeScreenSaver yes and XStatus gnome

Only enabled "XStatus gnome" option. As I expected, hibernate does not work
now.

Again, after applying "b.patch", hibernate works. Pleas take a look at the
calls and definition of get_env_var_of_process(). The parameter order either on
call or in the definition needs to be exchanged (but not both :-).

/usr/sbin/hibernate: line 810: /proc/XAUTHORITY/environ: No such file or
directory
/usr/sbin/hibernate: line 810: /proc/HOME/environ: No such file or directory

# grep -n -C3 get_env_var_of_process /usr/sbin/hibernate
206-        # Ensure the process still exists, and we aren't hallucinating.
207-        [ -d "/proc/$xpid/" ] || continue
208-
209:        xauth="`get_env_var_of_process XAUTHORITY $xpid`"
210:        xhome="`get_env_var_of_process HOME $xpid`"
211-        xuser=`/bin/ls -ld /proc/$xpid/ | awk '{print $3}'`
212-        [ -z $xauth ] && [ -n $xhome ] && [ -f $xhome/.Xauthority ] &&
xauth=$xhome/.Xauthority
213-
--
804-
805-# Gets the value of the environment variable in the environment space of
the
806-# processes identified by its PID.
807:get_env_var_of_process()
808-{
809-    local pid="$1" envvar="$2"
810-    tr '\0' '\n' </proc/$pid/environ | sed -ne "s/^$envvar=//p"

------- Comment #19 From Daniel Schömer 2007-11-24 21:32:08 0000 -------
Created an attachment (id=136926) [details]
Hibernate config for attachment 136924 [details]

------- Comment #20 From Alon Bar-Lev (RETIRED) 2007-11-24 21:52:09 0000 -------
Oh...
Thanks for the reference.

I think:
-xauth="`get_env_var_of_process XAUTHORITY $xpid`"
-xhome="`get_env_var_of_process HOME $xpid`"
+xauth="`get_env_var_of_process $xpid XAUTHORITY`"
+xhome="`get_env_var_of_process $xpid HOME`"

Can you see if this solve this issue?

------- Comment #21 From Daniel Schömer 2007-11-24 21:58:26 0000 -------
Yes, this change solves this issue for me. (already in 136868, but the
linenumbers there might be wrong, since I compared to the original hibernate.sh
from hibernate-script-1.97.tar.gz)

Thanks for your help.

------- Comment #22 From Daniel Schömer 2007-11-24 21:59:23 0000 -------
Sorry, I should have written "already in attachment 136868 [details]".

------- Comment #23 From Alon Bar-Lev (RETIRED) 2007-11-24 22:06:08 0000 -------
Oh.
I did not read your comment properly.
Does it work with the sound too?

------- Comment #24 From Daniel Schömer 2007-11-24 22:53:25 0000 -------
Created an attachment (id=136938) [details]
Working hibernate configuration

Yes, it works, even with "PauseAudio yes" in config. Here's my curret working
common.conf.

------- Comment #25 From Alon Bar-Lev (RETIRED) 2007-11-25 06:07:37 0000 -------
Thanks!!!

------- Comment #26 From Daniel Schömer 2007-11-25 16:20:15 0000 -------
With sys-power/hibernate-script-1.97-r3, to problem is gone. Thank you!

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug