You are not logged in.

#1 2011-04-25 02:52:23

MkFly
Member
From: Mars
Registered: 2009-12-10
Posts: 141

Can't suspend by closing lid when switched to another TTY

I'm having trouble getting my laptop to suspend when I switch TTYs away from X.

If I'm on my X desktop (Xfce, using xfce4-power-manager, I've also tried gnome-power-manager), my computer will suspend just fine when I close the rid, and resumes normally.

However, if I switch TTY to something not running X (say, tty3), closing the lid does nothing.  However, when I re-open the lid and switch back to X, I have a notification from xfce4-power-manager that simply says:

Power manager wrote:

not authorized

If I do this while logged in as root -> startx -> switch TTY -> close lid, it works just fine, telling me that this is likely some permissions issue, but I can't figure out what.  There's nothing in any logfile that I can see.  Here are the groups that my normal user is part of:

lp wheel locate network audio storage scanner power wireshark users

Anybody have an idea?  Thanks in advance. smile

Offline

#2 2011-04-25 05:15:22

Caliban
Member
Registered: 2011-04-24
Posts: 6

Re: Can't suspend by closing lid when switched to another TTY

I think you could edit visudo and enable no passwords for pm-hibernate pm-suspend:

eg:

%power ALL = NOPASSWD: /usr/sbin/pm-hibernate
%power ALL = NOPASSWD: /usr/sbin/pm-suspend

will allow memebers of the power group to suspend without permission
as shown in pm-utils wiki


edit. assuming you use sudo of course

Last edited by Caliban (2011-04-25 05:22:17)

Offline

#3 2011-04-25 06:32:20

MkFly
Member
From: Mars
Registered: 2009-12-10
Posts: 141

Re: Can't suspend by closing lid when switched to another TTY

Caliban wrote:

I think you could edit visudo and enable no passwords for pm-hibernate pm-suspend:

Thanks, but that didn't seem to help.  Doing

sudo pm-suspend

does work now without providing my password, but I still can't get it to suspend automatically when the lid is closed when I'm on another TTY.

Offline

Board footer

Powered by FluxBB