Author Topic: Make Backlight Go Off On Screen Close?  (Read 2925 times)

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Make Backlight Go Off On Screen Close?
« on: August 30, 2007, 12:21:12 pm »
Is it possible to make the backlight go off when the screen is closed under r198? I think there was a thread about this somewhere, but I couldn't remember where.

Thanks.
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

InSearchOf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1144
    • View Profile
    • http://
Make Backlight Go Off On Screen Close?
« Reply #1 on: August 30, 2007, 12:23:47 pm »
I believe mine does... I will have to verify

Late
Sharp Zaurus SL-C3100 and SL-6000L
pdaXrom Developer
Please visit pdaXrom.org for updates
My Blog
IRC #pdaxrom @ FreeNode

Capn_Fish

  • Hero Member
  • *****
  • Posts: 2342
    • View Profile
    • http://
Make Backlight Go Off On Screen Close?
« Reply #2 on: August 30, 2007, 04:41:58 pm »
Mine definately does not. How is turning off the backlight handled?
SL-C750- pdaXrom beta 1 (mostly unused)
Current distro: Gentoo

T3_slider

  • Full Member
  • ***
  • Posts: 125
    • View Profile
Make Backlight Go Off On Screen Close?
« Reply #3 on: August 30, 2007, 09:13:05 pm »
I'm not running r198, but in beta 3 the backlight only turned off upon closing the lid in Matchbox (I've tried to get it working in XFCE but, although it worked, I encountered too many screen rotation problems). I've seen you post about other WMs, so my advice would be to try it in Matchbox since InSearchOf said he thought his backlight turns on (unless you are using Matchbox).
Conics SL-C3200 running pdaXrom beta3 and XFCE with a Planex WiFi CF card.

Slackware rules!

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Make Backlight Go Off On Screen Close?
« Reply #4 on: August 30, 2007, 09:23:53 pm »
the rotation script handles what happens at each screen state, ie landscape, portrait, closed
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Make Backlight Go Off On Screen Close?
« Reply #5 on: August 31, 2007, 03:39:23 am »
I've seen swichevd go into a non working state on my c860 ... and neaded to restart it rarely. Hen swichevd is working properly on my c860 the backlight is turned off ok when I close the lid, this is not the case on my Z when the daemon is in the non working state.
In order to minimize problems when switchevd is not working properly I generally have the backlight turn off after one minute anyway (trough lightnpower.py or my command line shell script alternative).

In case your Z is doing something different to what mine is dooing, to my understanding,  this is the way switchevd works:
the daemon monitors any changes in the event0 device file,
the daemon reacts ot any changes in the event0 device file by running switchev.sh script with the appropriate parameters (in a way similar to the way acpi works on a standard xo6 .... this is much better then the way apm in mabaged in beta4 and above).

You could modify the  switchev.sh to also accomplish other actions on lid close/open states.

Personally I hate the lightnpower.py python script (it takes so long to load only to do very simple tasks and also it's pretty pointless when you are in natural sunlight because you cannot see the LightnPower window anyway) ... I've made an alternative command line shell script to do more or less the same things (if anyone is ontrested I'll share it).
Anyway in order to switch backlight on ad off you can do this:
echo "0" > /sys/class/backlight/corgi-bl/brightness     #this turns it off
echo "3" > /sys/class/backlight/corgi-bl/brightness     #turns it to brightness 3

If you do such actions manually the backlight will not come back on when you press any key ... so be carefull.

Managing the backlight i such a way may not be desirable ... one might prefer using the dpms features of xset:
xset dpms force standby
might be a better way to turn off the backlight ... this way you get back to the normal behaviour when you hit ant kay.
« Last Edit: August 31, 2007, 04:42:29 am by louigi600 »
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing