[KERNEL][USBHOST+LIVECOLOR][11/10] EternityProject Kernel 3.4.37 for LG Optimus 4X HD

Status
Not open for further replies.
Search This thread

kholk

Retired Recognized Developer
May 20, 2007
2,293
3,828
Torino
Welcome to the EternityProject's Kernel for LG Optimus 4X HD Thread!

What is it?
It is a custom kernel with some updates and optimizations on Tegra3 platform and Cortex A9 MPCore management drivers.

Why should I flash it?
You should flash it only if you know what are you doing. Remember that it works only on LG Optimus 4X HD with unlocked bootloader.
If you know what are you doing, you shouldn't ask this question.

Flashing methods:
1. Copy the archive on your internal/external memory.
2. Reboot to CWM
3. Flash it
4. Enjoy!

Features:
-- Memory and cache management optimizations
-- Modified Cortex-A9 (Tegra 3 core)'s cache behavior.
-- EternityProject Tegra 3 CPU Manager
-- Latest Tegra drivers
Great results on tests.

Changelog:
Code:
v1.0RC1
- Cleaned up touchscreen driver
- Added Android 4.3 kernel patches
- Auditing and SELinux support
- Enabled SmartDimmer (dummy, but makes nV blobs happy)
- TTY buffer size reduced to 4096
- Baseband random faults (usb-related) fixed
- USB Host activation code has been extended (cause of bb faults)
v0.20
- Fix topdown memory allocation bug
- Enable Contiguous Memory Allocator
- Updates to Security layer (for Android 4.3 compat)
v0.16 - Beta 7
- Fix EternityProject LiveColor disable bug
- Compile in FIOPS I/O Scheduler
- Definitely fix vibrator for CyanogenMod
v0.15 - Beta 6
- Support BlueSleep for BlueDroid (for CM BT)
- Fix CM Torch app
v0.14 - Beta 5
- Fixed baseband weirdness when display off
- Implemented NFC power management
- Increased audio gain (max volume)
- Updates to USB framework
- Updates to workqueues (now lighter!)
v0.13b - Beta 4
- Increased vibrator duty for CM
- Enabled GPU overclock @584MHz by default
v0.13 - Beta 4
- Include eprjdemand governor
- Stabilization code for baseband
- Update to EPRJScheduling for CPU Manager: Lighter on CPU
- Trial to solve data connection issue after suspend
- Fixed bug on timed_output for CM
- Enable UHID for CM BT
- Latest vanilla GeForce ULP drivers (GPU)
- Unlinked shared bus
v0.11 - Beta 2
- New feature: EternityProject LiveColor (enabled by default)
- EternityProject ChargerBoost now working on X3
- Added timed_output interface for CM vibrator
- Use deadline iosched as default
v0.10 - Beta 1
- Battery life greatly improved compared to 0.02
- USB Host Mode functionality implemented
- NFC support implemented
- GPU @584MHz
- Wakelocks are now a lot less aggressive
- USB wakelock issue solved
- Bluetooth seems to be working perfectly now
v0.02 - Alpha
- Phone call bug solved
- Brightness setting bug on LGE ROM solved
- Battery temperature is now reported correctly
- Headset detection and headset button implemented
v0.01 - Development Snapshot, pre-alpha
- Remember: this is buggy as hell.
- EternityProject Tegra 3 CPU Manager
- EternityProject eprjdemand governor
- EternityProject sysfs Tools
- EternityProject Hybrid ClusterSwitch
- Optimized ARM routines
- Other optimizations here and there (I am too lazy to list)
- Removed useless debugging

Various notes:
Taking screenshots:[/b]
Due to the bad hardware implementation of the power key, we've had to use bad hacks for its software implementation.
Since it is directly connected to the PMU, it is only firing IRQs and that means we didn't use the normal GPIO implementation, requiring you to use a little trick for taking screenshots on Android.
We're sorry for that, but I've had to make it (speaking about code) as light and as proper as possible, avoiding to use the really bad hacks that LGE used to write.
That's how that has to be done:
1. Press POWER KEY
2. Wait (one second) for the keys backlight to switch ON
3. Press VOLDN
4. Screenshot taken.

