OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: ecc_hy on June 15, 2007, 01:26:56 pm
-
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.
-
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?
-
unfortunately it crashes on loading, any ideas?
$ mb-applet-powerctrl
mbmenu: no _MB_THEME set on root window
Segmentation fault
-
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.
-
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163541\"][{POST_SNAPBACK}][/a][/div]
it runs fine on my c3000 running icewm 1.2.26
-
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?
daniel
-
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
-
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.
-
there is a bug, the SL-C3200 is ignored and thus the overclocking will fail for it.
-
there is a bug, the SL-C3200 is ignored and thus the overclocking will fail for it.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163590\"][{POST_SNAPBACK}][/a][/div]
Writing the zaurus model as hard code is not good idea.
Next version, I should make a config file.
-
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...
-
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.
-
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...
-
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.
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.
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.
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.
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.
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.
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.
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.
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...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163638\"][{POST_SNAPBACK}][/a][/div]
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.
-
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.
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.
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
I also rearranged the order of the popup items a bit to suit my own preferenes...
-
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.
-
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163687\"][{POST_SNAPBACK}][/a][/div]
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
-
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
-
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.
-
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163718\"][{POST_SNAPBACK}][/a][/div]
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...
-
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...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163751\"][{POST_SNAPBACK}][/a][/div]
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
-
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...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163751\"][{POST_SNAPBACK}][/a][/div]
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163754\"][{POST_SNAPBACK}][/a][/div]
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.
-
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?
-
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?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163763\"][{POST_SNAPBACK}][/a][/div]
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.
-
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%
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...
-
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.
other enhancements that would be nice:
The MEM indicator shows the total of both physical memory and swap, hence I get 195%
can you separate them out like in your alpha version?
Finished, check please.
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...
[div align=\"right\"][a href=\"index.php?act=findpost&pid=163811\"][{POST_SNAPBACK}][/a][/div]
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 != )
DPMSSetTimeouts(g_pDisplay, a, 0, ;
}
}
New function:
Include font define in powerctrl.cfg
-
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
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.
-
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?
-
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
-
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164032\"][{POST_SNAPBACK}][/a][/div]
its getting there. everything seems to be working as it should except when overclocking for too long, the Z gets warm and locks up
-
Finished:
code cleaning.
Display config.
Next:
Overclock protected.
-
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]
-
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
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164236\"][{POST_SNAPBACK}][/a][/div]
[/quote]
sudo it
-
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
-
Tried with sudo - same result
which section to I add these lines to, and do they ned a value?
i.e.
overclock=protected
-
I can not upload file to oesf now.
But I have send the new test to Meanie's yahoo mail, Please check it.
-
ecc_hy, thank you for this great tool! Much appreciated!
-
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.
-
That's the most useful applet ever! Keep the good job!
-
minor display buf fixed
add option "bVolumeCtrl" to powerctrl.cfg
New source has been sent to meanie, pls check.
-
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
-
Use ipk to install. Click the applet space and hold until "add/remove" menu displayed. Add powerctrl by menu.
-
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
-
Meanie know how to add applet in icewm. I always use matchbox, so can not help you, sorry.
-
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164343\"][{POST_SNAPBACK}][/a][/div]
Segfaults, even when run using sudo. I'm using 5.4.7 pdaxii13 on a 3200
-
latest source and test package...
-
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.
-
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.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164448\"][{POST_SNAPBACK}][/a][/div]
Thanks - deleting the old powerctrl.cfg worked.
-
I'm still getting the segfault.
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.
-
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.
-
How add/remove applet in ICEWM:
HIDING CONTROL APPLETS (ICONS):
You can hide IceWM Control Panel applets very easily, if you would like certain icons NOT to show up in the control panel. In the IceWM Control Panel's main window, click 'File' on the menu, then click 'Configuration...'. Then, click the 'Hide' check-button next to the icon you don't wish to see. Finally, click the 'Save' button. You're done!.
Please read
http://www.phrozensmoke.com/projects/icewmcp/applets.php (http://www.phrozensmoke.com/projects/icewmcp/applets.php)
-
I am also getting a segfault with error (sudo makes no difference and I am running a root session)
Can't open mixer device /dev/mixer
mbmenu: no _MB_THEME set on root window
I have noticed that the icewm theme browser doesn't seem to load the themes, even when I change the settings to the correct directory /usr/share/icewm/themes
might be a related problem?
I am running pdaXii13
-
powerctrl is conflicted to icewm's volume applet. You may close the volume ctrl in powerctrl.cfg now.
-
the volume control can be controlled by editing powerctrl.cfg and changing bVolumeCtrl=False
when the power is very low, the applet flashes the warning dialog, but it should just pop it up for a while so it can be read...
some nice enhancements would be:
- integrate the card applet functionality as well
- integrate the usbfunction.py as well
-
zeigerpuppy:
mbmenu: no _MB_THEME set on root window
I am not sure why we get the error message, but it is just warn. Alomost other applets also display same message.
Meanie:
When the enchancements are finished, the powerctrl should be rename to control center. Before we did it, can you tell me why? Or what do you plan?
-
zeigerpuppy:
mbmenu: no _MB_THEME set on root window
I am not sure why we get the error message, but it is just warn. Alomost other applets also display same message.
Meanie:
When the enchancements are finished, the powerctrl should be rename to control center. Before we did it, can you tell me why? Or what do you plan?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164549\"][{POST_SNAPBACK}][/a][/div]
yeah, it looks like the powerctrl applet is becoming more than just controlling the power, ie it does volume as well and potentially swap. since it already does most the functionality of the majority of the applets, ie volume, power, blanker, battery, so it might as well do everything, since the current memory usage is just 1MB.
there really are only two applets left that are not yet integrated into powerctrl, card and wireless, so might as well create one all powerful applet which can do everything
and while we are at it, we might as well integrate some of the functionality of the python scripts into the applet which is what the original applet was doing, ie cpuoverclock and lightnpower
i think it is a good idea to rename it control applet or control center since it pretty much does everything that is important.
-
Still getting the segfault after trying while not running volume control.
is there a way I can get more debugging info?
-
Still getting the segfault after trying while not running volume control.
is there a way I can get more debugging info?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164552\"][{POST_SNAPBACK}][/a][/div]
compile it with debugging enabled
-
another update from ecc_hy
Changlog:
Fixed: Low battery warning update for 400ms
Fixed: two seperate line when disable volume ctrl
Fixed: volume control keep mixer control file open
Add: new pixmaps
Fixed: change the value of powerctrl.cfg according to pdaxrom's
cpuoverclock.py, cacko value cause some machine crash.
-
Meanie,
how can I add this applet permanent inside icewm?
I can't find anything for fixing this inside the IceWM Config menue. When I click anything inside the Control Center I get the error message:
"Can't open /home/root/.icewm key".
Thanks
climber
SL-C3100 pdaXii13 v5.4.7
-
next version:
card ctrl should be add into at first.
But I do not know how to usb serial device's infor?
-
next version:
card ctrl should be add into at first.
But I do not know how to usb serial device's infor?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164643\"][{POST_SNAPBACK}][/a][/div]
here's my hacked mb-applet-card.c
-
Here's a quick patch to add a approximate percentage battery charge reading when connected to AC power, since apm helpfully refuses to tell us.
I was pleasantly surprised to find the applet already has support for displaying it once it is supplied!
-
Thanks Meanie & pelrun, I will try.
-
Anybody tried it on R198?
I installed it and got the following error after started:
mb-applet-powerctrl: failed to open /proc/driver/fl/corgi-bl.
mb-applet-powerctrl: failed to open /proc/zaurus/VCORE.
...
and when using it, I got a lot of:
mb-applet-powerctrl: failed to open /proc/zaurus/VCORE.
and the speedstep thing didn't happen.
Any idea?
-
Anybody tried it on R198?
I installed it and got the following error after started:
mb-applet-powerctrl: failed to open /proc/driver/fl/corgi-bl.
mb-applet-powerctrl: failed to open /proc/zaurus/VCORE.
...
and when using it, I got a lot of:
mb-applet-powerctrl: failed to open /proc/zaurus/VCORE.
and the speedstep thing didn't happen.
Any idea?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164755\"][{POST_SNAPBACK}][/a][/div]
the r198 kernel is very different and wont just play game. the applet needs to be enhanced to also support the 2.6 kernel, but that is something that will happen later. at least it wont crash anymore (it used to just crash). the cpu and volume thing wont work without some enhancements to the code, but most of the other features should work...
-
Add card control according to meanie's mb-applet-card.c
Add charge percent according to pelrun's patch, but it seems not exactly on my C1000.
Add usb device check, not only storage.
Please test it and tell me result.
Next:
add usb function.
-
My friend, Yangyang has post a cpu26 test program, but my C1K is not use r198 yet.
The program is test ok on c1k, r198. If interesting it, you may merge it to powerctrl.
-
The ac charge percentage is never going to exactly match the no-ac charge percentage from apm at partial charge. More important is for 100% to be right and 0% to be relatively close.
If the battery is fully charged and the ac level isn't showing 93-100%, could you tell me what /proc/driver/battery/sharpsl_main_battery_voltage is reporting with the power cable still plugged in? On my battery it's about 222, but I'd like to know if other people get markedly different values.
-
The ac charge percentage is never going to exactly match the no-ac charge percentage from apm at partial charge. More important is for 100% to be right and 0% to be relatively close.
If the battery is fully charged and the ac level isn't showing 93-100%, could you tell me what /proc/driver/battery/sharpsl_main_battery_voltage is reporting with the power cable still plugged in? On my battery it's about 222, but I'd like to know if other people get markedly different values.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=164974\"][{POST_SNAPBACK}][/a][/div]
Thanks for reply.
As you said, I have make a mistake because I try to match ac charge percent with no-ac, and failed. I guess, the charge procedure is not linear.
It is really good idea to get charge percent by voltage.
-
New source:
add usb function. The storage is different with usbfunction.py, and use mount point directly.
code clean
Next:
add swap function according by qtopia-memory applet.
The prog can swap off according by /proc/swaps, and create swap file on sd or cf with different size.
PS:
After release 0.0.2-3, I found it is hard to finish source and release.
I need help for testing and release.
-
New source:
add usb function. The storage is different with usbfunction.py, and use mount point directly.
code clean
Next:
add swap function according by qtopia-memory applet.
The prog can swap off according by /proc/swaps, and create swap file on sd or cf with different size.
PS:
After release 0.0.2-3, I found it is hard to finish source and release.
I need help for testing and release.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165047\"][{POST_SNAPBACK}][/a][/div]
thanks for all your hard work. i have just downloaded the latest. i'm off to the airport now. will test later on the plane...
-
ok did some testing and also some enhancements
tested some of the USB Function, ie switching between net and storage. did not test serial mode. the mounts for the storage mode needs to be filtered. rootfs should not be available as an option since it can cause file corruptions. also, not all mountable filesystems should be made available as an options, ie only vfat partitions and maybe ext2 and ext3 in some kind of advanced mode set in powerctrl.conf, but cramfs and squashfs mounts should be filtered out.
tested the card applet functionality and it works so now pretty much this applet can replace all the other applets (except for clock, wireless and tasks).
i just remembered that the usb storage mount is quite rudimentary. it only allows you to mount and unmount 1 usb disk. maybe this needs to be enhanced to detect whether there is a usb hub attached and if so, allow more disks to be mounted, ie check for /dev/sd[a-d] instead just /dev/sda. i wrote a applet for qtopia long time ago which did most of that, it also allowed you to mount/unmount zip drives and cdrom/dvd drives. it also had hooks to allows you to run scripts for usb ethernet, bluetooth, keyboard/mouse.
i took the liberty to make a few enhancements:
replaced the icon for the memory display to powerctrl-memory.png
renamed Cards to External Storage
renamed USB Function to USB Client Function
filtered the usb storage mounts to be only vfat partitions
renamed Volumes to Volume Control
added a mute option
-
i will try to find the source for qtopia-usb-applet and attach it here...
for the 2.6 kernel, it would be nice to also have an option to switch between speaker and headphones since that is not automatic like in the 2.4 kernel
/proc/driver/fl/corgi-bl equivalent in 2.6 kernel is /sys/class/backlight/corgi-bl//brightness
valid values are from 0 to 47 although anything above 7 is useless
for /proc/meminfo, the first 3 summary lines dont exist in 2.6 kernel, but the MemTotal, MemFree, SwapTotal,SwapFree values beneath are exactly the same.
for reading the current cpu frequency and voltage, use /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq and /sys/devices/system/cpu/cpu0/cpufreq/cpu-voltage respectively
-
tested some of the USB Function, ie switching between net and storage. did not test serial mode.
-> Not test serial too, never use it before. The progam is based on the usbfunction.py and checked carefully.
the mounts for the storage mode needs to be filtered.
-> There are two method.
1. use powerctrl.cfg, let user defined mount point, and good name like "SD card"/"CF card" can be easy added
2. use mtab to get all mount point, and filtered out. The exclude/inlcude types can be easy defined in powerctrl.cfg.
Which one is better?
tested the card applet functionality....
-> now powerctrl detects the usb host and usb serial device attached.
My question is: Do we need the deattach function? and how?
Waiting for meanie's qtopia-usb-applet, and try to modify it again.
Next:
swap on and off function should based on qtopia-memoryapplet.
swap off the item in /proc/swaps
create swapfile on sd/cf with different size which predefined in powerctrl.cfg.
check swap before eject sd/cf card.
auto swap on swapfile when sd/cf insert? the function I am not sure now.
About kernel 2.6:
I may add kernel 2.6 support to powerctrl, but can not test it now since only kernel 2.4 on my machine. The working should be very detail, something like file format, and hard to debug without kernel 2.6 env.
So I hope someone else develop and make it.
-
tested some of the USB Function, ie switching between net and storage. did not test serial mode.
-> Not test serial too, never use it before. The progam is based on the usbfunction.py and checked carefully.
the mounts for the storage mode needs to be filtered.
-> There are two method.
1. use powerctrl.cfg, let user defined mount point, and good name like "SD card"/"CF card" can be easy added
2. use mtab to get all mount point, and filtered out. The exclude/inlcude types can be easy defined in powerctrl.cfg.
Which one is better?
tested the card applet functionality....
-> now powerctrl detects the usb host and usb serial device attached.
My question is: Do we need the deattach function? and how?
Waiting for meanie's qtopia-usb-applet, and try to modify it again.
Next:
swap on and off function should based on qtopia-memoryapplet.
swap off the item in /proc/swaps
create swapfile on sd/cf with different size which predefined in powerctrl.cfg.
check swap before eject sd/cf card.
auto swap on swapfile when sd/cf insert? the function I am not sure now.
About kernel 2.6:
I may add kernel 2.6 support to powerctrl, but can not test it now since only kernel 2.4 on my machine. The working should be very detail, something like file format, and hard to debug without kernel 2.6 env.
So I hope someone else develop and make it.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165110\"][{POST_SNAPBACK}][/a][/div]
i think the better option would be to have a filter defined in powerctrl.cfg with the default just having vfat (and maybe ext2/ext3 as well) since most users just want to use the Zaurus as a usb storage device in Windows.
my qtopia usb applet does a decent job for handling the USB Host feature but it is not perfect. loading and unloading of the usb host modules should be handled automatically by the hotplug system.
the usb client feature (net/serial/storage) needs some improvements. The modules are not automatically unloaded by the hotplug system.
for the swap feature, both the SD and CF card have their own scripts for mounting and unmounting on insertion and those scripts can be enhanced to automatically enable swap, so the applet needs to be careful not to mount the swap again if its already automatically mounted by those scripts. maybe it can be an option to automount swap files but by default have this feature set to false.
i can enhance the applet to support 2.6 kernel when I have time, but in the meantime, i have added some code to disable those features that dont work yet in 2.6 kernel so the applet now also works in the latest pdaXrom distro with those features turned off until i get the time to implement them.
-
If I click inside the applet menu on Screensave I can't deactivate it.
I'm not sure but could it be that the applet needs a lot of battery?
Regards
climber
-
i will try to find the source for qtopia-usb-applet and attach it here...
for the 2.6 kernel, it would be nice to also have an option to switch between speaker and headphones since that is not automatic like in the 2.4 kernel
/proc/driver/fl/corgi-bl equivalent in 2.6 kernel is /sys/class/backlight/corgi-bl//brightness
valid values are from 0 to 47 although anything above 7 is useless
for /proc/meminfo, the first 3 summary lines dont exist in 2.6 kernel, but the MemTotal, MemFree, SwapTotal,SwapFree values beneath are exactly the same.
for reading the current cpu frequency and voltage, use /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq and /sys/devices/system/cpu/cpu0/cpufreq/cpu-voltage respectively
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165108\"][{POST_SNAPBACK}][/a][/div]
I have added some compatible code and more PATH define. We may test it in next release.
If I click inside the applet menu on Screensave I can't deactivate it.
I'm not sure but could it be that the applet needs a lot of battery?
Regards
climber
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165145\"][{POST_SNAPBACK}][/a][/div]
It seems the user right problem.
You may try to run powerctrl as root:
sudo mb-applet-powerctrl
To meanie:
Could I change all fork_exec command to "sudo"?
-
USB Client Function in 0.0.26 somehow not works as in prev. version ... I have 3 submenus - Serial / Network / Storage - when I click on Storage nothing happens (well, at least nothing visible). Is there any way to configure where the storage is ? I don't want it to be windows-mountable, i don't have FAT partitions, so ext2/3 is just fine for me.
-
added sudo for the exec lines
added ext? filesystem to the mount filters for usbstorage
-
USB Client Function in 0.0.26 somehow not works as in prev. version ... I have 3 submenus - Serial / Network / Storage - when I click on Storage nothing happens (well, at least nothing visible). Is there any way to configure where the storage is ? I don't want it to be windows-mountable, i don't have FAT partitions, so ext2/3 is just fine for me.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165186\"][{POST_SNAPBACK}][/a][/div]
A little bug in 0.0.26, has been fixed.
New config for filter partition type has been added in powerctrl.
The swap file function cost much time.
New release will come soon, please wait.
To kkazakov13:
Thanks for your many new packages. I always downloaded from your site.
Did you compile the new version of matchbox? version 1.2?
-
Thanks ! this version really works with ext2 + ext 3 now.
@ecc_hy, i haven't compiled it ( yet ). is there anything cool in this version?
-
Thanks ! this version really works with ext2 + ext 3 now.
@ecc_hy, i haven't compiled it ( yet ). is there anything cool in this version?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165203\"][{POST_SNAPBACK}][/a][/div]
I am not sure. There is a long changlog.
I found a bug og matchbox when develop mb-applet-powerctrl.
As document, the tray message can be auto disapear when timeout. But indeed, the timeout is not working.
So I gues the new version may solve the bug. If tray message's timeout function is working, we do not need click always.
-
New release.
Add swap function
swap file and size can be pre-defined in powerctrl.cfg
Too more fresh code, need more testing.
Add some kernel 2.6 compatible code, not tested:
/proc/driver/fl/corgi-bl equivalent in 2.6 kernel is /sys/class/backlight/corgi-bl//brightness
valid values are from 0 to 47 although anything above 7 is useless
-> backlight file can be defined in powerctrl.cfg
-> valid values can be defined in powerctrl.cfg also
for /proc/meminfo, the first 3 summary lines dont exist in 2.6 kernel, but the MemTotal, MemFree, SwapTotal,SwapFree values beneath are exactly the same.
-> Now is compatible
for reading the current cpu frequency and voltage, use /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq and /sys/devices/system/cpu/cpu0/cpufreq/cpu-voltage respectively
-> can be defined in powerctrl.cfg
Todo:
analyze powerctrl's memory usuage, try to optimize
check swap acticed befroe eject card
enhance usb host function, try to support mouse, keyboard, etc
Know bug:
can not active swapfile on RAM, failed when:
swapon /home/root/.swapfile
https://www.oesf.org/forums/lofiversion/index.php/t2171.html (https://www.oesf.org/forums/lofiversion/index.php/t2171.html)
-> modify powerctrl.cfg, change swapcount to 2, delete [swap0], change [swap1] to [swap0], [swap2] to [swap1]
-
Why powerctrl use almost 5M memory?
1. How to know powerctrl's memory usuage?
run free before load powerctrl
run free after load powerctrl
Some older applet's memory usuage:
cpu memory monitor, 680k
volume-control, 980k
blanker applet, 5.1M
Now mb-ammplet-powerctrl is based on blanker, and it cost 4.9M. The question is who eat so much memory.
2. GtkWidget *g_wndBlanker? No.
blanker is a fullscreen popup windows, used in blanker screen
One blanker timer to keep backlight off
One button event callback for blacklight on when clicked
One key event callback to control xmms, and make zaurus as mp3 player. The function is disable now, since we are not use xmms now. It may enable by support mplayer in the future.
Add a blankctrl enable/disable in powerctrl.cfg.
The test result is Blanker function not eat too much memory.
3. mbmenu? Yes
App launcher use almost 5M on my machine.
After compared with powerctrl, they are same.
So the result is mbmenu cost too much memory. The memory maybe different, is it relate with font?
PS:
I have tried new matchbox, nothing speical, and want many patch, so give up.
-
Minor fix.
Support timeout tray message
The version should be 0.9.0, if anyone release it.
Todo:
May give up libmatchbox, because mbmenu eat many memory.
-
I have test in icewm. The bad news is mb-applet-powerctrl can not support icewm.
So I should conside to rewrite it, and make it run. Maybe based on egg tray icon is better choice?
-
I have test in icewm. The bad news is mb-applet-powerctrl can not support icewm.
So I should conside to rewrite it, and make it run. Maybe based on egg tray icon is better choice?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165278\"][{POST_SNAPBACK}][/a][/div]
I use mb-applet-powerctrl on icewm. It works - it does crash occasionally with a segment fault, and sometimes the icons are very strange (sometimes they just work fine).
I always get "Failed to open /proc/driver/battery/sharpsl_main_battery_voltage".
I have tried meanies compiled version and am currently running my own compiled version.
What is it that doesn't work in icewm?
-
Can you attach the full source for the latest? ready to build. Thanks
-
Fixed icewm problem
"sudo" option is lost
Compile method:
tar zvfx mb-applet-powerctrl...tar.gz
configure --prefix=/usr
"--enable-startup_notification" is useless now.
How to use mb-applet-powerctrl in icewm?
1. Autorun when icewm startup
check & add line to ~/.xinitrc:
icewm 2>deve/null >/dev/null & wmpid=$!
icewmtray & >/dev/null
mb-applet-powerctrl & >dev/null
2. Use Menu to load powerctrl:
run makeicemenu in terminal after mb-applet-powerctrl installed.
the new menu item called "Power control" should be added into program->panel.
If you do not have panel yet, check
~/.icewm/programs
and delete char "#" before the line contain "folder panel"
-
I have test in icewm. The bad news is mb-applet-powerctrl can not support icewm.
So I should conside to rewrite it, and make it run. Maybe based on egg tray icon is better choice?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165278\"][{POST_SNAPBACK}][/a][/div]
I use mb-applet-powerctrl on icewm. It works - it does crash occasionally with a segment fault, and sometimes the icons are very strange (sometimes they just work fine).
I always get "Failed to open /proc/driver/battery/sharpsl_main_battery_voltage".
I have tried meanies compiled version and am currently running my own compiled version.
What is it that doesn't work in icewm?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165279\"][{POST_SNAPBACK}][/a][/div]
The segment fault is due to the program's bug, icewm resize icon three times, and openbox just once, so I can not found the bug in openbox.
It is my mistake, sorry!
When zaurus in charging, program can not get battery percent from normal apm_read function, so we read /proc/driver/battery/sharpsl_main_battery_voltage to get battery voltage, and estimate the battery percent. It is not accuracy in fact, but better than nothing.
Is the file exist? If exist, you may try:
cat /proc/driver/battery/sharpsl_main_battery_voltage
If not exist, you may try to find it and tell me the location.
-
Can you attach the full source for the latest? ready to build. Thanks
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165282\"][{POST_SNAPBACK}][/a][/div]
The source compile env is not changed. You can download a older src.tar.gz, and replace mb-applet-powerctrl.c with new one.
PS:
"sudo" options is coming back in new attach.
-
All is OK. works great so far
But it's not showing my swap partition anymore while not activated. Few versions ago, it was shown. I only see it now if the swap is activated, and I can turn it off.
[img]http://up.drun.net/v/s/2/f/powerctrl1.png\" border=\"0\" class=\"linked-image\" /] (http://up.drun.net/i/f/powerctrl1.png)
-
ecc_hy,
I tried to do your installation setting but I think you prescribed a little bit.
How to use mb-applet-powerctrl in icewm?
1. Autorun when icewm startup
check & add line to ~/.xinitrc:
icewm 2>deve/null >/dev/null & wmpid=$!
icewmtray & >/dev/null
mb-applet-powerctrl & >dev/null
My version: I hope this is correct?
icewm 2>/dev/null >/dev/null & wmpid=$!
icewmtray & >/dev/null
mb-applet-powerctrl & >/dev/null
I don't have a folder programs inside ~.icewm???
Should I reinstall icewm?
So far the Power Applet don't start after icewm is loading
Regards
climber
-
ecc_hy,
I tried to do your installation setting but I think you prescribed a little bit.
How to use mb-applet-powerctrl in icewm?
1. Autorun when icewm startup
check & add line to ~/.xinitrc:
icewm 2>deve/null >/dev/null & wmpid=$!
icewmtray & >/dev/null
mb-applet-powerctrl & >dev/null
My version: I hope this is correct?
icewm 2>/dev/null >/dev/null & wmpid=$!
icewmtray & >/dev/null
mb-applet-powerctrl & >/dev/null
I don't have a folder programs inside ~.icewm???
Should I reinstall icewm?
So far the Power Applet don't start after icewm is loading
Regards
climber
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165313\"][{POST_SNAPBACK}][/a][/div]
You may test mb-applet-powerctrl in x terminal before.
Open x terminal like xterm, rxvt etc, and exec mb-applet-powerctrl.
If you found problem, reply the screen capture or debug message here.
Try autoload after every thing is ok.
"programs" is not folder, whole file path is "~/.icewm/programs". In my expericense, icewm always disable panel in start menu, so you can not run mb-applet-* from menu.
-
All is OK. works great so far
But it's not showing my swap partition anymore while not activated. Few versions ago, it was shown. I only see it now if the swap is activated, and I can turn it off.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165307\"][{POST_SNAPBACK}][/a][/div]
To get mounted card information and swaped infor, powerctrl scan "/proc/mounts" ast first, and try "/etc/mtab" if failed.
The new program read them to memory since scan 3 times when active menu once.
You may check the function:
Bool mtab_read(MTAB arMTab[])
and try to find problem.
PS:
Very cool background even not clear.
-
All is OK. works great so far
But it's not showing my swap partition anymore while not activated. Few versions ago, it was shown. I only see it now if the swap is activated, and I can turn it off.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165307\"][{POST_SNAPBACK}][/a][/div]
To get mounted card information and swaped infor, powerctrl scan "/proc/mounts" ast first, and try "/etc/mtab" if failed.
The new program read them to memory since scan 3 times when active menu once.
You may check the function:
Bool mtab_read(MTAB arMTab[])
and try to find problem.
PS:
Very cool background even not clear.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165318\"][{POST_SNAPBACK}][/a][/div]
/proc/mounts and /etc/mtab shows what can is available for unmounting, however, /etc/fstab contains info about what can be mounted such as swap files and swap partitions
-
All is OK. works great so far
But it's not showing my swap partition anymore while not activated. Few versions ago, it was shown. I only see it now if the swap is activated, and I can turn it off.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165307\"][{POST_SNAPBACK}][/a][/div]
To get mounted card information and swaped infor, powerctrl scan "/proc/mounts" ast first, and try "/etc/mtab" if failed.
The new program read them to memory since scan 3 times when active menu once.
You may check the function:
Bool mtab_read(MTAB arMTab[])
and try to find problem.
PS:
Very cool background even not clear.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165318\"][{POST_SNAPBACK}][/a][/div]
/proc/mounts and /etc/mtab shows what can is available for unmounting, however, /etc/fstab contains info about what can be mounted such as swap files and swap partitions
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165320\"][{POST_SNAPBACK}][/a][/div]
I have this in /etc/fstab:
/dev/mtdblock2 / jffs2 rw 1 1
/dev/mtdblock3 /home jffs2 rw 0 0
/dev/hda1 /mnt/cf auto noauto,owner 0 0
/dev/mmcda1 /mnt/card auto noauto,owner 0 0
/dev/sda1 /mnt/usbstorage auto noauto,owner 0 0
/dev/hda3 /storage auto auto,owner 1 1
/dev/hda2 swap swap defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
but swap is not auto-detected ...
-
To kk:
I know you idea now. You want powerctrl swap on/off partition, I have thought about it, there are some problem may cause system crash:
1. When swap off the last partition, the system can not move swap data out and crash.
2. Swap partition is not suitable for C3XXX, since they have fixed storage.
3. Sytem mount swap partition automatically.
4. Swap file is more flexible and simple in C1000 and C8XX
To Meanie:
I have install icewm + idesk + rotate for powerctrl testing.
But when screen rotate, my mb-applet-powerctrl always be killed, and other applets which I do not want, like volume, battery, blanker.
Finally, I found the problem. rotate use the file "~/.icewm/icedock" or "/etc/icewm/icedock", we should clear the content and add the wanted applet.
-
To kk:
I know you idea now. You want powerctrl swap on/off partition, I have thought about it, there are some problem may cause system crash:
1. When swap off the last partition, the system can not move swap data out and crash.
2. Swap partition is not suitable for C3XXX, since they have fixed storage.
3. Sytem mount swap partition automatically.
4. Swap file is more flexible and simple in C1000 and C8XX
To Meanie:
I have install icewm + idesk + rotate for powerctrl testing.
But when screen rotate, my mb-applet-powerctrl always be killed, and other applets which I do not want, like volume, battery, blanker.
Finally, I found the problem. rotate use the file "~/.icewm/icedock" or "/etc/icewm/icedock", we should clear the content and add the wanted applet.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165325\"][{POST_SNAPBACK}][/a][/div]
Well, I can definatelty swap off with powerctrl. What i cannot is swap on. Why is swap partition not suitable for C3XXX ? I use it all the time, and have no complaints on this. What's the problem, don't get it.
about 3 - well, my system does not turn on swap partition automatically, despites what's written in /etc/fstab
-
To kk:
I know you idea now. You want powerctrl swap on/off partition, I have thought about it, there are some problem may cause system crash:
1. When swap off the last partition, the system can not move swap data out and crash.
2. Swap partition is not suitable for C3XXX, since they have fixed storage.
3. Sytem mount swap partition automatically.
4. Swap file is more flexible and simple in C1000 and C8XX
To Meanie:
I have install icewm + idesk + rotate for powerctrl testing.
But when screen rotate, my mb-applet-powerctrl always be killed, and other applets which I do not want, like volume, battery, blanker.
Finally, I found the problem. rotate use the file "~/.icewm/icedock" or "/etc/icewm/icedock", we should clear the content and add the wanted applet.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165325\"][{POST_SNAPBACK}][/a][/div]
Well, I can definatelty swap off with powerctrl. What i cannot is swap on. Why is swap partition not suitable for C3XXX ? I use it all the time, and have no complaints on this. What's the problem, don't get it.
about 3 - well, my system does not turn on swap partition automatically, despites what's written in /etc/fstab
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165329\"][{POST_SNAPBACK}][/a][/div]
the problem with swap not working automatically is because /etc/fstab is evaluated before the pcmcia devices (which the microdrive is part of) are initialized. i added some stuff to rc.sysconfig to mount the swap partition if it exists and map it correctly to the device name, ie /dev/hda2 or /dev/hdc2
i think powerctrl is just not looking at /etc/fstab yet to get the swap partition info which can be tricky because the device name is dynamic and thus not usually added to /etc/fstab
i use icedock in pdaXii13 to load matchbox applets so you dont need to edit .xinitrc and i kill all the applets and reload them during rotation because of some problems with the icewm panel...
-
How to add new swap item to powerctrl?
All options is in ~/Choice/powerctrl.cfg
# If SwapCount = 0, swap menu is disabled
SwapCount=2
[Swap0]
# menu item for better understand
name=SD Card
# swap can be enable or not? if the mount point is in mtab, swap can be enable. following is mount point of device
mount=/mnt/card
# mount point of swap partition or file path
path=/mnt/card/.swapfile
# file or partition
type=file
# only useful when type is swap file
size=16,32,64,128,256
-
How to add new swap item to powerctrl?
All options is in ~/Choice/powerctrl.cfg
# If SwapCount = 0, swap menu is disabled
SwapCount=2
[Swap0]
# menu item for better understand
name=SD Card
# swap can be enable or not? if the mount point is in mtab, swap can be enable. following is mount point of device
mount=/mnt/card
# mount point of swap partition or file path
path=/mnt/card/.swapfile
# file or partition
type=file
# only useful when type is swap file
size=16,32,64,128,256
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165340\"][{POST_SNAPBACK}][/a][/div]
does this mean, everytime you enable a swap file on SD or CF, it creates a new swapfile and then enables it. what if you already have a swapfile and just want to enable it without recreating it?
-
does this mean, everytime you enable a swap file on SD or CF, it creates a new swapfile and then enables it. what if you already have a swapfile and just want to enable it without recreating it?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165342\"][{POST_SNAPBACK}][/a][/div]
Yes, powerctrl's swap file function is based on cacko's memoryapplet-1.0.1.tar.gz.
Recreate swap file maybe a better choice since we are not sure the swap file is correct or not.
-
does this mean, everytime you enable a swap file on SD or CF, it creates a new swapfile and then enables it. what if you already have a swapfile and just want to enable it without recreating it?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165342\"][{POST_SNAPBACK}][/a][/div]
Yes, powerctrl's swap file function is based on cacko's memoryapplet-1.0.1.tar.gz.
Recreate swap file maybe a better choice since we are not sure the swap file is correct or not.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165349\"][{POST_SNAPBACK}][/a][/div]
This is true and should be the default behaviour, however, it may be a good idea to have a flag which if set changes the default behaviour such as not recreating the swap file.
btw, I think /proc/driver/battery/chg_status is the file you need for the battery charging status
-
This is true and should be the default behaviour, however, it may be a good idea to have a flag which if set changes the default behaviour such as not recreating the swap file.
Thank meanie. I will conside it.
-
This is true and should be the default behaviour, however, it may be a good idea to have a flag which if set changes the default behaviour such as not recreating the swap file.
Thank meanie. I will conside it.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165390\"][{POST_SNAPBACK}][/a][/div]
can you also make the Exit menu option optional? i can't see a use for it for myself except maybe when in testing mode.
also i've noticed that in matchbox when you tap and hold the menu bar, it lists all the applets to add/remove but powerctrl is not in the list.
-
also i've noticed that in matchbox when you tap and hold the menu bar, it lists all the applets to add/remove but powerctrl is not in the list.
It is in my list ... I add it from there.
-
This is true and should be the default behaviour, however, it may be a good idea to have a flag which if set changes the default behaviour such as not recreating the swap file.
Thank meanie. I will conside it.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165390\"][{POST_SNAPBACK}][/a][/div]
can you also make the Exit menu option optional? i can't see a use for it for myself except maybe when in testing mode.
also i've noticed that in matchbox when you tap and hold the menu bar, it lists all the applets to add/remove but powerctrl is not in the list.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=165404\"][{POST_SNAPBACK}][/a][/div]
matchbox will search /usr/share/applications/, and check for all .desktop files.
If the .desktop file contain following item, either or both I forgot
Type=PanelApp
Categories=Panel;Utility;MB
The new item will display on add/remove menu.
So, maybe you lost mb-applet-powerctrl.desktop in /usr/share/applications/
-
Todo:
1. add option to enable/disable "exit" menu item
2. add command line arg to set or restore backlight, freq etc. powerctrl can replace lightnpower.py within xiniitrc
3. add option to check backlight and restore.
4. Since mbmenu cost 4MB memory, try to find a way to merge mb-applet-powerctrl's menu to main menu.
5. check swapfile on cf/sd, add option to keep swapfile when swap off. This function rapid swap on.