Hi together,
concerning → standby-battery-high-drain-on-xperia-10-iii
I try to use timer-function (instead of crontab) to disable
- Android app support
- some cpu’s
- perhaps further processes
over night.
What I’ve done so far:
- save script phone-sleep:
[root@Xperia10III defaultuser]# vi /usr/local/bin/phone-sleep
#!/bin/bash
# Datei /usr/local/bin/phone-sleep
# energy saving cpus
echo 0 > /sys/devices/system/cpu/cpu1/online
echo 0 > /sys/devices/system/cpu/cpu2/online
echo 0 > /sys/devices/system/cpu/cpu3/online
echo 0 > /sys/devices/system/cpu/cpu4/online
echo 0 > /sys/devices/system/cpu/cpu5/online
echo 0 > /sys/devices/system/cpu/cpu6/online
echo 0 > /sys/devices/system/cpu/cpu7/online
# Stop Android App Support (after cpu's, otherwise they are still busy)
dbus-send --system --dest=com.jolla.apkd.control --print-reply /com/jolla/apkd com.jolla.apkd.control.controlService boolean:false
- make executable:
[root@Xperia10III defaultuser]# chmod a+x /usr/local/bin/phone-sleep
- save .service-file:
[root@Xperia10III system]# vi /etc/systemd/system/phone-sleep.service
#Datei /etc/systemd/system/phone-sleep.service
[Unit]
Description=save battery by deactivating things
[Service]
ExecStart=/usr/local/bin/phone-sleep
- save .timer file:
[root@Xperia10III system]# vi /etc/systemd/system/phone-sleep.timer
[Unit]
Description=phone-sleep timer
[Timer]
# OnActiveSec=3s
OnCalendar=22:00
Persistent=true
[Install]
WantedBy=basic.target
- start job with:
[root@Xperia10III system]# systemctl reenable --now phone-sleep.timer
Removed /etc/systemd/system/basic.target.wants/phone-sleep.timer.
Created symlink /etc/systemd/system/basic.target.wants/phone-sleep.timer → /etc/systemd/system/phone-sleep.timer.
But: the commands aren’t done and I don’t know, why.
Can someone help me please to get this working?
I followed the example of → kofler.info and information of → archlinux.org.