Questions tagged [sleep]
a command for delaying execution of a program for the given length of time. For low power mode, use *suspend* instead.
180
questions
0
votes
0
answers
22
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 ...
1
vote
1
answer
31
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 ...
0
votes
1
answer
31
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 (&...
0
votes
0
answers
55
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 ...
0
votes
0
answers
39
views
disable sleep ubuntu 22 kinetic
i tried guys with this
sudo systemctl mask sleep.target suspend.target hibernate.target
hybrid-sleep.target
gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'
gsettings set org.gnome....
2
votes
1
answer
2k
views
How can I use Ubuntu 22.04 on a Samsung Galaxy Book 2 ( NP750XED )?
I installed Ubuntu 22.04 on my Galaxy 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, ...
0
votes
0
answers
55
views
Ubuntu VPS in sleep mode/standby?
Exactly the same as this thread. Any ideas?
I currently have a problem with my VPS (ubuntu 14.04.4). When I access it after hours the first time again via HTTP or SSH it takes a few seconds until it ...
0
votes
1
answer
595
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 ...
4
votes
1
answer
239
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 ...
1
vote
0
answers
50
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 ...
0
votes
2
answers
61
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 ...
0
votes
0
answers
116
views
Xubuntu not resuming from sleep mode
I have recently made the switch from Windows 7 to Xubuntu.
Things have been going relatively well. Though my main problem with the install of the new OS is how it behaves when my laptop is left idle ...
2
votes
1
answer
100
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 ...
0
votes
0
answers
218
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. ...
0
votes
1
answer
416
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 ...
1
vote
1
answer
135
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 ...
0
votes
2
answers
156
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 ...
0
votes
1
answer
200
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 ...
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 ...
0
votes
2
answers
176
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 ...
0
votes
0
answers
7
views
separate sleep button on Dell model Vostro 14 3000 system 3490
Why is there no separate sleep button on Dell model Vostro 14 3000 system 3490? The Function Fn button + Insert button = sleep mode worked for me. Is there any other way?
1
vote
1
answer
4k
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 ...
1
vote
0
answers
110
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 ...
2
votes
1
answer
215
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 ...
0
votes
2
answers
493
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 ...
0
votes
1
answer
203
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 ...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
676
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)&...
0
votes
0
answers
195
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 ...
0
votes
1
answer
211
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 $(($...
0
votes
1
answer
1k
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 ...
0
votes
1
answer
502
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 ...
1
vote
1
answer
216
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 ...
0
votes
0
answers
194
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 ...
1
vote
0
answers
52
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. ...
0
votes
1
answer
341
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 ...
0
votes
1
answer
274
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 ...
1
vote
1
answer
350
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 ...
1
vote
1
answer
443
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 ...
-1
votes
1
answer
671
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.
0
votes
1
answer
427
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-...
9
votes
1
answer
2k
views
Why does sleep, when run in a shell script, ignore SIGINT?
When I run sleep manually, and then kill -INT it, sleep exits immediately. For example:
$ /bin/sleep 60 &
[1] 4002356
$ kill -INT 4002356
[1]+ Interrupt /bin/sleep 60
$ ps -C ...
1
vote
1
answer
492
views
systemd has a <sleep infinity > process. What is it?
I was looking through the process table and this process, /bin/sleep infinity, was there. It's started by /lib/systemd/systemd --user.
If I kill the sleep, my current session is stopped and I get ...
1
vote
0
answers
145
views
Capture sleep, hibernate and wakeup events on Linux
I need to capture these on both laptop and desktop environmetns. Explored 2 options, but unfortunately none of them worked as expected.
DBus works on desktop but these events also need to be captured ...
0
votes
0
answers
142
views
why SIGPIPE behaves different in different kernels?
I have two different systems running with linux and I'm getting some logs with
tail -f logfile
While tail was running, I sent SIGPIPE to tail's process. tail continued to run on system 1 but died ...
1
vote
0
answers
431
views
Run scripts before and after sleep
I need to run some scripts before and after my system (Fedora 33) goes into sleep mode. So far I tried two different approaches and they both have failed.
First was to place the commands and script ...
0
votes
1
answer
1k
views
How to pipeline sleep? sleep pipeline doesn't work
I wanted to simulate execution time of certain scripts for which I found sleep NUMBER does exactly what I want.
In my scenario I needed something like
sleep 5 | command | sleep 5 ...
But it behaved ...
1
vote
3
answers
843
views
Why is the command sleep an independent process but others seemingly not when used in a shell script?
I'm writing a bash script named test.sh as below on my Ubuntu:
#!/bin/bash
while true; do
echo 'abc' # pwd, df...
sleep 1
done
When I execute ./test.sh at one terminal, I open another ...
1
vote
1
answer
622
views
How Do I Set My Fedora KDE 33 Workstation To NOT Suspend Upon Lid Close?
My Fedora KDE 33 Workstation (Old Sony Vaio Book) suspends when I close it. I would like to listen to music with the lid closed, so how should I do this?
1
vote
2
answers
1k
views
How to kill a command run from a script after a period? [duplicate]
I would like to run a never-ending command (such as play a mp3 file in loop) for a period of length T.
I put the command in a shell script my.sh:
#! /bin/bash
vlc /path/to/my.mp3 # will play the file ...