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
26 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
77 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
  • 11
0 votes
0 answers
47 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
2k 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
2 votes
1 answer
131 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
233 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
120 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
1 vote
0 answers
234 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,488
0 votes
0 answers
39 views

Kali Linux mounting as read-only after suspend

Almost always when I wake my computer up from suspend mode, it says "read only file system" if i try and write to something, and Thunar file manager shows locks on all folders. I am running ...
L M's user avatar
  • 1
0 votes
0 answers
38 views

Unable to boot from USB after sleep

I have Void Linux setup with full disk encryption. My boot partition with kernel and encryption key is located on USD drive. Everything is working fine until I turn my laptop into sleep mode, my ACPI ...
g4s8's user avatar
  • 478
0 votes
1 answer
769 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
  • 791
0 votes
1 answer
91 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
0 votes
1 answer
315 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
40 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
99 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
165 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.3k
0 votes
0 answers
387 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
6k 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
2k 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
562 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
2 answers
215 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
208 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
2 votes
1 answer
307 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
571 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
988 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
243 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,057
0 votes
2 answers
397 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
729 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
2k 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
255 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
3 votes
2 answers
11k 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
125 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
371 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
824 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
312 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,963
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
1k 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
412 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
384 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
318 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
0 votes
0 answers
329 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
115 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
542 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
0 votes
1 answer
392 views

Manjaro with KDE takes a long time to wake up after sleeping

I've been a long time user of Cinnamon, which I always thought was super fast, but recently switched to KDE. My experience has been pretty good on all fronts, except that I’ve noticed my laptop takes ...
TomCho's user avatar
  • 529
2 votes
1 answer
680 views

Killing `sleep` in a subshell

In bash, I'm observing that calling kill on a sleeping process won't kill it if I start out with a subshell. Can you help me understand why? function foo () { # Start a loop with `sleep` in the ...
Jellicle's user avatar
  • 401
1 vote
1 answer
654 views

Dell laptop runs hot and loud on idle during suspend and cannot be woken up/resumed (Pop!_OS 21.04)

My Dell Inspiron 5405 (Ryzen 4500U CPU, integrated Radeon graphics) runs Pop OS 21.04 (kernel version 3.11). I have installed Powertop, auto-cpufreq, and kept my firmware and OS up to date. A random ...
botsunny's user avatar
0 votes
1 answer
2k views

what's the max number accepted by sleep? [closed]

I want to run some jobs after waiting some time: I can do: sleep 1000;foo-1;foo-2 What I expected is to wait couple of hours, sleep seems not the best solution. and I don't want to setup cron job.
Mark K's user avatar
  • 865
0 votes
1 answer
665 views

Not able to login after suspend/sleep in Linux Mint 20.04 from XFCE DE

I think this is due to Deepin Desktop Environment, which I install just now, from ubuntudde-ppa. I tried this post:- https://askubuntu.com/questions/818919/xubuntu-16-04-how-do-i-make-it-lock-screen-...
Austin Rojers's user avatar