Help - Search - Members - Calendar
Full Version: Mb-applet-powerctrl
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
Pages: 1, 2, 3
ecc_hy
Changelog:

2007-07-15
Bump to 0.0.2
add "overclocktimeout" to powerctrl.cfg

2007-07-02
clean the paint code
add paint config to powerctrl.cfg

2007-06-30
dpms_set() back to "xset", give up DPMSGetTimeouts()
new function: dpms_read(), read dpms status from "xset q"
add "Attention:" to powerctrl.cfg
speedstep over unstable freq

2007-06-29:
Big fixed
Display better.
Add powerctrl.cfg, you can modify almost everthing in it.

2007-06-23

Make the three bars wider, which would make them much more visible, and look better.

Change and test ok for screensaver and suspend options. It really confuse me. Now the function is:
1. Screensaver and suspend options is opened when startup, read lightnpower config at first, but not set dpms really.
2. If you disable or enable those options, read lightnpower config, and set dpms.
3. When power changed, read lightnpower config, change backlight.
4. If mb-applet-battery runnging, powerctrl would not set dpms.
5. If mb-applet-battery not runnging, powerctrl would set dpms. Keep disable if you disabled before, Otherwiase, set dpms according lightnpower config.

Add config of usage AC higher and usage battery higher. This should satisfy meanie's idea: when on battery power, it will only underclock and not overclock, while on the other hand, if its on AC power, it can automatically overclock.

Function list:
Blanker/suspend control, no support XMMS key control
CPU/Mem monitor, battery monitor, CPU clock monitor
Low battery warn
Set CPU Clock manually and very fast, replace cpuoverclock.py.
Set backlight manually and very fast, replace lightnpower.py.
Auto speedstep according CPU usage.

Source is not cleaned, if you want to compile:
make clean
make distclean
./configure
make

No debug infor:
delete line:
#define DEBUG

Install binary mb_applet_powerctrl_0.0.1.tar.gz:
tar zvfx mb_applet_powerctrl_0.0.1.tar.gz
and copy the files according to the directory

After install:
click and hold on applet for 2 seconds
select "add" -> "power control"

You may run mb-applet-powerctrl in terminal when you getting problem.
zi99y
looks really useful, I will try it tonight. What is the memory use like, I try to use few mb-applets to save memory.

anyone tried this yet?
zi99y
unfortunately it crashes on loading, any ideas?
CODE
$ mb-applet-powerctrl
mbmenu: no _MB_THEME set on root window
Segmentation fault
ecc_hy
I have not test in C3200 and icewm yet.

This program develop in PDAXROM 1.1 beta3 on C1000. It support other zaurus, but may need more test. For other zaurus, you may tell me some information as below when you get problem:
product identify -> /proc/deviceinfo/product
cpu clock -> /proc/cccr_change and /proc/zaurus/VCORE
backlight -> /proc/driver/fl/corgi-bl

It can not support kernel 2.6 now.
But new release will come soon.

As you mind. the powerctlr really does:
1. Save display screen. It merged battery, cpu usage, mem usage, and cpu clock display.
2. Optimize the display program, display changed pixel of tray icon only.
3. Change the backlight and cpu clock by simple click tray icon, it is very fast.
4. Speedstep CPU Clock according to CPU usage, when usage greater than 80%, set clock higher; when usage less than 20%. set clock lower.
Meanie
QUOTE(ecc_hy @ Jun 22 2007, 11:48 PM)
I have not test in C3200 and icewm yet.

This program develop in PDAXROM 1.1 beta3 on C1000. It support other zaurus, but may need more test. For other zaurus, you may tell me some information as below when you get problem:
product identify -> /proc/deviceinfo/product
cpu clock -> /proc/cccr_change and /proc/zaurus/VCORE
backlight -> /proc/driver/fl/corgi-bl

It can not support kernel 2.6 now.
But new release will come soon.

As you mind. the powerctlr really does:
1. Save display screen. It merged battery, cpu usage, mem usage, and cpu clock display.
2. Optimize the display program, display changed pixel of tray icon only.
3. Change the backlight and cpu clock by simple click tray icon, it is very fast.
4. Speedstep CPU Clock according to CPU usage, when usage greater than 80%, set clock higher; when usage less than 20%. set clock lower.
*


it runs fine on my c3000 running icewm 1.2.26
daniel3000
Great approach! Thank you!

Some ideas:
You could make the three bars wider, which would make them much more visible.
Now they are quite hard to see.

Blank screeen once did not work, and now it segfaults here.
Do you hae an ide why?

