![]() |
Serious power saving with dbus-scripts and pkill -STOP
We all know that many processes run in the background constantly. Some of the worst offenders are:
dbus-scripts (see the excellent Maemo Wiki page) is a nifty tool to listen to internal system events and respond accordingly. Now, in catching the D-Bus messages for screen dimming and especially screen lock, we can 'pause' these processes using the standard Unix 'SIGSTOP' signal, meaning they shouldn't consume any CPU cycles/power until awoken. Some of you might question putting browserd in there, firstly because of dsme/watchdog, and secondly because you might be downloading something and lock the screen. The good news is that I found that dsme/watchdog will not trigger a reboot if browserd is paused. As long as it is in the process list, no probs. Re downloading, I'd probably use Opera in that case. Be sure you know what you're doing, or are prepared to reflash How it's done: As root: Code:
$ root Code:
/usr/local/share/dbus-scripts/screen-lock * * com.nokia.mce.signal tklock_mode_ind locked Fīle: /usr/local/share/dbus-scripts/screen-lock Code:
#!/bin/ash Fīle: /usr/local/share/dbus-scripts/screen-unlock Code:
#!/bin/ash Now restart dbus-scripts: Code:
# killall dbus-scripts |
Re: Serious power saving with dbus-scripts and pkill -STOP
I will leave my phone locked overnight to see how it fares.
Could be worth holding off on doing this until I confirm long periods of locking don't cause any issues. |
Re: Serious power saving with dbus-scripts and pkill -STOP
FWIW, I use dbuscron as it seems to be more stable for me. With some intelligent scripting and fcron, it would be possible to grab the PID that's chewing unnecessary cycles and pause it when locked.
A lot of user spawned processes can be paused that aren't necessary; calendar, hildon-input-method, camera-ui are a few I've been doing with no issue. Curiously, I wonder what happens if you try and issue STOP to hildon-desktop, hildon-home and hildon-status-menu... |
Re: Serious power saving with dbus-scripts and pkill -STOP
Don't bother pausing hildon-desktop or home on lock trigger. Too many processes hook into them, namely phone calls don't work :P
I've shut off osso-xterm, calendar, camera-ui, browserd, image-viewer, hildon-input-method. I want thumbnailer and tracker to run, so renice to +19 and call it a day. |
Re: Serious power saving with dbus-scripts and pkill -STOP
Quote:
FYI I have 2 scripts. 1. Under-clocks and under-volts the phone to THE MAX. This is tied into the n900 'device inactive' dbus signal. I am unsure what the trigger is but it seems to appear a short while after the screen goes off. This only happens if the keyboard is closed AND the back light is off. This means if the n900 is doing something that will take a while and i don't want it to under power I just leave the keyboard open. 2. A clock and voltage back up script, this is triggered when the device is unlocked. This means that i have been able to get rid of the kernel-power-settings script (I have a local copy loading settings). For some reason it occasionally causes my n900 to spazz out with ~8000 wake ups per second keeping it in C0. For a while I was experimenting with stopping bme when the device was asleep however it wasnt easy to detect the 'plugged in, bme not started' condition (there is no dbus signal when BME is stopped), further more BME would just stop working after a bunch of start/stops :/ Although stopping BME was saving me around 200~wakeups/30s... |
Re: Serious power saving with dbus-scripts and pkill -STOP
Quote:
Also what is hawaii's opinion on the mlocker application? |
Re: Serious power saving with dbus-scripts and pkill -STOP
Simpler, if you don't want default services to be running you can look in /usr/share/applications/hildon/ and open .desktop files (the modest one for example), then comment out with a # these kind of lines:
X-Maemo-Prestarted=always X-Maemo-Prestarted-Priority=2000 |
Re: Serious power saving with dbus-scripts and pkill -STOP
Quote:
I use mlocker for the X server and I automatically set hildon-home, hildon-desktop and a few other core processes to FIFO or RR real time status when using the BFS scheduler. I have no idea why you'd want to stop BME? |
Re: Serious power saving with dbus-scripts and pkill -STOP
Any chance of making a script/app that you can choose witch process to stop and setup the trigger behavior!!!
I love my N900 and read all the TMO just for increase my batt life! Good work you all! |
Re: Serious power saving with dbus-scripts and pkill -STOP
Quote:
Some of these services, like scim-panel-gtk, are very useful to have when using the phone interactively. And totally redundant when the device is locked. Also, I'd be weary of dsme/watchdog. Out of ignorance, a few weeks ago I renamed the actual browserd executable, frustrated that it would always run and seemed to often keep my CPU busy even when I'd closed all my browser windows. The dsme rebooted the phone within 5 seconds, and I ended up with a reboot loop. Would adjusting those values satisfy dsme and stop it rebooting? |
Re: Serious power saving with dbus-scripts and pkill -STOP
As far as I know, the best option would be to setting R&D mode and disabling the watchdog lifeguards. There's no apparent side-effect for me, for the past few months.
Keep in mind, browserd renders rtcom-messaging windows among other things. |
Re: Serious power saving with dbus-scripts and pkill -STOP
I've been running for several days with dbus-scripts suspending SCIM, browserd and image-viewer.
Just thought of something for users of mscimswitcherstatus - if you have mscimswitcherstatus suspending SCIM when not needed, my dbus-scripts config above will wake it up each time the phone is unlocked. I think an updated script to check if MSCIM is enabled (by mscimswitcherstatus) before waking its process would be the best solution. |
Re: Serious power saving with dbus-scripts and pkill -STOP
somehow related:
I tried to pause nokia maps, because "battery drain", but "forever to load". Yet the GPS is still on. Is there a way to stop/start GPS tracking, so I can really stop consumption while having maps ready at hand? |
Re: Serious power saving with dbus-scripts and pkill -STOP
i thought why not made an app which gathering this script (power saving) and the script "Tweaks To Speed UP N900": http://talk.maemo.org/showthread.php?t=73315&page=27
one .deb will be better for many people. thank |
Re: Serious power saving with dbus-scripts and pkill -STOP
how do you tell if this works?
I had to create the folder "/usr/local/share/dbus-scripts/" and when doing step "killall dbus-scripts" I got error saying Code:
$ killall dbus-scripts |
Re: Serious power saving with dbus-scripts and pkill -STOP
Did anyone try out the dbus-script? please let us know the power saving improvements and if its worth installing.
I already have about 8-10 scripts/apps that save power, increase battery life and speed up N900 ! probably each and every thread that talks about these , have been implemented and now wonder if they are conflicting internally due to which i dont see a significant change ! |
Re: Serious power saving with dbus-scripts and pkill -STOP
smart reflex is best method to save battery power, but I have all mods installed.
installed this one today, not sure it worked.. but will test |
Re: Serious power saving with dbus-scripts and pkill -STOP
how many hours did you consider you gain with this script?
|
Re: Serious power saving with dbus-scripts and pkill -STOP
since the 9th noticed no improvement. smart reflex is by far the best way to prolong battery
|
Re: Serious power saving with dbus-scripts and pkill -STOP
Quote:
Most processes on the n900 are well behaved and 'sleep' while not doing anything. This means they have very little impact on system load. dbus-scripts however has to wake up every time there is a dbus event to check to see if it matches one of it's scripts. If you have ever looked at dbus-monitor you will see there are a quite a lot of them! especially when changing cell reception power. tl;dr I suspect dbus-scripts cause more system load checking to see if it needs to run a script in response to an event than the processes you are trying to kill. |
Re: Serious power saving with dbus-scripts and pkill -STOP
yes, how do safely and full get rid of this? thx
edit: I just deleted all 3 files... |
Re: Serious power saving with dbus-scripts and pkill -STOP
Quote:
Code:
Powertop 1.13.3 |
Re: Serious power saving with dbus-scripts and pkill -STOP
i want your opinion guys
does this save power or not ? (at least a bit) |
All times are GMT. The time now is 04:56. |
vBulletin® Version 3.8.8