Using the new EternityProject Features:

Download our EternityTweak app from Play Store or do it manually... :°)

EternityProject's USB Host Mode for LGE X3:
Due to hardware problems, I wasn't able to make you use normal ways of enabling it, so, here's what you need to do:
1. Activate USB Host Mode on EternityTweak (or "echo 1 > /sys/eprjmanager/usb_host_mode" from terminal emulator)
2. Connect an USB charger (or anything that provides VBUS IN -- a custom EternityProject hardware is about to come)
3. Disconnect the USB charger and connect the OTG cable with your USB device
4. Enjoy USB Host

EternityProject ChargerBoost:
By default, your devices allows to get 1A current only from AC adapters. With EternityProject ChargerBoost, you can allow the device to take 1A (fast charge) from your PC's USB, too!
Enable ChargerBoost: echo 1 > /sys/eprjmanager/charger_boost
Disable ChargerBoost: echo 0 > /sys/eprjmanager/charger_boost

NOTE: DETACH your USB cable prior enabling/disabling ChargerBoost, otherwise it won't work!

EternityProject LiveColor:
LiveColor makes you able to enhance your display with its calibration profile.
It applies a color lookup table to provide brilliant colors and better contrast.
Enable LiveColor: echo 1 > /sys/eprjmanager/livecolor
Disable LiveColor: echo 0 > /sys/eprjmanager/livecolor

NOTE: The LiveColor functionality is enabled by default.


EternityProject PowerLock (lock in LP mode!):
Lock in LP mode: echo 1 > /sys/eprjmanager/power_lock
Unlock to auto G/LP: echo 0 > /sys/eprjmanager/power_lock


EternityProject Benchmark Mode:
echo 0 > /sys/module/eprj_t3_cpumanager/parameters/auto_hotplug
echo 1 > /sys/devices/system/cpu/cpu0/online
echo 1 > /sys/devices/system/cpu/cpu1/online
echo 1 > /sys/devices/system/cpu/cpu2/online
echo 1 > /sys/devices/system/cpu/cpu3/online
echo 1 > /sys/eprjmanager/friedeggs

P.S.: Commands to be entered on Terminal Emulator, Script Manager (maybe), or ADB.


Downloads
EternityProject Kernel 3.4.37 for LG Optimus 4X HD: EternityProject Website

NOTE: Make sure to download the right kernel for your ROM (Stock/CM)!



Git:
The EternityProject public repositories are self-hosted at http://pubgit.eternityproject.eu



Enjoy!

The EternityProject Team Manager & Main Developer,
--kholk
 
Last edited:

king123321

Senior Member
Sep 24, 2008
467
69
hey Enterny its AmitMatok from twitter, I wiped cache but now it is stuck on CyanogenMod logo mode what should I do ? should I wipe all partitions and install CM10.1 again and then install your kernel on it ?
 

JoinTheRealms

Senior Member
Apr 7, 2012
1,940
1,303
I tried it on cm10 but it got stuck at android is upgrading - starting apps, did you have to overvolt much to achieve the 1.7ghz overclock?
 

timon12

Senior Member
May 24, 2009
223
41
Poznan
its working on v20a, no bootloops etc.


btw: nice joke ;)

gonna test it out with some games!


