LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 11-19-2008, 05:54 AM   #1
sameer.nalawade
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
detecting the monitor is on or off


hello everyone,
i m pretty new to linux. i m trying to figure out whether monitor is on or off by using a c program.i have tried using ddcprobe, it works well with CRT monitor,But in case of LCD monitor it works only when monitor cable is disconnected or power turned off from mains not when u use the monitor button for power ON/OFF.
So is there any way i can tell whether monitor is ON/OFF(i.e button on monitor panel ) without disconnecting power from it?
I m using fc7, monitor is samsung LCD .
Can anyone please help?
Thanks.
 
Old 11-19-2008, 08:16 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sameer.nalawade View Post
hello everyone,
i m pretty new to linux. i m trying to figure out whether monitor is on or off by using a c program.i have tried using ddcprobe, it works well with CRT monitor,But in case of LCD monitor it works only when monitor cable is disconnected or power turned off from mains not when u use the monitor button for power ON/OFF.
So is there any way i can tell whether monitor is ON/OFF(i.e button on monitor panel ) without disconnecting power from it?
I m using fc7, monitor is samsung LCD .
Can anyone please help?
Thanks.
That would depend on the hardware specs of your monitor. Get the programming guide for the particular monitor you're using, and check it out. There's probably a sense-code to look for.
 
Old 11-19-2008, 11:18 PM   #3
sameer.nalawade
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
That would depend on the hardware specs of your monitor. Get the programming guide for the particular monitor you're using, and check it out. There's probably a sense-code to look for.
what is sense code? i thought i need to do something like ddcprobe.
 
Old 11-20-2008, 08:42 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sameer.nalawade View Post
what is sense code? i thought i need to do something like ddcprobe.
Sense code is something like ddcprobe, but a generic term. Sense code can be anything the hardware says, like "someone pressed this button", "someone plugged a cable in", etc. That's why you should refer to the manual on your hardware, or look through their docs.

What you're trying to do isn't uncommon...alot of LCD's use the same sort of 'soft' off switch, so I'd guess that they'd all use the same sense code for it.
 
Old 11-20-2008, 11:14 PM   #5
sameer.nalawade
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Sense code is something like ddcprobe, but a generic term. Sense code can be anything the hardware says, like "someone pressed this button", "someone plugged a cable in", etc. That's why you should refer to the manual on your hardware, or look through their docs.

What you're trying to do isn't uncommon...alot of LCD's use the same sort of 'soft' off switch, so I'd guess that they'd all use the same sense code for it.
But it is not necessarily going to be LCD it can be CRT too. And is it possible to read sense code through c program?
 
Old 11-21-2008, 08:24 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by sameer.nalawade View Post
But it is not necessarily going to be LCD it can be CRT too. And is it possible to read sense code through c program?
Yes, since (as I said), that's what a ddcprobe does...reads a particular sense code from a particular piece of the hardware.

If you're not knowing what to do with the on/off state, why check it at all? The LCD's aren't really going 'off'...just sleeping. Sending a video signal will probably 'wake' them.
 
Old 11-21-2008, 11:15 PM   #7
sameer.nalawade
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Yes, since (as I said), that's what a ddcprobe does...reads a particular sense code from a particular piece of the hardware.

If you're not knowing what to do with the on/off state, why check it at all? The LCD's aren't really going 'off'...just sleeping. Sending a video signal will probably 'wake' them.
I got the same info that LCD's dont really go off.but what do u suggest then? i should use ddcprobe source code?
 
  


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
Problems detecting second monitor Slokunshialgo Linux - Hardware 1 01-28-2008 09:27 PM
RedHat 9 is not detecting the LAN card, but Win'98 is detecting the LAN card SKYNAT Linux - Newbie 4 12-28-2007 10:25 PM
Installer is not detecting the right monitor danraider Fedora 2 10-24-2006 02:32 PM
Detecting USB ports on Dell 2001fp monitor on Ubuntu Linux j3nnifers Linux - Hardware 8 10-10-2005 05:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:07 AM.

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