Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › Auto Suspend
- This topic has 13 replies, 6 voices, and was last updated Oct 2-1:18 am by sfink16.
-
AuthorPosts
-
September 20, 2022 at 1:10 am #89370Member
sfink16
Hi everyone,
I just installed AntiX, on a very low end Acer 32-bit laptop, and enjoy it very much. One thing that I couldn’t find was a timeout to suspend the session to save on power. I did use the screen-blank feature. I have that feature on my Ubuntu 22.04 desktop. I know that I can manually hit the Suspend button, but my wife will be the primary user, and she is not technically inclined. I am using the default full install, 32-bit AntiX desktop (I forget which one it is). I updated to the latest kernel 5.10. Am I missing something?
Steve
- This topic was modified 7 months, 3 weeks ago by sfink16.
September 20, 2022 at 5:56 am #89379ModeratorBobC
::Not sure if you can afford the memory or how much CPU it uses, but it sounds like XFCE Power Manager (package name: xfce4-power-manager) has all of the features you are looking for.
Without a lot of effort, I doubt Hibernate will work, BTW.
Maybe someone has a lighter solution?
September 20, 2022 at 1:16 pm #89389Member
sybok
::I have no custom solution, only a general idea.
The necessary thing to do is to track input to HID (Human Interface Devices), i.e. some sort of key/mouse/touch-logger.
If the last input is older than the threshold, suspend the PC.
Using any additional library that needs to be installed may raise concerns about privacy.One could do the following based on the status of monitor.
This below assumes that monitor gets suspended after a period of inactivity.
0) Script, the “core” code runs in a while loop, e.g. every minute.
1) Monitor if any monitor is connected (e.g. via ‘xset -q’: ‘Monitor is On’ or using ‘xrandr’) and whether it is suspended (???).
2) If several [configurable]c consequtive iterations (e..g how many minutes) (in the loop) detect monitor is suspended or off/disconnected, suspend the PC.Caveats:
My home PC with antiX testing – in order to wake up the monitor, I have to press a key, mouse does not work.September 20, 2022 at 1:47 pm #89390Member
manyroads
::Have you tried?
According to the Ubuntu Forum you can use the following commands: pmi action suspend and pmi action hibernate This requires that you install the powermanagement-interface package (not tested). sudo apt-get install powermanagement-interfaceIf one works, just create a keybinding for your favorite.
Pax vobiscum,
Mark Rabideau - http://many-roads.com
"For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
dwm & i3wm ~Reg. Linux User #449130
20 Jan 2021 ~ "End of an Error"September 20, 2022 at 8:41 pm #89427Membersfink16
::Thanks everyone for the responses! I haven’t had a chance to try any out yet but will let you know if any work.
September 22, 2022 at 12:35 am #89503Membersfink16
::Not sure if you can afford the memory or how much CPU it uses, but it sounds like XFCE Power Manager (package name: xfce4-power-manager) has all of the features you are looking for.
Without a lot of effort, I doubt Hibernate will work, BTW.
Maybe someone has a lighter solution?
I tried to use the xfce power management feature and found that the suspend button was grayed out. I’m giving up for now after that test.
September 22, 2022 at 6:06 pm #89556Moderator
Brian Masinick
::I don’t know how you have your system set up, but based on past situations when I’ve set up either Suspend, Hibernate, or both, they do come with some prerequisites:
1) Swap partition, typically enough for AT LEAST the amount of RAM (memory) in your system; the old recommendation used to be TWICE the amount of system memory; that can be a LOT of space that’s seldom actually used EXCEPT when Suspend or Hibernate functions are actually used.
2) Enough disk space to allocate a swap space greater than the size of your system memory!
If you meet these requirements, try setting up your system accordingly and see if it makes any difference.
CAVEAT: these USED to be the requirements; I’ve used Suspend and Hibernate in the past, but I’ve not done so recently, so I can not guarantee from RECENT personal experience that these are the correct or only current requirements; check my information out to see if it is still accurate information!
--
Brian MasinickSeptember 23, 2022 at 8:08 pm #89599Membersfink16
::Brian,
I’m not sure I’m following. I don’t think swap partition space would matter when trying to get AntiX to automatically Suspend/Hibernate after a specified period of time. I have no issues with clicking Leave, than Suspend button to Suspend the laptop. What am I missing?
Steve
September 23, 2022 at 8:11 pm #89601Moderator
Brian Masinick
::If you are sure my suggestion is irrelevant feel free to ignore it; that’s what I have done in the past and it did work for me to enable suspend and hibernate.
Try another solution, it’s OK with me.
--
Brian MasinickSeptember 23, 2022 at 8:21 pm #89602Member
marcelocripe
::Hello sfink16.
Please try this topics:
Suspend s3 with no reason
Suspending every 30 seconds
Screen doesn’t lock on suspend
Lock screen && suspend
Thinkpad T43 locks up upon wake from suspend
Laptop Lid-dissabling suspend/sleep/hibSeptember 24, 2022 at 12:52 am #89617Membersfink16
::If you are sure my suggestion is irrelevant feel free to ignore it; that’s what I have done in the past and it did work for me to enable suspend and hibernate.
Try another solution, it’s OK with me.
Brian,
I wasn’t suggesting it was irrelevant, rather looking for clarification. The Swap partition is already the same size as the memory. That doesn’t seem to work. So the other solution is that I taught my wife how to Suspend the session and wake it up again after.
Steve
September 24, 2022 at 2:18 am #89620Moderator
Brian Masinick
::Swap size the same size as memory is insufficient; make it larger; twice the memory size if possible; that works.
If manually suspending the system works and that’s enough then don’t change anything.
--
Brian MasinickSeptember 24, 2022 at 12:09 pm #89638ModeratorBobC
::Yes, XFCE Power Manager doesn’t seem to work anymore.
I found this site with a script that might work:
https://www.linuxquestions.org/questions/linux-newbie-8/how-to-suspend-after-idle-or-inactivity-period-without-desktop-environment-or-x-4175524123/October 2, 2022 at 1:18 am #90034Membersfink16
::I have revisited this using a suggestion from another source (FB group) and thought I’d share. Adding the LXQT Power management tool gives a few more options that I didn’t have before. Under this power management tool I can use the “Close Lid” option to automatically Suspend the laptop. The “Idle” option doesn’t seem to work. IMO, it’s slightly better than have to click the Menu/Leave/Suspend sequence.
Thanks for all the suggestions!
Steve
-
AuthorPosts
- You must be logged in to reply to this topic.