LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2006, 09:09 PM   #1
Misel
Member
 
Registered: Mar 2003
Location: Berlin
Distribution: Slackware current
Posts: 310

Rep: Reputation: 31
idle signal from X.org


Hello,

I'd like to save battery on my laptop and want to dynamically adjust the brightness of my display. Basically I'd like to have what Apple's i- and Powerbooks already do

The brightness itself can be easily changed with sonypi and spicctrl (I have a sony vaio).

However I'm struggling to find a way to get a signal when the user has been idle for n seconds. I've found some mailing lists suggesting g_idle_add. But this seems to be application specific and not what I have in mind. Another interesting thing might be the Xidle extensions. But I couldn't find any detailed information on how to use them on the map.

Can you give me some starting points?

Thanks in advance
Misel

Last edited by Misel; 03-01-2006 at 09:10 PM.
 
Old 03-01-2006, 09:22 PM   #2
Spudz76
LQ Newbie
 
Registered: Feb 2006
Distribution: Gentoo
Posts: 10

Rep: Reputation: 0
I don't specifically know, but what I'd do is grab some XScreenSaver source and grep it for keywords like "idle", "timeout", and such. Then figure out how it does it. Or make a screensaver plugin for XScreenSaver so then you just need to have that installed and point it at some dimming commands (in a shell script). There may even be an "exec this" plugin for it already to run one command at blanking time and another on returning from blanking, I would think it'd be sort of a common thing one would want to do. Sorry I can't be of more specific help.
 
Old 03-02-2006, 09:28 AM   #3
Misel
Member
 
Registered: Mar 2003
Location: Berlin
Distribution: Slackware current
Posts: 310

Original Poster
Rep: Reputation: 31
Have you ever seen an iBook or Powerbook in action. What they do is to dim down the monitor after about 30 seconds of no action from the user. And then some more after a longer period. Even before the screensaver completely disables the screen. But as soon as the user moves the mouse or presses a key it goes back to full brightness.

After my last post I had a glance at the xscreensaver source. But - as the creator himself admitted - the timer.c is a total mess. There doesn't seem to be one straight and obvious way to get the signals my program needs.
 
  


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
squid stops due to signal 6 and signal 25 simplyrahul Linux - Software 3 05-28-2011 01:05 AM
freebsdforum.org or bsdforum.org are they 'jeremy' forum websites? t3gah LQ Suggestions & Feedback 1 06-12-2005 10:06 PM
Signal 6: Unknown Signal <=> Error with MAYA4.X under Linux SOLVED!!!! Faeroon Linux - Software 9 05-09-2003 01:57 PM
Signal: 6 (Unknown Signal) - Problems running a program Faeroon Linux - Software 86 01-14-2003 12:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:27 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