Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 02-12-2013, 05:17 PM   #1
LQ Newbie
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
Question Going to sleep signal in Linux

Hi Devs,

I have a requirement in application. It needs to be notified when the system is about to sleep, so that I can prevent the system to sleep as my application is downloading some data. I want to enable sleep after the downloading is done. So, I need the following to be specific

1. AbouttoSleep signal
2. preventSleep(bool)

Thank you
Old 02-13-2013, 03:16 PM   #2
Senior Member
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 347Reputation: 347Reputation: 347Reputation: 347
I've never need to do this, so I'm just guessing. If I'm right, you'll need to add a sleep action to /etc/acpi/events/ and a corresponding action script to /etc/acpi/actions.

Look at man acpid and man acpi_listen and the Wiki article on ACPI

Note: Some BIOS settings can put devices in sleep mode without communicating (much) with the OS, so you should check your BIOS settings. (A modern BIOS would, I think, first raise one of the S3 flags, but, as I said, my knowledge is all theoretical.)

P.S.: I only replied here because your query has languished for some time with no replies, and it seemed like an interesting question.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
user-define signal handler & coredump for signal 11(SIGSEGV) Alexlun Linux - Software 2 05-24-2009 06:37 AM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 12:11 PM
Searching for Server (BOOTP/DHCP) <sleep> <sleep> .. .. Eileen Linux - Networking 12 10-21-2005 01:14 AM
Signal 6: Unknown Signal <=> Error with MAYA4.X under Linux SOLVED!!!! Faeroon Linux - Software 9 05-09-2003 01:57 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration