Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Power management under TTY
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
PeGa!
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 104
Location: Capital Federal, Buenos Aires, Argentina

PostPosted: Thu Jun 06, 2019 2:37 am    Post subject: Power management under TTY Reply with quote

Hello,

I'm doing a long waited system upgrade in my laptop, and as it only has 4GB of RAM, I decided to stop X entirely and work only in TTY.

Now, the problem is, when I close the lid, my system (i5 5200u based generic laptop) goes to sleep.

How could I control that behavior? In X (I use Plasma Desktop) it's just a couple of clicks, but what about TTY? I tried vbetool to no avail, and a couple of searches around the forums pointed me to look into /etc/acpi (there's no such directory in my system, and after a quick eix I noticed I don't have any acpi packages installed either) and to look into /proc. However, in /proc I only found the lid state and /sys wasn't helpful either.

Any hints will be appreciated.

Thanks in advance.
_________________
If it moves, it needs an ebuild.

Adopt an unanswered post.
Back to top
View user's profile Send private message
fturco
Veteran
Veteran


Joined: 08 Dec 2010
Posts: 1181

PostPosted: Thu Jun 06, 2019 9:46 am    Post subject: Reply with quote

If you use systemd you can set HandleLidSwitch=ignore in /etc/systemd/logind.conf and restart systemd-logind.service (be warned that this will terminate all login sessions that might still be open). Unfortunately I don't know how to accomplish the same thing with OpenRC or other init systems...
Back to top
View user's profile Send private message
PeGa!
Tux's lil' helper
Tux's lil' helper


Joined: 13 May 2005
Posts: 104
Location: Capital Federal, Buenos Aires, Argentina

PostPosted: Thu Jun 06, 2019 1:22 pm    Post subject: Reply with quote

Hi fturco,

I forgot to specify; I'm using OpenRC.

Thanks anyway.
_________________
If it moves, it needs an ebuild.

Adopt an unanswered post.
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Thu Jun 06, 2019 2:34 pm    Post subject: Reply with quote

Likely the kernel is doing this all on its own, that is, no need for any userspace ACPI package.

There is a file in the kernel source code tree, Documentation/acpi/acpi-lid.txt that advises of a few kernel boot parameters that affect how the lid switch is handled. I suppose there are some kernel build settings that could accomplish a similar "ignore" effect.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9892
Location: almost Mile High in the USA

PostPosted: Thu Jun 06, 2019 2:41 pm    Post subject: Reply with quote

It's doing some firmware based suspend. Acpid should intercept all the acpi events, of which lid switch is one of them. You can try emerging acpid and see if it will intercept the suspend like what GUI normally does to handle the suspend event.

(vbetool only handles your display, not cpu)

BTW, you probably can get away with running the GUI on 2GB 32-bit and ~3GB 64-bit machines, less than that is dicey, but you need swap space. I set up swap on all my machines including SSD based machines for the overflow.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
cboldt
Veteran
Veteran


Joined: 24 Aug 2005
Posts: 1046

PostPosted: Thu Jun 06, 2019 3:16 pm    Post subject: Reply with quote

Tried this, worked for me ...

"To toggle their state you have to echo the device name to the file as root."

Code:

# echo LID > /proc/acpi/wakeup


I did a `cat proc/acpi/wakeup` and the contents include an entry called "LID"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum