The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
0answers
156 views

How to run systemd user service to trigger on sleep (aka. suspend, hibernate)?

Based on various sources I have cobbled together ~/.config/systemd/user/screenlock.service: [Unit] Description=Lock X session Before=sleep.target [Service] Environment=DISPLAY=:0 ...
2
votes
0answers
39 views

How do I find out what process is putting my machine to sleep?

My laptop is going to sleep after about 10 minutes of inactivity, and I don't know why. I verified the standard power options, are they're not set to put my machine to sleep. Here is grep's output ...
0
votes
1answer
81 views

Using the Echo Command with Sleep command

So I asked a question on here a few weeks ago and the response I got was helpful but I figured I would add some info to get a better response. I work with a computer system that has 8 servers (4 ...
2
votes
1answer
61 views

Linux Fedora: can I preserve what I am doing so that everything will be restored when I power up again

I have Linux Fedora 20, with Gnome classic desktop. When I power down, via the "Power Down" icon on the top bar, everything shuts down, and everything is gone when I power up again, although I can ...
1
vote
0answers
458 views

CentOS 6.5 will not sleep after period of inactivity

I've recently upgraded my Ubuntu 12.04 LTS to CentOS 6.5. This is a desktop PC (non-server) that I would like to sleep/power down after a period of inactivity. I have the following settings in my ...
3
votes
1answer
61 views

Wake monitor from sleep remotely

I have an Ubuntu server running xdm with openbox on which is plugged a monitor that displays a video which is launched via a cron daemon. When the monitor is not used for a certain amount of time, it ...
0
votes
0answers
16 views

Why do I see my unlocked desktop briefly before the login screen when returning from sleep mode on my laptop?

It has happened consistently on multiple laptops for me. If this is a common occurrence, I'm wondering why it is happening.
7
votes
7answers
2k views

cron Vs. sleep - which is the better one in terms of efficient cpu/memory utilization?

The Case: I need to run some commands/script at certain intervals of time and for this I have two options - 1. set up a cron-job or, 2. implement a loop with sleep in the script itself. Question: ...
2
votes
0answers
103 views

How to use systemd hybrid-sleep instead of suspend under GNOME in Linux? [closed]

How can I make GNOME 3 use systemd hybrid-sleep instead of suspend, when closing the lid or using suspend from the menu?
0
votes
2answers
84 views

Red Hat Enterprise Linux 6 wakes up spontaneously after sleeping

I have a Lenovo ThinkPad T430 running Red Hat Enterprise Linux 6.5. Today I put my computer to sleep, double checked 10 seconds later, only to find out after arriving to my office that my computer ...
2
votes
1answer
72 views

Is uninterruptible sleep the only case?

French wikipedia say: Un processus en sommeil ininterruptible ne peut s'arrêter (ni libérer ses ressources) même lorsque SIGKILL apparaît. Il s'agit d'un des rares cas dans lequel un système ...
2
votes
1answer
465 views

Python script run while screen is locked

I have a python script which seems to be failing to continue running its while True: ... sleep() loop my code is at http://github.com/xdaimon/xdaimonConky What happens is I autostart python on ...
7
votes
3answers
233 views

What's the difference between && and ; when forking sleep to background?

I have just asked a question about forking a process to sleep in the backgroud. The notation I came up with myself looks like this: sleep 10 && echo "hello world" & This answer to a ...
3
votes
1answer
217 views

Why a sleep 300 (5 minutes) can last several hours some time? [closed]

I have a MiniMac with the OSX system. My script is: while true do echo "Sleep 300 seconds = 5 minutes" date sleep 300 echo "end of sleep" date done I want it to repeat every 5 minutes; ...
0
votes
2answers
963 views

Sleep until next occurrence of specific time

I need a series of commands or a single command that sleeps until the next occurrence of a specific time like "4:00" occurs. How would I do that? The at command or a cronjob is not a option because ...
2
votes
3answers
269 views

The only way to turn off/on wifi is to put laptop into sleep mode

After start GNOME prints Hardware disabled. I've tried to use keyboard shortcut and it doesn't work. Only way to disable/enable hardware wifi is to put laptop into sleep mode and restore.
3
votes
1answer
686 views

Closing lid on Crunchbang

I'm running Crunchbang on a laptop. I can't seem to find an option to toggle if the laptop goes to sleep when the lid closes. There are certain times where I want to put the laptop away or close it ...
2
votes
0answers
169 views

Waking an Ibook G4 (powerpc) running Debian Linux from suspend based on timer

I have recently received an Ibook G4 from a friend. I plan to use it as a server and have installed Debian Wheezy (7.0.0, release version) on it. However, I would like to suspend it at some points ...
2
votes
0answers
76 views

How to know when a device is ready

I have firewire mixing console and I wrote an udev rule which calls a script to set up the whole audio chain (alsa -> pulseaudio -> jackd -> firewire) as soon an the console is switched on. Now I ...
1
vote
2answers
399 views

Computer doesn't wake from sleep mode

I have a laptop with Linux Slackware 14, KDE 4.8.5, kernel 3.9.0-rc6. When I close the lid and pull out the power cord, the machine goes into sleep mode. When I wake it, plugging the cord back in and ...
5
votes
5answers
3k views

Avoiding busy waiting in bash, without the sleep command

I know I can wait on a condition to become true in bash by doing: while true; do test_condition && break sleep 1 done But it creates 1 sub-process at each iteration (sleep). I could ...
3
votes
1answer
392 views

Kubuntu doesn't reconnect to Wifi after waking up from sleep

I just installed Kubuntu on my laptop and it's working fine so far, except the wireless connection is not switched on after waking up from sleep. I do have to click "Enable wireless" so that it ...
4
votes
2answers
1k views

How preemption works on Linux when a program has a timer less then 4ms?

Jiffies in most Linux system are defaulted to 250 (4ms). The questions is that what happens when a program has a usleep() less then 4ms ? Of course it works as should when it is scheduled. But what ...
4
votes
1answer
800 views

auto reconnect VPN on waking up

When I wake up my computer, the internet automatically reconnects, however the VPN does not. Is it possible to make it automatically reconnect (using the network manager on KDE, or at least in a way ...
3
votes
1answer
370 views

Plotting the sleep/wait chain of a process

I often want to know why a process in the middle of a pipeline is sleeping and not busy processing data. My current method is: find the pid of interest sudo strace -pt pid to get the blocking ...
1
vote
3answers
2k views

Use DD-WRT to auto WOL when traffic is on same subnet

So i've seen the WOL scripts and they seem like they could work well when i'm trying to connect from a computer that is outside my router. Script i'm using: ...
3
votes
0answers
173 views

Sleep key stops working after some time

I've got a "Sleep" key on my keyboard that I use to suspend the system when I'm away from the computer for a longer time. This works fine, at least for a while after I've turned the computer on. ...
1
vote
0answers
136 views

Debian Mouse Preference?

I just loaded Debian onto a live usb today for the first time. I successfully killed my laptops annoying trackpad with the synclient command, but now I can't figure out how to get Debian to stop ...
1
vote
1answer
694 views

Alternative for `sleep seconds` that takes system load into account?

So I develop my server app and some client apps for it. After each rebuild I start my server (which tends to load qup all services for something like 2 seconds) and then I start my clients... So his ...
2
votes
1answer
2k views

Script to SCP files works manually but not through cron

I'm using CentOS 5.6. The below code might have some typos as I needed to change real info to fake info for security reasons: backup.sh #!/bin/bash set -vx rm -v /server/temp_db.gz rm -v ...
1
vote
4answers
335 views

Faster delayed execution than 1 minute?

I am working on a program that can "upgrade itself" by install a new package. In order to accomplish this, I am using the at command to specify that a shell script should be run one minute in the ...
7
votes
2answers
684 views

What is a good way of saying “run this after 15 minutes” on a shell?

I use this sleep 900; <command> on my shell. Just wanted to know is there is some alternate/better way that you use?
2
votes
2answers
266 views

Different sleep binaries on Mac (Darwin) and in Linux. How to properly handle the differences?

In my Linux box, sleep accepts seconds, minutes and hours. So: sleep 10m Sleeps for 10 minutes (or 600s). sleep on Mac only accepts seconds as argument. sleep 10m doesn't work, only sleep 600s. ...
1
vote
1answer
11k views

Adding Sleep command to shell script?

How can I add a 10sec sleep to my loop after each page is processed? #!/bin/sh for page in {1..50} do wget -q -U Mozilla "http://admin.domain.com/products_search/?p=$page" -O - \ | tr '"' ...
2
votes
1answer
696 views

Screen fading out on GNOME, without ability to cancel

Sometimes, on my Arch Linux laptop, using GNOME for the desktop, my screen will fade out after a while of non-activity (even if I'm watching a video). This fade out is very slow, and can't be ...
7
votes
2answers
2k views

How to power off a system but still keep it available on the network

I'm looking into installing a file server on my network, for serving data and backups. I want this machine to be available at all times, but I would rather not keep it on all the time (as to conserve ...