GNOME Bugzilla – Bug 352283
Suspend only works once with Compiz/XGL
Last modified: 2006-08-25 18:45:22 UTC
I've been running the latest Ubuntu Dapper gnome-power-manager release with no problems. I recently added the XGL extensions which has caused the suspend functionality to stop working. I've resolved this by stoping the compiz extension by adding stop/start scripts in /etc/acpi/[suspend|resume].d stop-compiz.sh killall compiz.real start-compiz.sh #!/bin/bash getXuser() { user=`who| grep -m1 ":$displaynum " | awk '{print $1}'` if [ x"$user" = x"" ]; then user=`who| grep -m1 ":$displaynum" | awk '{print $1}'` fi if [ x"$user" != x"" ]; then userhome=`getent passwd $user | cut -d: -f6` export XAUTHORITY=$userhome/.Xauthority else export XAUTHORITY="" fi } for x in /tmp/.X11-unix/*; do displaynum=`echo $x | sed s#/tmp/.X11-unix/X##` getXuser; if [ x"$XAUTHORITY" != x"" ]; then export DISPLAY=":$displaynum" export LIBGL_ALWAYS_INDIRECT=1 sudo -H -b -u $user /usr/bin/gnome-window-decorator --replace sudo -H -b -u $user /usr/bin/compiz --strict-binding --indirect-rendering --replace gconf fi done The stop script works fine and I can suspend/resume multiple times with just this in place (I obviously have to start the compiz binary by hand after resume). With the start-script in place I can suspend/resume once but subsequent attempts fail, in syslog I see the line : Aug 21 18:19:23 localhost gnome-power-manager: Suspending computer because the l id has been closed on ac power Nothing happens after this however. With the two sudo lines commented out, suspend/resume works multiple times so it's definately one of these actions that causes gnome-power-manager not to work. My questions are : 1. Is these anything immediately obvious about these two sudo lines that would cause gnome-power-manager not to function after they are executed 2. What other information can I provide that is relevant to debugging the situation ? I know there are a number of other users with a similar problem and I suspect with the popularity of the XGL extensions the numbers will grow significantly so it would be nice to be able to provide a fix that is compatible with gnome-power-manager.
I would say you've lost permissions to suspend, but can you get the output of 'gnome-power-manager --verbose --no-daemon' when the suspend fails please. Thanks.
Created attachment 71519 [details] gnome-power-manager log for the broken case
Created attachment 71520 [details] gnome-power-manager log for the working case
Hi, I've created two logs from gnome-power-manager --verbose --no-daemon The gnome-power-manager.log.working is the case where I can suspend/resume multiple times (without the compiz start script in /etc/acpi/resume.d) The gnome-power-manager.log.broken is the case where I can suspend/resume only once and subsequent attempts fail (with the compiz script in /etc/acpi/resume.d) In the 'broken' case (where the compiz start script is in place) I notice that restarting the gnome-power-manager makes no difference and subsequent suspends will always fail, which I guess implies something is retaining state and gnome-power-manger is reading/interacting with this causing it not to suspend (maybe something in /proc/acpi ???) Thanks, Rob
I see the line: gpm_manager_is_policy_timeout_valid: check-foreground-console returned with 0 which means that you are using the ubuntu modified version. Can you try with CVS head or an unmodified 2.x.x release please? Also, when g-p-m fails to suspend, can you try suspending manually please: dbus-send --system --print-reply --dest=org.freedesktop.Hal \ /org/freedesktop/Hal/devices/computer \ org.freedesktop.Hal.Device.SystemPowerManagement.Suspend \ int32:0 Thanks.
Yes - I'm running the ubuntu package version of gnome-power-manager. When forcing suspend : dbus-send --system --print-reply --dest=org.freedesktop.Hal \ /org/freedesktop/Hal/devices/computer \ org.freedesktop.Hal.Device.SystemPowerManagement.Suspend \ int32:0 I see : robl@dexter:~$ dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:0 Error org.freedesktop.DBus.Error.NoReply: No reply within specified time I'll try to compile the latest version of gnome-power-manager but I've had problems attempting to do this in the past, specifically pkg-config not finding HAL (on running configure), which I'm not sure how to overcome - I'll do some digging.
If the dbus-send command fails then it's not a gnome-power-manager bug, but a hal or pmi bug. Does 'pmi suspend' (or whatever the command is on ubuntu) work?
Thanks for the reply, To answer, pmi suspend works repeatably with the compiz scripts in place so I'm guessing the problem is with hal in some way and that due to the hal problem when gnome-power-manager tries to send dbus commands to hal it fails (?) I guess the bug can closed against gnome-power-manager and thanks for all the help. As a final question - I'm going to post a bug (probably on the ubuntu launchpad tracking system) against the hal system - do you have any suggestions/ideas about what the problem could be or any extra info that might help the hal package maintainers with repsect to this problem (I'll point them towards this bug so they've got this info). Thanks for all the help - much appreciated. Rob
Okay, thanks. I'll close this notgnome, and I wouldn't mind betting the issue is releated with how ubuntu patch hal to work with at_console, but I wouldn't like to speculate more. Make sure you link this report to the launchpad hal entry. Thanks. Richard