Dimdaemon - A simple backlight-dimming daemon for laptops

I wrote a simple and lightweight daemon that dims the backlight of our laptop and, in case, completely turn off it, after a given amount of time.
I don't have time to put the project on a service like sourceforge, github, etc...so I opened this thread.
If you have questions, doubts or if you simply want to report a bug or a feature request, please write here.
You can find the PKGBUILD on AUR here https://aur.archlinux.org/packages.php?ID=54009
So here is a summary of the configuration values :
environnement
userhome : well, the path to your home (only used to connect to eat your magic cookies connect to X)
displayname : choose in
/sys/class/backlight/
powersupplyname : choose a battery in
/sys/class/power_supply/
relative :  set to true if you want that dimdaemon dinamically dims your screen brightness; obviously undimpercent will not be used.
ac or battery
active : whether the dimdeamon will change the backlight when the computer is in this mode
undimpercent : brightness when user is active
dimtime : time before the screen gets dimmed if the comp is idle (0 will not disable this)
dimpercent : brightness when idle
turnofftime : time before turning the screen off.
0 will not disable, set big value instead. If it is less than dimtime, will act as if it is equal to it.
Regards
Last edited by punkeroso (2012-09-18 07:57:42)

nierro wrote:Hi!
I found your project quite interesting! Well, how did you managed to stop it while e.g. watching a movie? It is the first daemon that does such a thing!
Hi, the daemon "stops" because uses Xlib to know the idle time. A lot of media players (e.g. mplayer) send a "fake" mouse/keyboard event every n seconds, so the idle time resets.
nierro wrote:Btw I'm using calise (from aur) to adjust my screen brightness, so i'd like, for example, that "undimpercent" could be commented, so it won't affect the screen brightness calise set previously. I tried to comment it, but it seems it will set screen brightness at 100% anyway (as default option).
I'm really interested in "dimtime" and "turnofftime" option, because i'm using xfce4 without power manager, so i lack of those features.
So, what i'd like to see implemented (i'm only asking, obviously), it's :
- If "undimpercent" is not set, leave screen brightness as it is.
- "dimpercent" could be the percentage of the previous brightness (and not an absolute value, eg: if my calise, or "undimpercent" set screen brig, to 5, and "dimpercent" is set to 20, it should not set the screen brightness to 2, but to 1).
Tell me if i'm asking anything wrong, or if i misunderstood anything please.
By the way, thanks for this software
I could implement what you are suggesting but, what would be the behavior of the daemon when on battery? I mean, the daemon could read the actual brightness value but then, when switching to battery, what value should set? A percentage of the actual brightness?
No question is wrong a priori, we should just clarify some aspects; I'm glad that this piece of code could be useful to someone!