edit: cant test anything :(
all data is now in sdcard0/0 folder
 
Last edited:

leolipop

Senior Member
May 26, 2004
232
31
Athens
Ηow long does it take for the device to boot after flashing? Mine is over a minute so far at the LG loading logo , the animated one.The lighting fades and come on again time after time...
 
Last edited:

Bogeyof

Senior Member
Nov 24, 2011
591
185
Augsburg
I installed on official V20a (ANEUBK):
Seems ok, booted normaly, no issues so far...
Systemclock max is now on 1700 (SetCpu shows so), settings in SetCpu to 1200 or 1500 dont work, allways use 1600...
Changed to eprjdemand governor, first tests seems fine...
U wrote some things about - EternityProject sysfs Tools and- EternityProject Hybrid ClusterSwitch, where can I read about that (what is it) and where to find?
U also wrote about -EternityProject Tegra 3 CPU Manager, is this an App or internal stuff?
 

kholk

Retired Recognized Developer
May 20, 2007
2,293
3,828
Torino
It should boot instantly.

Btw, can anyone give me the official CM boot.img?
I will repack it and post.


About the infos @Bogeyof asked:
EternityProject sysfs Tools can be found in /sys/eprjmanager. It provides a way to control some internal things.. .even like GPU and CPU clocks (aka dynamic overclocking). I won't ruin you the surprise, check it out by yourself! :p

EternityProject T3 CPUManager is a replacement for the Tegra hotplug system. It is totally new and developed by the EternityProject Team (me and @lowjoel) and it will make you to save important juice (battery) while using your phone.
We internally describe it as "A precise manager with hotplug and cluster management capabilities", as it will manage the Tegra cluster switching and core on/downlining.


EternityProject Hybrid ClusterSwitch is contained in CPUManager and it allows you to change the whole cluster switching behavior of the Tegra 3 chip.
Normally, Tegra 3 will switch clusters based on frequencies, so, basically and easily said, on their stock implementation you've got an array of fixed frequencies that will define the cluster to use.

For example:
LP MAX will be 475MHz, so, you can't go to G (and multicore) at 475MHz or LOWER.


Our Hybrid ClusterSwitch permits us to destroy that limitation, so that...

For example:
LP MAX will be 475MHz (soon 600MHz, forgot to port entirely), but you will be able to go in quadcore mode even at 51MHz.


Where's the point in this?
Simple. You don't need more MHz if you've got lots of processes that you may spawn between multiple cores.

When you go up with frequencies, a voltage raise will happen. When you powerup multiple cores, the voltage will stay the same.

Now, the good reason for this is that VCC+ corresponds to PD^2 (where VCC stands for our voltage and PD stands for Power Drain), while USG+ corresponds to PD++ (where USG stands for Usage).



......And that's why we're saving a lot of power.
I'm sorry if my explaination is really really bad on this... I would need to write a 30 pages book on that for a good explaination of the whole concept.
If there's anything that you can't understand, feel free to ask. I will be happy to clear your doubts.
 
Last edited:

leolipop

Senior Member
May 26, 2004
232
31
Athens
Should the kernel version change? I see the same 3.1.10 but no frill cpu show 1.7ghz as max speed ...Quadrant score at 5430. not that much better than 5399 i had before.
 

kholk

Retired Recognized Developer
May 20, 2007
2,293
3,828
Torino
@leolipop
On the stock ROM, you can see the new version only if you go to the hidden LG menu.
About the benchmark, follow the benchmark mode instructions.

Anyway, Quadrant isn't a really good benchmark for devices like ours. The tested load is too low. Use AnTuTu, trust me.
 
Last edited:

HilfsaffeMojo

Member
Feb 10, 2011
15
3
Cm Repack Works !
Thanks

Edit: But Wifi doesn`t work :(
 

Attachments

  • Screenshot_2013-04-19-15-17-20.jpg
    Screenshot_2013-04-19-15-17-20.jpg
    30.5 KB · Views: 1,083
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 110
    Welcome to the EternityProject's Kernel for LG Optimus 4X HD Thread!

    What is it?
    It is a custom kernel with some updates and optimizations on Tegra3 platform and Cortex A9 MPCore management drivers.

    Why should I flash it?
    You should flash it only if you know what are you doing. Remember that it works only on LG Optimus 4X HD with unlocked bootloader.
    If you know what are you doing, you shouldn't ask this question.

    Flashing methods:
    1. Copy the archive on your internal/external memory.
    2. Reboot to CWM
    3. Flash it
    4. Enjoy!

    Features:
    -- Memory and cache management optimizations
    -- Modified Cortex-A9 (Tegra 3 core)'s cache behavior.
    -- EternityProject Tegra 3 CPU Manager
    -- Latest Tegra drivers
    Great results on tests.

    Changelog:
    Code:
    v1.0RC1
    - Cleaned up touchscreen driver
    - Added Android 4.3 kernel patches
    - Auditing and SELinux support
    - Enabled SmartDimmer (dummy, but makes nV blobs happy)
    - TTY buffer size reduced to 4096
    - Baseband random faults (usb-related) fixed
    - USB Host activation code has been extended (cause of bb faults)
    v0.20
    - Fix topdown memory allocation bug
    - Enable Contiguous Memory Allocator
    - Updates to Security layer (for Android 4.3 compat)
    v0.16 - Beta 7
    - Fix EternityProject LiveColor disable bug
    - Compile in FIOPS I/O Scheduler
    - Definitely fix vibrator for CyanogenMod
    v0.15 - Beta 6
    - Support BlueSleep for BlueDroid (for CM BT)
    - Fix CM Torch app
    v0.14 - Beta 5
    - Fixed baseband weirdness when display off
    - Implemented NFC power management
    - Increased audio gain (max volume)
    - Updates to USB framework
    - Updates to workqueues (now lighter!)
    v0.13b - Beta 4
    - Increased vibrator duty for CM
    - Enabled GPU overclock @584MHz by default
    v0.13 - Beta 4
    - Include eprjdemand governor
    - Stabilization code for baseband
    - Update to EPRJScheduling for CPU Manager: Lighter on CPU
    - Trial to solve data connection issue after suspend
    - Fixed bug on timed_output for CM
    - Enable UHID for CM BT
    - Latest vanilla GeForce ULP drivers (GPU)
    - Unlinked shared bus
    v0.11 - Beta 2
    - New feature: EternityProject LiveColor (enabled by default)
    - EternityProject ChargerBoost now working on X3
    - Added timed_output interface for CM vibrator
    - Use deadline iosched as default
    v0.10 - Beta 1
    - Battery life greatly improved compared to 0.02
    - USB Host Mode functionality implemented
    - NFC support implemented
    - GPU @584MHz
    - Wakelocks are now a lot less aggressive
    - USB wakelock issue solved
    - Bluetooth seems to be working perfectly now
    v0.02 - Alpha
    - Phone call bug solved
    - Brightness setting bug on LGE ROM solved
    - Battery temperature is now reported correctly
    - Headset detection and headset button implemented
    v0.01 - Development Snapshot, pre-alpha
    - Remember: this is buggy as hell.
    - EternityProject Tegra 3 CPU Manager
    - EternityProject eprjdemand governor
    - EternityProject sysfs Tools
    - EternityProject Hybrid ClusterSwitch
    - Optimized ARM routines
    - Other optimizations here and there (I am too lazy to list)
    - Removed useless debugging

    Various notes:
    Taking screenshots:[/b]
    Due to the bad hardware implementation of the power key, we've had to use bad hacks for its software implementation.
    Since it is directly connected to the PMU, it is only firing IRQs and that means we didn't use the normal GPIO implementation, requiring you to use a little trick for taking screenshots on Android.
    We're sorry for that, but I've had to make it (speaking about code) as light and as proper as possible, avoiding to use the really bad hacks that LGE used to write.
    That's how that has to be done:
    1. Press POWER KEY
    2. Wait (one second) for the keys backlight to switch ON
    3. Press VOLDN
    4. Screenshot taken.

    Using the new EternityProject Features:

    Download our EternityTweak app from Play Store or do it manually... :°)

    EternityProject's USB Host Mode for LGE X3:
    Due to hardware problems, I wasn't able to make you use normal ways of enabling it, so, here's what you need to do:
    1. Activate USB Host Mode on EternityTweak (or "echo 1 > /sys/eprjmanager/usb_host_mode" from terminal emulator)
    2. Connect an USB charger (or anything that provides VBUS IN -- a custom EternityProject hardware is about to come)
    3. Disconnect the USB charger and connect the OTG cable with your USB device
    4. Enjoy USB Host

    EternityProject ChargerBoost:
    By default, your devices allows to get 1A current only from AC adapters. With EternityProject ChargerBoost, you can allow the device to take 1A (fast charge) from your PC's USB, too!
    Enable ChargerBoost: echo 1 > /sys/eprjmanager/charger_boost
    Disable ChargerBoost: echo 0 > /sys/eprjmanager/charger_boost

    NOTE: DETACH your USB cable prior enabling/disabling ChargerBoost, otherwise it won't work!

    EternityProject LiveColor:
    LiveColor makes you able to enhance your display with its calibration profile.
    It applies a color lookup table to provide brilliant colors and better contrast.
    Enable LiveColor: echo 1 > /sys/eprjmanager/livecolor
    Disable LiveColor: echo 0 > /sys/eprjmanager/livecolor

    NOTE: The LiveColor functionality is enabled by default.


    EternityProject PowerLock (lock in LP mode!):
    Lock in LP mode: echo 1 > /sys/eprjmanager/power_lock
    Unlock to auto G/LP: echo 0 > /sys/eprjmanager/power_lock


    EternityProject Benchmark Mode:
    echo 0 > /sys/module/eprj_t3_cpumanager/parameters/auto_hotplug
    echo 1 > /sys/devices/system/cpu/cpu0/online
    echo 1 > /sys/devices/system/cpu/cpu1/online
    echo 1 > /sys/devices/system/cpu/cpu2/online
    echo 1 > /sys/devices/system/cpu/cpu3/online
    echo 1 > /sys/eprjmanager/friedeggs

    P.S.: Commands to be entered on Terminal Emulator, Script Manager (maybe), or ADB.


    Downloads
    EternityProject Kernel 3.4.37 for LG Optimus 4X HD: EternityProject Website

    NOTE: Make sure to download the right kernel for your ROM (Stock/CM)!



    Git:
    The EternityProject public repositories are self-hosted at http://pubgit.eternityproject.eu



    Enjoy!

    The EternityProject Team Manager & Main Developer,
    --kholk
    40
    Well guys, I didn't publish here on XDA but only on our website for a reason.

    The reason is that, as I said, the 3.4.37 kernel is a lot unstable and much things aren't working correctly as they should.


    Now, I'm sorry for yesterday's rage versus a guy on Twitter, but I think it was justified, and here's the reason:
    As you know, all of the kernels published here are "working" and "better than stock".

    The fact is, all the kernels are just a modified stock kernel, 3.1.10 (EOL, so no more updates from mainline linux)... also, 3.1.10 is really a lot bloated and that's why it was abandoned.
    Porting a board and a whole SoC on a new kernel takes lots of time and lots of code!

    3.4.x kernels are another whole story, much APIs have changed, and I've had to rewrite most of the code for our board (and our whole phone) to work.
    Rewriting everything isn't that easy, lots of things won't work initially just because OEMs are obviously producing their custom mainboards, connecting devices as they want on the GPIOs they want. Some chips on our mainboard have got their firmware and others' behavior is modified "initially" from the bootloader.

    That means it's not just about rewriting some source, but also understanding what the hell LGE did and figuring out what the hell to do to make that chip to work as LGE (and as everyone) intended it to.


    I've also had to move to a new home in those two weeks, so you can imagine how much time I've lost in that... but anyway, it was somehow a good thing because I've had time to test the stability of some components.

    Now, you should understand how hard is it to run 3.4.37 on the O4X (and on the HTC One X, too!) and how much time it takes.


    Sorry again for the rage, but meh, it happens when you put a lot of effort in something and the first comment is the one giving s$&t to you.

    From now on, the 3.4.37 releases should be done more frequently, and it will be officially updated on xda too only when it reaches a good point of stability.

    The 3.1.10 kernel that I've published a long time ago was just for making you all to have something to play with and an overall better device, while waiting for our 3.4.37 and I'm pretty sure (99.9%) that I won't update the 3.1.10 branch anymore.



    Meh, that said, stay tuned for the future updates!

    The EternityProject Team Manager & Main Developer,
    --kholk
    23
    The EternityProject Kernel 3.4.37 for LG Optimus 4X HD, v0.13, has been released!

    This version features the new GPU drivers, already being used on the HTC One X version of this kernel.
    Also, there is some stabilization code for the baseband and we've reintroduced the eprjdemand governor, that was temporairily out of tree for "maintenance" (we did something bad on it and couldn't release).

    This version should also solve the vibrator problem on CyanogenMod, since on v0.11 I committed a really bad stupidity... I only forgot to actually initialize the timed_output interface in the drivers.

    Ah, about the freeze problem, I already said it was solved.. and it should have been solved in v0.13: as always, nothing is for sure in this world, so... :°)

    I've also seen that I forgot to enable UHID in the previous versions, required for Bluetooth to work on CyanogenMod, so now there shouldn't be any problem about it.


    Another update is for our sysfs tools: when we developed it, we've had an hack that was automatically updating the cbus clock, then, when we switched the kernel trees, we forgot to fix that so it wasn't being updated when using the GPU clock controls.

    As I promised to @@non4, I've unlinked the shared bus, too.

    Anyway, I can't remember who it was that guy with that Sygic problem. I didn't do any specific fix (only generic), but I encourage you to retry with the latest version.


    Another thing, the source has been uploaded and it is available as a tarball archive. We'll use GIT when we reach a good development stage: we also need to reorder some commits and make them better, so, to let us to not lose time, we've chosen the tarball way for now.


    Apart all, I'm surely forgetting to say something, I know. I always do.


    If anything, we're listening to your reports.
    Enjoy your new beast!

    The EternityProject Team Manager & Main Developer,
    --kholk
    18
    The crazy stuttering issue affects only v0.11, and it's because of a modification I did.
    I've already solved that problem and I'm looking at the problem that @@non4 made me notice about the GPU.

    Actually, I'm running on a new video driver as the one in the previous releases was taken from an old tree I had here for ENRU, just adapted for X3.
    However, even with the new video drivers, even if booting is really faster, the AnTuTu 3D can't still run and I'm looking for the reason, but actually I can't find anything real.

    About the GPU, I'll unlink the buses today and see what will happen.


    Ah, the new version will contain some stabilization code for the baseband, as @reas0n reported some badnesses on 2G networks with SMS'es.
    I'll publish 0.12 in the afternoon and it won't contain anything really new (no new features), but just stabilization code and the new video drivers.


    If I'm missing anything, if there are other problems, as always, report here!
    Ah, and thanks for the various reports. The Sygic one looks weird... anyway I'll look into that ASAP (don't expect anything for v0.12, perhaps tomorrow on v0.13 we'll see some change).


    Have a good day!

    The EternityProject Team Manager & Main Developer,
    --kholk
    18
    EternityProject Kernel v0.11 (Beta 2) has been released!

    So, I've implemented the timed_output interface for CM ROMs. That should be the required one for the vibrator to work on CM, so, people who said it wasn't working... test that and tell me what's the result!

    Apart that, there are two new EternityProject toys: ChargerBoost and LiveColor.
    ChargerBoost is DEactivated by default, you can activate it like shown on first post, or using EternityTweak (better choice I'd say, less hassle..): it will make your device to be able to get up to 1A from your PC's USB, obviously only if your PC's port is able to provide such current.

    LiveColor is enabled by default. It will make your display to feel a lot better to your eyes.
    As you might know, I've got an HTC One X here and its display is really better. Yesterday, I was looking at the two devices and I've had to do something for the 4X display, as it was really too bad.....
    ....and here LiveColor comes!
    Okay, the fact is that the One X has got a better display by HW so it's impossible to get the same on 4XHD, but after some hours of parameters tuning, trial and error and development, now there isn't anymore that deeply infinite difference between the two displays, IMHO.

    @@non4
    You're tuning the wrong parameter. You only have to look at the tuneables in /sys/eprjmanager/ as the ones in other places won't even be updated.
    @reas0n
    Strange thing, I'm not using SMS that much I admit, I usually call and receive calls. Lots of calls. Calls everywhere. OMG.
    Ehm, yeah well, I'll have to see what's going on with SMS, but right now I can't really, so perhaps try the new version: there are some differencies.. and tell me if it works better on that part!



    The EternityProject Team Manager & Main Developer,
    --kholk