Sony Xperia 10II - Low power mode

After activating the low power mode by

mcetool --set-low-power-mode=enabled

the device is acting well. Only the period of time the date and time is displayed is too short.
Which parameter has to get changed to extend the time periode that the date and time is diplayed longer / 3 times longer would be fine.

4 Likes

mcetool - prints all current settings

mcetool --long-help - prints ALL options with short descriptions of settings

mcetool --set-low-power-mode=enabled / mcetool --set-low-power-mode=disabled

To prolong the time the display is active for, you need to adjust the DEFAULT 5 seconds, you can do this with the folowing;
mcetool --set-blank-from-lpm-on-timeout=15

2 Likes

There’s a small typo in there, it should be --set-blank-from-lpm-on-timeout, but either way that parameter doesn’t work on the Xperia 10 II. The LPM screen is only visible for about a second at most, regardless of how seconds the abovementioned parameter is set to.

And one more thing: the Xperia 10 II seems to suffer from the same proximity sensor issues as the Xperia 10 and Xperia XA2 (and occasionally the Xperia X), which means you will only occasionally get the LPM screen to show up when you take the device out of your pocket or wave your hand in front of it. Usually it just stays black and you have to use the power button or the fingerprint sensor (which is also the power button) to turn on the screen.

2 Likes

I experience the same effect on my Xperia X; the lpm timeout is effectively one second regardless of the setting of --set-blank-from-lpm-on-timeout. This has worked on SFOS3 but seems to be broken with SFOS4. It would be great if this could be fixed somehow.

2 Likes

Firstly from 3.2.0 / Torronsuo release notes:

An attempt was made to prevent calls from being accidentally held [Xperia X devices]. Proximity sensor utilization was tweaked to improve the reliability of in-call blanking behaviour. Unfortunately, this change also affects the Sneak Peek feature. Those users who have not experienced problems with in-call proximity blanking and wish to continue using Sneak Peek can revert back to the previous behaviour by executing mcetool --set-ps-on-demand=disabled from the command line.

Basically: In Xperia X the above should make lpm work without causing any issues. In other Xperia devices there is some risk that proximity sensor will start misbehaving and cause issues both for lpm and in-call proximity blanking.

There was a change in topmost window reporting (AFAIK in 4.1.x release) and this caused some more or less subtle problems for fingerprint wakeup, blanking timers, …, and lpm (misinterpreting topmost window state makes it look like there is an app on top of lpm screen = not ok for lpm → lpm is canceled → display blanks). Fix is in 4.2.x. Some more info at: [BUG][4.1.0.23, 4.1.0.24] Unlock device by fingerprint

6 Likes

Thanks for the explanation. Looking forward to 4.2. :slight_smile:

Xperia 10 ii SFOS 4.2 EA

I have ‘sneak peek’ working on Xperia 10 ii with a timeout of 15 seconds (LPM content shows for 15 seconds once activated). As pointed out by Spiiroin, to revert/enable back to LPM you must execute ‘mcetool --set-ps-on-demand=disabled’, prior to this, LPM would not show.

I note that the Weather Temperature on the LPM screen still shows white text when the time/day/date are in theme colours. Looks a little…disjointed.

Also to bear in mind, I have no SIM card in the device as yet, so I won’t know about Proximity Sensor problems until then. At least for now I can enjoy using sneak-peek once again.

EDIT:
I changed the colour of Weather Temperature on LPM screen. It’s quite a simple change and the file to be altered is here; ‘usr/lib64/qt5/qml/Sailfish/Weather/WeatherIndicator.qml’ at LINE 33;
change from;

    color: Theme.primaryColor     

to;

    color: lockScreen.lowPowerMode ? Theme.highlightColor : Theme.primaryColor
6 Likes

With mcetool --set-ps-on-demand=disabled
and mcetool --set-low-power-mode=enabled it causes no problems with proximity sensor on my Xperia 10II with SFOS 4.2.0.19 EA so far.

3 Likes

On light ambiances, the temperature even disappears, probably because the text is black due to the theme colour.

1 Like

Not a problem for the preset light ambience but yes, I have a white ambience that shows only the weather icon, as all text becomes black. I had only tested with preset ambience packages, not user ambience.
I’m fairly sure there is a way round it and if I work it out, I’ll be sure to post it here.

Hi. I setup low power mode timeout for one hour by this command:

mcetool \
  --set-low-power-mode=enabled \
  --set-blank-from-lpm-on-timeout=3600 \
  --set-blank-from-lpm-off-timeout=3600 \
  --set-powerkey-blanking=lpm

but then I’m experiencing the problem that clock on the screen are not updating :smiley: When I lock phone at 14:10, this time is displayed there until phone is waken up. Is there any possibility to make it refreshing?

