You are not logged in.

#1 2016-03-02 00:03:32

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

[SOLVED] Power Settings only apply to logged-in user?

Alright folks, should be an easy one for ya. I set up SSH and VNC servers on my laptop last night, eager to try a cheeky remote in from work today. So this morning I booted up and logged in, made sure it was all running, logged out and closed the lid. Now, I've set up power settings such that closing the lid does nothing, and the machine should never go into suspend mode, whether on AC or on battery. Unfortunately it looks like it has.
A good indicator that it has is that I set up a cron job to call a tiny PHP script to update an IP address that I can access from another server so I know what my home IP address is, should it change - I changed it to my work address, and it hasn't changed back after five minutes.
So the question is, do the power settings, that is the settings that can be changed through the UI, only apply to the logged in user, or should they be system-wide? Did I maybe miss something? I may have to investigate further when I get home, or maybe you guys know something I don't.

Last edited by Eraph (2016-03-02 09:59:55)


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#2 2016-03-02 00:45:30

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: [SOLVED] Power Settings only apply to logged-in user?

I a currently attempting to help another user who is having an issue with his system going to sleep when the screen locks, so it will be interesting to see what comes up. I am leaning towards xfce4-power-manager is working per-user. Also, I suspect light-locker, in that kicking the user back to login maybe resetting the login session. I think when I get this file-server built, I will set it up via systemd-networkd and setup systemd to also handle power management events.

Offline

#3 2016-03-02 07:25:13

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: [SOLVED] Power Settings only apply to logged-in user?

Well now that I'm home I can confirm that when logged out, closing the lid does indeed suspend the laptop, but not when I am logged in.
I had a look around and thought it might be something to do with acpid, but it's a pretty simple setup and the only rule there is for the power button.
So any ideas where to look for global power settings? I know the alternative is to just be logged in, but I figure it's good to know the proper way to do this.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

#4 2016-03-02 09:41:49

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: [SOLVED] Power Settings only apply to logged-in user?

Edit the file at /etc/systemd/logind.conf (as root!) and change these two lines:

HandleLidSwitch=ignore
LidSwitchIgnoreInhibited=no

Be sure to remove the "#" symbol from the start of those lines.

See logind.conf(5)

Offline

#5 2016-03-02 09:59:38

Eraph
Member
From: /au/qld/bne
Registered: 2016-02-29
Posts: 282
Website

Re: [SOLVED] Power Settings only apply to logged-in user?

Spot on mate, worked perfectly. I'll mark this as solved.


Lenovo IdeaPad Yoga 13 | BunsenLabs Hydrogen (x64)
Intel Core i7-3537U | Intel HD4000 | 8GB DDR3 | 256GB SSD

Offline

Board footer

Powered by FluxBB