[KERNEL][AOSP/TW][27 Dec] War Kernel r3 // colder than ever

snow

Senior Member
Oct 14, 2010
204
305
103
26
www.mozilla.ro
Thanks. Well, it's pretty clear that hwcomposer isn't working because libhdmiclient.so is missing, see line 737. I'm 99% sure you'll have problems with missing ioctls in the kernel after you get it to load. :D
Yeah, I saw that and I tried to add missing file(s) [because are more than just one]. :)

More recent logcat:
E/HAL ( 1896): dlopen failed: could not load library "libhdmiclient.so" needed by "hwcomposer.exynos4.so"; caused by could not load library "libTVOut.so" needed by "libhdmiclient.so"; caused by could not load library "libhdmi.so" needed by "libTVOut.so"; caused by could not load library "libcec.so" needed by "libhdmi.so"; caused by library "libcec.so" not found
So far these files are working:
lib/hw/hwcomposer.exynos4.so
lib/libExynosHWCService.so
lib/libExynosIPService.so
lib/libhwconverter.so
lib/libhdmi.so
lib/libhdmiclient.so
lib/libTVOut.so
lib/libedid.so
lib/libddc.so


Copied libcec.so into device, but it seems is not working for our device (after SAMSUNG logo just black screen). :p
 
  • Like
Reactions: GeeckoDev

GeeckoDev

Senior Member
Feb 26, 2013
458
3,331
0
Yeah, I saw that and I tried to add missing file(s) [because are more than just one]. :)

More recent logcat:


So far these files are working:
lib/hw/hwcomposer.exynos4.so
lib/libExynosHWCService.so
lib/libExynosIPService.so
lib/libhwconverter.so
lib/libhdmi.so
lib/libhdmiclient.so
lib/libTVOut.so
lib/libedid.so
lib/libddc.so


Copied libcec.so into device, but it seems is not working for our device (after SAMSUNG logo just black screen). :p
It's too early to give up. Do you have a logcat up to this point?
 

snow

Senior Member
Oct 14, 2010
204
305
103
26
www.mozilla.ro
It's too early to give up. Do you have a logcat up to this point?
Nope, but I will test tommorow again and I will post logcat.
Almost forgot.... One weird thing is that when I copied some files and rebooted, I've lost network signal and I got error when trying to search/select network (I think kernel-related issue; happens without Nameless ROM files). :)

EDIT: It seems I have a logcat saved on PC. :D Last logcat from a working device: http://pastebin.com/rDkiKT7w :)
P.S.: I have "refresh rate = 60.00 Hz" because I added your gralloc fixed on my S2 which works without any issue! :D

EDIT 2: Hmmm... I got logcat after black screen (copied libcec.so). Very interesting logcat is here: http://pastebin.com/Actt60BL
I copied all the files I mentioned in my earlier post + libcec.so :D
 
Last edited:

GeeckoDev

Senior Member
Feb 26, 2013
458
3,331
0
Nope, but I will test tommorow again and I will post logcat.
Almost forgot.... One weird thing is that when I copied some files and rebooted, I've lost network signal and I got error when trying to search/select network (I think kernel-related issue; happens without Nameless ROM files). :)

EDIT: It seems I have a logcat saved on PC. :D Last logcat from a working device: http://pastebin.com/rDkiKT7w :)
P.S.: I have "refresh rate = 60.00 Hz" because I added your gralloc fixed on my S2 which works without any issue! :D

EDIT 2: Hmmm... I got logcat after black screen (copied libcec.so). Very interesting logcat is here: http://pastebin.com/Actt60BL
I copied all the files I mentioned in my earlier post + libcec.so :D
It's handy to look at the android_hardware_samsung commit history to see what needs to be updated. This looks related to the crash you're getting.

Copy gralloc, libfimg and libfimg. ;)

Edit: for reference, here's what the logcat should look like once it's working http://pastebin.com/cbdJigNj
 
Last edited:

snow

Senior Member
Oct 14, 2010
204
305
103
26
www.mozilla.ro
It's handy to look at the android_hardware_samsung commit history to see what needs to be updated. This looks related to the crash you're getting.

Copy gralloc, libfimg and libfimg. ;)

