Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 140403 - sys-power/hibernate-script - hibernate KDE lock
Summary: sys-power/hibernate-script - hibernate KDE lock
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Heim (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-14 12:52 UTC by Alexandre Ferreira
Modified: 2006-07-15 13:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Ferreira 2006-07-14 12:52:47 UTC
Using hibernate-script if a session is already locked in KDE, hibernate just hangs waiting a dcop lock command to return.

Changing the file /usr/share/hibernate/scriptlets.d/lock
from:
    # send the lock command to all sessions
    for session in $avail_sessions; do
        vecho 1 "Locking $session"
        dcop --session "$session" --all-users kdesktop KScreensaverIface lock > /dev/null 2>&1
    done
to:
    # send the lock command to all sessions
    for session in $avail_sessions; do
        vecho 1 "Locking $session"
        # dev/null because dcop warns if it can't connect to X (this is normal!)
        locked=`dcop --session "$session" --all-users kdesktop KScreensaverIface isBlanked 2>&1`
        if [ "x$locked" = "xtrue" ]
        then
           vecho 1 "Already locked $session"
        else
           dcop --session "$session" --all-users kdesktop KScreensaverIface lock > /dev/null 2>&1
           vecho 1 "Locked $session"
        fi
    done

solves the problem by not calling dcop to lock if the session is already locked.

Portage 2.1.1_pre2-r8 (default-linux/amd64/2006.0, gcc-3.4.6/amd64-vanilla, glibc-2.4-r3, 2.6.16-suspend2-r9 x86_64)
=================================================================
                       System Settings
=================================================================
System uname: 2.6.16-suspend2-r9 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.1
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://brasilia.cs.pitt.edu/"
LANG="en_US.ISO8859-1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/my_portage"
SYNC="rsync://brasilia.cs.pitt.edu/gentoo-portage"
USE="amd64 X Xaw3d a52 aac aalib acl acpi alsa arts asf ati atk audiofile avi berkdb bitmap-fonts bzlib cdparanoia cdr cli cross crypt cscope ctype cups curl curlwrappers dba dbus divx4linux dlloader doc dri dvd dvdr dvdread eds emboss encode ethereal ffmpeg firefox flac foomaticdb fortran gd gdbm gif glut gnome gpm gstreamer gtk gtk2 gtkhtml guile hal iconv icq imagemagick imap imlib innodb ipv6 isdnlog jabber java joystick jpeg kde lesstif libcaca libg++ lm_sensors logrotate lzw lzw-tiff mad matroska mcal mime mmap mng motif mp3 mpeg mplayer musicbrainz mysql ncurses nls nptl nptlonly ofx ogg oggvorbis openal opengl oss pam pcre pdf pdflib perl php pic png postgres ppds pppd python qt qt3 qt4 quicktime readline reflection samba scanner sdl session shared sharedmem sndfile soap sockets speex spell spl ssl tcpd theora tiff truetype truetype-fonts type1-fonts usb vcd vorbis xine xml xml2 xmms xorg xpm xsl xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_fglrx"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Christian Heim (RETIRED) gentoo-dev 2006-07-15 13:07:46 UTC
Fixed in CVS. Thanks a lot!
Comment 2 Christian Heim (RETIRED) gentoo-dev 2006-07-15 13:09:15 UTC
I should even mark it as fixed then!