Similar Messages

  • The best cron daemon for laptops?

    Hello,
    I´m a veteran Slackware user that recently switched to Arch. I got a new laptop (perfect excuse for the switch) and so far the transition has been smooth as silk.
    In my previous Slack laptop, I had dcron scheduled to run during the times that I knew the system will be on. I never bothered to look for a more elegant solution, as dcron is the only official cron daemon for Slack.
    I see that fcron and anacron are available in community and I would like to ask the more experienced Arch users which is their cron daemon of choice for their laptops and how do they configure it.
    Cheers.

    I use anacron, but I have to say that I did not test fcron. :-)

  • Nvidia-325.15-1 breaks backlight dimming

    Hi everybody,
    after installing the new nvidia-driver, my backlight dimming doesn't work anymore. I had to roll back to 319.32 to make it work again.
    Anybody else experiencing this?
    My Laptop:
    Model: Vostro 3300
    GPU: Geforce 310M
    Kernel: 3.10.5-1-ARCH

    Yes, I have noticed the same after upgrading to 325.15.
    Backlight dimming from within E17 does not work anymore.
    Another phenomena is that "tooltips" (in e.g. for networkmanager and nvidia tools) shows up as black on black.
    Same deal with xfce4-terminal as a whole.
    Tested rolling back to 319.32 and all works fine again. But this is obviously not a good solution so I'm up on 325.15-2 again.
    Toshiba Satellite L750
    Geforce 525M
    Kernel 3.10.6-2
    WM Enlightenment
    (The special keys for backlight has never worked but that's a different problem not related).

  • Questions on MCX Policies for Laptop/Mobile Users:

    Questions on MCX Policies for Laptop/Mobile Users:
    I have several managed Macs running Leopard. Many of them are MacBook laptops. My main MCX policies involve mapping printers and mounting network volumes at login. These are simple computer and group policies to help make the users life a little easier when it comes to finding and using network resources such as file server volumes and network printers.
    Since most of my users are laptops, they are expressing 2 major concerns involving their laptops when they are off the LAN (i.e.; on the road at a cafe, working at home, staying at a hotel or when they have no network at all)
    1) When users are off our LAN, the Mac still tries to mount the network volumes in their OD/MCX login items when the user logs in (with cached mobile credentials). Can this be avoided? Windows PCs do not do this. If the PC laptop cant find an AD DC, they simply don't run the login scripts and thus dont try to mount/map network volumes. How can I make the Mac laptops only mount network volumes when they are on the LAN?
    2) Most Mac users have a Cisco VPN client, and use it regularly to connect to the company's LAN from home, hotels etc. Of course when they log into the network via VPN, their network volumes are not mounted automatically. Is their a way to re-run the MCX managed login items script once they connect to the VPN and mount (i.e.; "map") their network drives? Sure, users can simple use the "Connect To Server" option in the FInder (or perhaps try and use the god-awful Leopard Finder side bar discovery browser thingy which I hate - never mind), but I need a consistent automated way to mount volumes quickly and easily for my mobile users. There must be a way to run (or re-run) the login items part of my MCX policies.

    Ping!
    I'm looking for this functionality too. Anyone have a solution to either of these? One that came to mind is to wrap the login items in a script which detects if the LAN is available.

  • How do I use my late 2011 iMac ( with thunderbolt) as external monitor for laptop/Xbox or other device with hdmi as output.

    May be this question has been asked thousand times. how do I use my mid 2011 iMac ( with thunderbolt) as external monitor for laptop/Xbox or other device with hdmi as output. if apple hasn't removed that feature and has just moved that functinoality to thunderbolt then how can I use it. currently there is no laptop available with thunderbolt output. no 3rd party converter available. whats the use of having feature on latest functionality if we cant use it. I wish they would have made one port has mini-dvi and other thunderbolt for backward compatibility untill some vendor comes up with converter.

    It Says :
    Mac (21.5-inch, Mid 2011) and iMac (27-inch, Mid 2011) and later computers support Target Display Mode via Thunderbolt to Thunderbolt cable (2 m) when the source is another Thunderbolt-equipped computer.
    Name one computer model/vendor which has thunderbolt as output for display + audio. this is so stupid to move to new technology without availbility of its compatible devices.

  • Looking for a simple flip book template for Flash CS5

    Hi, I'm looking for a simple flip book template for Flash CS5 for a 20 page brochure/ booklet. Or a tutorial. Does anyone know of one?
    Thanks!

    Hi Mark,
    No need to restrict your choice to the preset Pages Templates. Do a web search and choose a Word template. Pages will open Word documents and templates. Or design your own:
    This is a Table I inserted into a blank Pages Word Processing document. Format the date column in Inspector > Table > Format > Cell Format. Select the first Date cell,then drag the fill handle down to increment the dates.
    Regards,
    Ian.

  • Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Can someone please tell me a simple but effective method for burning a slideshow to DVD? Now that the connection between iPhoto and iDVD no longer exists, I can't figure out a way to get there with an acceptable quality result.

    Export the slideshow out of iPhoto as a QT movie file via the Export button in the lower toolbar.  Select Size = Medium or Large.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    If iDVD was not preinstalled on your Mac you'll have to obtain it by purchasing a copy of the iLife 09 disk from a 3rd party retailier like Amazon.com: ilife 09: Software or eBay.com.  Why, because iDVD (and iWeb) was discontinued by Apple over a year ago. 
    Why iLife 09 instead of 11?
    If you have to purchase an iLife disc in order to obtain the iDVD application remember that the iLife 11 disc only provides  themes from iDVD 5-7.  The Software Update no longer installs the earlier themes when starting from the iLIfe 11 disk nor do any of the iDVD 7 updaters available from the Apple Downloads website contain them. 
    Currently the only sure fire way to get all themes is to start with the iLife 09 disc:
    This shows the iDVD contents in the iLife 09 disc via Pacifist:
    You then can upgrade from iDVD 7.0.3 to iDVD 7.1.2 via the updaters at the Apple Downloads webpage.
    OT

  • Creation of Daemon for the DTO  for the real time data aquisition

    Hi i need help how to create a daemon for the DTP in the real time data aquisition.i'm learning now Sap and practicing a lot to be professional but i need a bit of hel.Can you please give me some details how to create it?
    I have to access the RSRDA T-code and what i need to do after?

    Hi First of all you need to create a real time DTP once that is done go to RSRDA T-code and click on the Create Daemon
    and right click assign DTP , here you can assign the DTP once that is done save and execute . your Daemon will run
    Thanks
    Santosh

  • Upgrade question for laptop to run PPro CS6/CC

    All,
    I've spent the last several days reading, researching and generally getting up to speed on what my options are re hardware moving forward, and though I've been a lurker/user of these forums (and others) for years, this is my first time engaging directly now that I feel I know a bit more. I must also say how incredible a resource the regular users like Harm Millard have been to self-taught but enthusiastic newbies like me - thank you!
    I've been a longtime self-taught, relatively light but still barely pro Premiere Pro user for the past ten years. For the past couple of years, I've been barely getting by using CS4 on my once-top-of-the-line Dell Precision M6500 laptop running Win7 Pro 32-bit. The M6500 is by far my favorite PC I've ever owned and is still rocking, even with older specs (listed below), but it is time to grow up, bite the bullet and (hopefully) upgrade this machine so that I can take advantage of CS6/CC and do a bit more heavy lifting (basic color correction, light After Effects, etc).
    I currently shoot on a Sony AX2000 in AVCHD, but am starting to do more work on my Canon t3i and am close to moving up to a Canon 5D mk3, so will be using more HD MOV files in the near future, possibly alongside the old AVCHD footage. Most of my exports are for HD web uploads, but also occasionally export to DVD. I do not anticipate stepping up to Red footage or the like in the near or mid future.
    My current laptop specs are as follows:
    Win7 32-bit
    4GB RAM
    Intel i7 quad core M620 (2.67GHz)
    500GB 7200rpm HDD
    Nvidia Quadro FX 2800M
    I've already ordered a RAM upgrade to get me to 16GB, have Win7 64-bit ready to install, and just bought 2 x 750GB 7200rpm HDD (Western Digital). Instead of investing in an all new machine (laptop or desktop), and considering the amazing stability and longevity (so far) of the M6500, I'd like to try and see if I can get this machine to a place where I can take advantage of CS6/CC and have it run stably and somewhat fast. I realize it's not the best option, and that getting an all-new tricked out desktop is the preferred option, but for budget reasons, that's not possible right now.
    Here's my plan:
    Upgrade so that system will be:
    Win7 64bit
    16 GB RAM
    2 x 750GB 7200rpm HDDs (internal)
    rest of the system listed above would remain the same as above - namely CPU and graphics card
    The machine can also support a mSATA mini SSD (up to 256GB), but I haven't splurged for that yet. I'm  trying to figure out whether to use the two new HDDs in RAID 0 and have the OS, project files, cache, source footage and export files all on those two RAIDed drives, or whether it would make a truly huge difference to add another internal SSD as the boot/OS/Program Files drive and leave the RAID 0 configuration to handle all video and project files. I've read enough to assume that adding the SSD is the preferred option, but it's pricey, and what I'm trying to determine is whether or not it's really worth the cost vs a straight 2-HDD RAID 0 configuration.
    I've read a lot about the dangers of RAID 0, but am not too concerned about failures since I use an online backup system (Sugarsync) for all my document files (this machine doubles as my main work PC) and I regularly back up all source and exported video files.
    On a separate note, I realize that my graphics card is not listed among the supported cards for CS6/CC - is that going to cause stability and/or significant performance issues, or will it work since I won't be doing 4k/Red files? Is the CUDA hack an option for me? I have the option of upgrading the card to a supported card (Nividia M5000), but it's hugely pricey (close to $2k) and unless it will make the machine an absolute stud for years to come, it's not worth it.
    So in short (yeah right ), here are my questions:
    Does my proposed new system have the juice to handle what I want to do?
    Which HDD setup is preferred, and by what degree (do I absolutely have to get the SSD to make this work?):
    2 x 750GB 7200rpm HDDs in RAID 0 for the entire machine
    1 x SSD (what size is minimum recommended?) as boot/OS plus 2x750GB HDDs in RAID 0
    Will my existing Quadro 2800M graphics card make the other RAM/HDD upgrades a waste of money?
    Is my existing CPU powerful enough to warrant these other upgrades?
    Sorry for the long post, and thanks for any help you guys can provide!
    Van

    Van,
    Tough love - I'm going to give you my honest opinion here, but it does make me feel bad since you seem to have already ordered parts before you posted.
    1. In a word no. Your processor is dual core. You really want at least quad core + hyperthreading for the media that you will be pushing around. The Quadro 2800M only has 96 CUDA cores and DDR3 (slow) memory. BTW, task manager shows 4 "cores" when you have a dual-core + hyperthreading.
    2. I'd choose 2. - much nicer - worth the cost
    3. yes
    4. no
    So what to do if you cut bait on your current plan and get a new laptop. Check out recent (< 6 mths old) threads here for lots of discussion at various price points. Gamers laptops and Sager/Clevo models definitely offer the best bang for the buck for laptops to run Premiere, mostly due to the GTX video line trouncing the Quadro line for performance for the price. I loved the Dell M6500 in its time. If you want to replace it with something current day the M6700 is good, but I like what HP is doing for the 17" workstation class even better in 2013. If you can buy a few months, I suspect the new smaller die size 22nm Intel cpus will be really help for laptop performance (desktops have just about all the cpu cooling capacity required, but in laptops cooling through tiny tiny coolers and tiny, tiny, quiet fans is way limited - so, the new lower wattage, cooler 22nm cpus should be much larger boost for laptop users than workstations).
    I suspect that I would really enjoy editing on a well thought out $1500 Asus, even better on a $2200 Sager, and would have similar performance with the support of HP or Dell at closer to a $3000 price point for the media you mention above. ADK sells Sager/Clevo laptops and has much better support for video (and audio) editors than HP or Dell ever dreamed to provide; prices would be a bit more than www Sager dealers but ADK is a no-brainer if you want "real" support and a machine that is tweaked for Adobe.
    Regards,
    Jim

  • Best Practice(s) for Laptop in Field, Server at Home? (Lightroom 3.3)

    Hi all!
    I just downloaded the 30-day evaluation of Lightroom, now trying to get up to speed. My first task is to get a handle on where the files (photos, catalogs, etc.) should go, and how to manage archiving and backups.
    I found a three-year-old thread titled "Best Practice for Laptop in Field, Server at Home" and that describes my situation, but since that thread is three years old, I thought I should ask again for Lightroom 3.3.
    I tend to travel with my laptop, and I'd like to be able to import and adjust photos on the road. But when I get back home, I'd like to be able to move selected photos (or potentially all of them, including whatever adjustments I've made) over to the server on my home network.
    I gather I can't keep a catalog on the server, so I gather I'll need two Lightroom catalogs on the laptop: one for pictures that I import to the laptop, and another for pictures on the home server -- is that right so far?
    If so, what's the best procedure for moving some/all photos from the "on the laptop catalog" to the "on the server catalog" -- obviously, such that I maintain adjustments?
    Thanks kindly!  -Scott

    Hi TurnstyleNYC,
    Yes, I think we have the same set-up.
    I only need 1 LR-catalog, and that is on the laptop.
    It points to the images wherever they are stored: initially on the laptop, later on I move some of them (once I am am fairly done with developing) within LR per drag&drop onto the network storage. Then the catalog on the laptop always knows they are there.
    I can still continue to work on the images on the network storage (slightly slower than on laptop's hard drive) if I still wish to.
    While travelling, I can also work on metadata / keywording, although without access to my home network the images themselves are offline for develop work.
    2 separate catalogs would be very inconvenient, as I would always have to remember if I have some images already moved. No collections would be possible of images including some on the laptop, some on the network.
    Remember: a LR catalog is just a database with entries about images and the pointer to their storage location.
    You can open only 1 DB of this sort at a time.
    There is no technical reason for limiting a LR-catalog - I have read of people with several hundert thousand images within one.
    The only really ever growing part on my laptop with this setup is the previews folder "<catalog name> Previews.lrdata". I render standard previews so that I can do most of the work for offline-images while travelling.
    The catalog itsself "<catalog name>.lrcat" grows much slower. It is now 630 MB for 60'000+ images, whereas previews folder is 64 GB.
    So yes, I dedicate quite a junk of my laptop hard disk to that. I could define "standard"-previews somewhat smaller, fitting to the laptop's screen resolution, but then when working at home with a bigger external monitor LR would load all the time for the delta size, which is why I have defined standard-preview-size for my external monitor. It may turn out to be the weakness of my setup long-term.
    That is all what is needed in terms of Lightroom setup.
    What you need additionally to cover potential failure of drives is no matter of LR, but *usual common backup sense* along the question "what can be recreated after failure, if so by what effort?" Therefore I do not backup the previews, but very thoroughly the images themselves as well as the catalog/catalog backups, and for convenience my LR presets.
    Message was edited by: Cornelia-I: sorry, initially I had written "1:1-previews", but "standard previews" is correct.

  • My key to increase backlighting of keys for my MacBook Pro isn't functioning

    My Key to increase backlighting of Keys for my MacBook Pro isn't functioning.

    Check your settings in System Preferences>Keyboard.
    Try a SMC reset:
    http://support.apple.com/kb/ht3964
    Ciao.

  • I need Java code for a simple graphical hit counter for a webpage

    I was wondering if anybody out there could send me some code for a simple graphical hit counter for a webpage. All the sites that I've visited are garbage and of no use to me. Please help me.
    Colin

    Not as easy as you'd imagine with applets. You need some way to store the hits, usually through a file on the server. That's not gonna happen in a hurry for 2 reasons -
    - Applets can't read/write files
    - Your web server usually won't let you run programs on their machine (ie, programs that listen for socket connections from applets, then load/read/write/close a file).
    In short, no, there is no simple java solution (that I know of).
    Cheers,
    Radish21

  • Using blackberry as modem for wireless communicat​ion for laptop

    I've seen this done but wasn't able to find instructions on how to do this. Does anyone know how to use the blackberry curve as a modem for wireless connectivity for laptop?  What settings do I need and any software for the laptop needed?

    Hi there!
    Here are the RIM KB's about the topic. All other information you will need to get from your carrier.
    KB05178 Support for tethered modem use
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • WebtoGo for laptop and mobile device - urgent

    Hi,
    I need to develop a web to Go application for both laptop and mobile device. The code which i generate for laptop should work on mobile device too.
    ie the single application should work for both mobile and laptop devices.
    Now coming to lightweight framework and small footprints what technologies should i use in J2EE.
    If i use struts is that going to be mess in mobile device. Some one guide me here about choosing the technologies.
    Thanks

    our java app that we have just ported from PDA to laptop uses AWT components as these work on the PDA. need to go for what will work on the windows mobile device, abnd this may restrict you to older and less functional components.
    NOTE platform is defined within the application on the server side (the name of the database on the client), and therefore you will need two applications in terms of oracle lite publications, so define the database name external to the code in some kind of a properties/config file

  • Simple audio CD player for Gnome

    Is there a simple audio CD player for gnome which can get the disk information from any CDDB server like in many other linux distributions?

    Is there a simple audio CD player for gnome which can get the disk information from any CDDB server like in many other linux distributions?

Maybe you are looking for