[SuperSU] mag01:
Well, I've done some more tests and Greenify and especially Franco Kernel Updater seem to be the most troublesome apps (in my case).

Now about those tests.

- assume the tested app is removed from the SuperSU applications list so that the popup is brought up when the root access is requested

- SuperSU timeout is set to default 10s

1. FKU

- boot up the phone

- turn off the screen as soon as it's possible

- wait...

- the screen goes on after a while

- screen will stay (constantly) on for minutes (I tested it for about 5 minutes and it was on all the time) - e.g. the phone is awake all that time

- if I switch it off myself, it will go back on again in a while

2. Greenify

- boot up the phone

- start few apps that are setup to be greenified - just to ensure the Greenify will really kick in

- turn off the screen

- wait...

- the screen goes on after approx. 4 minutes

- screen will go off after a while

- then the screen goes on again after another approx. 4 minutes

- screen will go off after a while

etc

With SuperSU timeout set to 30s the situation becomes slightly better with FKU, it will occassionally let the screen go off for a while, but it will go back on in approx. 3 minutes at most.

With both Greenify and FKU tested simultaneously (both are configured to trigger the popup) the SuperSU may even hang (application SuperSUS is not responding - close?) after few minutes. Sometimes it happens even with just FKU being active.

What's interesting is how the SuperSU timeout is dealt with.

Both FKU and Greenify are able to keep the SuperSU displaying the popup over and over again (after the timeout is reached) - fortunately not indefinitely as they will stop after about 10 timeouts - see another paragraph below.

However when I explicitly deny the root request for these apps (and then quickly remove them from the SuperSU list) they will stop offending immediately.

So it's strange that they don't stop after the 1st timeout.

When I do the same with Terminal Emulator for example, it will stop after the 1st timeout as one would expect.

Maybe the reason is that in the case of FKU and Greenify the root request comes from services and not regular user processes?

Then I performed another tests to get confirmation that the timeout countdown doesn't really run when the phone is locked/screen is off. That would explain most of this, because even the FKU would normally stop offending after about 10 timeouts (e.g. when you leave the screen on with phone unlocked and it will trigger the popup).

In this case the FKU seems to quite agrressively call su as it's able to keep the screen on (locked phone) while Greenify will let it go off for a while at least...

So yes, the question is whether it's possible to do something about the case when the SuperSU popup is to be displayed while the screen is off (phone is locked) and the SuperSU timeout counter wouldn't run. It may be hard to get all the apps modified to handle this situation better so at least some workaround for those incorrectly written would be really good. FKU seems to be the worst example for me as it's capable to keep the phone on continuously. I will try to report that to the [MENTION=3292224]franciscofranco[/MENTION] so he may improve this in his FKU app.