[Q] Xperia SL - hardened and Linux Friendly - Sony Xperia S, Acro S, Ion

Hi,
I wanted to ask some question so please we should keep this thread as short and qualitative as possible, so
1) I want to have a custom ROM (CM in this case) but without transforming my device in to a Xperia S especially without loosing the CPU power, normally - with what I know- the kernel should detect the processor as a 1.7 ghz but I read that if you put the Xperia S ROM it won't so (will see it as 1.5 which is STRANGE to me), is there any CM for xperia sl (It sounds rhetorical to me as I searched and didn't find - looked up also freexperia) so basically what should I edit/do to get one?
2) I saw some projects on hardening the kernel (with grsec, yeah spender did a "nice" job, although Ac1db3atch3s crashed gradm ), so what should I do to put a hardened kernel in to the above ROM? I'm not particularly interested in "paranoid-secure" kernel , but more in to a flexible / light / USEFUL / robust one , so which one you recommend (with what patches) and how do I build everything and put it on CM ? [I'm on Arch Linux but I have also Windows if that it's a MUST]
3) Even after installing busybox , the system is still far from Linux as there are missing options like for example, lsof it's just lsof with no options, netstat is without "-e or -p" although it is as an option but doesn't show the processes or details, ls is lacking of -h and -c , and this question maybe returns to #2 as maybe there is a ROM out there with already packed "correct" binaries.
What should I do to get those?
4) What are the best applications you recommend (I saw guardianproject but not particularly interested in tor sub applications) to have full control on what's going on the OS?
Thanks.

0fo said:
Hi,
I wanted to ask some question so please we should keep this thread as short and qualitative as possible, so
1) I want to have a custom ROM (CM in this case) but without transforming my device in to a Xperia S especially without loosing the CPU power, normally - with what I know- the kernel should detect the processor as a 1.7 ghz but I read that if you put the Xperia S ROM it won't so (will see it as 1.5 which is STRANGE to me), is there any CM for xperia sl (It sounds rhetorical to me as I searched and didn't find - looked up also freexperia) so basically what should I edit/do to get one?
2) I saw some projects on hardening the kernel (with grsec, yeah spender did a "nice" job, although Ac1db3atch3s crashed gradm ), so what should I do to put a hardened kernel in to the above ROM? I'm not particularly interested in "paranoid-secure" kernel , but more in to a flexible / light / USEFUL / robust one , so which one you recommend (with what patches) and how do I build everything and put it on CM ? [I'm on Arch Linux but I have also Windows if that it's a MUST]
3) Even after installing busybox , the system is still far from Linux as there are missing options like for example, lsof it's just lsof with no options, netstat is without "-e or -p" although it is as an option but doesn't show the processes or details, ls is lacking of -h and -c , and this question maybe returns to #2 as maybe there is a ROM out there with already packed "correct" binaries.
What should I do to get those?
4) What are the best applications you recommend (I saw guardianproject but not particularly interested in tor sub applications) to have full control on what's going on the OS?
Thanks.
Click to expand...
Click to collapse
Hello @0fo,
I'd try to be as qualitative as possible (As you mentioned)
1.) A Custom Rom won't affect the CPU speed of 1.7GHz, It is the Kernels that can give you other CPU speeds.
So after installation you need to edit the kernal using third party tweaks. And considering the research you have done This wont be so hard to overclock.
2.) About Hardened Kernals, You can not do anything right now. Only Stable Kernels Available Are For Nexus Devices. . For Building Your Own Kernal And ROM Please refer to Guides Available for The Same.
3.) Unable to Understand Completely, A little more feedback on your problem would help.
4.) For Complete Control on the OS. You dont need applications but a working compiler and modding shell, Not much can be done from phone itself.
Install Android kitchen and Cagywin. You would have complete control.
If my time given to you was helpful please press thanks button!

dwarkesh2492 said:
Hello @0fo,
I'd try to be as qualitative as possible (As you mentioned)
1.) A Custom Rom won't affect the CPU speed of 1.7GHz, It is the Kernels that can give you other CPU speeds.
So after installation you need to edit the kernal using third party tweaks. And considering the research you have done This wont be so hard to overclock.
2.) About Hardened Kernals, You can not do anything right now. Only Stable Kernels Available Are For Nexus Devices. . For Building Your Own Kernal And ROM Please refer to Guides Available for The Same.
3.) Unable to Understand Completely, A little more feedback on your problem would help.
4.) For Complete Control on the OS. You dont need applications but a working compiler and modding shell, Not much can be done from phone itself.
Install Android kitchen and Cagywin. You would have complete control.
If my time given to you was helpful please press thanks button!
Click to expand...
Click to collapse
Thank you for your reply,
1) When I mentioned ROM and not the kernel I was referring to http://forum.xda-developers.com/showthread.php?t=2245327 under "General" which says "Any ROM for S will Work for SL BUT you lose 1.7GH Speed" So what should I do, should I download the "nozomi" image and than tweak ? Even though I don't know were to tweak or how because I'm new to android and I rooted my phone just yesterday, but I have experience with Linux systems / also enterprise.
2) Yep
3) On Linux when I want to list files/dirs I run ls -aclh but -c and -h options are missing on the ls binary installed on my phone, also while using netstat and lsof some useful options are missing, it's like the system is build to not let you know which process is using X connection and you can't track which process has opened the socket , for example I see a socket communicating with a amazon cloud server constantly on port 4244 or similar but don't know what and why which makes me curious.
4) will try those out.

