LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-21-2021, 12:10 AM   #1
hawkjm73
LQ Newbie
 
Registered: Oct 2021
Posts: 1

Rep: Reputation: Disabled
Looking for event based automation that can detect when the OS sleeps and wakes the screen


Hello!

I am using Zorin OS 16, Ubuntu based with Gnome desktop. My computer display is a large TV screen rather then a monitor. When my system sleeps, the display does not gracefully turn off, and it will not turn back on when the system wakes.

The display does not have very good ip-control but does support hdmi-cec. As my video card does not support cec, I've used an cec injecting adapter and can send on and off commands from the terminal.

What I can't figure out how to do is get the system to send the on/off when it wakes or sleeps the monitor. Is there anything in Linux that listens and reacts to system events like that?
 
Old 10-21-2021, 07:27 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,145

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
It pays to be specific in your terminology. "sleep"is a term usually associated with monitor(s) - at least in my case.
Presuming you are actually referring to system suspend/hibernate, there are various options depending on power management agent in control. The Arch linux wiki is an excellent resource for all things Linux - have a look at this page - the bit under sleep hooks is what you are after.
 
Old 10-22-2021, 02:55 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by hawkjm73 View Post
What I can't figure out how to do is get the system to send the on/off when it wakes or sleeps the monitor. Is there anything in Linux that listens and reacts to system events like that?
udev (more-or-less random link, there's other introductions to udev around the web)
 
  


Reply



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
external hard disk sleeps but never wakes up nass Slackware 2 12-03-2011 07:17 PM
Detect Screen Saver & Computer lock event vikassp Linux - Desktop 1 07-22-2009 04:54 AM
Monitor sleeps with ATI drivers king111 Linux - Newbie 8 07-24-2005 06:12 PM
machine sleeps ignoring network requests rguptatx Red Hat 2 11-13-2003 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:35 PM.

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