Skip to main content

Questions tagged [sleep]

a command for delaying execution of a program for the given length of time. For low power mode, use *suspend* instead.

Filter by
Sorted by
Tagged with
0 votes
1 answer
53 views

Suspending and Resuming Thinkpad X1 Carbon Gen 10 in Debian 12

S3 suspend used to work on this machine, but then I updated the firmware and now it doesn't. systemctl suspend makes the screen go black and print Allocating and mlocking memory: 1050624 kb Sleeping ....
groceryheist's user avatar
0 votes
0 answers
37 views

Unable to hibernate, sleep or suspend

I'd like to get hibernate, sleep or suspend to work on my laptop running debian bookworm. I first tried hibernate, but this failed: █[debian-x1-7th][~][0]$ sudo systemctl start systemd-hibernate....
ealfonso's user avatar
  • 953
0 votes
2 answers
76 views

How in convenient and flexible way to input time period for timer and convert it to seconds in Bash?

Like in sleep: sleep 1h 30m 50s. But ideally with even more flexibility like in time calculator with support time corrections with minus sign. Examples: time2seconds (t2s) 1h30m50s # basic case - ...
Anton Samokat's user avatar
0 votes
1 answer
49 views

start command at given time interactively in terminal

is there similar command to sleep, but where I can specify given time, so that my command will start at given time, INTERACTIVELY in my current open terminal window? I know about at command, but that ...
Martin Vegter's user avatar
0 votes
0 answers
23 views

When waking from standby the display prior to sleep is shown for a few seconds on Debian12/KDE --- how to debug if it's fully going to Sleep?

I mentioned this issue here in a question about the built-in keyboard being turned off since recently when waking from sleep and this problem is probably linked to that. When resuming from standby the ...
mYnDstrEAm's user avatar
  • 4,398
0 votes
0 answers
39 views

Why do the lights of keyboard turn on after standby?

What causes the keyboard to stay turned on (or turn back on a few min later) after standby and how to make it turn off on Debian? There are a few lights on my USB keyboard and for a long time after ...
mYnDstrEAm's user avatar
  • 4,398
1 vote
0 answers
118 views

Sometimes the keyboard is turned off when waking from standby after upgrading to Debian12

After upgrading to Debian12 with KDE, sometimes the keyboard of a laptop is turned off while the touchpad still works. It doesn't work again after putting it back into standby and then waking it from ...
mYnDstrEAm's user avatar
  • 4,398
0 votes
1 answer
41 views

Cannot avoid suspend on Xfce

Okay i have had an issue for the past few weeks I cannot figure out. I have been trying to prevent screen sleep/logout on some industrial screen that should staty awake permanently, with autologin, ...
lalannou's user avatar
1 vote
0 answers
127 views

How to run a task running during sleep mode (modern standby/S0ix/S2Idle)

The modern standby exists so Windows can keep network connectivity even when the laptop is in sleep mode, but Linux doesn't seem to do anything similar. How can I make use of such feature and run some ...
123's user avatar
  • 21
0 votes
0 answers
62 views

System won't sleep, Kernel issue?

Randomly, my system will not enter s3 sleep properly, and thus does not wake up from sleep. I have noticed that when it does not enter s3 sleep correctly, entries in my journalctl from the kernel ...
Diamond White's user avatar
2 votes
2 answers
3k views

How can I prevent Linux OS from waking up from sleep mode by pressing buttons?

I often switch my Fedora Linux computer into sleep mode. However, I do not want it to wake up when pressing any button on the keyboard (except for the Power button). What can I do in order to achieve ...
Artem Tartakovskiy's user avatar
3 votes
1 answer
172 views

is there a sleep command that works with real date time and ignores suspend?

is there a sleep command that works with real date time and ignores suspend? echo a;sleep 3600;echo b i work 10mins, suspend the notebook for 2h. When I wake it up from suspend, "b" will ...
VeganEye's user avatar
0 votes
0 answers
253 views