1 Like

You probably should not do this… It delays lpm-off (= display off, suspend blocked) → off transition (= display off, suspend allowed), which basically means: visually there is no difference - display stays blank, but device is consuming more power than it needs to for up to 1 hour. [What it is meant to do: some devices put proximity sensor to less reactive mode on suspend to reduce power drain. And when we are potentially juggling between showing/hiding lpm ui based on proximity sensor state, we’d rather have the sensor in a more reactive mode.]

Updating of the time value is suspended when display blanks / nobody is going to see the result. Unfortunately the logic predates lpm and does not know how to differentiate between display off and lpm ui on screen. Then again at the present state “lpm” is not exactly “low power”, so keeping it active for long periods of drains battery. And having static image on screen for extended periods could have adverse effects too.

2 Likes

loknar299
Member

Jun 10, 2014

19

21

Apr 4, 2016 at 4:00 PM 

#145

LPM how to

szymeczek34 said:
It used to be in here: /usr/share/jolla-camera/presets/GstOMXMPEG4VideoEnc-omxmpeg4videoenc.prs
Although that was a long time ago on version around 1.0.0.25, it could have changed since then.
Did you manage to get LPM working on OPX? I miss it so much.

Edit. Yep, it's gone.

Exactly, and i didn’t managed to find it anywhere else.

Well, LPM was (and in a way still is) tough nut to crack, but what i did:

Enabling LPM (in terminal under root)
Code:

mcetool --set-low-power-mode=enabled

After this it’s there, but only for several seconds, i also added it as reaction to powerkey press
Code:

mcetool --set-powerkey-blanking=lpm

And because i want it there all the time (unlike Jolla’s we have AMOLED’s so we can afford it battery wise) this is how to change timeout:
Code:

mcetool --set-blank-from-lpm-on-timeout=130

(It’s in seconds, I started with one day - 86400, but unfortunately it doesn’t update [time stays the same “forever”], so it’s kind of pointless)
So to address this, with help of some older sailfish OS forum posts i created configuration, that updates LPM every minute, but only when it’s already active (pretty much switching it off and on immediately, since i didn’t find out how to just refresh it )
It has three parts:
Code:

lpm.service

file, that determines what to run - lpm.sh script in my case,
Code:

lpm.service

should be placed in
Code:

/etc/systemd/system/

Code:

lpm.timer

file, that sets how often should lpm.service run, should also be placed in
Code:

/etc/systemd/system/

and also it needs to be activated
Code:

systemctl enable lpm.timer

and started (or you can reboot, then it of course starts automatically, since it’s activated)
Code:

systemctl start lpm.timer

and finally
Code:

lpm.sh

script, that checks, whether system is active or locked and update when necessary (has to be runnable [chmod +x lpm.sh] of course)
Unfortunately, so far LPM consumes battery a lot (something between 1-2 % per hour), for me it is acceptable, and also if you need to get longer life, just put it display down, since proximity sensor switches LPM off (then it’s more like 1 % down in three hours).

lpm.timer:
Code:

[Unit]
Description=LPM Update

[Timer]
OnCalendar=--* ::00
#This means that service with the same name (lpm) is activated every minute

[Install]
WantedBy=timers.target

lpm.service
Code:

[Unit]
Description=LPM refresh

[Service]
ExecStart=/root/lpm.sh

lpm.sh (very simple, i hope it can be done better way, but so far i don’t know how)
Code:

#!/bin/bash
if grep mce /sys/power/wake_lock >/dev/null 2>&1
#checks whether phone is awake
then
if /usr/sbin/mcetool | /bin/grep Inactivity | /bin/grep inactive >/dev/null 2>&1
#checks whether LPM is active
then
/usr/sbin/mcetool -d
#switches display on
/usr/sbin/mcetool --blank-screen-lpm
#switches back to LPM, but with updated time
fi
fi

Like 

Reactions: kimmoli, elvarr, knauji and 1 other person

4 Likes

I couldn’t start lpm.timer so i modified the onCalendar argument to this:


actually the forum somehow interprets the asterisk * and shows something different that’s why i made the screenshot

I found out that it would turn on the lpm screen during navigation, so i modified lpm.sh to check if pure-maps is running or not:
#!/bin/bash
if grep mce /sys/power/wake_lock >/dev/null 2>&1
#checks whether phone is awake
then
if /usr/sbin/mcetool | /bin/grep Inactivity | /bin/grep inactive >/d
ev/null 2>&1
#checks whether LPM is active
then
if ! pgrep maps>/dev/null; then
/usr/sbin/mcetool -d
#switches display on
/usr/sbin/mcetool --blank-screen-lpm
#switches back to LPM, but with updated time
fi
fi
fi

2 Likes