[ltp] change vt when Xorg is running, on ThinkPad X31

HOSONO Hidetomo linux-thinkpad@linux-thinkpad.org
Mon, 19 Jun 2006 08:27:18 +0900


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello, guys.

 I use recent Gentoo Linux on ThinkPad X31 (Video card is Radeon
Mobility M6 LY). To avoid hanging up when suspension with X11, I have
stored the code, /etc/apm/event.d/chvt, which is kicked from
/etc/apm/apmd_proxy.

(Here is the code of /etc/apm/event.d/chvt)
======================================================================
#!/bin/sh
### -*- mode: sh; coding: utf-8; -*-
### $Id$

PATH=/usr/bin:/bin

case ${1} in
    suspend|standby)
	/usr/bin/chvt 1 2>&1 >> /var/log/chvt.log
        ;;
    resume)
        PIDOFX=`/usr/bin/pidof X | /usr/bin/awk '{print $1}'`
        if [ ${PIDOFX} != 0 ]
        then
            VTOFX=`ps -p ${PIDOFX} -o '%y' --no-header | sed -n -e
's/^tty//p'`
            if [ ${VTOFX} != 0 ]
            then
                /usr/bin/chvt ${VTOFX}
            fi
        fi
        ;;
esac
======================================================================

 After upgrading x11-base/xorg-x11-7.1 and
x11-drivers/xf86-video-ati-6.6.0, this script doesn't work fine with
X. If X is running, after pressing Fn+F12, the display gets blank but
do not hybernate. If I switch to any console (tty1 to tty6) before
pressing Fn+F12, this script works fine.

 Please tell me any hints or experiences with this problem, If you
know.

 Thanks in advance.

- --
HOSONO Hidetomo <http://www.blessedgeeks.org/h12o/>
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEleFTI657i8BdhWgRAufDAJ0VXyH7T6/NIkYmSNX5QNdK3BQzWACgw8sr
ebS0OqcBN6jILW0nr43K9SY=
=brq4
-----END PGP SIGNATURE-----