Kubuntu 23.04 - screen freezes randomly when connected to external monitor (extand display)

The weird thing is, that connecting to 2 external extended display monitors (viewing with 3 monitors including the laptop's one), and the problem does not happen. Only with 1 monitor attached. ...
Tzahi Serruya's user avatar
1 vote
0 answers
136 views

Does Debian 12 running on a Dell XPS 15 9520 support "deep" suspend mode?

I have checked the file /sys/power/mem_sleep and it only has the value [s2idle], I didn't see the option deep, but maybe is missing.
logicito's user avatar
  • 111
2 votes
0 answers
385 views

systemd.timer to catch up on missed runs of the services

Following up on Schedule a job every 20 days, This is for renewing purpose, thus can be done sooner than 20 days. But I'm doing it from my laptop, which would be put into sleep most of the time. Thus ...
xpt's user avatar
  • 1,644
0 votes
1 answer
2k views

Linux Sleep Command - Sleep less than 1 ms

How can I sleep less than 0.001s / 1ms? If I use this, it shows me that is is only sleeping for 1ms. Is it possible to sleep less? $ time sleep 0.00001 sleep 0.00001 0,00s user 0,00s system 79% cpu 0,...
Bog's user avatar
  • 1,034
0 votes
1 answer
116 views

Sleep vs tail to wait on process

Currently I do: while [ -d "/proc/$PID" ]; do sleep 1 done To wait for a process to exit. If I would replace it with: tail --pid=$PID -f /dev/null Would that be more efficient for the ...
Maestro's user avatar
  • 191
1 vote
1 answer
504 views

Linux wakes up from sleep on power jack plugging or unplugging

I have a fresh Linux Mint Xfce 21.1 on Lenovo IdeaPad 5 Pro 14ACN6. Sleep/wake works fine when I close and open the lid except one problem: plugging or unplugging the power supply when sleeping wakes ...
Zapunidi's user avatar
0 votes
0 answers
46 views

VirtualBox hogs CPU after host wake, fans roar

Run overnight crashes Windows, sleep overnight cranks VirtualBox %CPU on wake. Either way I must reboot every morning instead of once or twice a year. Windows 11 Home 22H2 Virtual Box 7.0.4-r154605 ...
Devon's user avatar
  • 131
1 vote
1 answer
126 views

DPROBES (DTRACE_PROBE) for measuring high latency stuff under 1µsec

Currently, I'm analyzing the performance of a high latency application but I'm not confident in my measurements at all. So far, I have used DPROBES for instrumentation and BCC/funclatency for ...
Bahamas's user avatar
  • 113
0 votes
1 answer
220 views

How to diagnose a sharp, sudden increase in the frequency with which processes enter the D ("uninterruptible sleep") state

The Linux cluster I work on recently started getting frozen for a few minutes at a time. I've determined that the reason for this behavior is that processes are very frequently landing in the D (&...
kjo's user avatar
  • 15.6k
0 votes
0 answers
500 views

OpenSuse TW - wake up from sleep issue

I have ThinkPad L13 yoga gen 2 running OpenSUSE TW with KDE/Wayland and after going to sleep it won't wake up and throws the following Tried to sleep laptop using X11 this is what I get: Also note ...
WhiteProfileSpecialist's user avatar
2 votes
1 answer
8k views

How can I use Ubuntu 22.04 on a Samsung Galaxy Book 2 ( NP750XED )?

I installed Ubuntu 22.04 on my Samsung Galaxy Book 2 (NP750XED) by following the official instructions and it works perfectly until I turn the computer off. After boot, when reaching the login prompt, ...
Morten Emmanuel Schiøler's user avatar
3 votes
1 answer
3k views

Cannot write into /sys/power/mem_sleep in Fedora 36

Since I failed to find a way to tell systemctl to go to sleep in a one-time specified mode (see previous question), I decided to write some script to change whether the system goes to sleep in shallow ...
Silmathoron's user avatar
4 votes
1 answer
670 views

What is 'csd-media-keys' and why does it block my sleep mode?

After the most recent upgrade, my laptop does not enter suspend mode anymore. With $pm-suspend it seems to start suspending but the power button never turns off. I have read about inhibitors, and ...
shuhalo's user avatar
  • 213
3 votes
3 answers
319 views

On-the-fly switch between deep and idle sleep

I typically put my laptop to sleep regularly, with two distinct cases: short periods (a few minutes) while I read/discuss something long periods (an hour or more) during lunch and commutes I would ...
Silmathoron's user avatar
0 votes
2 answers
250 views

What happened to a sleep command after server shutdown?

I would like to execute a script after 5 hours. My script is $cat << EOF > run.sh sleep 18000 sh run_my_script.sh EOF I submitted the job as: sh run.sh >& log & But due to some ...
Kay's user avatar
  • 101
3 votes
1 answer
350 views

How to run X programs automatically after wakeup from S3 sleep (suspend) or S4 sleep (hibernation)?

The existing question how to run a user script after systemd wakeup? already has answers that allow running scripts after wakeup from sleep. However, the solutions provided to that question require ...
Mikko Rantalainen's user avatar
0 votes
0 answers
675 views

Prevent HD from sleeping in USB external enclosure

I have seen this asked several times. However none of the solutions proposed have worked for me. I am running Ubuntu Server 22.04 with a Mediasonic HF2-SU3S2 ProBox filled with 4 x 2TB drives. ...
Jonathan Konrad's user avatar
0 votes
1 answer
1k views

In my dualboot, KDE Neon(Ubuntu based) does not wake up after sleep/supend/closing lid manually, it needs to be started again manually 9/10 times

I think the title covers it all. I have KDE Neon dualboot with Windows 10. 9 out of 10 times, if it gets to sleep mode it does not wake up. I need to press the power button to power on the laptop ...
Yousuf Azad's user avatar
1 vote
1 answer
293 views

GPU seems to crash Arch upon wake up

Symptoms: On closing the lid the laptop sleeps successfully(evident by the fan dying). On wake up often (1 out of 10 times) everything just freezes. This happens when running X and ratpoison but also ...
Vorac's user avatar
  • 3,115
0 votes
2 answers
527 views

In linux, cannot kill sleep processes (trash.so or dolphin). what to do?

I cant kill any sleep process. I have tried most of the kill signals. I confront this problem often. What i must do in order to kill these processes? trap "kill -15 '-773623'" 0 1 2 3 15 It ...
Estatistics's user avatar
0 votes
1 answer
872 views

sleep in Bash if/else sleep vs <condition> && sleep clamining cpu

I wrote a script to check on the battery and if it is below 5% notify the user. The script is put to sleep for 1 minute after every check. If I write the script in the following way, the cpu workload ...
jeykey's user avatar
  • 33
8 votes
5 answers
3k views

What is difference between sleep and NOP in depth?

I am trying to learn operating system concepts. Here is two simple python code: while True: pass and this one: from time import sleep while True: sleep(0.00000001) Question: Why when running ...
Mojtaba Kamyabi's user avatar
1 vote
2 answers
283 views

Logout of tty but save session for next login

5.18.9-arch1-1 Dell XPS 15 9510 I am running arch linux on xmonad. I do not have a login manager. On boot, I simply login via the tty and run startx to start my x session. This behavior is exactly ...
marc.soda's user avatar
  • 203
4 votes
2 answers
13k views

Linux cli: disable sleep when laptop lid closed

I have no systemd on my debian based distro (antix) and I also have no desktop environment. How can i make my laptop to only blank (or disable) screen when lid is closed, instead of suspending as well ...
Fun_Dan3's user avatar
1 vote
0 answers
132 views

Multiple Scripts all in one with breaks [closed]

I’m writing a script where instead of using ‘sleep 600’ (for example), i actually want to execute another script for the same amount of time as sleep. So basically, instead of “doing nothing” for 10 ...
catgrepsed's user avatar
3 votes
1 answer
409 views

How to figure out what process or event is waking up laptop from `xset dpms force off`

I have a laptop where I tried xscreensaver auto blanking screen after 1 minute of idle time and even though everything seems idle it doesn't blank the screen. So then I ran this command to blank the ...
user3133806's user avatar
0 votes
2 answers
998 views

Bash script with while loop that waits for a file to be refreshed but kills if time threshold is exceeded

I am very basic with bash so apologies if this is obvious to solve and please let me know if more details are needed. The script below is part of a larger script to launch a python workflow and wait ...
Taycano's user avatar
0 votes
1 answer
339 views

SIGSEGV address boundary error shortly after waking from sleep

After resuming from a hybrid-sleep, I can log in (swaylock) and initially it seems ok - pwd, journalctl -xe run as expected in the shell still open from when I put it to sleep. After a short while ...
OJFord's user avatar
  • 1,995
0 votes
1 answer
3k views

What does the sleep command do when run in background?

When I run this command - sleep 10 the terminal waits for 10 seconds. So sleep is acting on the terminal. What happens when I do - sleep 10 &? In the first case it was acting on the terminal but ...
avm's user avatar
  • 111
0 votes
1 answer
2k views

Random float sleep in bash script?

I need randomized pauses in my script between two numbers smaller than 1 second in my script. The following used to work: #! /bin/bash sleep $(python -c "import random;print random.uniform(.2,.8)&...
John's user avatar
  • 3
0 votes
0 answers
445 views

Alpine Linux becomes unreachable after a certain period of inactivity

I have installed Alpine Linux as OS for a mini server. I have correctly configured the server to be reached via ssh (openSSL) and my programs run on docker containers. I use a wired connection. The ...
0Franky's user avatar
0 votes
1 answer
434 views

Variable sleep bash alias [duplicate]

So, I'm trying to create an alias which will run a command after sleeping x seconds. alias ls_sleep="sleep $1 && ls" The problem is, $1 is being passed as string and things like $(($...
alex_pc89's user avatar
  • 101
0 votes
1 answer
2k views

Second display does not turn on after sleep

After my machine (Fedora 35) goes to sleep and wakes, my second monitor won't turn on again. I can reproduce the same problem by running xrandr --output HDMI-1-1 --off xrandr --output HDMI-1-1 --auto ...
ibroketheinternet's user avatar
0 votes
1 answer
1k views

Does locking in gnome allow background tasks like uplaoding to keep running?

I am uploading things in the back and want to lock the screen, but am not sure if the lock function in gnome locks the screen while allowing that to continue. So far it seems that the computer is not ...
user avatar
1 vote
1 answer
349 views

Using sleep command in ssh authorized_key to prevent user's actions

I'm setting up an Ubuntu server to receive ssh connections from clients so I will then be able to connect back to their machine (reverse SSH tunneling). I searched for a way to prohibit any action ...
Joel Rivest's user avatar
1 vote
0 answers
355 views

Deactivate Linux Sleep/freeze/hibernate state without systemctl

I have a system with a very specific Linux compilation that runs on ARM CPUs. It lacks almost all services (systemctl included) and generally-included software (apt-get, snap, etc.) and it is not ...
Eventine's user avatar
2 votes
0 answers
120 views

Closing the lid wakes laptop from sleep

Plugging the power cable in or removing it does the same. Expected behaviour would be that only opening the lid or pressing a key wakes it up. I disabled everything in /proc/acpi/wakeup, no change. ...
tobiashellbusch's user avatar
0 votes
1 answer
575 views

GDM lock screen after resume

I saw a really old question a but like this one but with no answer and no activity in three years. I'm on arch linux with GDM and gnome and when I resume my laptop from suspend, the screen is on what ...
eephyne's user avatar
  • 203