Disable HW overlays + force gpu rendering

Search This thread

molesarecoming

Inactive Recognized Developer
Feb 12, 2012
7,532
27,173
Berlin
What is the purpose/benefit of these options?

rendering a view goes through layers or abstractions, even passing through dedicated hardware doing the job. hardware overlay allows the renderer to take a couple of regions aside and treat them optimized. then theres the cpu and gpu. usually android decides which abstraction is best for each view, taking things like transparency into account and what not. you switch hw overlays off, project butter goes out of the window but cpu and gpu still do the job. you force gpu, the composition will be done by your gfx chip. just don't touch it - its meant for developers picking up debugging output.
 
Last edited:

DEV_Geek

Member
Apr 21, 2013
17
2
Root

rendering a view goes through layers or abstractions, even passing through dedicated hardware doing the job. hardware overlay allows the renderer to take a couple of regions aside and treat them optimized. then theres the cpu and gpu. usually android decides which abstraction is best for each view, taking things like transparency into account and what not. you switch hw overlays off, project butter goes out of the window but cpu and gpu still do the job. you force gpu, the composition will be done by your gfx chip. just don't touch it - its meant for developers picking up debugging output.

I am rooted, and I'd like to know wether this does improve performance of the CPU cuz the GPU is rendering the stuff. I don't care about the battery.
Thanks in advance
 

shaktishekhar

Senior Member
Apr 10, 2012
664
697
Mumbai
sgatechwork.blogspot.in
Make Disable HW Overlays Pernment

View attachment 91fixoverlays.zip

Script To Make Disable Hardware Overlays Permanently On Boot use the script using init.d or script manager or boot shell :laugh:

Code:
#!/system/bin/sh

(while :
do
    sf=$(service list | grep -c "SurfaceFlinger")

    if [ $sf -eq 1 ]
    then
        service call SurfaceFlinger 1008 i32 1
        break
    else
        sleep 2
    fi
done
) &
 

Crwolv

Senior Member
Mar 28, 2012
1,265
434
Metro Detroit
www.reverbnation.com
You won't notice any considerable improvements. But can cause unintended side effects in apps (mainly embedded images not displaying)

Sent from my Nexus 4 using xda app-developers app

dear Mr Alex you are right you may not notice any discernible difference but you free up to cpu to do more especially if you're writing intensive apps.my advice keep it on free that cpu baby
 
  • Like
Reactions: amit ad

Miustone

Senior Member
Jul 23, 2012
3,355
6,184
30
Google Pixel 7 Pro
How to run the script?

Simple way is to use a working init.d script. Open it using a Text Editor and erase all lines. Copy the lines from sgatechwork to the file and save it to /system/ect/init.d. There are some Apps to emulate init.d if your ROM/Kernel does not support it.
But if you don't know how to use it, why do you want to use it? Do you know what it does? :rolleyes:

Thanks @sgatechwork !:cowboy:
 

JazzMartian

Senior Member
Feb 10, 2015
133
33
Nvidia Shield
Samsung Galaxy S10+
How to run the script?

Odd. I don't recall ever seeing or posting in this thread, and I haven't installed the script. Seems about par for the course for me. Anyways, I read about it, and it sounds like a nifty script. Since you say script (and I would concur, based on the lack of a file ext., and the file size)... it would be placed in the init.d folder in system/etc/init.d, as long as your kernel supports init.d. If not, there are apps to run scripts w/o init.d support. The one I know of is Boot Shell [ROOT]. Also, there's an app that lets you choose which folder you wanna run your scripts from, called init.d Scripts Support. However, the most recommended init.d managing app, based off of what I've read most people recommending, is Script Manager - SManager (there's also a paid ad-free version Script Manager-SManager(NoAds)). Hopefully at least some of this is found helpful. Sorry the response is so late. :?
 

diabolicalprophecy

Senior Member
Jul 5, 2012
150
13
Hi there. I wonder if it's possible to disable GPU rendering in lollipop. My phone is still using gpu to draw the UI even after I uncheck 'disable HW overlays' from developer options. I am having lag issues while playing games. I think it's because System UI is always using GPU and as a result my games are laggy, but those same games work perfectly fine on kitkat without any lags.
I can see GPU usage curve spiking from 40% to 80% all the time in system monitor.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Make Disable HW Overlays Pernment

    View attachment 91fixoverlays.zip

    Script To Make Disable Hardware Overlays Permanently On Boot use the script using init.d or script manager or boot shell :laugh:

    Code:
    #!/system/bin/sh
    
    (while :
    do
        sf=$(service list | grep -c "SurfaceFlinger")
    
        if [ $sf -eq 1 ]
        then
            service call SurfaceFlinger 1008 i32 1
            break
        else
            sleep 2
        fi
    done
    ) &
    13
    What is the purpose/benefit of these options?

    rendering a view goes through layers or abstractions, even passing through dedicated hardware doing the job. hardware overlay allows the renderer to take a couple of regions aside and treat them optimized. then theres the cpu and gpu. usually android decides which abstraction is best for each view, taking things like transparency into account and what not. you switch hw overlays off, project butter goes out of the window but cpu and gpu still do the job. you force gpu, the composition will be done by your gfx chip. just don't touch it - its meant for developers picking up debugging output.
    3
    You won't notice any considerable improvements. But can cause unintended side effects in apps (mainly embedded images not displaying)

    Sent from my Nexus 4 using xda app-developers app
    1
    You won't notice any considerable improvements. But can cause unintended side effects in apps (mainly embedded images not displaying)

    Sent from my Nexus 4 using xda app-developers app

    dear Mr Alex you are right you may not notice any discernible difference but you free up to cpu to do more especially if you're writing intensive apps.my advice keep it on free that cpu baby
    1
    View attachment 2741805
    Script To Make Disable Hardware Overlays Permanently On Boot use the script using init.d or script manager or boot shell :laugh:
    Thanks so much, it worked nicely on my Sony Xperia S (aka Lt26i) on stock rom, with init.d support (Universal init.d support)
    :good: