Idle optimization

Discussion in 'Pandora OS (SuperZaxxon GNU/Linux)' started by notaz, May 15, 2016.

  1. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,904
    Location:
    Lithuania
    As my pandora spends most of it's time idle waiting for me to do some occasional hacking (something becoming more and more rare), I've decided to do a few hacks on background processes to reduce their activity. The other rather obvious thing to reduce idle power usage was to dim the power LED (which turned out quite significant, no idea why it wasn't done before, you can edit /etc/pandora/conf/led.conf to customize).

    [​IMG]
    If LED is ignored. the improvement is a bit hard to detect with the fuel gauge (battery monitoring) chip, as reading the chip itself requires waking up the CPU (obviously) and OMAP peripheral power domain to activate i2c. Still I think it's quite visible.

    Run "Upgrade Pandora OS" to get this stuff. As usual chances are that something got broken so testing is welcome.
     
    Tags:
    CapcomSuicide, lukey, ElPoco and 11 others like this.
  2. matzesu

    matzesu Advanced Member

    Joined:
    Jul 22, 2009
    Messages:
    2,649
    Location:
    Germany,, Saarland, at home
    On my CC Pandora, i dit this whit the Power LED also some yeahr ago, because i ditnt want it too light whyle my Pandora lies somewhere..
    I ditnt thought this should bring that much more batterietime, but its better than nothing..

    Beside the Power LED: which other modifikations dit you do ??
     
  3. fusion_power

    fusion_power Advanced Member

    Joined:
    Dec 11, 2006
    Messages:
    6,914
    Location:
    germany
    I never thought about that but indeed, the led's could be dimmed down actualy. Especialy the SD loading indicator which annoys me alot when I watch a Video in the dark. ^^
    Good job notaz, as usual. May all the Pandora experience you've gained help to make the Pyra even greater! :D
     
  4. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,645
    Location:
    Somewhere off the coast of the EU
    I wonder how much work it would be for me to implement a cron timer to dim the power LED at night, but put it back up to full power in the morning. During sunlight hours I have occasionally needed to shield my power LED to detect if the system is still powered up.
     
  5. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,260
    Location:
    Everywhere
    @notaz I would also like to know what else is different. Like @matzesu I have had my power LED dimmed since I got mine, so I am curious about the other stuff.
     
  6. matzesu

    matzesu Advanced Member

    Joined:
    Jul 22, 2009
    Messages:
    2,649
    Location:
    Germany,, Saarland, at home
    The update is now loadet on my cc,
    There was also a Menue option "LED Settings" which works great..
    No need to fiddle around whit terminal hacking..

    I got some issues bevore, because somethimes, when i put my Pandora in Sleep Mode in Poket, and then something hittet one SD Card, and its ejektet, the Pandora waked up and ditnt fell in sleep, so i got about 50 % discharge on this day and its went to 4% ..
    So if there is a way, to prefent the Pandora frome wake up, when a SD Cards gets ejekt, this could also help to improve the Experience whit the Pandora on its last 4 Months..
     
  7. Hồng Thất Công

    Hồng Thất Công Đả Cẩu Bổng Pháp

    Joined:
    Dec 19, 2012
    Messages:
    4,351
    Location:
    Cái Bang
    Updated my 3 Pandas. Thanks notaz! Please keep on hacking your Pandora so we can all benefit. :)
     
  8. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,904
    Location:
    Lithuania
    - stopped HAL sending useless messages over dbus
    - hacked pndnotifyd, gconf, thunar to block indefinitely instead of doing polls every 3 seconds (or so)
    - something else I forgot

    You can only dim power and charger LEDs, others are on/off only.
    --- Double Post Merged, May 15, 2016, Original Post Date: May 15, 2016 ---
    Changing SD cards while suspended can corrupt them, it would be better to just avoid it instead...
     
    Glyph Reader and rygD like this.
  9. Michoko

    Michoko Member

    Joined:
    May 13, 2008
    Messages:
    456
    Location:
    France
    Great work Notaz, thank you! :)
     
  10. rygD

    rygD Nihilistic Mystic

    Joined:
    Feb 28, 2014
    Messages:
    7,260
    Location:
    Everywhere
    I will probably get this in a little bit. Thanks for sharing it with the rest of us.

    Do I need to change my power LED stuff back to default to see what you set the new default to?
     
  11. Eight Bit

    Eight Bit Advanced Member

    Joined:
    Nov 16, 2008
    Messages:
    1,435
    Location:
    Amsterdam, Netherlands
    Nice Notaz! I'm a sucker for optimizations :)

    I did notice, I Set my power LED brightness (normal mode) to 9 and (powersave) to 1, the led brightness increases when I close the lid.
    My lid settings are set to Turn off the screen.
    When I set the LID setting to low power mode the LED does dim as intended but after the wifi reconnect the wifi LED which I just disabled, turned on again and won't turn off with the LED settings menu anymore.

    Edit: Just found out I have to enable the wifi led (while it's on) and then disable it again to switch the led off again.

    Edit 2: Reboot fixed the wifi LED from switching on after coming out of low power mode. It stays off now
     
    Last edited: May 15, 2016
  12. M-HT

    M-HT Very Active Member

    Joined:
    Nov 30, 2007
    Messages:
    599
    Location:
    Bratislava
    I don't know if it was current or earlier change, but when I upgraded my Pandora I noticed a proposed change to configuration file /etc/slim.conf . The proposed change was line:
    Code:
    current_theme       pnd-default
    
    which was changed to
    Code:
    current_theme       default
    
    I'm not sure this was intended.
    I tried it out and noticed it changed the background image on login screen (there may be other changed I didn't notice) so I reverted the change (to pnd-default).
     
  13. ekianjo

    ekianjo Hardcore Member

    Joined:
    May 7, 2012
    Messages:
    8,261
    Location:
    神戸市、日本 (Japan)
    Notaz, thanks for the added optimization !
    Do you have any benchmark running to see how much difference it makes in battery life before/after the changes ? any rough estimation ?
     
  14. Silent-Hunter

    Silent-Hunter Advanced Member

    Joined:
    May 29, 2010
    Messages:
    2,735
    I updated and now squashfs seems to be missing. What do I do? I can't turn on WiFi so I can't give the exact error but it says squashfs is an unknown filesystem type.
     
  15. levi

    levi Still fresh, damnit!

    Joined:
    Oct 6, 2008
    Messages:
    9,645
    Location:
    Somewhere off the coast of the EU
    Have you rebooted yet? Those sort of errors are common after a kernel upgrade, since the old existing kernel is still running, but it's modules have been moved to the location for the new kernel.

    Are you booting using the NAND kernel and NAND fs, or SD kernel and SD fs or a combination of the two? In the latter case you'll need to update the kernel you boot from.
     
  16. Silent-Hunter

    Silent-Hunter Advanced Member

    Joined:
    May 29, 2010
    Messages:
    2,735
    I did reboot yes. When I type lsmod it shows no modules loaded at all. I was using the smartreflex enabled kernel, but going back to the one from the rootfs.tar.bz2 download fixes nothing.
     
  17. TeDaDeS

    TeDaDeS Very Active Member

    Joined:
    Jan 15, 2004
    Messages:
    788
    Location:
    The Netherlands
    What would the Pandora do without Notaz :)

    Benchmarking this stuff takes a lot of time, mostly because the battery drains so slow in Idle.
    This appears to be saving about 30%, which would mean 30% longer idle time (which is great).
     
    ingoreis likes this.
  18. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,904
    Location:
    Lithuania
    That's because idle mode now has separate LED brightness configuration, it was just not added to the GUI. Try running the update again, it should be configurable now.
    Odd you had problems with wifi LED config, seems to work correctly here.

    I don't know how the theme is selected really. The slim package comes with it set to "default", it's the same in a fresh rootfs. Must be some evil ED's script changing it during first boot, or something.
    --- Double Post Merged, May 16, 2016, Original Post Date: May 16, 2016 ---
    Like TeDaDeS said it's quite hard to measure, and I'm not curious enough to reflash back to old firmware to measure it.
     
  19. notaz

    notaz Certified Guru

    Joined:
    Aug 23, 2005
    Messages:
    4,904
    Location:
    Lithuania
    I've managed to squeeze some more by finding a way how to disable the 5V supply:
    [​IMG]
    The 5V supply feeds the EHCI (aka big) USB port, audio amp and (on CC units only) the LCD. So now when all those are not used the 5V voltage converter is also turned off. This means that there is no longer power on USB port while USB is off.

    While at it, I've also disabled the expansion port power supply and added some new controls:
    • /proc/pandora/always_enable_5v - set to 1 to get the old behavior with always powered big USB port (if you want to use idle pandora as a portable battery pack, to charge a phone or something)
    • /proc/pandora/exp_power_mv - set the expansion port voltage in millivolts: 0 (default), 1500, 1800, 2500, 2800 or 3000.
    So go "upgrade pandora OS" and test, I hope I got all the code right.
     
    Eight Bit, FBnil, Linux-SWAT and 4 others like this.
  20. Hồng Thất Công

    Hồng Thất Công Đả Cẩu Bổng Pháp

    Joined:
    Dec 19, 2012
    Messages:
    4,351
    Location:
    Cái Bang
    Very awesome! Can't thank you enough for keeping enhancing the Pandora! Because of you, I won't abandon my Pandas anytime soon even after Pyra comes out. :)
     

Share This Page

Loading...