<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>140403</bug_id>
          
          <creation_ts>2006-07-14 12:52 0000</creation_ts>
          <short_desc>sys-power/hibernate-script - hibernate KDE lock</short_desc>
          <delta_ts>2006-07-15 13:09:15 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>2006.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>alexandref75@gmail.com</reporter>
          <assigned_to>phreak@gentoo.org</assigned_to>
          <cc>mobile@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>alexandref75@gmail.com</who>
            <bug_when>2006-07-14 12:52:47 0000</bug_when>
            <thetext>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 &quot;Locking $session&quot;
        dcop --session &quot;$session&quot; --all-users kdesktop KScreensaverIface lock &gt; /dev/null 2&gt;&amp;1
    done
to:
    # send the lock command to all sessions
    for session in $avail_sessions; do
        vecho 1 &quot;Locking $session&quot;
        # dev/null because dcop warns if it can&apos;t connect to X (this is normal!)
        locked=`dcop --session &quot;$session&quot; --all-users kdesktop KScreensaverIface isBlanked 2&gt;&amp;1`
        if [ &quot;x$locked&quot; = &quot;xtrue&quot; ]
        then
           vecho 1 &quot;Already locked $session&quot;
        else
           dcop --session &quot;$session&quot; --all-users kdesktop KScreensaverIface lock &gt; /dev/null 2&gt;&amp;1
           vecho 1 &quot;Locked $session&quot;
        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=&quot;amd64 ~amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=athlon64 -O2&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/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&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c&quot;
CXXFLAGS=&quot;-march=athlon64 -O2&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks metadata-transfer sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://brasilia.cs.pitt.edu/&quot;
LANG=&quot;en_US.ISO8859-1&quot;
MAKEOPTS=&quot;-j1&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=&apos;/distfiles&apos; --exclude=&apos;/local&apos; --exclude=&apos;/packages&apos;&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/my_portage&quot;
SYNC=&quot;rsync://brasilia.cs.pitt.edu/gentoo-portage&quot;
USE=&quot;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&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>phreak@gentoo.org</who>
            <bug_when>2006-07-15 13:07:46 0000</bug_when>
            <thetext>Fixed in CVS. Thanks a lot!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>phreak@gentoo.org</who>
            <bug_when>2006-07-15 13:09:15 0000</bug_when>
            <thetext>I should even mark it as fixed then!</thetext>
          </long_desc>
      
    </bug>

</bugzilla>