Friday, 27 December 2013

Jolla HowTo: Workaround for battery life NFC bug

Link to mobile view for Jolla Sailfish browser (browser is not automatically recognized yet):
https://reviewjolla.blogspot.com/2013/12/jolla-howto-workaround-for-battery-life.html?m=1

After publishing an article about finding the NFC bug, lot's of users have tested workarounds to fix the bug. The software solution given there is now confirmed as safe, so I share it again in this detailed HowTo. Workarounds like this remains the only change for users to extend their battery life for normal level, as the next Sailfish update 2, version 1.0.2.5 does not offer a fix the this bug yet, but an update is on it's way:

To enable developer superuser mode in Jolla

  1. Go to Jolla Settings -> Developer Mode
  2. Enable developer mode. Enable SSH connection.
  3. Enter or generate a new password (options are visible after SSH). Remember it and Save.
  4. Reboot your phone
After steps above, your phone has a new app called Terminal in the laucher view. Via terminal you are able to give commands to the phone as a root user, and practically everything is possible there - even causing the phone not to start, so please be careful and doublecheck every letter you write there. Giving wrong commands might affect to the warranty of your phone.

To prevent Jolla's communication with The Other Half (NFC bug)

Open terminal. You see an exchanged keyboard, and an enter line showing "bash-3.2$ ". That's where you write your commands. During the following commands, the enter line changes to "bash-3.2# ", telling you that you have entered developer superuser mode. In this mode it's possible to command the phone's hardware. During your writing, either the keyboard or the command line is higlighted - you can write even when keyboard changes to grey. Write the bolded commands below, and press enter after each:

devel-su <- you command your terminal to enter developer superuser mode
(your password) <- note: invisible writing. Jolla confirms that you are the superuser
systemctl mask tohd.service <- you put a mask to a buggy service commanding NFC chip
systemctl stop tohd.service <- you stop the service
exit <- you leave the devel-su mode
exit <- you leave the terminal (it closes)

Terminal closes, and you have now a phone using less battery. Cconsumption is reduced by 2% per hour, giving you max 500h standby time. Your phone does not recognize The Other Half any more, so the ambience does not change when you attach it. Everything else is normal. Masking the service, like commanded above, prevents the phone to enable connection after reboot, so this offers a permanent fix until removed.

To return everything the way it was

After Jolla distributes a Sailfish OS update fixing the NFC bug, you can remove your changes to the system. It's safer to do before installing that update, but this should work as well after it. Open terminal again, write the bolded commands below, and press enter after each:

devel-su <- you command your terminal to enter developer superuser mode
(your password) <- note: invisible writing. Jolla confirms that you are the developer.
systemctl unmask tohd.service <- you take the mask away, so the system can find the service again
systemctl start tohd.service <- you start the service
exit <- you leave the devel-su mode
exit <- you leave the terminal (it closes)

Terminal closes, and your Jolla can communicate with The Other Half again.

Is this all safe?

According to Harri Hakulinen, Chief engineer at Jolla, yes it is:
According to several users, yes it is. I've been carefully following comments going on at forums, twitter and The User Report tool during the last 4 days. People are reporting better standby hours, and none of them has reported  problems caused by this fix.

However, keep in mind that you must be careful with what you do. In the developer mode, wrong commands given can break your phone.

1 comment:

  1. After the update to version 1.0.2.5:
    - Already masked and stopped service stays that way, so the fix stays right
    - Only stopped service (without masking) starts again (normal, as the phone reboots during the update)
    - this fix can still be done the same way

    You can check connection to the other half with a terminal command: systemctl status tohd.service
    If the fix is done correct, as a return you should see:
    Loaded: Masked...
    Active: Inactive...
    Warning: Unit file changed...

    Before asking, please check for any typos ;)

    ReplyDelete