Related

[kernel] CM7 2.3.4 kernel(s) OCUV-SOUND-COLOR-ETC 12/05 [EOL]

UPDATE/IMPORTANT/README 1ST
I am giving away the SGS and got a new SGS2. This means I won't be able to test updates on this kernel, this I will DISCONTINUE it soon.
I might update this kernel til i'm unable to (in a week prolly) so i'd suggest to switch over to another kernel, choices are, to my knowledge:
- zach's kernel: lots of tweaks, but people seems to have good results. its based on my kernel
- glitch's kernel: less tweaks but close, higher oc. its also based on my kernel
- cm7's stock kernel: i'm based on them of course, its the same as my kernel minus oc/uv and voodoo, but if you want something simple and stable without caring for oc/uv or voodoo color it's pretty good because it's reliable. voodoo sound works via voodoo +
Note that I'm still hanging out on the CM7 sgs channels and will most likely contribute one way or another still
**********************************************************************
Fat visible download link http://kang.project-voodoo.org/
Disclaimer:
These kernels are provided as-is without any warranty. I'm not here to provide support etc although I might when I'm able, but don't count on it. If your phone explode, it's your problem. Updates are not guaranteed as well.
I made a thread only so that it doesn't get lost in spam and have pms asking where to find it
What's included
Sometimes: testing stuff from teamhacksung before it goes into their stable upstream
Various tweaks: such as JPX screen timings, Haptic feedback and general vibration intensity slightly reduced (integrated upstream)
Voodoo sound patch
Voodoo color patch
[*]Led notification: Now integrated upstream
[*]Extra governors: Smartass, Interactive They're not that good.
Overclock/Undervoltage: I use [email protected] and 1.2Ghz max and rest default, change voltage with "voltage control" (market). Default settings to 1Ghz.
Easy building system and clear commits: for other devs, and myself too lol
Click to expand...
Click to collapse
Credits & stuff:
Thanks to Supercurio for making those great enhancement patches and to the Teamhacksung/CMSGS/CM7 contributors for the CM project. Thanks to many other authors who put their source online, they're too many to name. No thanks to the ones who don't, tho
http://project-voodoo.org/
http://forum.cyanogenmod.com/forum/85-samsung-galaxy-s-experimental-mod/
Click to expand...
Click to collapse
Sources (includes non-GT-I-9000 kernels such as Captivate, Vibrant, etc. - always up to date within ~15min of binary upload depending on my upload speed):
https://github.com/kangsterizer/android_kernel_samsung
If there's anything you don't find in the source (missing source or w/e could ever happen, i'm only another noob human)/ doesn't look correct / you don't understand, don't be shy to ask
Binaries & CWMs (aka fat visible download link - what you're looking for ;-):
http://kang.project-voodoo.org
Other goodies
Netfilter/iptables fix: http://kang.project-voodoo.org/f/iptables-cm7-kang.zip
Nexus S windows USB driver (for SGS CM7) - just like to have the link handy for ADB:
https://dl-ssl.google.com/android/repository/usb_driver_r04-windows.zip
Unpack, go into the device manager, look for the "Nexus S" device, click update driver, have disk/search my computer, put the path to the directory..
Tool for OC/UV: http://forum.xda-developers.com/showthread.php?t=1018411
Some more links
IRC: irc://irc.freenode.org/#project-voodoo irc://irc.freenode.org/#cmsgsteam
Twitter: http://twitter.com/kangsterizer (not using it a lot.. but i'm trying lol)
Click to expand...
Click to collapse
Latest changes
-- r25
- upstream sync (use new cm7 nightly!)
--r12
- upstream sync (camera stuff) (use new cm7 nightly)
--r10
- upstream sync (fix battery info/display)
-- CM7_GT-I9000_kernel_kang_20110504_r9_update.zip
- upstream sync
- some fixes for new recovery
-- CM7_GT-I9000_kernel_kang_20110504_r5_update.zip
- upstream sync
-- CM7_GT-I9000_kernel_kang_20110501_r2_update.zip
- test of new scripts x)
- fixed said new scripts since test failed x)
-- CM7_GT-I9000_kernel_kang_20110501_r1_update.zip
- Supports GB 2.3.4 (upstream)
- Reviewed some code
- Removed governors: ondemand is better in their current state anyway
- using "r" release versionning in case i'm uploading more than 1 kernel per hour or make tests etc.. avoids confusion ;-)
-- CM7_GT-I9000_kernel_kang_20110429_18_update.zip
- allocate more memory to FIMC0 / fixes googles goggles FC
-- CM7_GT-I9000_kernel_kang_20110428_23_update.zip
- upstream sync
- requires latest CM7 nightly for compass etc
- supports bml_over_mtd at flash time
-- CM7_GT-I9000_kernel_kang_20110427_02_update.zip
- upstream sync
- Voodoo sound v8
- some touchkey tweaks
-- CM7_GT-I9000_kernel_kang_20110409_17_update.zip
- upstream sync - untested release (don't have phone access this week )
Older changes are not displayed (lack of space) - see GIT for complete change log
Click to expand...
Click to collapse
NOTE: THESE ARE NOT OFFICIAL VOODOO (or CM7) KERNELS. THESE ARE TEST KERNELS INTEGRATING POSSIBLY UNSTABLE AND UNSUPPORTED VOODOO PATCHES
Fat visible download link http://kang.project-voodoo.org/
Support FAQ
Q: Do LED notification require an app, such as BLN, etc ?
A: No. It uses Android's and Cyanogen settings, other apps are not required, although some that are designed for regular LEDs may work.
Q: How to I turn off LED notifications, scheduled or/and complete turn off?
A: Use Cyanogen's Quiet Hours feature (settings>cyanogen>sound>quiet hours) and check "Dim the LEDs during quiet hours" (in reality it will turn them off on the SGS). If you schedule a complete day, then LED notifications will be off all the time.
Q: How do I setup per app, find other LED settings etc?
A: Settings>cyanogen>interface>LED notifications
Q: What to do with LED color settings?
A: We have only one color, so that doesn't work. Use Green as default setting. Some non-bright colors turn off notification, as it's the equivalent as diming LEDs (note that on real LEDs if you dim them too much they look like off too anyway, the difference is that it's gradual. On the SGS the LEDs can be only on or off, not gradual)
Q: How can I troubleshot my system, I can use ADB but...
A: adb logcat | grep lights (on linux) will show you Android requests to turn LED on or off. "status" tells you what we decide will be interpreted as "turn LED on" (1= on, 0 = off)
adb shell cat /proc/kmsg for live view (or adb shell dmesg if you're using adb after the issues occurs - careful the backlog is limited in size so don't be too slow)
notify_led_on and notify_led_off are requests to the kernel to turn LED on or off.
touch key write/read errors (cypress) are non-fatal failures to ask the touch key to do something (eg lit up the LED), when the hardware goes crazy or there's a logical error in the code (can be both)
touch key recovery routine or "stopped responding" are either hardware errors, either a logical error where the driver would try to write something the touchkey doesnt understand. in some occasion lock&unlock fix those as a work around, of course a permanent fix is required
Q: I used another kernel and some things don't work as expected / I'm the only one to have a problem / music skip with screen off / etc
A: Try this cleanup script: http://forum.xda-developers.com/showpost.php?p=13223426&postcount=1312
Features FAQ
Q: Why do you not implement jhash3?
A: This hash function is used in 3 places in the kernel, and mainly iptables. None of them are performance relevant unless you use your phone as router for a thousand of machines (and that is the *only* case). Yes, it is utterly useless.
Q: Why do you not implement XYZ?
A: Usually, same reason as jhash3. Feel free to suggest tho, some features are actually useful and I don't know everything.
It only work with CM7??? Or work in a Froyo or Gingerbread rom??
You just can't read?! CM7.
thx bilboa, it's really good
Keep up the good work
Sent from my Galaxy S using Tapatalk
Flashed cwm .zip getting force closes when trying to adjust headphone volume in voodoo app read about this on the cm7 thread might have something to do with 2.3.3 lol I got no idea, just throwing it out there you can throw it right back
EDIT: found the voodoo app on supercurios page http://dl.project-voodoo.org/apps/
Sent from my Galaxy S using XDA App
quadix said:
You just can't read?! CM7.
Click to expand...
Click to collapse
I read perfect, that's only a question, do you understand???
Medel-Silver said:
I read perfect, that's only a question, do you understand???
Click to expand...
Click to collapse
Its very stupid question, hence the a bit rude, yet truthful, answer. It says in the topic what this kernel is for.
I need to backup the WiFi modules before i get flash that?
Thanks a lot for posting this! Do you still have the "old" voodoo control app with you, that works with the headphone amplifier?
Thank you for providing the source code, that gives me an idea on what i have done wrong while implementing voodoo sound
btw have you guys experienced the volume bug mentioned here and here?
Anybody got a solution?
could not download
Sent from my Galaxy S using XDA App
Thanks heaps - installed it apparently ok - it runs the phone - the voodoo app can see the features and recognises that its a compatible kernal - but whenever trying to change the analogue volume - it force closes the app
is this relating to the broken git stuff for cyanogen - unrelated and just me doing something wrong - or its a bug and i can give you some logs or something to check whats happened?
I'll try doing a clean flash from an old firmware and come back again with the results in a few hours when i get home from work (err - probably shouldnt have tried experimenting with it at work - heh)
^^you need voodoo control app and voodoo app for it to get it to work.
@bilboa1
nice to see it's stand alone.
Edit : Crap, i can't get it to download, i've tried different browsers, using my phone. I even tried it from different computer with no luck
It seems github don't like my computer or my phone. Can anyone attach the .zip for i9000, PLEASE.
Hello, I'm from the Captivate forum, just seeing if any known bugs are found I heard Wi-Fi doesn't work.
Also had problems DL'ing. Attached the SGS i9000 file from the CM7_SGS_2011_03_04 folder. Thanks for the kernel!
sorry if this could be a dumb question, but I wanna be sure of what I'm doing:
If i use the CWM package, do I still need to flash te zImage and push the modules??
^^no need to, just flash it from recovery.
~drz
this is base on the latest kernel from the 02/03 update? it's will affect on the speed / smoothness (for bad)?
I think it was built from the latest commit.
just try it out man, if you don't like it, you can just flashed back to the "official" one.
The non-sgs kernel currently check for SGS model before flashing.. which of course won't work ;-) Ill change that when I get a little bit of spare time.

Multiple Custom Roms and kernels

Hello Comm. and Devs,
For our Archos there are now many custom rom-images and experimental distris of linux and so on and every "rom" has its own kernel and init which have to be flashed and it seems it is only possible to have one kernel and one init.
I want to test as many roms, plasma, ics alpha, ubuntu, 3.2.80 with busybox and adobe, etc. for shorter or for everytime. And when Archos brings ICS finally i want to upgrade of course, without losing apps and settings etc.
Now i am on rooted 3.2.79 with chainfire 3d and i dont know if it makes senes to upgrade to 3.2.80 custom rom from surdu. Okay, vibrator and so on and some goodies, sounds nice, therefore i want to test and perhaps revert it later.
Which roms are compatibel with each other and which not?
Which rom is how much recommend?
What are the differences between these inits (kernel seems often to be the same seen by its size i think) - is there the possibility and the evidence to merge the inits somehow?
Or is there a kind of general initramfs one could take for most roms?
What rom has which kernel in which version and same for initfs?
What are there for possibilities that every image gets it adequate kernel and initfs?
Many of us want multi boot which i think is not really (?) supported for gen9 .
What should be done for compatibility if i want a kind of multiboot?
It would be nice if this would give a set of infos for us all.
Well, no, kernels are not the same. We're not 100% sure for Archos ones, they're currently closed source, but looking at what they fixed in the different releases, I believe there have been changes. Plasma is definitely using a different kernel, ics will require a completely new 3.0 kernel and probably require clear data.
So what you're looking for is not really possible, not matching kernel with firmware is not a good idea. The only exception would be Ubuntu, but that's it.
what about multi-boot menu from open aos?
There are roumors that people have it work but it is not supported.
Dont want to mess all up.
Do you know something or have experiences?
svennimann said:
what about multi-boot menu from open aos?
There are roumors that people have it work but it is not supported.
Dont want to mess all up.
Do you know something or have experiences?
Click to expand...
Click to collapse
Sorry - about this with multiboot i see there is already a thread.

[Q] [KERNEL] Apply realtime patches to kernel

Hi,
I am trying to apply the preempt_rt patches[2] in order to test the realtime performance of native code on an android device in a study project. The device I have for testing is the Galaxy Nexus.
People here seem to have managed to do that with a Xoom[1].
My starting point was the kernel of the current official (4.2.2) Android release (android-omap-tuna-3.0-jb-mr1.1). According to the version string it is based on linux 3.0.31, so I tried to patch it with the corresponding rt-patchset. Except for a few rejects that went fine. Most of them I could get fixed manually.
My problem atm is that there seem to be quite some backports from newer (3.3/3.4?) kernels, especially for the file "include/linux/plist.h" and "kernel/rtmutex.c" which change some function-declarations. Today I managed to compile the kernel with the "CONFIG_PREEMPT_BASIC" option set, but when I try to boot the phone it gets stuck during the Google-bootscreen. It does not show up as an adb device, so I can't get any output from the device.
For me the question is, how much of the Kernel is actually still 3.0.31, maybe it would be more suitable to use the rt_patches for more recent Linux-kernels?
I was also thinking about trying to patch the kernel the GNex was released with, because this one may be closer to the original Linux kernel (I checked, plist.h and rtmutex.c are not the original ones as well)?
Maybe someone else has a better idea what to test, because I am not overly familiar with all the different subbranches and development trees of Android yet. Any help or suggestions would be greatly appreciated.
Best regards,
Jan
PS: I would have posted this in the development section, but wasn't permitted to. Maybe a mod could move it?
PPS: It seems, I am also not allowed to include working links :-/
[1] Search for: "mauerer real time linux tag" to get the paper
[2] rt.wiki.kernel.org/index.php/CONFIG_PREEMPT_RT_Patch

[Q] Low-level camera access

Not sure if this question really fits in here but here it goes.
As Linux kernel is running under Android, how would one write applications that would run native (without Java overhead)? Additionally to the first question, I would like to access camera in that arrangement, like one would for example use v4l2 on PC or similarly?
Thanks,
Damjan
damjandakic said:
Not sure if this question really fits in here but here it goes.
As Linux kernel is running under Android, how would one write applications that would run native (without Java overhead)? Additionally to the first question, I would like to access camera in that arrangement, like one would for example use v4l2 on PC or similarly?
Click to expand...
Click to collapse
It really depends on the camera and the kernel the device is running.
If kernel > 2.6.26 (which it should be, as Android 1.5 was using 2.6.27 already) and your camera is supported by UVC, then it's easy (V4L being the best choice). Otherwise, you will need the source and/or binary SDK, which is usually quite difficult to get ahold of.

[KERNEL] TonoKrnl for Nexus 7 (2013)

EDIT: I want to remind everyone DO NOT FILE AN UBUNTU BUG REPORT WITH THIS KERNEL INSTALLED, ALWAYS REVERT BACK TO THE STOCK KERNEL IF YOU HAVE AN ISSUE BEFORE FILING
This is my first actual Kernel project, so please be gentle.
This kernel is ONLY for the Nexus 7 (2013) flo. I do not know if it boots on the deb, theoretically it should as I don't have any flo specific options and there are config options for Deb in the Kernel configuration. It should work for those on stable, rc or rc-proposed and may possibly work on devel (not sure) as long as devel has not released a new kernel package (3.4.0-5-flo+)
I have cherry-picked some battery optimizations from bricked-flo, elementalx-flo (4.4 branch) and some additional commits elsewhere in an attempt to not only improve battery-life but also to bring some Android features (DoubleTap2Wake) to Ubuntu Touch.
Currently it has the following:
- ROW I/O scheduler
- Beginnings of OCing (pulled from ElementalX, I think I'm missing some commits to make this relevant though)
- ElementalX's kernel thermal control
- binfmt_misc support
- CD/DVD Filesystem Support for external optical drives (ISO9660/UDF)
- Some Slimbus enhancements
- Battery life optimizations (changing default MHz, etc.)
- Default CPU governor changed from Performance to Interactive (yes, they had it set to Performance, not sure why.)
- Direct Rendering Interface/Direct Rendering Manager (XFree86 + msm_kgsl_drm)
- and more!
You can check my github for the items cherrypicked into it and there is even a current release which has seen my battery drop 4% in the last 30 minutes with the screen fully on (no autolock), WiFi on and Bluetooth.
The name of the kernel is still up for change, TonoKrnl is not going to be it's final name unless everyone likes it.
Repository is at: http://github.com/ShadowEO/TonoKrnl
Releases can be found: https://github.com/ShadowEO/TonoKrnl/releases
Status of Github Repo: It builds. It boots and it runs. I am trying my hardest not to push changes that break building.
Reserved for future use. Currently the status of the kernel's updates can be found on the issue tracker: https://github.com/ShadowEO/TonoKrnl/issues/5
Be patient, if you don't see new releases right away, it's because I'm still in the process of generating them, check back later.
-- Release 1.0.3-UBports (11/19/2017): A lot was done to bring this kernel back into usable state, see below:
Added OTG Charging
Added initscripts for turning on features (Requires the rootfs to be mounted read/write for manual installation, see my latest post #16 I think...)
Created patches to be applied against a clean UBports kernel tree for certain features (right now, only DT2W and USB Charging)
(USB Host Charging was pulled from flar2's ElementalX source code, it is not turned on by default and can be turned on with
Code:
echo 1 > /sys/module/msm_otg/parameters/usbhost_charge_mode
Feature is tested and does work.
Developers:
1.0.3 brought the kernel tree back into a buildable state and also cleaned up some problems with the previous releases. I am in the process of generating a kernel patchset which will be able to be applied to a clean kernel to bring those features to the stock UBports kernel source. After I complete generating the kernel patchset, I will be rebasing the entire kernel project onto a clean tree (As I am absolutely certain that I have problems like unfinished cherry-picks [missing commits] etc.). Be patient regarding these patches, as I am re-adding the features I pulled in originally by hand rather than cherry-picking them as I appear to have fuxxed up somewhere cherry-picking previously.
If you have any random reboots, try:
Code:
echo 1 >/sys/module/msm_watchdog/parameters/runtime_disable
If you still receive random reboots afterwards or if you received them previously but the above command fixes them, please open an issue on my project tracker with a copy of /proc/last_kmsg attached.
Kernel TODO:
Generate kernel patchset and then rebase onto clean kernel tree
Finish Kernel Feature Documentation and publish (these docs will give information on tweaking the changes to the kernel, such as readahead buffer, turning on/off DT2W, turning on/off usbhost charging, etc.)
Move TonoKrnl initscripts into ramdisk, should make them more robust and reliable.
Create ZIP installer for TWRP recoveries (this is needed for automatic installation of kernel modules, since /lib/modules is a read-only, bound mountpoint for the Android LXC container. To fix this, we just have to move /lib/modules out of the Android container.
Allow me two questions:
Which kernel repository is this branched off? Apologies if that is dumb question, my git and kernel knowledge is cursory at best, but I can't seem to figure this out looking through your github repo.
ShadowEO said:
- Direct Rendering Interface/Direct Rendering Manager (XFree86 + msm_kgsl_drm)
Click to expand...
Click to collapse
What's the intention behind this? Does this have anything to do with enabling the freedreno driver for the GPU and would that pave a way to a setup without Mir, but with wayland or X?
doniks said:
Allow me two questions:
Which kernel repository is this branched off? Apologies if that is dumb question, my git and kernel knowledge is cursory at best, but I can't seem to figure this out looking through your github repo.
What's the intention behind this? Does this have anything to do with enabling the freedreno driver for the GPU and would that pave a way to a setup without Mir, but with wayland or X?
Click to expand...
Click to collapse
This started off with the debian source package for linux-image-flo in the Ubuntu archives which is the kernel for our device. The reason you are having trouble with figuring it out is because I started with the base (Ubuntu's 3.4.0-5-flo+), pulled it into an empty git repo and then started cherry-picking features. It was originally going to be for my own personal consumption as I didn't know how well a custom kernel would be received by the touch community (so far, in all the communities I've posted it, you were the only one to ask any questions ), but since I already had a git repo up, figured that I may as well share it. So here I am, an amateur working on the Linux kernel, and learning a lot.
My full intent was to improve the experience (even marginally) on Ubuntu Touch for the Nexus 7 2013, I wanted to bring the mobile kernel features previously found on the desktop that myself or others may find useful (hence binfmt support for qemu-user), there really is no reason for me to turn on DRI/DRM except to allow playing with Wayland and X, yes, that part is correct, and I have tested the freedreno driver with it (Freedreno does get the KGSL DRI device and does start X)
In addition I found some interesting choices in the kernel in terms of battery life, it would seem that the CPU governor used by the default Ubuntu Kernel is Performance, which would explain why the battery dies so fast, I tried to pull in some battery optimizations from a couple other kernels around the Android scene for the device. So far I'm pleased with the results, and recently found that both the original cherry-picking done for DT2W worked along with the code to add fast charging.
I've had to put the project on hold due to work issues, but once I'm able to work on it again, I'm reverting the last 100 changes pulled in that broke my tree and going from there since my original targets in terms of features actually worked. (I'm pretty sure it was some recent changes to the CPU hotplug driver that killed it, I can no longer compile the kernel without mpdecision on, so that's my likely suspect.)
Thanks for your explanations!
ShadowEO said:
This started off with the debian source package for linux-image-flo in the Ubuntu archives which is the kernel for our device.
Click to expand...
Click to collapse
So something like apt source linux-image-flo? And then to build you use the instructions in the package also?
there really is no reason for me to turn on DRI/DRM except to allow playing with Wayland and X, yes, that part is correct, and I have tested the freedreno driver with it (Freedreno does get the KGSL DRI device and does start X)
Click to expand...
Click to collapse
Exciting!
In addition I found some interesting choices in the kernel in terms of battery life, it would seem that the CPU governor used by the default Ubuntu Kernel is Performance, which would explain why the battery dies so fast
Click to expand...
Click to collapse
I'm really only speculating, but my conjecture to previous mentions of odd govenor choices in android kernels was that the actual android power management magic is happening behind the backs of the governors. But, I'm really just babbling. I don't know much of anything about this. You seem to be getting impressive improvements!
I'm reverting the last 100 changes pulled in that broke my tree and going from there since my original targets in terms of features actually worked.
Click to expand...
Click to collapse
So, that means: "If you want to try it now, don't use v1.0.2, but use v1.0.2-alpha for now." Is that about correct?
doniks said:
Thanks for your explanations!
So something like apt source linux-image-flo? And then to build you use the instructions in the package also?
there really is no reason for me to turn on DRI/DRM except to allow playing with Wayland and X, yes, that part is correct, and I have tested the freedreno driver with it (Freedreno does get the KGSL DRI device and does start X) Exciting!
In addition I found some interesting choices in the kernel in terms of battery life, it would seem that the CPU governor used by the default Ubuntu Kernel is Performance, which would explain why the battery dies so fast
I'm really only speculating, but my conjecture to previous mentions of odd govenor choices in android kernels was that the actual android power management magic is happening behind the backs of the governors. But, I'm really just babbling. I don't know much of anything about this. You seem to be getting impressive improvements!
I'm reverting the last 100 changes pulled in that broke my tree and going from there since my original targets in terms of features actually worked. So, that means: "If you want to try it now, don't use v1.0.2, but use v1.0.2-alpha for now." Is that about correct?
Click to expand...
Click to collapse
I removed the problem download, the only ones available are the source tree downloads and the last known good build I had, I have also tested to ensure that the last build up there works as well as it's the one I'm running on my device until I have time to go through the tree again.
As for building, essentially yes, but you have to build the image separately. Due to how Ubuntu currently has the filesystem set up and with Android's boot images, its not feasible to really package it in a traditional sense. Essentially what I did was create a chroot, apt-get source linux-image-flo and then to get a working defconfig I used the config.* files found in Debian.flo and Debian.master, from there was the tree that I used as my base.
Then run make with the following to customize:
Code:
ARCH=arm make menuconfig
ARCH=arm make -j <number of processors>
To build the image, you'll need to grab the boot image from your device and tear it apart using a abootimg them rebuild it with the Ubuntu ramdisk. If you are using MultiROM, you can just drop it in the folder for your ROM.
Edit: As for the weird choice of governors, I noticed during my investigations (via the cpufreq-info package) that while Android is managing the CPUs that are online (I found it's running it's own version of mpdecision behind the scenes inside the LXC container), it's not doing anything to the CPU governor. That's all managed in the kernel right now through CPUFreq it appears and in the stock kernel it's set to performance, as for the reason for it, I'm not sure myself.. The other governors ARE there though, just unused right now.
ShadowEO said:
This kernel is ONLY for the Nexus 7 (2013) flo. I do not know if it boots on the deb, theoretically it should as I don't have any flo specific options and there are config options for Deb in the Kernel configuration.
Click to expand...
Click to collapse
Jup, it does boot on my deb! I've downloaded the .img, put the tablet in bootloader mode and did
fastboot boot TonoKrnl-1.0.2-flo.img
It booted without problems, and so far it's running for about half an hour or so without any problems. Wifi, sound, video, usb mouse, all work fine.
doniks said:
Jup, it does boot on my deb! I've downloaded the .img, put the tablet in bootloader mode and did
fastboot boot TonoKrnl-1.0.2-flo.img
It booted without problems, and so far it's running for about half an hour or so without any problems. Wifi, sound, video, usb mouse, all work fine.
Click to expand...
Click to collapse
Wow, that's great to hear, I wasn't sure but I was definitely curious since I had seen options for both Deb and Flo in the makeconfig page.
If you can script it in (or edit sysfs.conf) to have it write a 1 to /sys/android_touch/doubletap2wake while it's booting, you can have working DT2W and there's quite some others to mess around with under /sys :3 CPU governors are somewhere there too, just don't have it offhand.
Since you are testing it out, have you noticed any changes in the device's normal battery life? The stock kernel seems to drain 1% every 1 1/2 minutes on my Flo, not doubting that the power optimizations ARE working (I know I'm getting much better life), I'm just wanting to ensure that it's not a placebo effect that I'm experiencing.
ShadowEO said:
If you can script it in (or edit sysfs.conf) to have it write a 1 to /sys/android_touch/doubletap2wake while it's booting, you can have working DT2W
Click to expand...
Click to collapse
After
Code:
echo 1 | sudo tee /sys/android_touch/doubletap2wake
I can indeed (sometimes) wake it with double tapping. I have since quite a while (with the standard kernel) the situation that its really hard to wake up. I have to press the powerbutton many many times. Feels like it is sleeping really deeply.
Since you are testing it out, have you noticed any changes in the device's normal battery life? The stock kernel seems to drain 1% every 1 1/2 minutes on my Flo, not doubting that the power optimizations ARE working (I know I'm getting much better life), I'm just wanting to ensure that it's not a placebo effect that I'm experiencing.
Click to expand...
Click to collapse
Well, I haven't noticed anything. I might just not be in the best position to judge. I rarely have it unplugged for more than a couple of hours at a time and I don't generally monitor the battery status closely. That being said though, I have very definitely never experienced anything remotely close to 1% per 1.5 min!
If you have a particular test/measurement you'd like to see - let me know.
doniks said:
After
Code:
echo 1 | sudo tee /sys/android_touch/doubletap2wake
I can indeed (sometimes) wake it with double tapping. I have since quite a while (with the standard kernel) the situation that its really hard to wake up. I have to press the powerbutton many many times. Feels like it is sleeping really deeply.
Well, I haven't noticed anything. I might just not be in the best position to judge. I rarely have it unplugged for more than a couple of hours at a time and I don't generally monitor the battery status closely. That being said though, I have very definitely never experienced anything remotely close to 1% per 1.5 min!
If you have a particular test/measurement you'd like to see - let me know.
Click to expand...
Click to collapse
I may be exaggerating slightly, but normally my tablet goes from 100% to 95% in about 5 minutes while I'm using it after taking it off the charger (in Ubuntu only, may be an rc-proposed thing too). I haven't seen that behavior since changing kernels. I'm gonna see if I can go ahead and start reverting commits today or possibly reset back to the last known good commit.
As for the screen problems, I think there is a bug in the current doubletap2wake driver, if you look at dmesg after using DT2W for a while, you'll see it being spammed with error messages from the touchscreen driver.
That could possibly be related. Additionally, I think the minimum processor speed defaulted to 384MHz (I didn't touch any processor clock speeds in here) which the Performance governor would never had let the processor hit. So it's likely that the minimum processor speed will need bumped up at least one step there, I get some stuttery behavior on the command line when the screen is off which I hadn't received on the stock kernel.
Edit (07/01/16): I'm not sure what else I can really bring to the table here, mpdecision running in the android LXC container defeats any meaningful changes to the clock speed. I also noticed mention that you shouldn't have two hotplugging daemons running at the same time, effectively that is what the new developments would've brought in. I think my best option to continue this would be to wait until the Xenial transition and see if they make any changes for me to update on.
I'm also quite a novice, so besides cherry picking commits, I'm not sure what else I can do.
ShadowEO, is bluetooth working on your device? With your kernel or with the one from Canonical?
I can't seem to get anything at all to show up on my deb.
I am so embarrassed that I didn't check this thread in so long. Ya, Bluetooth still works on my device with either kernel. Sometimes it doesn't seem to like to power on, so if you are having trouble, try this.
Open Terminal,
do sudo bluetoothctl and see if Nexus 7 (2013) shows up in there. If it does, type power on and hit enter. You should see the bluetooth indicator show up in the status bar. If it doesn't, exit bluetoothctl and do these from a root prompt:
start bluetooth-touch
start bluetooth-touch-flo
Sometimes the commands may take a little bit of time (no idea why honestly), but after those, you should see bluetooth start. At that point, if you still don't, fully power the device down and try again.
For whatever reason, the bluetooth scripts fail every so often, haven't been able to look into it much due to personal things IRL taking up all my time the last few months.
It's been a long while since I touched this project, but I have finally cleaned up the kernel source tree and ensured that it builds properly!
Two features that must remain disabled however are GOVERNOR_ELEMENTALX and MSM_SLEEPER as they are currently broken and do not function as of right now. The defconfig for flo also has sane defaults for the UBports Ubuntu Touch distribution (installable via the UBports installer application) and has DT2W enabled (but not turned on, that requires some extra work) by default.
You should also no longer need to disable the MSM watchdog using the instructions in the OP, running the kernel now and haven't experienced near as many random reboots I used to with the previous version! (I wonder if that was a UTouch problem, because I DO get random reboots sometimes using certain apps, but they're very rare... Then again, I'm not sure if UBports made any initramfs changes for the Flo when they added it to their system-image server, which they may have, since it's in the ubports-touch/15.04 distribution instead of their ubuntu-touch mirror for older, no-longer supported devices)
To turn on DT2W, you must follow the instructions on the github page for the 1.0.2 release.
NOTE: I highly recommend building the kernel from source rather than downloading a release! I have yet to add the current stable release to the github releases page! I also have a zip file with some helper scripts and configuration that can be installed into the UBports rootfs to turn DT2W and Kernel Samepage Merging on at startup. In case that's useful, I'm adding the zip to this post. To install, simply remount your root as read/write, extract the ZIP to / and then "chmod +x /sbin/tonokrnl-init" and reboot. Upon reaching the lightdm greeter, you should be able to shut the screen off, then double tap it to wake.
The files contained in the zip are:
/sbin/tonokrnl-init - Helper Script to start DT2W and KSM
/etc/sudoers/tonokrnl - Allows the user-session upstart config to run the helper script, which requires root.
/home/phablet/.config/upstart/tonokrnl.conf - Upstart configuration to run /sbin/tonokrnl-init using sudo (requires the sudoers file)
Off-topic slightly: The reason this project got set aside, was due to my IRL work, and because I had stopped using Ubuntu Touch and was testing out other ways of getting Linux onto the N7 'flo'. I messed with the Sailfish distribution found in the Nexus 7 2013 forum, then went to postmarketOS and messed with that (it's cool, but rather bare, not enough desktop packages to make it useful [no osk, etc]), then attempted to boot a debian distribution with the Linaro mainline kernel from John Stultz (couldn't even get X11 to start, the system did boot though! Perhaps mesa/libdrm needed recompiling with freedreno support...) and then finally came back to Ubuntu Touch via UBports!
Back on Topic, if you decide to use this kernel (either by building it yourself, or using the new UBports-1.0.3 release that will go up soon!) and install the attached helper scripts (or even find your own solution to on-boot DT2W, KSM, and the Interactive governor) please let me know your experiences! I noticed after turning KSM on that the web browser didn't crash as much, but I'm not sure if it's a placebo effect or not.
(I wonder if @flar2 has a 3.4.0 patchset I can apply rather than attempting to cherry-pick ElementalX into the kernel... That would be amazing to have ElementalX's additions to the kernel under Ubuntu Touch. [Please don't be angry I used a mention flar, I just wanted to ask if you had a patchset for the flo's kernel [version 3.4.0])

Categories

Resources