[Script] [EMUI] honor 5X 720p graphics/gaming boost - all models - root only - Honor 5X ROMs, Kernels, Recoveries, & Other Develo

Ok - you may be familiar with my mod here -
http://forum.xda-developers.com/hon...ipt-disable-enable-swap-honor-5x-kiw-t3308321
If not - try it - but in any case, from that thread, get SH Script Runner, Stericson's Busybox Installer
What this mod is about -
Makes your phone act like it's 720p instead of 1080p
It's still 1080p
But it moves the work from the GPU to the screen's hardware scaler
There's no such thing as a free lunch so this won't give you more battery duration
This may screw up your favorite keyboard, like SwiftKey - use the Google keyboard
This may screw up your icon sizes in your launcher (so look for launcher options to change that if you care)
This is going to make your fonts smaller in many places
This mod is not guaranteed to work the way you want
You MUST make a nandroid backup before proceeding if you know what's good for you
Run this the same way as you would my swap scripts
What this mod contains -
dpi-switch.zip that you unzip at the top of your /sdcard
If you followed the swap script instructions, you already knew that
720p.sh does exactly what the name implies - it's the mod
1080p.sh does what the name implies - it restores your phone to the default state
You must be root to run - see the instructions - turn on the SU button in SH Script Runner
Your phone will reboot when done
I may or may not change that
What could possibly go wrong -
If you use this with other DPI or screen mods, the sky could fall, your friends will leave and your dog will disown you - plus your phone will be borked
You didn't ignore me, you made a nandroid backup so nothing really bad can happen if you did
The screen may start out as tiny - play with it some, it will sort itself out - maybe even hold power to kill it and start it again
I can reproduce that but not every time
You can get the right sized screen and be fine, just play with it if it hits you
Try turning to landscape and back, that seems to clear it up too
That only happens right after the mod is applied
Important things to know about this mod -
No puppies were harmed during its creation
I am not responsible if your phone dies, catches fire, blows up, tries to take over the world, or starts running like a bat out of hell and makes you very happy
OK, I'm a little bit responsible for that last bit but only a little
Monjori OpenGL Shader benchmark test - 49 fps stock, 62 fps modded
PERFECTLY SAFE TO GO BACK AND FORTH FROM 720 TO 1080 AT ANY TIME
Enjoy - if it's pretty necessary, I'll come back with pictures - but seriously - see the swap thread linked about - this just copies the same approach, and just gives you some new commands.
Cheers!
PS - Yes - you can too do this yourself or use some other apps. No - nothing is as easy as doing it this way if you're not an expert in these things - that's why I made this for you.
Download is right here -
View attachment dpi-switch.zip

Here are the codes:
720p -
Code:
#!/system/bin/sh
# Sets 720p windows defaults on 1080p 5.5" Huawei, such as honor 5x
# Must run as root
# WILL reboot when finished!
# March 19, 2016
# EarlyMon
wm size 720x1280
wm density 320
setprop sys.powerctl reboot
1080p -
Code:
#!/system/bin/sh
# Restores 1080p windows defaults on Huawei, such as honor 5x
# Must run as root
# WILL reboot when finished!
# March 19, 2016
# EarlyMon
wm size reset
wm density reset
setprop sys.powerctl reboot

Is it the same as running
adb shell wm size 720x1280
adb shell wm density 320
adb reboot
Through adb or are there changes in value ?
Edit: I looked into the files and saw a change in density, 267 instead of 320...would it work with 320 ?

Zakaria.R said:
Is it the same as running
adb shell wm size 720x1280
adb shell wm density 320
adb reboot
Through adb or are there changes in value ?
Edit: I looked into the files and saw a change in density, 267 instead of 320...would it work with 320 ?
Click to expand...
Click to collapse
Yep, basically the same thing. There are namespace and zygote differences from Huawei so things in a terminal emulator aren't always the same as when run through adb, so we need root here.
267 comes from Pythagoras -
sqrt( 720^2 + 1280^2 ) / 5.5 = 267
320 is the class value understood by services and both work equally well.
I've updated the script to the use the 320 class value for density and went ahead and changed shutdown to reboot - I've seen occasional weirdness with just a reboot, but the first post instructions say if it's weird, try a shutdown anyway.
I'm not sure the changes make a difference but you're right - most folks familiar with this will expect the class value there, so I've changed the script.
And as I mentioned at the end of the post - no magic, nothing you can't do yourself if you know how, just a lot easier this way for non-experts.
Cheers!
PS - added the script codes to the second post, no secrets to this.

EarlyMon said:
Yep, basically the same thing. There are namespace and zygote differences from Huawei so things in a terminal emulator aren't always the same as when run through adb, so we need root here.
267 comes from Pythagoras -
sqrt( 720^2 + 1280^2 ) / 5.5 = 267
320 is the class value understood by services and both work equally well.
I've updated the script to the use the 320 class value for density and went ahead and changed shutdown to reboot - I've seen occasional weirdness with just a reboot, but the first post instructions say if it's weird, try a shutdown anyway.
I'm not sure the changes make a difference but you're right - most folks familiar with this will expect the class value there, so I've changed the script.
And as I mentioned at the end of the post - no magic, nothing you can't do yourself if you know how, just a lot easier this way for non-experts.
Cheers!
PS - added the script codes to the second post, no secrets to this.
Click to expand...
Click to collapse
Appreciate the explanation good job my friend keep up

