View previous topic :: View next topic |
Author |
Message |
PeGa! Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/147406717655e14ef57ccd8.png)
Joined: 13 May 2005 Posts: 104 Location: Capital Federal, Buenos Aires, Argentina
|
Posted: Thu Jun 06, 2019 2:37 am Post subject: Power management under TTY |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
fturco Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 08 Dec 2010 Posts: 1181
|
Posted: Thu Jun 06, 2019 9:46 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
PeGa! Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/147406717655e14ef57ccd8.png)
Joined: 13 May 2005 Posts: 104 Location: Capital Federal, Buenos Aires, Argentina
|
Posted: Thu Jun 06, 2019 1:22 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
cboldt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/8786426094ce7c06a7c5dd.jpg)
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Thu Jun 06, 2019 2:34 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
eccerr0r Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 01 Jul 2004 Posts: 9892 Location: almost Mile High in the USA
|
Posted: Thu Jun 06, 2019 2:41 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
cboldt Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/8786426094ce7c06a7c5dd.jpg)
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Thu Jun 06, 2019 3:16 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|