Edit: for reference, here's what the logcat should look like once it's working http://pastebin.com/cbdJigNj
I copied gralloc, libfimg and libfimg. Somehow after 5 minutes, device booted up (after about 2 bootloops; image stuck after 1-2 sec [I just saw half of cyanogenmod text, not even the logo of CM 11]; [second boot was a little bit better, I saw cyanogenmod text and logo, logo was a little bit dark, blue to black color]; it remains stuck a lot of seconds). Finally it booted. But it works really slow, I mean there's a big lag. Is not loading wallpaper, I see just black wallpaper. System is working, but when I try to "unsleep" (aka wake up) phone, I can see just clock, battery and signal (no lockscreen, rest of screen black). First 20 secs (When I "wake up" phone from lock screen) was a working phone (with lag, but somehow it worked). Device is up, but I can't do anything. Logcat here (when I was stucked): http://pastebin.com/8CAiYC31 And another logcat when device already booted: https://paste.ee/p/UKOUy

One funny thing (and weird at the same time) is that I hear lock sound (that sound when you press lock button) at every 3 seconds. I'm scared :D [happened only once]

EDIT: It reboots suddenly.

EDIT2: Sometimes boots, sometimes not. :D

Anyway, what means "E/SECHWC_LOG( 4322): runCompositor:stretch failed retry#XYZ"? (XYZ represents any number). I see this message spammed in logcat. :)
 
Last edited:

GeeckoDev

Senior Member
Feb 26, 2013
458
3,331
0
I copied gralloc, libfimg and libfimg. Somehow after 5 minutes, device booted up (after about 2 bootloops; image stuck after 1-2 sec [I just saw half of cyanogenmod text, not even the logo of CM 11]; [second boot was a little bit better, I saw cyanogenmod text and logo, logo was a little bit dark, blue to black color]; it remains stuck a lot of seconds). Finally it booted. But it works really slow, I mean there's a big lag. Is not loading wallpaper, I see just black wallpaper. System is working, but when I try to "unsleep" (aka wake up) phone, I can see just clock, battery and signal (no lockscreen, rest of screen black). First 20 secs (When I "wake up" phone from lock screen) was a working phone (with lag, but somehow it worked). Device is up, but I can't do anything. Logcat here (when I was stucked): http://pastebin.com/8CAiYC31 And another logcat when device already booted: https://paste.ee/p/UKOUy

One funny thing (and weird at the same time) is that I hear lock sound (that sound when you press lock button) at every 3 seconds. I'm scared :D [happened only once]

EDIT: It reboots suddenly.

EDIT2: Sometimes boots, sometimes not. :D

Anyway, what means "E/SECHWC_LOG( 4322): runCompositor:stretch failed retry#XYZ"? (XYZ represents any number). I see this message spammed in logcat. :)
Nice progress. What you describe is somehow what happens when we try to run new Insignal's HWC without the new kernel. I think it's caused by fences timing out, or failed s3cfb ioctls, because this kernel driver on 4210 devices is not meant to run with this HWC.

4x12 HWC and 4210 HWC are different as the first one uses fences for compositing, and the second one doesn't, among other things. So s3cfb must be built as if it was a 4412 device. Take a look in the kernel: drivers/video/samsung/s3cfb_main.c and drivers/video/samsung/s3cfb_ops.c. You will see a lot of #ifdefs that compile different code paths for 4210 and 4x12.

For example, here, s3cfb_map_video_memory() does nothing on 4x12 (probably done in userspace). Another example, here the S3CFB_WIN_CONFIG ioctl is entirely disabled on 4210. I think it's required for this HWC.

Can you send me a zip archive containing all the libraries you flashed? I'll see what I can do for the kernel, unless you wanna do it. Thanks a bunch :)
 

snow

Senior Member
Oct 14, 2010
204
305
103
26
www.mozilla.ro
Nice progress. What you describe is somehow what happens when we try to run new Insignal's HWC without the new kernel. I think it's caused by fences timing out, or failed s3cfb ioctls, because this kernel driver on 4210 devices is not meant to run with this HWC.

4x12 HWC and 4210 HWC are different as the first one uses fences for compositing, and the second one doesn't, among other things. So s3cfb must be built as if it was a 4412 device. Take a look in the kernel: drivers/video/samsung/s3cfb_main.c and drivers/video/samsung/s3cfb_ops.c. You will see a lot of #ifdefs that compile different code paths for 4210 and 4x12.

