Author Topic: Battery/Power Conservation Strategy  (Read 6465 times)

tac

  • Newbie
  • *
  • Posts: 13
    • View Profile
Battery/Power Conservation Strategy
« on: January 16, 2021, 05:04:42 am »
Hello,

Is the battery life for the Linux OS on the cosmo terrible? I tried to use my Communicator with Linux the other day but the devices only lasted  between  6 to 7 hours in standby mode/Closed.  Are there any suggestions or tips on how to make the device conserve/use less power ?  Would tlp or any other linux packages be applicable? 

sven1999

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #1 on: January 16, 2021, 05:39:36 am »
Turning off power-hungry features that you do not need during standby could help, e.g. turning off CoDi (by moving the file .config/autostart/co... to another diectory; takes effect after relogin or reboot) and WiFi.

On a related issue: Unfortunately, hibernation (i.e. suspend to disk) is described nowhere.
« Last Edit: January 18, 2021, 05:22:21 am by sven1999 »
Cosmo Communicator (UbuntuTouch), OnePlus 3T (UbuntuTouch OTA 18)

gweber

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #2 on: January 16, 2021, 11:14:10 pm »
Hello,

Is the battery life for the Linux OS on the cosmo terrible? I tried to use my Communicator with Linux the other day but the devices only lasted  between  6 to 7 hours in standby mode/Closed.  Are there any suggestions or tips on how to make the device conserve/use less power ?  Would tlp or any other linux packages be applicable?
Lucky you! Mine lasts 3 to 4 hours.   :P

sven1999

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #3 on: January 18, 2021, 05:24:45 am »
Quote
Mine lasts 3 to 4 hours

In standby, this is really disappointing.

Does anybody reach much better numbers? I will measure my setup (i.e. standby without WLAN and CoDi) now and report back.
Cosmo Communicator (UbuntuTouch), OnePlus 3T (UbuntuTouch OTA 18)

sven1999

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #4 on: January 19, 2021, 09:12:34 am »
Quote
standby without WLAN and CoDi

The battery goes from 100 % to 0 % in 33 hours for me. Not too bad. But of course. suspend to disk would be a big plus.
Cosmo Communicator (UbuntuTouch), OnePlus 3T (UbuntuTouch OTA 18)

tac

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #5 on: January 19, 2021, 10:40:35 am »
So I did do one other thing on my cosmo linux install.  I installed tlp and tlp-rdw and left it running in default mode. 

One thing I noticed it does is shutoff wifi when I close the cosmo,  On mobile data alone I get about 8 to 10 hours use, mostly in standby. 

sudo apt-get install tlp tlp-rdw

This isn't perfect and has some issues, but  think it may be a starting point. 




mibry

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #6 on: January 27, 2021, 04:37:18 pm »
I did a test last night with my Cosmo, in standby over 9 hours the battery went down only 30%. I made the following changes:

-install tlp and ran tlp start before going into standby
-installed cpufreq and set governor to powersave (sudo cpufreq-set -g powersave)
- Turned off Wifi
- Compiled new kernel from gemian github site using the packaging branch.

I hope this info is helpful.

Regards

Mibry

sven1999

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #7 on: January 28, 2021, 04:18:01 am »
Which advantages does the kernel that you compiled provide?
Cosmo Communicator (UbuntuTouch), OnePlus 3T (UbuntuTouch OTA 18)

mibry

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #8 on: January 28, 2021, 05:32:43 am »
The packing kernel includes some extra modules that I wanted. Also includes some tweaks that seem to help.

tac

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #9 on: January 30, 2021, 03:26:39 pm »
Hi @mibry  how did you install the cosmo communicator linux kernel 4.4 from gemian. I seem to be runing into issues. 

I downloaded the kernal zip
unziped it via unzip
cd into the directory cosmo-linux-kernel-4.4

made sure all the dependencies were installed  on the comso
https://github.com/gemian/cosmo-linux-kernel-4.4/blob/master/Documentation/Changes
sudo apt-get install gcc make binutils util-linux module-init-tools e2fsprogs jfsutils reiserfsprogs xfsprogs squashfs-tools btrfs-progs pcmciautils quota-tools pppd isdn4k-utils nfs-utils procps oprofile udev grub mcelog iptables oppenssl bc

