You are not logged in.

#1 2012-08-16 14:19:33

manolomartinez
Member
Registered: 2011-04-29
Posts: 66
Website

nVidia and suspend in console

Hello,

Apparently nvidia won't suspend from console -- when coming back up, the display stays black.

I was hoping to hack my way around this problem by starting x right before suspending and killing it right before awaking. The following
script is my attempt at doing so. It goes in /usr/lib/systemd/system-sleep. I'm using systemd:

#!/bin/sh

#Initiate X before suspending if in console

case "$1" in

pre)
if [ ! "$DISPLAY" ]
then
    touch /tmp/fromconsole
    startx & 
    sleep 3
fi
;;

post)
if [ -f /tmp/fromconsole ]
then
    rm /tmp/fromconsole
    killall /usr/bin/X
fi
;;

esac

It does not work: the script does start x, but it doesn't subsequently suspend. Rather, it waits for me to kill x and *then*, unhelpfully, suspends.

Is there anyway to fix whatever is not working, or is this a hopeless attempt?

Thanks
Manolo

Offline

Board footer

Powered by FluxBB