[ROM][6.0.1] Unlegacy Android 6.0.1/Lineage-13.0 For A2109 [2017-05-28]

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
HDMI-out works fine for me.
Thanks very much for testing!

Open bugs:
  • Freeze upon wireless display disconnect
  • Spurious reboots on charger connect while sleeping (REGRESSION)
  • Video recording limited to 720p, preview limited to 480p (REGRESSION)
  • Low bass audio levels on headphone audio (REGRESSION)
  • Screen recording has no sound
  • Sometimes seems to have very low framerate for a while... (REGRESSION)
  • High battery use
New functionality since Lollipop
  • Adoptable storage for sd-card
  • Wireless display
  • Screen recording
So, we have regressions, but they're not severe, and we have new features. Seems to me that marshmallow currently outweighs lollipop. I already moved from CM to LineageOS, its successor. Agreed? If yes, then I'll put up may latest build and call it mostly stable.

Follow-up question - how should the todo-list be prioritised?
  • Backport kernel security patches since July 2016
  • Fix regressions
  • Fix other open bugs
  • Start Nougat
 
Last edited:

JLP

Member
Feb 20, 2017
3
0
Hi PJBrs. First up, a big thank you for all the hard work you have put into this project - outstanding!
I've been using your CM11 rom for a while no and it's so much better than the stock rom. I tried your CM12 ROM but had lag and freezing problems (I'm probably loading too any apps!) - so went back to the CM11 ROM that works for my needs. This week I tied your latest CM13 rom (20170214) and thought brilliant, everything I need is working really smooth and fast - then I noticed that something was up with the sound. When I plug external speakers in to the headphone out all the bass is lost and the sound is very mid and treble biased - I've tried your first CM13 rom (20170112) and the sound is good, as is the sound on your CM11 rom. Back to the latest CM13 ROM and further testing shows that the bass response is ok on internal speakersspeakers and good on a set of borrowed bluetooth speakers - could something you did to enable bluetooth sound have affected the headphone out sound? I hope this is an easy fix as I only have wired speakers and would love to be able to use your lastest rom (I use the tablet for music & media a lot so good sound is very important).
Anyway, thanks again for giving this tablet a new lease of life & I'm looking forward to trying out any new roms in the future :)
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
Hi PJBrs. First up, a big thank you for all the hard work you have put into this project - outstanding!
I've been using your CM11 rom for a while no and it's so much better than the stock rom. I tried your CM12 ROM but had lag and freezing problems (I'm probably loading too any apps!) - so went back to the CM11 ROM that works for my needs. This week I tied your latest CM13 rom (20170214) and thought brilliant, everything I need is working really smooth and fast - then I noticed that something was up with the sound. When I plug external speakers in to the headphone out all the bass is lost and the sound is very mid and treble biased - I've tried your first CM13 rom (20170112) and the sound is good, as is the sound on your CM11 rom. Back to the latest CM13 ROM and further testing shows that the bass response is ok on internal speakersspeakers and good on a set of borrowed bluetooth speakers - could something you did to enable bluetooth sound have affected the headphone out sound? I hope this is an easy fix as I only have wired speakers and would love to be able to use your lastest rom (I use the tablet for music & media a lot so good sound is very important).
Anyway, thanks again for giving this tablet a new lease of life & I'm looking forward to trying out any new roms in the future :)
First, thanks for testing!

I'm afraid you just found another regression. And unfortunately this is hard to fix. I didn't do much to fix bluetooth audio. The only thing I did was, I took the audio HAL from a different tablet with the same chipset as ours. Problem is, most of these HAL's are proprietary, closed source software, so I don't know how to change anything about it. I do think I have the sources (somebody leaked them, I can't share since I don't have the license to do so), so I can try to find out what the HAL does when the headphone is inserted. I can also compare the audio hardware registers to find differences between lollipop and marshmallow.

In the meantime, as a workaround I suggest that you fiddle with the settings in the AudioFX app. I was able to boost bass a lot that way.
 

joebine

Senior Member
Jan 14, 2015
150
32
I had tested a bit the last build. I had 1 freeze after about 1 hour of play time... not too bad anyway. For the rest, it was running smootly.

I found that it will no go to deep sleep. I charged it yesterday night, unplug it and leave the tablet on the counter. Today, the battery was at 77% and I didn't used it today.

Follow-up question - how should the todo-list be prioritised?

I thing that you should fix the regression first. We have now a very smooth and fast OS and worth to be fixed.
 

JLP

Member
Feb 20, 2017
3
0
First, thanks for testing!

I'm afraid you just found another regression. And unfortunately this is hard to fix. I didn't do much to fix bluetooth audio. The only thing I did was, I took the audio HAL from a different tablet with the same chipset as ours. Problem is, most of these HAL's are proprietary, closed source software, so I don't know how to change anything about it. I do think I have the sources (somebody leaked them, I can't share since I don't have the license to do so), so I can try to find out what the HAL does when the headphone is inserted. I can also compare the audio hardware registers to find differences between lollipop and marshmallow.

In the meantime, as a workaround I suggest that you fiddle with the settings in the AudioFX app. I was able to boost bass a lot that way.

Thanks for your reply to my post. Shame that this is a hard fix - oh well. I've flashed back to your CM11 rom for now - as everything I need works really well. But I'll switch back this weekend if I get the time and play with the AudioFX app.
Thanks again for all your hard work :)
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
Some progress (not tested very well).

I think I have fixed the spurious reboots on charger connect while sleeping by backporting a number of patches from the 3.10 tegra kernel (Nexus9). Tested about 15 times without problem (then again, this being spurious it's hard to tell whether it's really gone...). I also think I fixed the low bass audio levels, by going back to the stock audio HAL. That was a difficult one. Further testing pointed out the following:
  • The audio wrapper that I used to fix old HAL incompatibility causes bluetooth audio not to work under marshmallow
  • The new audio HAL that I used had the headphone bass problem
  • The old, stock audio HAL didn't load because it didn't satisfy a version check (and it needs more patches)
I added patches for old (JellyBean 4.1, aka MR0) audio HAL compatibility and I disabled the HAL version check, and then it worked. Conclusion: our stock audio HAL does something specific for headphone jack bass levels that other compatible audio HALs don't. Incidentally, this also fixed audio in screen recording.

Next, @joebine reported a lack of deep sleep. I noticed in dmesg that, indeed, the tablet never seems to switch to its low power CPU cluster. I think it did before with marshmallow, and I'm quite sure that this is caused by the newer gralloc and hwcomposer HALs that I took the wexler tab qc750. I'm working on this, might have to switch back to stock gralloc and hwcomposer, but that would really be a shame, because the new HALs seem to offer a much improved, smoother experience.

Current bug status (excluding fixed and probably currently fixable):
  • Freeze upon wireless display disconnect
  • Video recording limited to 720p, preview limited to 480p (REGRESSION)
So, one more regression to go. But that's a very hard one...

Finally, @joebine, LineageOS has one difference with CM - it's no longer prerooted. For the rest, they're the same. Expect a new build later this week.
 
Last edited:

Reidless

Member
Nov 14, 2016
18
0
I haven't seen many issues other than some slow downs. I had the rotation problem at one point but it hasn't showed up in a while. I use this tablet almost everyday at work, mainly for reading PDFs from cloud storage, but it has also been used for some Math games (I'm a math teacher), and occasionally I use it to play movies when traveling. The one issue I see is when trying to use an app that accesses the camera (Photomath). The app takes pictures of math problems and solves them, but it states there is no camera to connect to. The issue happened in the Lollipop build as well.

I cast my vote for working on nougat. Just about everything I need works on it, minus the camera connecting to the app, but I rarely even use that app (to show teacher aides how to use it and help the students).
 
Last edited:

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
Hmmmmmm..... @Reidless, how is your battery doing?

About the camera - let me think aloud for a bit.
  • On lollipop everything was fine
  • On marshmallow, previewsize and videosize act weird
Cause may reside either in new incompatibilities in the android code (google's code) or differences between the lollipop and marshmallow device trees (our code). To rule out differences in the device tree out more, I'll minimise the differences between the lollipop and marshmallow device trees, being:
  • marshmallow uses libkaicompat, lollipop uses patches in frameworks
  • marshmallow uses a new interposition library to work around new security stringencies in marshmallow, libdgv1.
  • marshmallow prescribes that vendor blobs reside in /vendor/lib, lollipop allows them in both /system/lib and /vendor/lib
  • Of course, marshmallow uses kernel 3.4. I tested lollipop with 3.4 and the camera works well with it.
I'll fiddle some more with the camera first. Also, I don't want to put out a release with deep sleep issues. If new HALs have caused deep sleep issues, then I'm very sorry, because it means going without display casting and screen recording...

*** EDIT ***

First thing I did was to add a camerawrapper to lollipop. If nothing else, this shows what commands are forwarded to the camera. It seems as if the camera gets reset behind our backs, because some of the commands are in the right direction, but then they more or less get reverted or something... I mean, the camerawrapper itself shows a difference in commands called into it between lolllipop and marshmallow, suggesting that indeed there is something wrong in marshmallow - the same HAL receives different calls...

*** EDIT 2 ***

Previoius edit might be wrong. @joebine, the deep sleep issue was caused by the USB fixes...
 
Last edited:

Reidless

Member
Nov 14, 2016
18
0
Battery seems fine. I haven't had it die early. If anything, it seems the battery lasts longer. I had the tablet sleeping for a whole week and it still had about 50% left.

The camera works in the normal camera app, it just wont make a connection in that math app. I think it actually says "no supported camera". It also said that in the lollipop build but i believe the camera worked for that app in the kitkat build.
 

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
This is a test report. I try to make lollipop vendor blobs like marshmallow as much as possible. For every step along the way I check camera function and deep sleep. I'll update this post as I go along.

TestVideo recording problems?Deep sleep issues?
Stock lollipopNoNo
Lollipop with camerawrapperNoNo
... and wexler gralloc and hwcNoNo
... blobs moved to /vendor/libNoNo
[TBODY] [/TBODY]

Unfortunately libdgv1 (that works around marshmallow selinux strictures to load some vendor blobs) doesn't work on lollipop (well, I can't get it to work). So now I'm working the other way simplifying the libkaicompat alternative to patching frameworks in marshmallow.

Perhaps there is another way to set the right camera mode as well...
 
Last edited:

PJBrs

Senior Member
Developer
Dec 29, 2014
480
405
I THINK I FIXED THE CAMERA!!!!! WOOHOO!!!

Nothing really hard, I removed something from libkaicompat and added it back as a patch to frameworks. Also, I think I improved my usb patch, needs further testing, but it seems to allow deep sleep. ALMOST THERE!!!
 

joebine

Senior Member
Jan 14, 2015
150
32
I am very excited to test your last build because, since then, it is the most fast and stable build ever.

Thank you again for your hard work @PJBrs
 
Top