Performance Impact for 2D games
I notice my phone is bit laggy when I play 2D game with 720p mode. I doubt scaler is overloaded.
So I compare both score with GFX benchmark.
Here are texturing results. 720p score was about 1270, native was about 1400.
720p mode impact some 2D performance by use hardware scaler always.

Same benchmark shows improvement in other areas - there's no simple answer and this is a mod to use when it benefits games that get along with it. As you've found, not all do.

EarlyMon said:
Same benchmark shows improvement in other areas - there's no simple answer and this is a mod to use when it benefits games that get along with it. As you've found, not all do.
Click to expand...
Click to collapse
Strong agree.
I decided my phone to leave default. 'cause for me, more suitable than 720p. But someone is not.
Not simple.
Here are all results for comparison. for someone.

On my KIW-L21 the Screen did not scale, unfortunately.
Meaning the Screen with a resolution of 720p was stuck in the upper left corner of the screen(Like a window, the rest of the screen was black),
while the touch input was rooted from the whole screen, which made it a little bit challenging to operate the device
Any idea how one could tackle that problem?

Nekly said:
On my KIW-L21 the Screen did not scale, unfortunately.
Meaning the Screen with a resolution of 720p was stuck in the upper left corner of the screen(Like a window, the rest of the screen was black),
while the touch input was rooted from the whole screen, which made it a little bit challenging to operate the device
Any idea how one could tackle that problem?
Click to expand...
Click to collapse
1. Enable auto-rotate. Then rotate your phone at lock screen.(See #1)
2. Try edit script "wm density 267" instead of 320. Use SH script runner on root mode. (See #3~)
3. Try adb command via PC (see #3) if you feel too difficult to operate with touch screen.
I counter same problem. I resolve this with 3. 'cause I can't unlock my phone

ssrnsrsr said:
1. Enable auto-rotate. Then rotate your phone at lock screen.(See #1)
2. Try edit script "wm density 267" instead of 320. Use SH script runner on root mode. (See #3~)
3. Try adb command via PC (see #3) if you feel too difficult to operate with touch screen.
I counter same problem. I resolve this with 3. 'cause I can't unlock my phone
Click to expand...
Click to collapse
1. Autorotate is on. Does not do anything.
2. Edited the script to uses 267 density. Did not work either.
3. ADB kinda works with density 320. I could test, wether to use this mod or not. But in my Use Case I got no benefit whatsoever. Also not beeing able to change this on the go is another deal breaker to me.
Thanks for the support.

I have the same results as Nekly. After digging deeper, the problem lies within the EMUI 3.1 launcher. After you change the resolution/density, the icons look all jacked. I opened some games, and the games look just fine. There is definitely a noticeable FPS boost.
There's no such thing as a free lunch so this won't give you more battery duration
Click to expand...
Click to collapse
After careful thought, I tend to disagree with this statement. While the screen is off, hes right, there is no free lunch there. While I have not tested it, in theory it *should* result in more battery duration while you are using the phone. My theory is that if you were to change the resolution to 720x1280 thats 921600 total pixels rendered on the screen. Instead of the normal 1080x1920 which is 2073600 total pixels rendered. Thats a net difference of 1161000 less pixels that the GPU has to render. So less work for the GPU. The MHZ will still be the same so no change there. If there was no FPS boost in the game, then the GPU would still be doing the same amount of work. But there is an FPS boost.
This is an awesome tweak, I wish I could get the launcher to display the icons correctly. Again great work @EarlyMon!

TouchOdeath said:
I have the same results as Nekly. After digging deeper, the problem lies within the EMUI 3.1 launcher. After you change the resolution/density, the icons look all jacked. I opened some games, and the games look just fine. There is definitely a noticeable FPS boost.
After careful thought, I tend to disagree with this statement. While the screen is off, hes right, there is no free lunch there. While I have not tested it, in theory it *should* result in more battery duration while you are using the phone. My theory is that if you were to change the resolution to 720x1280 thats 921600 total pixels rendered on the screen. Instead of the normal 1080x1920 which is 2073600 total pixels rendered. Thats a net difference of 1161000 less pixels that the GPU has to render. So less work for the GPU. The MHZ will still be the same so no change there. If there was no FPS boost in the game, then the GPU would still be doing the same amount of work. But there is an FPS boost.
This is an awesome tweak, I wish I could get the launcher to display the icons correctly. Again great work @EarlyMon!
Click to expand...
Click to collapse
0.5 × 2 = 1
If you render half as many pixels per frame but increase the number of frames per second by what could be a factor of two, then the system theoretically ends up rendering the same number of pixels per second.
(pixels/frame × frames/second = pixels/second)
GPUs and displays work on fields - even the LCD control matrix doesn't have to refresh in terms of pixels - so the math is actually quite a bit more complex for making predictions.
If you get better battery performance, great!
But I won't promise that because TANSTAAFL.

Nice!! Very deep insight, love the formula!!

Loving these small but useful script contributions, Mon. Thanks for the hard work. Will definately try this when I get home. Question - is the effect on the icons on the native launcher only? I removed that from /system and installed Nova as my only and default launcher, so just wondering if it's Huawei's fault or just a secondary effect from the resolution change.

I have the same results as Nekly. After digging deeper, the problem lies within the EMUI 3.1 launcher. After you change the resolution/density, the icons look all jacked.
Click to expand...
Click to collapse
What I said in the above quote is wrong. Nekly does a great job in describing the problem:
On my KIW-L21 the Screen did not scale, unfortunately.
Meaning the Screen with a resolution of 720p was stuck in the upper left corner of the screen(Like a window, the rest of the screen was black),
while the touch input was rooted from the whole screen, which made it a little bit challenging to operate the device
Any idea how one could tackle that problem?
Click to expand...
Click to collapse
I'm experiencing the exact same problem on my L24 as @Nekly and I now have a ghetto solution.
There is an app called Resolution Changer. It has widgets you can place on your desktop. I have two widgets, a 720p and a 1080p. When the device is rebooted, the resolution will screw up, all you have to do is click on the 1080p, and it will restore fullscreen. Then click on 720p widget, and your screen will be fullscreen 720p. I'll post a better solution when I find one.
+1 to @EarlyMon for coming up with this geniusry. This tweak is clutch.

Can anybody get me a flashable zip that resets the resolution back to 1080p? I used the Resolution Changer app and somehow I screwed up my display. Any help would be appreciated!
EDIT: found this -->https://forum.xda-developers.com/android/general/guide-fixing-resolution-using-nomone-t2921856, this guy saved my day, but it would be more convenient when having a flashable zip file instead of having to connect to a computer and reset res via adb. Cheers!:good:

Related

Cm 13 res change

I just got cm 13 and i wonder IF i change res to 1920x1080 will their be negative stuff and will my phone get better performance IF i change res
From my experience, it will affect performance in positive way, but battery life will be pretty much same. Try it out
dmxpeter said:
From my experience, it will affect performance in positive way, but battery life will be pretty much same. Try it out
Click to expand...
Click to collapse
Will contacts and playstore breake IF so how could i reactivate apps
Battery life will not improve because the pixels are just getting bigger for it to become 1080p this does NOT actually disabled them or anything. IT does the same as your PC.
gusselibus said:
Will contacts and playstore breake IF so how could i reactivate apps
Click to expand...
Click to collapse
No, everything should work fine. The problem could be with stock rom, but on CM you should be good to go.
wold i get super big Icons
just try it, open terminal and type
su wm size 1920x1080 //this will change your resolution, you can experiment with different resolutions
su wm density 560 //density - if you go too high, everything will be bigger; if you go lower, everything will be smaller; I would recommend 500
reboot your device
if something goes wrong, you can always reset your resolution and density
su wm size reset //it will reset your screen size to default value - 2k (1440x2560)
su wm density reset //this will reset density to default value - (560 on CM13 I think)
Don't be afraid, try everything out, experiment.

[TIP] [SM-P600-601] Howto Degrease Battery Drain

I found a tip for my sm-p600 to degrease battery drain.
You just have to degrease resolution and dpi.
On an adb console on your PC :
tape this:
Code:
wm size 2048x1280
(you will have a fc launcher, no pain)
then tape
Code:
wm density 250
your res is now 2048x1280 and your tab is now battery friendly about 50%
it stay after reboot.
if you want to go back to native screen, you have to set res to 2560x1600 and dpi 320
try ! it work
Don't do this on terminal emulator because on change res, you have continuous fc launcher and you can't change dpi.
:good:
This shows how silly xHD resolution is for phones with less than 6 inches. And how amazing battery life could be on current top phones if they still had FullHD displays.
Sm-p600 is an amazing tab with a very high rsolution but have a poor battery life.
If you degrease the res a little, you still have a good display but your battery will stay longer.
Its my choose, so i share.
Please explain how I do this.?
I downloaded android - skd and Android studio and I have USB debugging enabled but that's all I know. Thanks in advance.
Great idea ...
Dear @murigny64 , it's a good idea to lower the resolutions ... but , didn't you face any problems with system apps ( as they are designed for some especial resolutions ... ) ? also , how was your performance with games and demanding apps ? ... did it effect your benchmark results ? ... Great Thanks in Advance
With Best Wishes
Hitman1376​
hitman1376 said:
Dear @murigny64 , it's a good idea to lower the resolutions ... but , didn't you face any problems with system apps ( as they are designed for some especial resolutions ... ) ? also , how was your performance with games and demanding apps ? ... did it effect your benchmark results ? ... Great Thanks in Advance
With Best Wishes
Hitman1376​
Click to expand...
Click to collapse
No prob with system apps if you respect resolution vs density.
Only one thing : bootanimation is shifted when you boot device.
I've doing this especially for games like crash royale.
Before the tweak, i can play about 30minutes only. But now, i can play more than 1 hour. It's very amazing.
You can try, it's easy.
Antutu is 53550 with stock 5.1.1 .
+ Good idea to reduce the resolution :good:, more juice for the processor, radio, Gpu, screen on time, etc.
+ I used NOMone resolution changer w\ root (revert back to default in 9s if things go wrong).
+ Layerpaint & cpu-z detects the display as 8".
- Got 51th 48296 on antutu 6.2.7 (lollypop stock serbia rooted, P601 w\ deathly adiutor) Right bellow note 5, Probably because TW lollypop & old processor. Was "13th" 54954 on kitkat (P601 w\ gltools).
- samsung gallery got 1/4 view cut on the right side of the screen (folder view) , i use quickpic.
Didn't see any significant increase in terms of battery life, only slightly.
can anyone else confirm it works?
I'd be interested in an explanation of how reducing the resolution would have any effect on battery usage. The backlight is still on, all the pixels are still used, so what's using less battery?
theophile2 said:
I'd be interested in an explanation of how reducing the resolution would have any effect on battery usage. The backlight is still on, all the pixels are still used, so what's using less battery?
Click to expand...
Click to collapse
Less render pressure for the SoC I assume. Backlight is still the #1 hog though.
---------- Post added at 07:41 PM ---------- Previous post was at 07:36 PM ----------
To OP: Although this could be overkill, I think you could make the new resolution an integer-multiple downsize to the original (e.g. 2x - 1280x800), so that one image pixel could correspond to an integer-amount of physical pixels (e.g. 2^2=4) on the screen. Could ease rendering pressure even more, but naturally at the cost of clarity.
murigny64 said:
I found a tip for my sm-p600 to degrease battery drain.
You just have to degrease resolution and dpi.
On an adb console on your PC :
tape this:
Code:
wm size 2048x1280
(you will have a fc launcher, no pain)
then tape
Code:
wm density 250
your res is now 2048x1280 and your tab is now battery friendly about 50%
it stay after reboot.
if you want to go back to native screen, you have to set res to 2560x1600 and dpi 320
try ! it work
Don't do this on terminal emulator because on change res, you have continuous fc launcher and you can't change dpi.
:good:
Click to expand...
Click to collapse
Hi, adb says this is WM is not recognized as a command. Do you know what am I doing wrong?
>>> nevermind. just an incomplete command
adb shell WM size 2048x1280
Is it possible to do a step by step for non developers? (or a quick video)
What software are you running?
Wow, if working that sounds awesome! Do you think it works also on the P605 (LTE version)?

[HELP] My LG G4 is heating near camera and images not loading in gallery

My lg g4 was worked fine for the past 1 year. Now I am facing an issue near the camera.
Battery draining too quick. If I use 10 mins, around 30% battery is draining.
And my images are not loading. Showing like something encrypted. I have attached the screenshots too.
Note: I done reset many times. But, still facing the problem.
Using android 6.0:crying::crying:
best way to fix this is to reduce the big core A57 to 1.44 ghz or disable it completely to cool down lock the freq
clear the cache install root optimized stuff that u need all on the internet out there to solve
even the new S8 device they set it deafult at 1080p resolution so set the resolution
to 1080x1920 at 440 dpi
script (using android terminal or rom toolbox auto script startup**leave the su command for rom toolbox )
su
wm size 1080x1920 wm
or use dpi changer app (root) to archive scale but stock app will crash use 3rd party app
remove all bloat ware app ..... there alot of things to optimized
Thanks alot. I am not a techie like you. I am just a beginner. Can you tell me in the easy way to do it?

Research - XZP SHARP Panel @ 120Hz

XZP 120Hz QUEST​
First i would like to push this thread forward cause i thing phone has some potential still to unlock. There is much writen about XZP - 120hz but nothing concrete or usable in stock, before i write something of mine i would like to credit a developer which inspired me to snoof around a bit:
thanks to "kholk @ Github" and here is kholk,s work:
https://github.com/sonyxperiadev/ke...si-panel-somc-synaptics-sharp-4k-cmd-ID6.dtsi
https://forum.xda-developers.com/newthread.php?do=newthread&f=6237
thanks to Paranoid Team for developing a great rom for XZP
http://paranoidandroid.co/downloads/maple
So lots of us have rooted device and in root explorer i triggered search for "SHARP" word just from curiosity, after minutes of waiting search completed and 4 folders stand out:
qcom,mdss_dsi_sharp_4k_dsc_cmd
qcom,mdss_dsi_sharp_4k_dsc_video
qcom,mdss_dual_sharp_1080p_120hz_cmd
qcom,mdss_dsi_sharp_1080p_cmd
Is it possible to enable this mode from this folders and sub files in stock rom? And how would i an amateur user switch this modes?
I will make backups in twrp and then myself try to mess up with files or at least go through them if something punches me in the eye i will report, what i meant to say it would be nice if above links could be used to inject it into our stock roms?
Oh, i recently installed paranoid android and there are settings to enable 120hz but are not yet working, you can google it, so xzp is at least in good hands and path, hope we wount wait too long for this goodies
If annyone has some succes or ideas, observations please write it down maybe some devs will look into them
stipi69 said:
XZP 120Hz QUEST
First i would like to push this thread forward cause i thing phone has some potential still to unlock. There is much writen about XZP - 120hz but nothing concrete or usable in stock, before i write something of mine i would like to credit a developer which inspired me to snoof around a bit:
thanks to "kholk @ Github" and here is kholk,s work:
https://github.com/sonyxperiadev/ke...si-panel-somc-synaptics-sharp-4k-cmd-ID6.dtsi
https://forum.xda-developers.com/newthread.php?do=newthread&f=6237
thanks to Paranoid Team for developing a great rom for XZP
http://paranoidandroid.co/downloads/maple
So lots of us have rooted device and in root explorer i triggered search for "SHARP" word just from curiosity, after minutes of waiting search completed and 4 folders stand out:
qcom,mdss_dsi_sharp_4k_dsc_cmd
qcom,mdss_dsi_sharp_4k_dsc_video
qcom,mdss_dual_sharp_1080p_120hz_cmd
qcom,mdss_dsi_sharp_1080p_cmd
Is it possible to enable this mode from this folders and sub files in stock rom? And how would i an amateur user switch this modes?
I will make backups in twrp and then myself try to mess up with files or at least go through them if something punches me in the eye i will report, what i meant to say it would be nice if above links could be used to inject it into our stock roms?
Oh, i recently installed paranoid android and there are settings to enable 120hz but are not yet working, you can google it, so xzp is at least in good hands and path, hope we wount wait too long for this goodies
If annyone has some succes or ideas, observations please write it down maybe some devs will look into them
Click to expand...
Click to collapse
I wish to have it in Android pie coz of this I really like this phone
I'm building Zest Kernel got this device soon and that surely seems like a great idea. I'm personally thinking of trying to force 120Hz as I forced 90Hz on the Essential phone with celtaire. The only problem is it seems the userland side of things may have limitations to 60fps which would need a bypass somehow, as Razer did.
PA seems interesting that they have a switch so I'll try look at they code to see (if they have the piece of the puzzle I was missing that would be amazing).
Great this would be awesome :fingers-crossed:
can't wait, 60 hz really hurts my eyes.
amakuramio said:
can't wait, 60 hz really hurts my eyes.
Click to expand...
Click to collapse
Lol, as in its pretty smooth anyways. But 120Hz is likely darn water flowing.
Any update on this lol went back to my xz premium
I've been thinking about how to get this working, but it seems tweaking the qcom,mdss-dsi-panel-framerate value on the default configuration (1080p) alone is not enough, although from an initial diff between the original 60Hz configuration and kholk's newly added 120Hz configuration on SonyOpenDevices kernel showed only the framerate value was changed (there are probably things I didn't find).
I've tried changing it from 60 to 90 and 120. Changing to 90 has no apparent effect (the system still renders at 60 FPS), while changing to 120 caused everything to be rendered at 24 FPS (very sluggish). Still, it seems the refresh rate change is indeed set to the value, as this app (which looked rather dated and unreliable) did show the system's refresh rate (rr) is configured to the value written in the dtsi.
From the looks of it, it seems the dtsi file controls what refresh rate be configured at kernel level, but something's probably needed in the userland to get it function properly. But still, it's interesting that setting the value to 120 would cause the system to render everything at 24 FPS, while setting the value to 90 doesn't have any impact.
I posted some details here yesterday as I was mainly building my own CarbonROM zips with some own configurations. For CarbonROM, the dtsi file is located in arch/arm/boot/dts/qcom/dsi-panel-maple.dtsi.
Back to the OP... I've found the entries as well. However, even after I modify the dsi-panel-maple.dtsi and that the modified value is registered somewhere, the value in /sys/firmware/devicetree/base/soc/qcom,[email protected]/qcom,mdss_dsi_sharp_1080p_cmd is still 60 (003c). This file is probably the one representing the original 60Hz command:
https://github.com/CarbonROM/androi.../boot/dts/qcom/dsi-panel-sharp-1080p-cmd.dtsi.
And there's the 120Hz configurations placed in /sys/firmware/devicetree/base/soc/qcom,[email protected]/qcom,mdss_dual_sharp_1080p_120hz_cmd.
This file might be related to it. However, this file is significantly different from the 1080p (60Hz) one and I'm wondering if this is indeed for the same panel our device is using.
https://github.com/CarbonROM/androi...com/dsi-panel-sharp-dualmipi-1080p-120hz.dtsi
Not sure if there are any hope on getting 120Hz working on existing Oreo custom ROMs as SonyOpenDevices is now working on 4.9 kernel (which is used by Pie), and I'm yet to be able to build a working AOSP ROM for it. The last time I built an AOSP Pie ROM and flashed the generated images resulted in a lot of crashes and then the phone powered off by itself... it was completely unusable.
EDIT: It seems the value I previously changed was reflected in /sys/devices/mdss_dsi_panel/change_fps (which can be viewed via cat). As I set it to 90 in the dtsi, the value here is also 90.
raven213 said:
Any update on this lol went back to my xz premium
Click to expand...
Click to collapse
I haven't got round to modding the display on my kernel yet, I'm firstly trying to fix WiFi lol.
---------- Post added at 09:10 PM ---------- Previous post was at 08:56 PM ----------
LSS4181 said:
I've been thinking about how to get this working, but it seems tweaking the qcom,mdss-dsi-panel-framerate value on the default configuration (1080p) alone is not enough, although from an initial diff between the original 60Hz configuration and kholk's newly added 120Hz configuration on SonyOpenDevices kernel showed only the framerate value was changed (there are probably things I didn't find).
I've tried changing it from 60 to 90 and 120. Changing to 90 has no apparent effect (the system still renders at 60 FPS), while changing to 120 caused everything to be rendered at 24 FPS (very sluggish). Still, it seems the refresh rate change is indeed set to the value, as this app (which looked rather dated and unreliable) did show the system's refresh rate (rr) is configured to the value written in the dtsi.
From the looks of it, it seems the dtsi file controls what refresh rate be configured at kernel level, but something's probably needed in the userland to get it function properly. But still, it's interesting that setting the value to 120 would cause the system to render everything at 24 FPS, while setting the value to 90 doesn't have any impact.
I posted some details here yesterday as I was mainly building my own CarbonROM zips with some own configurations. For CarbonROM, the dtsi file is located in arch/arm/boot/dts/qcom/dsi-panel-maple.dtsi.
Back to the OP... I've found the entries as well. However, even after I modify the dsi-panel-maple.dtsi and that the modified value is registered somewhere, the value in /sys/firmware/devicetree/base/soc/qcom,[email protected]/qcom,mdss_dsi_sharp_1080p_cmd is still 60 (003c). This file is probably the one representing the original 60Hz command:
https://github.com/CarbonROM/androi...boot/dts/qcom/dsi-panel-sharp-1080p-cmd.dtsi.
And there's the 120Hz configurations placed in /sys/firmware/devicetree/base/soc/qcom,[email protected]/qcom,mdss_dual_sharp_1080p_120hz_cmd.
This file might be related to it. However, this file is significantly different from the 1080p (60Hz) one and I'm wondering if this is indeed for the same panel our device is using.
https://github.com/CarbonROM/androi...com/dsi-panel-sharp-dualmipi-1080p-120hz.dtsi
Not sure if there are any hope on getting 120Hz working on existing Oreo custom ROMs as SonyOpenDevices is now working on 4.9 kernel (which is used by Pie), and I'm yet to be able to build a working AOSP ROM for it. The last time I built an AOSP Pie ROM and flashed the generated images resulted in a lot of crashes and then the phone powered off by itself... it was completely unusable.
EDIT: It seems the value I previously changed was reflected in /sys/devices/mdss_dsi_panel/change_fps (which can be viewed via cat). As I set it to 90 in the dtsi, the value here is also 90.
Click to expand...
Click to collapse
Okay so I've been looking into this for quite some time and have even got a 90Hz Essential PH-1. But the thing is while we CAN force the display Hz, we aren't telling the display/graphics HAL to run at that frequency. So we need to find a way (or just find the way) to tell HAL to support by default this FPS. Razer clearly does this and that's why even on GSIs the display HAL in its /vendor position loads it up to normal.
Sony's SOMC kernel seems to have the display driver a bit wonky to the AOSP standards as you've seen. It seems this way for their method of HAL switching to 4K. Little OT tip: wm set doesn't change the resolution you see, only changes the resolution that's processed ?.
TL;DR it's pretty obvious (if you spend some time) to see the display references in the kernel where the Hz of the panel is displayed HOWEVER we need to rather focus on finding a way to force/tell the display/graphics HAL to process those 90 or 120 fps otherwise you'll have 60fps on your 120Hz panel .
There is the monitor (Hz) and the processed refresh rate (FPS) and one can usually get used the both being the same when using a desktop system however this is incorrect. They are 99% of the time aligned but it IS possible to have them not aligned (which is what happens when we're changing the kernel here).
LazerL0rd said:
Okay so I've been looking into this for quite some time and have even got a 90Hz Essential PH-1. But the thing is while we CAN force the display Hz, we aren't telling the display/graphics HAL to run at that frequency. So we need to find a way (or just find the way) to tell HAL to support by default this FPS. Razer clearly does this and that's why even on GSIs the display HAL in its /vendor position loads it up to normal.
Sony's SOMC kernel seems to have the display driver a bit wonky to the AOSP standards as you've seen. It seems this way for their method of HAL switching to 4K. Little OT tip: wm set doesn't change the resolution you see, only changes the resolution that's processed .
TL;DR it's pretty obvious (if you spend some time) to see the display references in the kernel where the Hz of the panel is displayed HOWEVER we need to rather focus on finding a way to force/tell the display/graphics HAL to process those 90 or 120 fps otherwise you'll have 60fps on your 120Hz panel .
There is the monitor (Hz) and the processed refresh rate (FPS) and one can usually get used the both being the same when using a desktop system however this is incorrect. They are 99% of the time aligned but it IS possible to have them not aligned (which is what happens when we're changing the kernel here).
Click to expand...
Click to collapse
So it seems we need to also alter the HAL to get the correct FPS. But the interesting phenomenon is, altering the kernel to use 120Hz, without touching any other code, triggers the HAL to render at 24 FPS instead of 60 FPS. This might be a hint on where we need to look at in the HAL code, if possible. I haven't tried other combinations, only 90 and 120, with the former having no impact (60 FPS).
As for you saying the SOMC kernel using a driver wonky to the AOSP standard might explain why it's been so complicated to get DRS (Dynamic Resolution Switching) to actually work despite the functionality's already been implemented in the SonyOpenDevices project (which is NOT what current CarbonROM is based on). Not sure about the functionality in AOSP now, but it's been non-working for quite a while (at least up to the point of switching to the 4.9 kernel as it wasn't complete on 4.4 kernel). At that time, the functionality itself existed, but it did nothing.
And as for the wm not changing the resolution we see... does it mean the panel is still outputting at 1080p even when instructed to change to 4K? If so, the "4K" is actually achieved via GPU scaling (which is also possible on desktop video cards, to attain a virtual 4K resolution on a 1080p-only monitor). This makes the 4K support claim fake, as it's not a real 4K resolution, but rather 4K rendered in background then downscaled to 1080p when outputting to the panel as the panel is operating at 1080p.
LSS4181 said:
So it seems we need to also alter the HAL to get the correct FPS. But the interesting phenomenon is, altering the kernel to use 120Hz, without touching any other code, triggers the HAL to render at 24 FPS instead of 60 FPS. This might be a hint on where we need to look at in the HAL code, if possible. I haven't tried other combinations, only 90 and 120, with the former having no impact (60 FPS).
As for you saying the SOMC kernel using a driver wonky to the AOSP standard might explain why it's been so complicated to get DRS (Dynamic Resolution Switching) to actually work despite the functionality's already been implemented in the SonyOpenDevices project (which is NOT what current CarbonROM is based on). Not sure about the functionality in AOSP now, but it's been non-working for quite a while (at least up to the point of switching to the 4.9 kernel as it wasn't complete on 4.4 kernel). At that time, the functionality itself existed, but it did nothing.
And as for the wm not changing the resolution we see... does it mean the panel is still outputting at 1080p even when instructed to change to 4K? If so, the "4K" is actually achieved via GPU scaling (which is also possible on desktop video cards, to attain a virtual 4K resolution on a 1080p-only monitor). This makes the 4K support claim fake, as it's not a real 4K resolution, but rather 4K rendered in background then downscaled to 1080p when outputting to the panel as the panel is operating at 1080p.
Click to expand...
Click to collapse
The 24 thing seems more like a glitch to me, personally. Since Android was never designed to support high refresh rates. Maybe in Android Q, hey?
By wonky I meant they use a different.. unusual method of seemingly having a display for each resolution (and one for 120hz) which are switched between or something like that. An interesting fact is if you're watching 4k and screenshot you get a black screen. I've noticed Windows 10 doing a similar thing in their recent closed Insider beta.
Yes the panel outputs 1080p even with a 4k resolution as the window manager (wm) only controls how much it processes not the output, without the HALs allowance. Yupp is 4k rendered them down to 1080p and breaks screenshots. You can easily tell by looking at a 4k picture in any app and then album with the stock wm.
Is 120Hz still being worked on? its been nearly a year since it was discovered and i thought it would be working by the end of the year at least. coming from the XZ
XxperexX said:
Is 120Hz still being worked on? its been nearly a year since it was discovered and i thought it would be working by the end of the year at least. coming from the XZ
Click to expand...
Click to collapse
Thanks to Bartcubbins/Pavel we're pretty close to getting it on stock on my kernel.
For custom ROMs they've had it for ages.
LazerL0rd said:
Thanks to Bartcubbins/Pavel we're pretty close to getting it on stock on my kernel.
For custom ROMs they've had it for ages.
Click to expand...
Click to collapse
I follow your project[emoji6]
Envoyé de mon G8141 en utilisant Tapatalk
LazerL0rd said:
Thanks to Bartcubbins/Pavel we're pretty close to getting it on stock on my kernel.
For custom ROMs they've had it for ages.
Click to expand...
Click to collapse
im running omni 8.1.0 custom rom on my XZ and it has the toggle for it, but it doesnt work i understand that u probs only work on the XZP, but at least work is being done on it
Any new updates? or is it still WiP?
LazerL0rd said:
Thanks to Bartcubbins/Pavel we're pretty close to getting it on stock on my kernel.
For custom ROMs they've had it for ages.
Click to expand...
Click to collapse
Which roms?
razerphynx said:
Which roms?
Click to expand...
Click to collapse
Idk but it's been available to all SODP for some time.

How To Guide Force 120Hz Guide (S22)

[Tested. Works as of One UI 4.1 September, 2022 Patch AVHH Build]
Hello again! A handful of you may have seen my S21 guide for forcing 120Hz through pretty much every app and while the camera is active (looking at you, Snapchat!!). The previous guide doesn't apply to the S22 series because Samsung changed the range of valid refresh rate values all the way down to 1Hz.. WELL I still managed to break it... 0.1Hz as a value apparently works.
A kind user made a video based on my guide: Linked;
I also want to say that the August update seems to have broken something for some users, but I've re-applied this on said update and it still works fine on my end.
This is also for allowing 120Hz when the camera is active; not so much forcing 120Hz (some users got confused because of my poor choice of wording).
Before you start, make sure your refresh rate is set to Adaptive.
1. Download SetEdit from the google play store.
2. Open up to the system table.
3. At the very top, you'll see an option to add a new setting. Go ahead and tap.
4. enter this: min_refresh_rate
5. Save changes. For the second value, enter: 0.1
6. Do this again but instead start with: peak_refresh_rate
7. Save changes
8. enter again, : 0.1
9. Save changes.
That's it! You'll still benefit from adaptive refresh rates when the screen is still and most apps will run in 120Hz regardless of their manifest. Enjoy a smooth Snapchat and everything else!
No.. Google Maps still runs at 60Hz; but rightfully so! It uses a lot of battery as-is.
If you want to undo this, carefully delete the lines we added and reboot the phone.
Screenshot 1: Snapchat 120Hz
Screenshot 2: Native Camera 120Hz
Thanks bossman. On it.
Will this force games like COD Mobile to run in 120pfs?
Kris_b1104 said:
Will this force games like COD Mobile to run in 120pfs?
Click to expand...
Click to collapse
It won't 'force' games to run any higher than they are programmed to. It just allows the screen to go up to 120Hz in most applications that normally wouldn't.
MochaVex said:
It won't 'force' games to run any higher than they are programmed to. It just allows the screen to go up to 120Hz in most applications that normally wouldn't.
Click to expand...
Click to collapse
Thanks, makes sense.
What FPS counter app do you use?
Thank you for this! Does this tweak have an impact on battery life?
Kris_b1104 said:
Will this force games like COD Mobile to run in 120pfs?
Click to expand...
Click to collapse
if you want play COD with 120hz just use [App]Galaxy Max Hz ,
i play on mine s22 with very high graphic quality and force 120hz with this app
herothezero90 said:
Thank you for this! Does this tweak have an impact on battery life?
Click to expand...
Click to collapse
Nothing too noticeable in my experience between stock and forced.
skura91 said:
if you want play COD with 120hz just use [App]Galaxy Max Hz ,
i play on mine s22 with very high graphic quality and force 120hz with this app
Click to expand...
Click to collapse
That's still not 120FPS though, alls it is doing os putting out 120Hz.
Thank you for good article.
Is there any way to fix 90 or 96Hz not 120Hz?
Doesn't work anymore on August update
leonbarroso said:
Doesn't work anymore on August update
Click to expand...
Click to collapse
For my Tab 8, on newest firmware I had to change the min_refresh_rate value to 120. Leaving the peak_refresh_rate at 0.1 Instantly locked to 120.
Actually tested this on my s22+ and the result was me having "grey" screen instead of black in 24hz, just deleted the "peak" and "min" values and restarted and was solved! If anyone getting this, that is the solution.
does it work on s22 ultra in agust 2022 update?
safereg said:
does it work on s22 ultra in agust 2022 update?
Click to expand...
Click to collapse
Re-applied just now and it seems to without any issues.
Any way to use system table or other means to allow adaptive refresh when battery saver is enabled? Even if peak is still 60 fps with battery saver on, seems like it would still improve battery life to have it drop down to 24 or whatever it normally does when there is no motion, though I may be completely wrong.
Why can't Samsung give what we want in the first place? Why don't we have the freedom of choosing what refresh rate our phones runs on, like for ffs
pschoolmeester said:
Any way to use system table or other means to allow adaptive refresh when battery saver is enabled? Even if peak is still 60 fps with battery saver on, seems like it would still improve battery life to have it drop down to 24 or whatever it normally does when there is no motion, though I may be completely wrong.
Click to expand...
Click to collapse
Not that I could find.. They fixed system table modifications for what you're asking for with One UI 4.0's release. Galaxy Max Hz App *might* be able to accomplish this but I'm not entirely sure.
AmmarHaseeb said:
Why can't Samsung give what we want in the first place? Why don't we have the freedom of choosing what refresh rate our phones runs on, like for ffs
Click to expand...
Click to collapse
The Beta Moderator's reasoning was that the phone's hardware couldn't handle the screen running up to 120Hz in every single activity.. part of that is proven incorrect and the rest I can't vouch for because no matter what I do some apps just refuse to go higher than 60Hz.

Categories

Resources