FORUMS
Remove All Ads from XDA

New to Tasker - Need a Bit of Help

4,447 posts
Thanks Meter: 1,380
 
By airmaxx23, Senior Member on 7th November 2019, 05:32 PM
Post Reply Email Thread
I have a Pixel 4 XL (rooted), there is a way to enable High Brightness Mode when the screen is at 100% brightness and by entering the following in Terminal Emulator.

su
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode

This only sticks until the screen goes off and needs to be ran again to get it on again. I'd like to make a task so that it automatically turns on when the screen is at 100% brightness but I have no idea how to do it. I've watched a few videos but I'm still not sure what to do. Thanks in advance.
7th November 2019, 10:34 PM |#2  
ktmom's Avatar
Senior Member
Thanks Meter: 2,363
 
More
Add a task and make sure to name it.

Add an action to the task code -> run shell.

On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode

Tick the box for use root.

Tap the on the line with the "if"

On the first line put the variable %BRIGHT

Tap the center button (probably displays a ~)

Select "Maths: greater than" (will now display a > )

On the second line, enter 230 (* see further down for an explanation)

Back out of the task to save it.



Now create a profile, with the context of event -> display -> display on

Link the task you created above




What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.

On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.

If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.
The Following User Says Thank You to ktmom For This Useful Post: [ View ] Gift ktmom Ad-Free
7th November 2019, 10:37 PM |#3  
OP Senior Member
Flag Colton, NY
Thanks Meter: 1,380
 
More
Quote:
Originally Posted by ktmom

Add a task and make sure to name it.

Add an action to the task code -> run shell.

On the line for command put your terminal command;
echo on >> /sys/class/backlight/panel0-backlight/hbm_mode

Tick the box for use root.

Tap the on the line with the "if"

On the first line put the variable %BRIGHT

Tap the center button (probably displays a ~)

Select "Maths: greater than" (will now display a > )

On the second line, enter 230 (* see further down for an explanation)

Back out of the task to save it.



Now create a profile, with the context of event -> display -> display on

Link the task you created above




What this does is each time the display turns on, the associated task will run. But the code will execute only if the display brightness is above the level set. You will need to play with the number to your satisfaction.

On my Pixel 3XL, stock Pie, 237 is actually the highest I've seen brightness go. In theory, 255 is the highest. Other (non pixel devices) have reported an order of magnitude higher. You can view the value of the variable in an alert -> flash action.

If there is a specific app that you will be using, then adding that as a profile context will reduce the number of times the profile will run. Or any other way to narrow down the active condition, maybe a state -> light level context.

Thank you very much, I'll give it a shot.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes