Score:1

Suspend-then-hibernate

tk flag

I enabled suspend-then-hibernate but its not working all the time. When the system is not running code, if i press the power key then the system suspends for 10seconds(as i gave hibernate delay sec=10 in sleep.conf) then hibernates. I am running a python code with multiprocessing, during this time if I press the power button then system suspends for 10seconds, then pauses and again on suspend.

sleep.conf file: [Sleep] #AllowSuspend=yes #AllowHibernation=yes AllowSuspendThenHibernate=yes #AllowHybridSleep=yes #SuspendMode= #SuspendState=mem standby freeze HibernateMode=platform shutdown HibernateState=disk #HybridSleepMode=suspend platform shutdown #HybridSleepState=disk HibernateDelaySec=10

and did "sudo ln -s /usr/lib/systemd/system/systemd-suspend-then-hibernate.service /etc/systemd/system/systemd-suspend.service"

I also tried enabling Allowsuspend, AllowHibernation, giving the suspend mode in the sleep.conf file. Then i modified the logind.conf by enabling "HandlePowerKey=suspend-then-hibernate".

I converted my code to exe using pyinstaller. If I run as python code then this functionality works fine but if I run the exe it doesn't.

Can somebody please clarify this behaviour? Why doesn't it work when the code is running? I am using Intel 11th gen NuC and Ubuntu 20.

Score:0
tk flag

After increasing the swap space and disabling 'secure boot'(not sure if its safe to do so) it worked.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.