Thursday, November 17, 2016

NEW BUILD! CyanogenMod 13 for the Huawei P9 Lite

From day 1 we have been operating without a hwcomposer. We have also been experiencing a lot of minor graphical type issues and everyone ( and I mean everyone ) assumed that it was because of the missing hwcomposer. Well, I learned long ago that just because "A" precedes "B" doesn't mean that "A" causes "B". I knew that the hwcomposer was insignificant because codinalte runs just fine without one and I did a little experiment. I deleted the hwcomposer on stock and rebooted. Guess what? It ran just fine! There was absolutely no change in the way Stock operated visually that I could detect. So the question remained, "What is causing these minor graphical issues?"

So, finally, since everyone assumed it was the hwcomposer, I thought I'd write one. I personally thought there might be a problem with vertical synchronization and the hwcomposer (can) be responsible for that, but during my debugging, I noticed that the default number of surface buffers in surfaceflinger was 2. In the back of my mind I already knew this and 2 buffers has always been enough for my previous devices but something made me decide to experiment with it. So, I bumped it up to 6. Then I tested. I must say that the graphical glitching was plaguing me. I tried so many different things to try to get it fixed and every time, I thought, "It's fixed!"; Boom it would happen again. So, I kept expecting it to happen again but it never did! All it took was bumping the surface buffers to 6. Not really hwcomposer related at all. I'm so glad I took my time and followed my instincts.

Since that was fixed I buttoned up the hwcomposer that I wrote and it works just fine. I'm uncertain about the vsync implementation. When enabled, surfaceflinger quickly decides that it's not needed and turns it off and indeed, it may not be needed because visually, everthing looks awesome.

This build also has a new opensource power HAL that I wrote. I must say that I'm quite happy with the results but it's effectiveness will depend on usage. Please let me know about your "battery life" experiences. Is it better/worse than before? Is it better/worse than stock?

Battery modes now available in Settings.

Wifi/BT off, 2g no data, balanced power profile, no gapps

Wifi/BT off, 2g no data, balanced power profile, no gapps

I also had a chance to test A2DP and for me it's working perfectly.

I also fixed Screencast and no, the issue is not related to hwcomposer. It was a media codecs issue. Our hw stagefright codecs do not play nice with standard color formats. So, I just modified the "/etc/media_codecs.xml to prefer google codecs over our hw codecs.

Download and more details on the download page as always.

No comments:

Post a Comment