For example, here, s3cfb_map_video_memory() does nothing on 4x12 (probably done in userspace). Another example, here the S3CFB_WIN_CONFIG ioctl is entirely disabled on 4210. I think it's required for this HWC.

Can you send me a zip archive containing all the libraries you flashed? I'll see what I can do for the kernel, unless you wanna do it. Thanks a bunch :)
Sure! Archive is attached! :D
 

Attachments

smokeyrider

Senior Member
Aug 6, 2012
152
54
48
Maclean
R4 working OK for me. no boot animation but kernel runs smooth with very little lag. Just my opinion. Thanks for your hard work.

---------- Post added at 03:47 PM ---------- Previous post was at 03:46 PM ----------

Meant r4TW.
 

BarelyPosting

Member
Dec 11, 2014
26
10
0
I tried the r7 4.4 on SlimSaber 4.4, and it was a wow. Fast, fluid and stable for me. Question, is it possible to have an increase frequency of GPU? I mean, the 160-267 is already fast, well for UI and other stuff, but it's not that sufficient for HD graphics games. Been dying to try it for quite some time now (4.4's updated mali drivers + 400mhz gpu). :p
 

GeeckoDev

Senior Member
Feb 26, 2013
458
3,331
0
Last edited:

abufrejoval

Senior Member
Dec 26, 2010
135
98
0
Frankfurt
Could you please do a TRIM enabled variant?

Cher Clément!

I know it's been asked for before...

Perhaps Lanchon and you could get together to allay your fears?
He seems quite sure to have fixed the problem...
http://forum.xda-developers.com/gal...kernel-trim-speed-cyanogenmod-galaxy-t2875730

While TRIM automation has only been introduced with Android 4.3, it's been available quite a while longer via 'fstrim' on the busybox command line and I've used it for years now on a huge variety of devices right back to Ice Cream Sandwich.

And it has turned out a life saver for devices with really slow eMMC, that have seen lots of update on constrained storage (e.g. my Notion Ink Adam or my Nexus 7-2012).

My N7000 also has the affected eMMC, but luckily never got hurt by a careless kernel.

My fear is that without TRIM support in the kernel, not even a full wipe will actually ever tell the flash chips, that it's allright to assume some blocks as empty, causing unnecessary write amplification even on storage that is logically completely empty. You need spare area allocation in excess of 30% to survive that in the long run according to my tests on SSDs.

And since with LP even TW will(/should?) include TRIM mechanics, it's perhaps even more useful to revisit the topic: Don't you agree?

Cordialment, Thomas
 
Last edited:

bladecgn

Senior Member
Mar 9, 2005
128
33
0
Essen / Germany
Instaled R8 Omni on SlimSaber: Scrolling sometimes a little chopy, SlimSaber original kernel is better in this regard. Maybe a new gralloc would improve the situation.

I agree, trim capability would be nice.
 

GeeckoDev

Senior Member
Feb 26, 2013
458
3,331
0
Cher Clément!

I know it's been asked for before...

Perhaps Lanchon and you could get together to allay your fears?
He seems quite sure to have fixed the problem...
http://forum.xda-developers.com/gal...kernel-trim-speed-cyanogenmod-galaxy-t2875730

While TRIM automation has only been introduced with Android 4.3, it's been available quite a while longer via 'fstrim' on the busybox command line and I've used it for years now on a huge variety of devices right back to Ice Cream Sandwich.

And it has turned out a life saver for devices with really slow eMMC, that have seen lots of update on constrained storage (e.g. my Notion Ink Adam or my Nexus 7-2012).

My N7000 also has the affected eMMC, but luckily never got hurt by a careless kernel.

My fear is that without TRIM support in the kernel, not even a full wipe will actually ever tell the flash chips, that it's allright to assume some blocks as empty, causing unnecessary write amplification even on storage that is logically completely empty. You need spare area allocation in excess of 30% to survive that in the long run according to my tests on SSDs.

And since with LP even TW will(/should?) include TRIM mechanics, it's perhaps even more useful to revisit the topic: Don't you agree?

Cordialment, Thomas
I'm considering it. I thought TRIM wouldn't work at all on brickbug affected devices but it doesn't seem to be the case, so that's definitely interesting!