then ran
make oldconfig
make

then this is were I started to have issues.  the make command would run but would error out. 




mibry

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #10 on: January 30, 2021, 04:30:22 pm »
Have a look at the guide that @AdamBoardman put together.

https://github.com/gemian/gemian/wiki/KernelCompilation

Regards

Mibry

tac

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #11 on: January 30, 2021, 08:00:21 pm »
Thanks @mibry, that worked. 

mibry

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #12 on: January 30, 2021, 11:54:57 pm »
Let's us know how you go with the new kernel and if it improves powering saving, it would be good to get a comparison. If I can get decent power saving I will start to use gemian as my daily.

Regards

Mibry

tac

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #13 on: January 31, 2021, 06:30:44 pm »
So, I appear to be having a few issue with the custom kernel (cosmo-linux-kernel4.4).   The Codi display stays stuck at the planet logo once mobile data is enabled / Network Manager is removed. Also, I am unable to answer calls via the open cosmo screen by pressing accept.  Any one else dealing with this?

Outside of that the power usage seems to be ok.  I started using the device today around 9am with moderate usage and I am at about 32% usage now at about 17:29PM. 

tac

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Battery/Power Conservation Strategy
« Reply #14 on: January 31, 2021, 06:38:16 pm »
Also, below is a running wiki of things I have done to my cosmo on linux so far.  This is a compilation of several sources.  Please take a look an make any corrections or suggestions. 

Setup Cosmo Communicator Debian
Follow Planet Computer Linux Install Instructions.
https://support.planetcom.co.uk/index.php/Linux_for_Cosmo#Phone_and_Message_apps


install gemian cosmo linux kernal 4.4
https://github.com/gemian/gemian/wiki/KernelCompilation

sudo apt update
sudo apt upgrade
sudo reboot
git clone https://github.com/gemian/cosmo-linux-kernel-4.4.git
cd cosmo-linux-kernel-4.4
git checkout packaging
sudo apt install devscripts build-essential bc qemu-user-binfmt
debuild -b -uc -us
sudo dpkg -i ../cosmo-linux-kernel*deb

Prevent kernel upgrade over apt
https://hollysydney.com/article/prevent-ubuntu-upgrading-kernel
https://askubuntu.com/questions/938494/how-to-i-prevent-ubuntu-from-kernel-version-upgrade-and-notification

sudo dpkg -l | grep cosmo-linux
sudo apt-mark hold cosmo-linux-kernel:arm64
sudo apt-mark hold cosmo-linux-kernel-headers
sudo apt update
sudo apt upgrade

Install power saving tech
https://www.oesf.org/forum/index.php?topic=36471.0
https://wiki.debian.org/CpuFrequencyScaling

apt get install cpufrequtils tlp
sudo cpufreq-set -g powersave
sudo cpufreq-set -c 0 -g powersave

Create Startup Script for CPU Power Settings
mkdir ~/scripts
vim ~/scripts/cpupowersave
Type the following lines then save :wq
#/bin/sh -e
cpufreq-set -c 0 -g powersave
cpufreq-set -c 1 -g powersave
cpufreq-set -c 2 -g powersave
cpufreq-set -c 3 -g powersave
exit 0

go to Settings -> System Settings -> Startup and Shutdown -> Autostart -> Add Script
navigate to /home/cosmo/scripts/cpupowersave then press Ok.
   
Turn On Mobile Data
Follow Plan Mobile Data Instructions
https://support.planetcom.co.uk/index.php/Cosmo_Linux_Mobile_Data

Fix cosmopda not found when running sudo
https://askubuntu.com/questions/59458/error-message-sudo-unable-to-resolve-host-none

Two things to check (assuming your machine is called my-machine, you can change this as appropriate):

    That the /etc/hostname file contains just the name of the machine.

    That /etc/hosts has an entry for localhost. It should have something like:

     127.0.0.1    localhost.localdomain localhost
     127.0.1.1    my-machine