I see "Max speed" and "Max save" can both be unchecked which is probably setting the CPU speed to default behavior (i.e. don't change at all and set to 416MHz).
But I think it would be good to have an explicit third option "Default speed" so te user really knows that the applet doesn't change anything. It is not obvious instantly that the optoins canno only be "cross-checked" but also unchecked at all.

Did you use Meanie's algorithms from his banker applet hack for the blanker equivalent options?

Maybe the volume applet could also be integrated? smile.gif

daniel
climber
This sound very interesting!

As I'm not the linux specialist what have I to to with the "mb_applet_powerctrl_0.0.1.tar.gz?"

I extracted the file and there are a few folders like the zaurus already has. I think there's should be a command how to get these data to the right folders!?

Thanks
climber
Meanie
i packaged it up.


i like the new features it adds, but since i am using icewm which already has the monitoring bits i am inclined to rather not have it show those monitors. what i intend to do is use the code from powerctrl and merge it back into my custom blanker applet (which also has the xmms stuff removed but handles the screensaver/suspend functionality a bit better).
so i intend to add the cpu and backlight settings parts to blanker applet, but i want to add some logic to the power step feature where when on battery power, it will only underclock and not overclock, while on the other hand, if its on AC power, it can automatically overclock.
Meanie
there is a bug, the SL-C3200 is ignored and thus the overclocking will fail for it.
ecc_hy
QUOTE(Meanie @ Jun 23 2007, 06:03 AM)
there is a bug, the SL-C3200 is ignored and thus the overclocking will fail for it.
*


Writing the zaurus model as hard code is not good idea.

Next version, I should make a config file.
Meanie
ok, then you are going to change the following code to read a config instead?

(memcmp(sLine, "SL-C1000", 7) == 0 || memcmp(sLine, "SL-C3100", 7) == 0 || memcmp(sLine, "SL-C3000", 7) == 0)

Don't forget to add the SL-C3200 to that config list.

In addition, in 2.4.20 kernel, you can easily determine the model name, but in 2.6.x kernel, this info is not easily available. Instead, you can only get the dog name, ie Akita, Spitz, Borzoi, Terrier, etc.. so if you use that information instead, then the applet could also work in new pdaXrom that is using 2.6.x kernel...I have added the following into postinst:

HARDWARE=`cat /proc/cpuinfo | grep 'Hardware' | cut -d':' -f2 | cut -d' ' -f3` > /etc/hardware

because there is no /proc/deviceinfo under 2.6.x kernel

so instead of reading /proc/deviceinfo/product, I read /etc/hardware instead and instead of checking whether the model is SL-C1000, SL-C3100, etc... I check for Akita, Borzoi, etc... instead... This would make it work for all versions of pdaXrom...




Also, can you add another option so you can choose whether you want to display cpu info/memory info/battery status or the suspend/screensaver status which the original blanker is displaying?

Another nice to have feature would be an extra option to turn on/off swap...
Meanie
QUOTE(ecc_hy @ Jun 16 2007, 03:26 AM)
Change and test ok for screensaver and suspend options. It really confuse me. Now the function is:
1. Screensaver and suspend options is opened when startup, read lightnpower config at first, but not set dpms really.
2. If you disable or enable those options, read lightnpower config, and set dpms.
3. When power changed, read lightnpower config, change backlight.
4. If mb-applet-battery runnging, powerctrl would not set dpms.
5. If mb-applet-battery not runnging, powerctrl would set dpms. Keep disable if you disabled before, Otherwiase, set dpms according lightnpower config.


This is what I intended for the blanker when I hacked it:

1. In the original blanker, screensaver and suspend option were always enabled by default when you start the applet (even when they really were enabled or disabled), so I changed the code to check whether those features really were enabled or disabled when the applet started and had it show the status accordingly.

2. Yep, I also found that xset didn't properly set those options so made it call xset-wrapper instead which when fiddled with the options to set things properly, ie if you have xscreensaver installed, it would also enabled/disable xscreensaver as well and not only the build in screensaver in X

3. Exactly. power.cfg has backlight settings for AC and battery mode, so set backlight according to what is set there.

4. Battery applet calls lightnpower.py to set dpms when power changes between AC/battery, so when it is running, blanker/powerctrl does not need to do anything

5. since there is no battery applet, powerctrl applet needs to change settings. maybe it should check whether blanker applet is running as well.
Meanie
the speedstep feature has a problem. when i am on battery power and doing nothing it correctly steps down to a lower cpu frequency, however, when i am plugged into the AC and do a compile, i can see it steps up the cpu frequency but then it shuts down my Zaurus and I have to reset it...
ecc_hy
QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
ok, then you are going to change the following code to read a config instead?

Yes, the config file should be copy to /etc/powerctrl.cfg or ~/Choice/powerctrl.cfg. Puting the config file to HOME should avoid the problem of user right.
The /proc/cpuinfo can be used or not? Only cpu model stored in it.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
Also, can you add another option so you can choose whether you want to display cpu info/memory info/battery status or the suspend/screensaver status which the original blanker is displaying?

This maybe not easy if you want to change the status bar on tray image. As you know, the all drawing work is based the icon file. If you really want to do this, drawing the whole icon's backgroud is needed.
If you just wat ignore it and leave the bar no change, it should by more easy.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
1. In the original blanker, screensaver and suspend option were always enabled by default when you start the applet (even when they really were enabled or disabled), so I changed the code to check whether those features really were enabled or disabled when the applet started and had it show the status accordingly.

Do you mean check lightnpower.cfg?
Disable screen save or suspend if the value of config file is 0. Yes, I have done it.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
2. Yep, I also found that xset didn't properly set those options so made it call xset-wrapper instead which when fiddled with the options to set things properly, ie if you have xscreensaver installed, it would also enabled/disable xscreensaver as well and not only the build in screensaver in X

I have copy it from your blanker, even do not know why. Now you explain it.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
3. Exactly. power.cfg has backlight settings for AC and battery mode, so set backlight according to what is set there.

Yes. powerctrl read lightnpower.cfg to get the baklight config, and also read
/proc/driver/fl/corgi-bl to get current backlight value.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
4. Battery applet calls lightnpower.py to set dpms when power changes between AC/battery, so when it is running, blanker/powerctrl does not need to do anything
I have copy it from your blanker, and check battery applet is running or not.


QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
5. since there is no battery applet, powerctrl applet needs to change settings. maybe it should check whether blanker applet is running as well.

In fact, I want to replace replace battery applet and blanker applet. Any way, I shill check the blanker.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
Another nice to have feature would be an extra option to turn on/off swap...

This should be easy by exec "swapon -a" and "swapoff -a". I will try.

QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
the speedstep feature has a problem. when i am on battery power and doing nothing it correctly steps down to a lower cpu frequency, however, when i am plugged into the AC and do a compile, i can see it steps up the cpu frequency but then it shuts down my Zaurus and I have to reset it...
*


I have found the "make" program may be error when overclock.
The same problem occurs one times before modify the screensaver and suspend control. It seems powerctrl always call dpms_set.

Now the new ipk and source is changed screensaver and suspend control according meanies' blanker. I have not shuts down after modified.

You may try new ipk and source.

Someone said, overclock may not safe, and suggest 7500 can not over clock for 30 minutes, and C1000 can not for one hour. Is it truth? I can design a time protect. Is it nessary?

Thanks meanie very much, I will conside those ideas carefully.
Meanie
QUOTE(ecc_hy @ Jun 25 2007, 12:44 AM)
The /proc/cpuinfo can be used or not? Only cpu model stored in it.

Yes but it contains extra info which you need to strip out first and it only has dog name but no model name.

QUOTE(ecc_hy @ Jun 25 2007, 12:44 AM)
QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
Also, can you add another option so you can choose whether you want to display cpu info/memory info/battery status or the suspend/screensaver status which the original blanker is displaying?

This maybe not easy if you want to change the status bar on tray image. As you know, the all drawing work is based the icon file. If you really want to do this, drawing the whole icon's backgroud is needed.
If you just wat ignore it and leave the bar no change, it should by more easy.

Those bars are really of no use to me, so I rather have the old icons back.

QUOTE(ecc_hy @ Jun 25 2007, 12:44 AM)
QUOTE(Meanie @ Jun 24 2007, 04:08 AM)
Another nice to have feature would be an extra option to turn on/off swap...

This should be easy by exec "swapon -a" and "swapoff -a". I will try.


I changed the CPU frequency for the overclocking using the values from Cacko instead and it didnt shutdown or turn into a white screen smile.gif

I also rearranged the order of the popup items a bit to suit my own preferenes...
ecc_hy
Powerctrl can put amost everything in config file. For example:

[powerctrl]
productfile=/proc/deviceinfo/product
or
productfile=/etc/hardware

bCheckBankerApplet = 1
bCheckBatteryApplet = 1

[SL-C1000]
CCCR=/proc/cccr_change
CCCRFormat="%x"
VCORE=/proc/zaurus/VCORE
VCOREFormat="%02x"

freqnum = 6
freq5=624,2000310,0e
...

[Akita]
CCCR=/proc/cccr_change
CCCRFormat="%x"
VCORE=/proc/zaurus/VCORE
VCOREFormat="%02x"

freqnum = 6
freq5=624,2000310,0e
...

Some problem should conside:
1. put the powerctrl.cfg to HOME directyory or /etc, or maybe both
2. Is it safe? The error config may hurt zaurus.
Meanie
QUOTE(ecc_hy @ Jun 25 2007, 04:44 PM)
Powerctrl can put amost everything in config file. For example:

[powerctrl]
productfile=/proc/deviceinfo/product
or
productfile=/etc/hardware

bCheckBankerApplet = 1
bCheckBatteryApplet = 1

[SL-C1000]
CCCR=/proc/cccr_change
CCCRFormat="%x"
VCORE=/proc/zaurus/VCORE
VCOREFormat="%02x"

freqnum = 6
freq5=624,2000310,0e
...

[Akita]
CCCR=/proc/cccr_change
CCCRFormat="%x"
VCORE=/proc/zaurus/VCORE
VCOREFormat="%02x"

freqnum = 6
freq5=624,2000310,0e
...

Some problem should conside:
1. put the powerctrl.cfg to HOME directyory or /etc, or maybe both
2. Is it safe? The error config may hurt zaurus.
*


I think it should look in $HOME first, if it finds it then use that, otherwise, copy default config from /etc to $HOME.

PS: I think there should be a maxtime for the overclocking when it automatically steps down again so not to cook the Zaurus CPU. better safe than sorry smile.gif
ecc_hy
only for test:
Merge Meanie's modify
Add powerctrl.cfg, you should copy it to ~/Choice/

Please check powerctrl.cfg
[powerctrl]
PathModel0=/proc/deviceinfo/product
PathModel1=/etc/hardware

SL-C700=PXA250
Corgi=PXA250

SL-C750=PXA255
SL-C7500=PXA255
SL-7500=PXA255
Shepherd=PXA255

SL-C760=PXA255
SL-C860=PXA255
Husky=PXA255
Boxer=PXA255

SL-6000=PXA255
Tosa=PXA255

SL-C1000=PXA270
SL-C3100=PXA270
SL-C3000=PXA270
SL-C3200=PXA270
Akita=PXA270
Spitz=PXA270
Borzoi=PXA270
Terrier=PXA270

[PXA250]
BatteryWarn=15
bSpeedStep=False
StepDelay=3
acUsageHigher=80
acUsageLower=20
acMaxFreq=2
acMinFreq=1
baUsageHigher=80
baUsageLower=20
baMaxFreq=2
baMinFreq=0

# do not change below
PathCCCR=/proc/cccr_change
PathVCORE=
MaxFreq=2
DefaultFreq=2
backlight0=1
backlight1=5
backlight2=b
backlight3=105
backlight4=10b
backlight5=11f

freq0=199
cccr0=141

freq1=398
cccr1=241

freq2=472
cccr2=272

[PXA255]
BatteryWarn=15
bSpeedStep=False
StepDelay=3
acUsageHigher=80
acUsageLower=20
acMaxFreq=2
acMinFreq=1
baUsageHigher=80
baUsageLower=20
baMaxFreq=2
baMinFreq=0

# do not change below
PathCCCR=/proc/cccr_change
PathVCORE=
MaxFreq=3
DefaultFreq=2
backlight0=1
backlight1=5
backlight2=b
backlight3=105
backlight4=10b
backlight5=11f
freq0=199
cccr0=141

freq1=398
cccr1=161

freq2=472
cccr2=162

freq3=531
cccr3=163

[PXA270]
BatteryWarn=15
bSpeedStep=False
StepDelay=3
acUsageHigher=80
acUsageLower=20
acMaxFreq=5
acMinFreq=3
baUsageHigher=80
baUsageLower=20
baMaxFreq=5
baMinFreq=1

# do not change below
PathCCCR=/proc/zaurus/CCCR
PathVCORE=/proc/zaurus/VCORE
MaxFreq=5
DefaultFreq=3
backlight0=10000
backlight1=10001
backlight2=10007
backlight3=10101
backlight4=10107
backlight5=10111

freq0=104
cccr0=2000204
vcore0=4

freq1=208
cccr1=2000206
vcore1=6

freq2=312
cccr2=2000208
vcore2=8

freq3=416
cccr3=2000210
vcore3=a

freq4=502
cccr4=2000290
vcore4=c

freq5=624
cccr5=2000310
vcore5=e
ecc_hy
If no problem, I should continue to work on:
1. overclock safe control, overclock whithout overheat
2. swap on/off
3. volume control maybe
4. try to make the tray icon wider, and include volume display bar

It is really many works todo, but the most hard work has finished.
Meanie
QUOTE(ecc_hy @ Jun 26 2007, 03:56 AM)
If no problem, I should continue to work on:
1. overclock safe control, overclock whithout overheat
2. swap on/off
3. volume control maybe
4. try to make the tray icon wider, and include volume display bar

It is really many works todo, but the most hard work has finished.
*


so far, I can overclock fine, the speed step works beautifullly when I am connected to AC and compiling things, however, when on battery power, the underclocking results in the screen flickering and flashing. I tried other cpu frequencies but have not found one that does not cause flickering yet...
ecc_hy
QUOTE(Meanie @ Jun 25 2007, 07:24 PM)
so far, I can overclock fine, the speed step works beautifullly when I am connected to AC and compiling things, however, when on battery power, the underclocking results in the screen flickering and flashing. I tried other cpu frequencies but have not found one that does not cause flickering yet...
*


My zaurus is C1000-pdaxrom 1.1 beta3

1. "make" always error when overclock. If set to default clock, "make" is ok.
2. the screen flickering only when:
underclock
on battery power
connect PC as USB Disk mode (CF/SD)
copy file between pc and CF/SD
Meanie
QUOTE(ecc_hy @ Jun 26 2007, 03:50 PM)
QUOTE(Meanie @ Jun 25 2007, 07:24 PM)
so far, I can overclock fine, the speed step works beautifullly when I am connected to AC and compiling things, however, when on battery power, the underclocking results in the screen flickering and flashing. I tried other cpu frequencies but have not found one that does not cause flickering yet...
*


My zaurus is C1000-pdaxrom 1.1 beta3

1. "make" always error when overclock. If set to default clock, "make" is ok.
2. the screen flickering only when:
underclock
on battery power
connect PC as USB Disk mode (CF/SD)
copy file between pc and CF/SD
*




overclocking and underclocking is not always reliable and depends pretty much on the individual CPUs in the unit. it is good that you now have a config files where these values are stored and can be changed, ie not hardcoded in the binary/code anymore.
the same values may not work for everyone, so it probably would be a good idea to have several known values that work in the config files, but commented out and let the advanced users uncommment the appropriate value.

for example (note that these are not actual working values, but just some values to give as an example)

#freq2=312
# cccr2=2000208
# cccr2=a000208
# cccr2=2000210

if freq2 and one of the cccr2 is uncommented, 312 is shown as an option in the applet, otherwise, it is not.

this way, the users can test which settings work and only have the frequencies that work for his/her Zaurus shown and used in the applet.

alternatively, the config files could have a default value and alternate values commented out so if the user finds that the default value is not working, try the other ones and if none of them work, disable that frequency altogether by commenting out the whole section.

On my C3000, the old values for overclocking would shutdown my Zaurus or the screen would turn white. With the new values, it works without problems, ie I can run make and many other things... tetsu has a list of many overclocking values on his website which you can try. unfortunately, there are not that many underclocking values, so when I underclock, the screen flickers.
ecc_hy
Just for compiler and test:
Change config file format, more simple, especial backlight and cpu clock freq.
menu will not display the freq commented.

Question to Meanie:
How do ajust the frquence config? Just try it one by one, or you can read the hardware value, or not?
Meanie
QUOTE(ecc_hy @ Jun 26 2007, 06:44 PM)
Just for compiler and test:
Change config file format, more simple, especial backlight and cpu clock freq.
menu will not display the freq commented.

Question to Meanie:
How do ajust the frquence config? Just try it  one by one, or you can read the hardware value, or not?
*


need to try one by one. it will be different for each Zaurus. For example, there could be 10 people with C3100 who can use one value but for 5 other users also with C3100 that value crashes their Z and they need to use different value. Only trial and crash can tell which value is correct for your own Z.
Meanie
ok, now with this latest code, when I comment out a frequency, ie freq3, it does not get displayed, however, the applet picks an invalid default freqency when it starts up, in my case, freq1. the problem seems to be that when changing frequencies, it always steps by one frequency level and if one is commented out, it gets confused and goes to the wrong one.
It also does not have the default 416 ticked when it starts up (when all the freq in the config files are uncommented at default settings).

other enhancements that would be nice:

The MEM indicator shows the total of both physical memory and swap, hence I get 195% smile.gif
can you separate them out like in your alpha version?

The screensaver and suspend options are ticked/unticked according to the values stored in lightnpower.cfg, but it would be nicer if they displayed the actual status of those settings, ie according to what `xset q` says maybe...
ecc_hy
QUOTE(Meanie @ Jun 26 2007, 06:25 PM)
ok, now with this latest code, when I comment out a frequency, ie freq3, it does not get displayed, however, the applet picks an invalid default freqency when it starts up, in my case, freq1. the problem seems to be that when changing frequencies, it always steps by one frequency level and if one is commented out, it gets confused and goes to the wrong one.
It also does not have the default 416 ticked when it starts up (when all the freq in the config files are uncommented at default settings).

It is real confuse me.
If comment some freq, we lost those value.
As my experience, if change clock from level 1 to leve 3 directly, zaurus may crash, so middle freq level can not be throw.
If keep the unstable middle level, it is very hard to contrl speedstep, and do not stay the unstable for a long time.
Otherwise, speedstep always stay on min freq set by powerctrl. If only the lowest or highest level is not stable, the problem is simple, it is enough if we change the min / max freq in powerctrl.
Finally, I just add a new config (1, stable / 0, unstable) at the end of freq define. The unstable is not displayed in menu. It means, you can not set to unstable manually. but auot speedstep do not check.

QUOTE(Meanie @ Jun 26 2007, 06:25 PM)
other enhancements that would be nice:

The MEM indicator shows the total of both physical memory and swap, hence I get 195% smile.gif
can you separate them out like in your alpha version?

Finished, check please.

QUOTE(Meanie @ Jun 26 2007, 06:25 PM)
The screensaver and suspend options are ticked/unticked according to the values stored in lightnpower.cfg, but it would be nicer if they displayed the actual status of those settings, ie according to what `xset q` says maybe...
*

Following is come from the pdaxrom builder's patch, I do not sure is it for all pdaxrom version? I am sure it is working for me, c1k, 1.1 beta3

if (DPMSQueryExtension(g_pDisplay, &dummy, &dummy))
{
if (DPMSCapable(g_pDisplay))
{
DPMSGetTimeouts(g_pDisplay, &standby, &suspend, &off);
if ((standby != a) || (off != cool.gif)
DPMSSetTimeouts(g_pDisplay, a, 0, cool.gif;
}
}

New function:
Include font define in powerctrl.cfg
Meanie
hiding the unwanted frequencies now work if you set the value to 0 at the end, and they do not appear on the applet menu any more, however, the speed step still uses them. for me the lowest two frequencies cause flickering so i rather not have them being used. i can set MinFreq to 2 and speed step won't use freq 0 and 1. however, what if freq 0 and 2 were not working for me and only freq 1 did? also, speed step is set to true by default which might be a nice idea once all is working perfectly, but for the time being it is better set to false.
the filename for the suspend icon is mispelled, you forgot the ctrl after power smile.gif
and finally, the DPMSQueryExtension code crashes my Z. it just turned off and I had to pull the battery when I toggled the auto suspend. toggling the screensaver was ok . not sure why as the code looks ok.
ecc_hy
We have two solutions:
1. Compress the freq list, and throw the unstable freq level. It may cause system unstable when over step, like step from 3 direct to 1, skip level 2.
2. Reserved the unstable. It will make the speedstep() too complex. We should conside in very detail and test more.

I will use method 2, and find a way to make it simple, you know, use function freq_stepset().

and finally, the DPMSQueryExtension code crashes my Z. it just turned off and I had to pull the battery when I toggled the auto suspend. toggling the screensaver was ok . not sure why as the code looks ok.

It is not problem of DPMSQueryExtension().
I have found the problem from xset's source. Please check:
The mb-applet-blanker patch from pdaxrom builder do not call DPMSEnable() before set. xset of pdaxrom 1.1 have same problem also.

So, someone add "xset -dpms" this to blanker:

I decide to use xset after read the source of xset. xset should be easy when powerctrl is migrated to other computer.

PS:
I have read dpms para and status from "xset q", but not sure how to use it.
Any suggestion?
ecc_hy
2007-06-30 Hu Yong <ecc_hy@hotmail.com>

dpms_set() back to "xset", give up DPMSGetTimeouts()
new function: dpms_read(), read dpms status from "xset q"
add "Attention:" to powerctrl.cfg

speedstep over unstable freq
Meanie
QUOTE(ecc_hy @ Jul 1 2007, 02:31 AM)
2007-06-30  Hu Yong  <ecc_hy@hotmail.com>

dpms_set() back to "xset", give up DPMSGetTimeouts()
new function: dpms_read(), read dpms status from "xset q"
add "Attention:" to powerctrl.cfg

speedstep over unstable freq
*


its getting there. everything seems to be working as it should except when overclocking for too long, the Z gets warm and locks up sad.gif
ecc_hy
Finished:
code cleaning.
Display config.

Next:
Overclock protected.
zi99y
I still cannot get this to work, using the latest ipk I get the following ouput when running from a terminal:

[code]
~$ mb-applet-powerctrl
DEBUG: Read config [/home/gez/Choices/powerctrl.cfg]
DEBUG: /home/gez/Choices/powerctrl.cfg . PowerCtrl
DEBUG: PowerCtrl . PathModel0 . /proc/deviceinfo/product
DEBUG: PowerCtrl . PathModel1 . /etc/hardware
DEBUG: PowerCtrl . MenuFont . Verdana-14
DEBUG: Product [SL-C3200]
DEBUG: /home/gez/Choices/powerctrl.cfg . PowerCtrl
DEBUG: PowerCtrl . SL-C3200 . PXA270
DEBUG: CPU [PXA270]
DEBUG: /home/gez/Choices/powerctrl.cfg . PXA270
DEBUG: PXA270 . PathCCCR . /proc/zaurus/CCCR
DEBUG: PXA270 . PathVCORE . /proc/zaurus/VCORE
DEBUG: PXA270 . MaxFreq . 5
DEBUG: PXA270 . DefaultFreq . 3
DEBUG: /home/gez/Choices/powerctrl.cfg . PXA270
DEBUG: PXA270 . backlight . 10000,10001,10007,10101,10107,10111
DEBUG: PXA270 . freq0 . 104,2000204,4
DEBUG: PXA270 . freq1 . 208,2000206,6
DEBUG: PXA270 . freq2 . 312,2000208,8
DEBUG: PXA270 . freq3 . 416,2000210,a
DEBUG: PXA270 . freq4 . 502,2000290,c
DEBUG: PXA270 . freq5 . 624,2000310,e
DEBUG: Read backlight 0 - 0x10000
DEBUG: Read backlight 1 - 0x10001
DEBUG: Read backlight 2 - 0x10007
DEBUG: Read backlight 3 - 0x10101
DEBUG: Read backlight 4 - 0x10107
DEBUG: Read backlight 5 - 0x10111
DEBUG: Read Freq 0 - 104, 0x2000204, 0x4
DEBUG: Read Freq 1 - 208, 0x2000206, 0x6
DEBUG: Read Freq 2 - 312, 0x2000208, 0x8
DEBUG: Read Freq 3 - 416, 0x2000210, 0xa
DEBUG: Read Freq 4 - 502, 0x2000290, 0xc
DEBUG: Read Freq 5 - 624, 0x2000310, 0xe
DEBUG: /home/gez/Choices/powerctrl.cfg . PXA270
DEBUG: PXA270 . BatteryWarn . 15
DEBUG: PXA270 . bSpeedStep . False
DEBUG: PXA270 . StepDelay . 3
DEBUG: PXA270 . acUsageHigher . 80
DEBUG: PXA270 . acUsageLower . 20
DEBUG: PXA270 . acMaxFreq . 5
DEBUG: PXA270 . acMinFreq . 3
DEBUG: PXA270 . baUsageHigher . 80
DEBUG: PXA270 . baUsageLower . 20
DEBUG: PXA270 . baMaxFreq . 5
DEBUG: PXA270 . baMinFreq . 1
mbmenu: no _MB_THEME set on root window
DEBUG: lnp AC Power 4 1200 0
DEBUG: lnp battery 1 300 3000
DEBUG: CCCR val 0x2000210
DEBUG: Backlight string 0x00010111

DEBUG: Backlight val 0x10111
Segmentation fault
[/quote]
Meanie
[quote=zi99y,Jul 4 2007, 05:57 AM]
I still cannot get this to work, using the latest ipk I get the following ouput when running from a terminal:

[code]
~$ mb-applet-powerctrl
DEBUG: Read config [/home/gez/Choices/powerctrl.cfg]
DEBUG: /home/gez/Choices/powerctrl.cfg . PowerCtrl
DEBUG: PowerCtrl . PathModel0 . /proc/deviceinfo/product
DEBUG: PowerCtrl . PathModel1 . /etc/hardware
DEBUG: PowerCtrl . MenuFont . Verdana-14
DEBUG: Product [SL-C3200]
DEBUG: /home/gez/Choices/powerctrl.cfg . PowerCtrl
DEBUG: PowerCtrl . SL-C3200 . PXA270
DEBUG: CPU [PXA270]
DEBUG: /home/gez/Choices/powerctrl.cfg . PXA270
DEBUG: PXA270 . PathCCCR . /proc/zaurus/CCCR
DEBUG: PXA270 . PathVCORE . /proc/zaurus/VCORE
DEBUG: PXA270 . MaxFreq . 5
DEBUG: PXA270 . DefaultFreq . 3
DEBUG: /home/gez/Choices/powerctrl.cfg . PXA270
DEBUG: PXA270 . backlight . 10000,10001,10007,10101,10107,10111
DEBUG: PXA270 . freq0 . 104,2000204,4
DEBUG: PXA270 . freq1 . 208,2000206,6
DEBUG: PXA270 . freq2 . 312,2000208,8
DEBUG: PXA270 . freq3 . 416,2000210,a
DEBUG: PXA270 . freq4 . 502,2000290,c
DEBUG: PXA270 . freq5 . 624,2000310,e
DEBUG: Read backlight 0 - 0x10000
DEBUG: Read backlight 1 - 0x10001
DEBUG: Read backlight 2 - 0x10007
DEBUG: Read backlight 3 - 0x10101
DEBUG: Read backlight 4 - 0x10107
DEBUG: Read backlight 5 - 0x10111
DEBUG: Read Freq 0 - 104, 0x2000204, 0x4
DEBUG: Read Freq 1 - 208, 0x2000206, 0x6
DEBUG: Read Freq 2 - 312, 0x2000208, 0x8
DEBUG: Read Freq 3 - 416, 0x2000210, 0xa
DEBUG: Read Freq 4 - 502, 0x2000290, 0xc
DEBUG: Read Freq 5 - 624, 0x2000310, 0xe
DEBUG: /home/gez/Choices/powerctrl.cfg . PXA270
DEBUG: PXA270 . BatteryWarn . 15
DEBUG: PXA270 . bSpeedStep . False
DEBUG: PXA270 . StepDelay . 3
DEBUG: PXA270 . acUsageHigher . 80
DEBUG: PXA270 . acUsageLower . 20
DEBUG: PXA270 . acMaxFreq . 5
DEBUG: PXA270 . acMinFreq . 3
DEBUG: PXA270 . baUsageHigher . 80
DEBUG: PXA270 . baUsageLower . 20
DEBUG: PXA270 . baMaxFreq . 5
DEBUG: PXA270 . baMinFreq . 1
mbmenu: no _MB_THEME set on root window
DEBUG: lnp AC Power 4 1200 0
DEBUG: lnp battery 1 300 3000
DEBUG: CCCR val 0x2000210
DEBUG: Backlight string 0x00010111

DEBUG: Backlight val 0x10111
Segmentation fault
[/quote]
*

[/quote]

sudo it
ecc_hy
add "overclock protected" to powerctrl.cfg
add volume control
try swap on/off, but system hang when exec "swapoff -a"

clean the paint code
add paint config to powerctrl.cfg
zi99y
Tried with sudo - same result

which section to I add these lines to, and do they ned a value?
i.e.

overclock=protected
ecc_hy
I can not upload file to oesf now.
But I have send the new test to Meanie's yahoo mail, Please check it.
zodttd
ecc_hy, thank you for this great tool! Much appreciated!
Meanie
here's the source file and ipk for further testing.

can the volume control be made optional, ie volume_ctrl=true|false for those who want to use a separate volume applet.
kkazakov13
That's the most useful applet ever! Keep the good job!
ecc_hy
minor display buf fixed
add option "bVolumeCtrl" to powerctrl.cfg

New source has been sent to meanie, pls check.
climber
That look pretty good.

How can I activate this applet permanent because after reboot it's not loaded. It would be also interesting how to deactivate other.

As I see in Meanies screen-thumbnail he has got a row for 'Swap' and nice thumbnails for Battery and Mem.


SL-C3100 & pdaXii13 v5.4.7
ecc_hy
Use ipk to install. Click the applet space and hold until "add/remove" menu displayed. Add powerctrl by menu.
climber
I use Meanies pdaxii13 v5.4.7 wiht icewm as windows maker. This don't work but under Cacko I know this doing to add or remove an applet.

climber
ecc_hy
Meanie know how to add applet in icewm. I always use matchbox, so can not help you, sorry.
zedkatuf2
QUOTE(Meanie @ Jul 5 2007, 08:24 AM)
here's the source file and ipk for further testing.

can the volume control be made optional, ie volume_ctrl=true|false for those who want to use a separate volume applet.
*


Segfaults, even when run using sudo. I'm using 5.4.7 pdaxii13 on a 3200
Meanie
latest source and test package...
ecc_hy
Segfaults?
If used old version, you sould delete file /home/root/Choice/powerctrl.cfg.

Otherwise, run mb-applet-powerctrl in x terminal, and try to upload debug information.
zedkatuf2
QUOTE(ecc_hy @ Jul 6 2007, 03:23 PM)
Segfaults?
If used old version, you sould delete file /home/root/Choice/powerctrl.cfg.

Otherwise, run mb-applet-powerctrl in x terminal, and try to upload debug information.
*


Thanks - deleting the old powerctrl.cfg worked.
zi99y
I'm still getting the segfault.

CODE
gez@zaurus:~$ sudo mb-applet-powerctrl
Password:
mbmenu: no _MB_THEME set on root window
Segmentation fault
gez@zaurus:~$


using latest ipk, have deleted powerctrl.cfg, using sudo.
ecc_hy
It seems the problem caused by not-root user.
First, I suggest you login as root, and try again.
Second, I will test powerctrl as not-root user, and try to find solution.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.