Author Topic: Screen Off, Suspend Off? (r121)  (Read 3223 times)

svs57

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • http://
Screen Off, Suspend Off? (r121)
« on: January 26, 2007, 05:20:58 am »
How can set screen off while i play music?
I do
xset dpms 0 0 0
xset q show
  Standby: 0    Suspend: 0    Off: 0
  DPMS is Enabled
But Z suspend after about 4 min.
If I do
xset -dpms
script /etc/sysconfig/clamshell/closed.d/100x11scr
switch dpms to enable with command:
xset dpms force suspend

Why Z suspend if dpms set to "0 0 0"?
The only way I see set xset -dpms
But in this case I can't switch screen off

pelrun

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
Screen Off, Suspend Off? (r121)
« Reply #1 on: January 26, 2007, 06:46:33 am »
Hehe - this looks like the opposite problem to one from a while back, being unable to get the screen to stay on.  Luckily, the answer to that problem is the answer to yours.

There are two X features that do blanking; one is DPMS, and the other is the screensaver. Both are controlled by xset! So to disable suspend and blank the screen, try this:

Code: [Select]
xset -dpms
xset s activate

"xset dpms 0 0 0" should imply "xset -dpms"; I consider the fact that it doesn't is a bug.
SL-C3100 with usb power mod running debian eabi
pdaXii13 still on the NAND for dualbooting
16GB SDHC! (a new one, after I sat on the old one and it went kaput)
D-Link 660 wifi, Socket Bluetooth rev H
External 9800mAh LiIon battery and slimline dvd drive
Homebrew microphone and remote

svs57

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • http://
Screen Off, Suspend Off? (r121)
« Reply #2 on: January 26, 2007, 07:01:27 am »
Quote
Hehe - this looks like the opposite problem to one from a while back, being unable to get the screen to stay on.  Luckily, the answer to that problem is the answer to yours.

There are two X features that do blanking; one is DPMS, and the other is the screensaver. Both are controlled by xset! So to disable suspend and blank the screen, try this:

Code: [Select]
xset -dpms
xset s activate

"xset dpms 0 0 0" should imply "xset -dpms"; I consider the fact that it doesn't is a bug.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=152517\"][{POST_SNAPBACK}][/a][/div]
Screen doesn't turn off if I set
xset -dpms
xset s activate
It turn off only  if
xset +dpms
xset s activate
But in this case Z suspend

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Screen Off, Suspend Off? (r121)
« Reply #3 on: January 26, 2007, 07:17:00 am »
I have a dirty workaround: light&power setup to turn off screen after 1 minute but never suspend (o minutes).
I have tested this and have seen that when the battery is critically low the device still suspends.
When on external power this is no problem ... but if you forget the Z on while using batterys you may reach a point where you will only be able to turn it back on when you have some external power.

I find this an acceptable compromise while waiting for a fix.
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

svs57

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • http://
Screen Off, Suspend Off? (r121)
« Reply #4 on: January 26, 2007, 07:44:32 am »
Quote
I have a dirty workaround: light&power setup to turn off screen after 1 minute but never suspend (o minutes).
I have tested this and have seen that when the battery is critically low the device still suspends.
When on external power this is no problem ... but if you forget the Z on while using batterys you may reach a point where you will only be able to turn it back on when you have some external power.

I find this an acceptable compromise while waiting for a fix.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=152520\"][{POST_SNAPBACK}][/a][/div]
Of cause I know that I can change via light&power setup.
To much action to start music.
I'll try find something easy way.
May be change /etc/sysconfig/clamshell/closed.d/100x11scr
to check weather xmms work or create script for xmms to start.

svs57

  • Full Member
  • ***
  • Posts: 108
    • View Profile
    • http://
Screen Off, Suspend Off? (r121)
« Reply #5 on: January 26, 2007, 07:58:47 am »
/etc/sysconfig/clamshell/closed.d/100x11scr
closed() {
        c=`ps ax|grep xmms|grep -v grep|wc -l`
        if [ $c -ge 1 ]; then
         /usr/X11R6/bin/xset -dpms
         /usr/X11R6/bin/xset s 1
         /usr/X11R6/bin/xset s activate
        else
           /usr/X11R6/bin/xset dpms force suspend
        fi
    return 0
}

After xmms stop:

b="AC"
apm|grep On-line &>/dev/null
if [ $? == 1 ]; then
b="BATTERY"
fi
xset dpms `grep $b /home/root/Choices/lightnpower.cfg | awk -- '{gsub(".*screenoff=\"","",$3);gsub(".*su
spend=\"","",$4);print $3*60," 0 ",$4*60}'`
xset s `grep $b /home/root/Choices/lightnpower.cfg | awk -- '{gsub(".*screenoff=\"","",$3);;print $3*60}
'`

Drake01

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Screen Off, Suspend Off? (r121)
« Reply #6 on: January 26, 2007, 07:30:39 pm »
Quote
Of cause I know that I can change via light&power setup.
To much action to start music.
I'll try find something easy way.
May be change /etc/sysconfig/clamshell/closed.d/100x11scr
to check weather xmms work or create script for xmms to start.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=152526\"][{POST_SNAPBACK}][/a][/div]
I agree.  I wanted to write a simple script so that I could easily switch to a couple pre-defined settings without having to start light&power (which just takes too long to start up).  

I looked at the light&power script.  I don't know python, but I thought I understood what the script was doing.  I never did get my own (bash) script to work consistently.
Device: SL-C3200 running pdaXii13v2 build 5.5.0
Networking: Symbol Spectrum24 WLAN card; Kingston CIO10T CF NIC
Storage: 4GB Transcend 150x SD; 16GB Transcend 133x CF; 4GB Seagate CF HDD; 4GB Patriot SD
HID: Logitech V450 Laser Mouse; generic silicone USB keyboard; 2 generic optical mice; stock plastic stylus
GPS: generic "UT-41" USB GPS Receiver
Case: neoprene case from my old Palm foldable keyboard