OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: 10BaseT on April 01, 2006, 11:00:47 pm

Title: Help Blanker
Post by: 10BaseT on April 01, 2006, 11:00:47 pm
Hey all,

I've been at this for a week now and I can't seem to get the Blanker utlity to work at all.  I have gone so far as to reinstall pdaxrom with a fresh clean install to see if i could get Blanker to work... The only thing I have done is jgraves key mapping hack/mod...

Right now, know matter what I do or don't do with the Blanker utlity, I get 6 mins of music from xmms befor my Z c3100 suspends it's self... and then you know what happens after that...

#killall xmms
#ps -e
#kill ####
(if i'm lucky)

And 6 mins just happens to be what I set my Z to suspend at...
(I kinda feel like the Blanker utlity is one of those Playschool toys where the kid sits in the toy pushs the buttons, turns the wheel, but never gets anywhere...)

I vary curious as to how the Blanker utility is preventing the Z from suspending, if thats what it's supposed to do.

#man mb-applet-blanker (anyone?)


I would be greatful for any help (including the you stupid noob kind)  

-Thanks
10baseT

P.S.
THANKS pdaxrom for all your hard work!!!
Title: Help Blanker
Post by: karlto on April 02, 2006, 06:33:07 pm
Quote
Hey all,

I've been at this for a week now and I can't seem to get the Blanker utlity to work at all.  I have gone so far as to reinstall pdaxrom with a fresh clean install to see if i could get Blanker to work... The only thing I have done is jgraves key mapping hack/mod...

Right now, know matter what I do or don't do with the Blanker utlity, I get 6 mins of music from xmms befor my Z c3100 suspends it's self... and then you know what happens after that...

#killall xmms
#ps -e
#kill ####
(if i'm lucky)

And 6 mins just happens to be what I set my Z to suspend at...
(I kinda feel like the Blanker utlity is one of those Playschool toys where the kid sits in the toy pushs the buttons, turns the wheel, but never gets anywhere...)

I vary curious as to how the Blanker utility is preventing the Z from suspending, if thats what it's supposed to do.

#man mb-applet-blanker (anyone?)


I would be greatful for any help (including the you stupid noob kind)  

-Thanks
10baseT

P.S.
THANKS pdaxrom for all your hard work!!!
[div align=\"right\"][a href=\"index.php?act=findpost&pid=121434\"][{POST_SNAPBACK}][/a][/div]

It seems to work fine for me out of the box - just choose 'Disable suspend'. I have noticed that the screen blanking part is a bit strange - it only blanks two thirds of it from the top (I suspect because I have an SL6000 in portrait mode and it expects landscape). Are you using openbox/matchbox?
Title: Help Blanker
Post by: 10BaseT on April 02, 2006, 07:11:39 pm
yeah right now i'm using the basic install of 1.1.0beta1. So yeah i think thats what comes with 1.1.0beta1...
(i do notice that the  Blank Screen option dose work but, then all the keyboad and out side buttons stop working(and it still suspends))

right now i going through the source code to see if i can understand better whats going on...  
Title: Help Blanker
Post by: karlto on April 02, 2006, 10:53:08 pm
Quote
yeah right now i'm using the basic install of 1.1.0beta1. So yeah i think thats what comes with 1.1.0beta1...
(i do notice that the  Blank Screen option dose work but, then all the keyboad and out side buttons stop working(and it still suspends))

right now i going through the source code to see if i can understand better whats going on... 
[div align=\"right\"][a href=\"index.php?act=findpost&pid=121509\"][{POST_SNAPBACK}][/a][/div]

If blanking the screen stops things from working then it definitely seems like a bug or incompatibility somewhere. Do you have other suspend crashes/problems with your Z? If so, then I imagine you need to sort these first.
Title: Help Blanker
Post by: 10BaseT on April 03, 2006, 07:34:47 pm
Yeah....

I'm not get very far with this.

Can anyone with a c3100 running 1.1.0beta1 post here if there are experiencing the same problem, or am I the only one?
I hate to be chasing down a problem if it's something that i'm not doing right. I just don't know what will fix the my suspend problem if a clean install didn't... (unless it's a bug and not local to me.)

I did find something out that both the Blanker utility and Lightnpower both seem to set the suspend time with a

# xset dpms * * * (basically)

a snippet from the man pages about xset dpms

             "When numerical values are given, they set the
               inactivity period (in units of seconds) before the three  modes
               are  activated.   The  first  value  given is for the `standby'
               mode, the second is for the `suspend' mode, and  the  third  is
               for  the  `off'  mode.  Setting these values implicitly enables
               the DPMS features.  A value of zero disables a particular mode. "

So if you want the Z not to suspend

# xset dpms 30 0 0
(30 can be whatever... It just turns the screen off in 30 sec)
right ?

which is what Blanker does....
(doesn't work)
and if i type it in
(doesn't work)

any input?
Title: Help Blanker
Post by: karlto on April 03, 2006, 08:42:42 pm
Quote
Yeah....

I did find something out that both the Blanker utility and Lightnpower both seem to set the suspend time with a

# xset dpms * * * (basically)

So if you want the Z not to suspend

# xset dpms 30 0 0
(30 can be whatever... It just turns the screen off in 30 sec)
right ?

which is what Blanker does....
(doesn't work)
and if i type it in
(doesn't work)

any input?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=121668\"][{POST_SNAPBACK}][/a][/div]

Use 'xset -q' to check whether the values are taking; lightnpower.py sets the default values using standby and off, but not suspend (although suspend does work if I set it manually).

Other than that, you're right - someone else with a C3100 needs to comment...
Title: Help Blanker
Post by: 10BaseT on April 04, 2006, 06:04:28 am
Yeah i'm ahead of ya' their...

wote me a little sript go somethin' like dis'

Code: [Select]
#!/bin/bash
for ((i = 0; i < 1; i = i ))
do
    xset q | tail -5 | head -1
    sleep 2
done

Yep they take and nothing chages them ether. the Z suspends while "xset q" still reports the off values is at 0
If I kill the blanker utility and type the "xset dpms 0 0 0" or "xset -dpms" the Z seems to pick a random time to shut off the sreen and to suspend... sometimes it's 5 seconds sometimes it's 5 minutes....

Starting to get a bit frustrated
Title: Help Blanker
Post by: desertrat on April 04, 2006, 06:28:19 am
Quote
Other than that, you're right - someone else with a C3100 needs to comment...
OK, in "Light & Power":

battery
suspend = 0
screen off = 5 min
backlighting = 1

ac power
suspend = 0
screen off = 0
backlighting = 1

This is the observed behaviour:

When on AC Power, does not suspend and does not blank. This is the expected behaviour.

When on Battery, does not suspend, this is expected.
But after power on (resume) the screen will blank after 5 min regardless of activity - so I could be typing away or poking the touchscreen and *bang* the screen blanks after 5 min. After I unblank the screen (ie press a key or touchscreen), then screen does  not blank again, ever, that is until I suspend/resume, whereupon it will cycle thru "blank after 5 min, then don't blank".

-- cheers
Title: Help Blanker
Post by: maxg on April 04, 2006, 02:30:15 pm
I've got the same issue, and it's true the Blanker applet is broken since beta1. I don't know why the screen shuts off after resume on battery, even when you're typing text, which is of course a totally unexpected behaviour, but a report should be submitted on the tracker.
Title: Help Blanker
Post by: karlto on April 04, 2006, 06:31:39 pm
Quote
I've got the same issue, and it's true the Blanker applet is broken since beta1. I don't know why the screen shuts off after resume on battery, even when you're typing text, which is of course a totally unexpected behaviour, but a report should be submitted on the tracker.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=121776\"][{POST_SNAPBACK}][/a][/div]

Judging by what is posted here, the blanker isn't broken - it's the apm (again!)
Title: Help Blanker
Post by: 10BaseT on April 05, 2006, 12:11:58 am
Well, now that i have looked at the code for both lightnpower and blanker I have come to some conclusions

1) i don't think that the blanker utility is really broken (but, something somewhere sure is...)
2) the blanker utility doesn't do exactly what you think it does (at lest I was confused about a few things)
3) lightnpower and the blanker utility should be rewritten into one entity ( my opinion of course...)

But... I have hit a dead end, I don't think rewriting the blanker utility is the solution to the problem at hand... I think that there is a third element somewhere that is cause the Z to suspend and to shut off the screen. (which is overwriteing the xset dpms ... command)

Any clues?

(maybe a bug report is needed)
Title: Help Blanker
Post by: karlto on April 05, 2006, 12:30:24 am
Quote
Well, now that i have looked at the code for both lightnpower and blanker I have come to some conclusions

1) i don't think that the blanker utility is really broken (but, something somewhere sure is...)
2) the blanker utility doesn't do exactly what you think it does (at lest I was confused about a few things)
3) lightnpower and the blanker utility should be rewritten into one entity ( my opinion of course...)

But... I have hit a dead end, I don't think rewriting the blanker utility is the solution to the problem at hand... I think that there is a third element somewhere that is cause the Z to suspend and to shut off the screen. (which is overwriteing the xset dpms ... command)

Any clues?

(maybe a bug report is needed)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=121830\"][{POST_SNAPBACK}][/a][/div]

It seems like the xset dpms just isn't working - this is likely a kernel/machine specific issue, as it works for others using the same xset. I would recommend using the lightnpower applet to test a few different settings (if the above is all correct then it will probably ignore those settings), then file a bug report with the results.
Title: Help Blanker
Post by: 10BaseT on April 06, 2006, 06:02:48 pm
Hey!

Think i got something here.

I looked into what karlto suggested about testing the lightnpower applet and found that it worked... always.... which didn't make any sense being that it's useing the same command "xset dpms"...


So, I looked at the lightnpower.py sript a little closer to see what it was doing different, and there is one difference. It execs two commands to xset (as far as I can understand, sense I'm not good with python(i think it is)

Something like this...

to disable suspend

#xset dpms * 0 0
#xset -dpms

(the '*' is the time you want the screen to shut off at, in seconds. This still works after you exec the "xset -dpms" command which, doesn't make much sense to me but it works, so... whatever)

and to enable it again

#xset +dpms
#xset dpms * 0 *

which works!!! (so far)    

and therefore, my current work around is

killing off the Blanker utility and running this wrapper sript for xmms

Create an xmms wrapper file:
/usr/bin/xmmsWrapper.sh

Code: [Select]
#!/bin/bash
xmodmap /etc/X11/kb/xmms.xmodmap
/usr/X11R6/bin/xset dpms 30 0 0
/usr/X11R6/bin/xset -dpms
xmms
/usr/X11R6/bin/xset +dpms
/usr/X11R6/bin/xset dpms 120 0 360
xmodmap /etc/X11/kb/xmmsBack.xmodmap

I'm useing jgraves mp3 player hack/mod (my version of it)

mp3 player hack/mod  (https://www.oesf.org/forums/index.php?showtopic=3249&hl=mp3+player)

I think thats understandable...

-Enjoy  

--MY $600 MP3 player!!!!
Title: Help Blanker
Post by: karlto on April 07, 2006, 12:14:08 am
Quote
to disable suspend

#xset dpms * 0 0
#xset -dpms

(the '*' is the time you want the screen to shut off at, in seconds. This still works after you exec the "xset -dpms" command which, doesn't make much sense to me but it works, so... whatever)

and to enable it again

#xset +dpms
#xset dpms * 0 *

which works!!! (so far)   
Cool; I know that 'xset dpms * * *' implies 'xset +dpms' (turn on dpms). I would have thought using a value of 0 would have implied the opposite ('xset -dpms' to turn it off). Obviously not... (or a bug in xset?)

Glad you got it sorted anyway
Title: Help Blanker
Post by: 10BaseT on April 12, 2006, 02:37:16 am
Quote
Quote
to disable suspend

#xset dpms * 0 0
#xset -dpms

(the '*' is the time you want the screen to shut off at, in seconds. This still works after you exec the "xset -dpms" command which, doesn't make much sense to me but it works, so... whatever)

and to enable it again

#xset +dpms
#xset dpms * 0 *

which works!!! (so far)   
Cool; I know that 'xset dpms * * *' implies 'xset +dpms' (turn on dpms). I would have thought using a value of 0 would have implied the opposite ('xset -dpms' to turn it off). Obviously not... (or a bug in xset?)

Glad you got it sorted anyway
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122169\"][{POST_SNAPBACK}][/a][/div]


What I meant by * * * is u can put any value there... I don't think a xset dpms takes * as a valid argument

but yeah, seems to be working fine
Title: Help Blanker
Post by: karlto on April 12, 2006, 04:31:53 pm
Quote
What I meant by * * * is u can put any value there... I don't think a xset dpms takes * as a valid argument

but yeah, seems to be working fine
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122796\"][{POST_SNAPBACK}][/a][/div]
I was actually referring to a wildcard too (I'm not very articulate sometimes) - from what the man page says, 'xset +dpms' and 'xset -dpms' should be taken care of automatically depending on what values you use. I see from my own tests also that pdaXrom does not always do this, and it needs to. The environment the blanker was originally written for maybe supported this better so explicit commands were not required?

Another caveat is that any power events (suspend, battery/AC change) will reset all these settings.

Perhaps a good project would be to integrate the blanker functionality into the lightnpower.py script as a third mode, indicated by a file flag or something? The battery applet/power management seems to honour these settings consistently...
Title: Help Blanker
Post by: 10BaseT on April 20, 2006, 04:53:50 pm
Quote
Quote
What I meant by * * * is u can put any value there... I don't think a xset dpms takes * as a valid argument

but yeah, seems to be working fine
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122796\"][{POST_SNAPBACK}][/a][/div]
I was actually referring to a wildcard too (I'm not very articulate sometimes) - from what the man page says, 'xset +dpms' and 'xset -dpms' should be taken care of automatically depending on what values you use. I see from my own tests also that pdaXrom does not always do this, and it needs to. The environment the blanker was originally written for maybe supported this better so explicit commands were not required?

Another caveat is that any power events (suspend, battery/AC change) will reset all these settings.

Perhaps a good project would be to integrate the blanker functionality into the lightnpower.py script as a third mode, indicated by a file flag or something? The battery applet/power management seems to honour these settings consistently...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=122911\"][{POST_SNAPBACK}][/a][/div]

Yeah thats about what I figured too... I haven't submited a bug report yet    because my work around is working fine other then I do have to be careful of (suspend, battery/AC change). I'm debating wheather I want to try rewriting the blanker and the lightnpower.py script into one program or script because there are other times when supending is bad like rewiting files to the Zaurus via USB...
Title: Help Blanker
Post by: karlto on April 20, 2006, 08:04:59 pm
Quote
Yeah thats about what I figured too... I haven't submited a bug report yet    because my work around is working fine other then I do have to be careful of (suspend, battery/AC change). I'm debating wheather I want to try rewriting the blanker and the lightnpower.py script into one program or script because there are other times when supending is bad like rewiting files to the Zaurus via USB...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=123951\"][{POST_SNAPBACK}][/a][/div]
After claiming here that everything worked fine for me I discovered it didn't... so I came up with a workaround also. The problem is that the blanker is compiled, so I gave away the idea of using that. The lightnpower.py script however is actually very reliable, and the settings here are honoured throughout (settings in ~/Choices/lightnpower.cfg). So, I made a second file with some always-on settings, and:

Code: [Select]
#!/bin/sh

case "$1" in

        on)
          if [ -f ~/Choices/lightnpower.cfg.blanker ]; then
                  mv ~/Choices/lightnpower.cfg ~/Choices/lightnpower.cfg.normal
                  mv ~/Choices/lightnpower.cfg.blanker ~/Choices/lightnpower.cfg
                  /usr/bin/lightnpower.py --loadandquit
          fi
         ;;

        off)
          if [ -f ~/Choices/lightnpower.cfg.normal ]; then
                  mv ~/Choices/lightnpower.cfg ~/Choices/lightnpower.cfg.blanker
                  mv ~/Choices/lightnpower.cfg.normal ~/Choices/lightnpower.cfg
                  /usr/bin/lightnpower.py --loadandquit
          fi
         ;;

        *)
          echo "Usage: $0 (on|off)"
          exit 1
         ;;

esac

exit 0
This script just copies the different settings file in, runs the lightnpower.py script to update settings, and they are used until swapped back. Instead of 'on' and 'off', it would be reasonably trivial to have any number of modes/files...

And you don't have to be careful about taking on or off AC power or suspending at all.