[KERNEL][DEVELOPMENT] Help us make a good kernel!

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
ANNOUNCEMENTS
This kernel is already included in AICP, and it will not work on ROMs which use Nougat bootloader(RR by AndropaX, LAOS 14.1 by HnT).

KERNEL DEVELOPMENT
After the problems the entire community encountered using kernels based on Xiaomi's release, like the battery problems and various other issues, I decided to ask for help from the community in developing a stable kernel from the ground-up.
I've been working on this by myself for a while, but i can't test it alone.
This operation will most likely benefit all custom ROMs.

#include
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
SOURCE
https://github.com/Demon000/kernel_xiaomi_libra

DOWNLOAD
https://drive.google.com/open?id=0B4gtFsm9Zjb5eFJHLWJIQlFGUEE
Works on any rom except MIUI.

BUGS
  • vibration slider

FIXED
  • inaccurate battery percentage after restart
  • touchscreen not working on the edges
  • shutdown at low percentage
  • random reboots
  • improved camera

TASK
  • test the kernel
  • report bugs and get logs if you can
  • provide suggestions and improvements
  • be patient
  • test for user experience, battery life and stability, we are not doing a "who gets the highest Antutu score" race

Please only report bugs if you can't find an issue already opened here, https://github.com/Demon000/kernel_xiaomi_libra/issues .


Thanks!
 
Last edited:

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
It's related to kumajaya's device tree modifications, and I'm waiting for someone to report not working touchscreen before adding his changes.
If there is anything you want me to check (brute-force, crash test etc.) or anything in particular, it's easier for us to make a check-list in the first post so that we know what are we looking for !
 
  • Like
Reactions: Cozzmy13

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
If there is anything you want me to check (brute-force, crash test etc.) or anything in particular, it's easier for us to make a check-list in the first post so that we know what are we looking for !
We're not looking for something particular, we're looking for general user experience, stability and battery life.

I updated the OP.
 
Last edited:
  • Like
Reactions: arh91

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Well if we take Andropax's kernel as a baseline, this kernel must have somewhat near (of not the same) amount of features like sound controls, display controls and adreno idler
 
  • Like
Reactions: Cozzmy13

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
Well if we take Andropax's kernel as a baseline, this kernel must have somewhat near (of not the same) amount of features like sound controls, display controls and adreno idler
We can focus on adding features after we get the kernel to work perfectly.
I'll add adreno_idler cause it might improve battery life.
 
  • Like
Reactions: arh91

csolanol

Senior Member
Apr 18, 2010
1,732
2,590
153
@Cozzmy13 didn't realize you created this thread and was typing in cm14 one. Nice!. Let me know what device part needs to be changed to go inline with the kernel.
Officiak Aicp line compatibility with this kernel since next Thursday.
 
Last edited:

solis_f

Senior Member
Mar 26, 2015
1,000
578
0
Update:
When left at screen off for a small period of time, I can not unlock the phone and I have to screen off/screen on again. The reason this is happening seems to be some kind of problem with sliding gesture only registering first and last touch location and some random ghost touches. Just confirmed this with "show taps" option
 
Last edited:
  • Like
Reactions: mradermaxlol

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
Update:
When left at screen off for a small period of time, I can not unlock the phone and I have to screen off/screen on again. The reason this is happening seems to be some kind of problem with sliding gesture only registering first and last touch location and some random ghost touches. Just confirmed this with "show taps" option
I have seen a commit that fixes this somewhere, I just don't remember where, will look for it and make a new build tomorrow.
 
  • Like
Reactions: arh91

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
@Cozzmy13 didn't realize you created this thread and was typing in cm14 one. Nice!. Let me know what device part needs to be changed to go inline with the kernel.
Officiak Aicp line compatibility with this kernel since next Thursday.
Find any instance of this inside the device repo
/proc/touchscreen/double_tap_enable
and replace it with
/sys/class/input/input1/wake_gesture

Also find any instance of
/proc/touchscreen/nav_button_enable
and replace it with
/sys/class/input/input1/0dbutton

Make a test build and check if double tap to wake works and if the hardware buttons can be disabled.
I'll have to add edge tap to the kernel then I'll rewrite the edge tap package inside the device tree and send it back to you.

If you don't have time to change those I'll fork your repo and change them myself tomorrow so you can merge it. I can't build the ROM because of bad internet connection so you'll have to test changes for me.

Thanks for the support, buddy!
 

helmat

Member
Apr 7, 2012
28
3
0
Innsbruck
One user reported that battery percentage doesn't decrease drastically after restart anymore.
I also think that the phone won't shutdown randomly anymore.
that would be amazing :D

First impression is good, not as smooth as before but very useable
Just one major issue - out of the three hardware buttons only the back button is working, no response from Home or Menu. I'm using the software buttons for the time.
 

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
that would be amazing :D

First impression is good, not as smooth as before but very useable
Just one major issue - out of the three hardware buttons only the back button is working, no response from Home or Menu. I'm using the software buttons for the time.
I am trying to find what's the source of the bug, it's harder to track this one.
 
  • Like
Reactions: arh91

csolanol

Senior Member
Apr 18, 2010
1,732
2,590
153
Find any instance of this inside the device repo
/proc/touchscreen/double_tap_enable
and replace it with
/sys/class/input/input1/wake_gesture

Also find any instance of
/proc/touchscreen/nav_button_enable
and replace it with
/sys/class/input/input1/0dbutton

Make a test build and check if double tap to wake works and if the hardware buttons can be disabled.
I'll have to add edge tap to the kernel then I'll rewrite the edge tap package inside the device tree and send it back to you.

If you don't have time to change those I'll fork your repo and change them myself tomorrow so you can merge it. I can't build the ROM because of bad internet connection so you'll have to test changes for me.

Thanks for the support, buddy!
Thanks, will do it tomorrow morning. Night of work today, have to patch some systems [emoji53]

Edit: changes done but can't build tonight.
FYI: For edge touch we are using /proc/touchscreen/edge_touch_mode now.
 
Last edited:
  • Like
Reactions: Cozzmy13

Cozzmy13

Senior Member
Aug 17, 2014
1,311
3,747
113
21
Suceava
Thanks, will do it tomorrow morning. Night of work today, have to patch some systems [emoji53]

Edit: changes done but can't build tonight.
FYI: For edge touch we are using /proc/touchscreen/edge_touch_mode now.
https://github.com/reposte/android_...src/com/cyanogenmod/settings/extra/Utils.java
In getInputControlPath
Replace /proc/touchscreen with /sys/class/input/input1/
In setActiveEdgeMode
Replace edge_touch_mode with edge_tap
And writeLine(path, (state ? "2" : "0")); with writeLine(path, state);
I will see if I can implement those changes in the kernel too.

If anyone reports not working touchscreen we will have to revert back to the original implementation.
 
Last edited:
  • Like
Reactions: arh91 and Danny94
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone