Originally Posted by tomatende2001
Any news about the reboot problem? I have to use a very old version of CM12.1 with too many bugs ...
Yes - I've finally been able to do some testing on CM12 and have identified what exactly is going on. CM12 added an "LCD density" option into the "Display & lights" settings, which runs the "wm density" command whenever the option is changed. They then modified the way the "wm density" command works to force a soft reboot to occur immediately after the command is run.
SecondScreen also runs the "wm density" command whenever a density change is requested, triggering the reboot. Unfortunately it doesn't look like I can disable the reboot from occurring, however I can certainly make SecondScreen play nice with it. I will have some time this weekend to work on this and, hopefully
, release an update.
In the meantime, here's how you can work around this behavior on current builds of CM12:
* Disable safe mode in SecondScreen settings, so that the app doesn't turn itself off after rebooting.
* In the profile you want to run, set the density back to "Device native".
* Run the profile, and then go to Quick Actions and set the density seperately. The device will reboot.
* When you are finished using the profile, the safest way to turn SecondScreen off is to go to Quick Actions and press "Reset settings", to clear the density change. The device will reboot again. You can then turn the profile off normally.
There is another issue with the recent LMY48I security update to Android 5.1.1 (also affecting CM12) that I am going to need to work around. LMY48I backports a change from Marshmallow where apps are no longer able to read pids from running processes, which is how SecondScreen detects the SystemUI process so that it can be restarted. Therefore, the "Restart SystemUI" UI refresh method is broken on current builds of 5.1.1. A fix for this will also be released in the next update, but it will require Busybox to be installed on the device (only required for 5.1.1, this won't be needed on Marshmallow).