[Kernel] Bricked-Kernel Ville - Sense JB

Search This thread

kira411

Senior Member
Sep 13, 2012
90
3
Hi @show-p1984,

I saw llabtoofeR has released Sense 5 android 4.2.2 for HTC One S. Could you please build the custom kernel that enable Sweep2wake for this ROM?
 

AKToronto

Senior Member

Yay Kcontrol! Great work as always ShowP... Truly though it seems the work of a dev is never complete and often thankless too. Not sure if sources for 4.2.2. Kernel for One S have been posted but yes it seems the first stable ROM and stock kernel have been posted... Im sure the requests for a 4.2.2. Update for Bricked will be coming in :)

Sent from my HTC One S using Tapatalk 4
 

show-p1984

Inactive Recognized Developer
Jul 30, 2011
3,700
11,805
Yay Kcontrol! Great work as always ShowP... Truly though it seems the work of a dev is never complete and often thankless too. Not sure if sources for 4.2.2. Kernel for One S have been posted but yes it seems the first stable ROM and stock kernel have been posted... Im sure the requests for a 4.2.2. Update for Bricked will be coming in :)
I will check if a quick merge is possible, otherwise this might take a week or two. KControl takes precedence now since it was pushed aside for other stuff far too often.
 

AKToronto

Senior Member
I will check if a quick merge is possible, otherwise this might take a week or two. KControl takes precedence now since it was pushed aside for other stuff far too often.

No worries . Very much appreciate the work on Kcontrol (as well as everything else you do). Its been working well for me so far and I really do like the Kcontrol interface. Let's you make changes real easily and it does appear to stick after reboot. Will report any serious bugs but ok so far.

Sent from my HTC One S using Tapatalk 4

---------- Post added at 08:22 PM ---------- Previous post was at 07:55 PM ----------

No worries . Very much appreciate the work on Kcontrol (as well as everything else you do). Its been working well for me so far and I really do like the Kcontrol interface. Let's you make changes real easily and it does appear to stick after reboot. Will report any serious bugs but ok so far.

Sent from my HTC One S using Tapatalk 4

Actually one small thing. I have my cpu 1 overclocked at 1728. On reboot it seems like kcontrol increases this to 1836...not sure if others are experiencing this?

Sent from my HTC One S using Tapatalk 4
 

show-p1984

Inactive Recognized Developer
Jul 30, 2011
3,700
11,805
Actually one small thing. I have my cpu 1 overclocked at 1728. On reboot it seems like kcontrol increases this to 1836...not sure if others are experiencing this?
I would say that this is impossible :p
gimme:
Code:
adb shell
su
cat /data/data/de.bricked.kcontrol/shared_prefs/de.bricked.kcontrol.sharedprefs.xml | grep _scaling_
 

AKToronto

Senior Member
I would say that this is impossible :p
gimme:
Code:
adb shell
su
cat /data/data/de.bricked.kcontrol/shared_prefs/de.bricked.kcontrol.sharedprefs.xml | grep _scaling_

Actually it looks like it may have been another app interfering. No worries on that.

But just noticed an interesting things re voltage control. Not sure if voltage control sticks? Seems to go back to defaults after boot... Also may be interesting to note, I had undervolted before installing kcontrol. Now when I hit the reset button it resets to my undervolted values. Works for me since I like the profile. Either way some time in the future, having the option to save voltage profiles may help ppl. Should I still pull the info above for this issue too?

Sent from my HTC One S using Tapatalk 4
 
  • Like
Reactions: gelo01

show-p1984

Inactive Recognized Developer
Jul 30, 2011
3,700
11,805
Actually it looks like it may have been another app interfering. No worries on that.

But just noticed an interesting things re voltage control. Not sure if voltage control sticks? Seems to go back to defaults after boot... Also may be interesting to note, I had undervolted before installing kcontrol. Now when I hit the reset button it resets to my undervolted values. Works for me since I like the profile. Either way some time in the future, having the option to save voltage profiles may help ppl. Should I still pull the info above for this issue too?

Sent from my HTC One S using Tapatalk 4

For voltage sticking you need to have it ticked under settings, which is separate from the frequency toggle to protect people from applying 'testing' voltages on boot accidentally. (which could be unstable)
For applying voltages another file is responsible:
Code:
adb shell
su
cat /data/data/de.bricked.kcontrol/files/saved_cpuvdd
This file won't exist if you have reset to defaults. In light of your recent post that you launched KControl with non-stock settings and it remembered them as the reset voltages, the issue is this:
When you launch a section of KControl for the first time it saves everything it is reading in that section into a file: def_name.
If you click reset within that section KControl will reset everything to those saved values and reset the shared_prefs used to apply on boot to -1, the boothandler will then ignore that. (Voltages are an exception: It saves your modified frequencies to the above mentioned file saved_cpuvdd because it makes more sense for this number of shared_prefs, keeping in mind that those values could change every kernel flash. Resetting will delete that above file.)
The boothandler will not restore settings that have been 'reset' to their saved values, because we operate under the assumption that the settings KControl reads on first launch are actually the ones from the kernel and we don't want to mess with them if the user selected "reset".

For you this happens now:
If you reset the frequencies, your previously modified settings are restored immediately, because KControl has read them on first launch. It will ALSO DELETE the saved_cpuvdd file because you wanted to go back to stock.
The boothandler will launch on boot, check if you want to restore vdd and if the file saved_cpuvdd exists, which, in your case, is not the case. It therefore will just skip this section.
To fix this behavior with what you currently have (this is not an app bug): just hit apply once in the cpuvdd screen when you have reset to defaults. (the file saved_cpuvdd will be created and the boothandler will find it)
To have the intended function of KControl: reset it's data, prevent any app from setting anything and reboot. (The quickest way to get clean stock kernel settings back is still a reboot) When you now launch KControl it will save the actual stock frequencies and everything will work as intended.
 

AKToronto

Senior Member
I will just diff both sources tomorrow and see if the changes are minor enough to allow a merge. (What would disqualify this: a re-base and too many files touched that I have modified)

Just curious if anyone would know whether HTC will have to release their official sources for HTC One S 4.2.2. kernel? I know the source above (in my quote) is a port and has a few bugs (same with the ROM ports too, which I think still need in call volume fixed, etc)

Im just curious bc it seems the unofficial 4.2.2. One S ROM from LlabTooFeR may never be officially released... So I dont know if HTC is under an obligation to still post official 4.2.2. kernel sources?
 
Last edited:

AKToronto

Senior Member
Hi @show-p184

I was playing around with flar2's kernel source for Sense JB 4.2.2, running off 2.16 hboot (with the firmware upgrade, it has a slightly new partition layout). I added a bunch of commits from your JB kernel, and mainly was interested in advanced ThermalD management and kernel based MpDecision.

In order to get it to boot, I also had to disable intelidemmand.

I was able to get a bootable zImage, but then another challenge occurred... Everytime I would reboot my phone, my data partition would get corrupted, forcing me to do an advanced reformat in TWRP (formats everything including sdcard). That seemed to be the only issue. If it booted, it ran just fine.

Here is my github https://github.com/AKToronto/IronBorn2

Not sure if something in the kernel is enabled by default, that may be causing this?

Anyways I know you are busy (and thx for the KControl updates I keep seeing btw!), but if u had any ideas off the top of your head that would be great.

Anyways, any help or advice you could give would be great. In any event, it was just something I wanted to use until (or if) you were able to update this amazing kernel. No big deal either way, just thought I would ask for your opinion, and any ideas as to what would cause something to work, but only not work after a reboot...

AK
 

light_n_roses

Senior Member
Oct 25, 2009
2,345
101
Hi snow!

I'm still using your kernel with viper 2.2.0 ROM on my HTC One S, recently I have change my battery from 1650 with the battery of the One X+ which is 2100 mah, I have red here http://xdaforums.com/showthread.php?t=1888741&page=54 that some people are suggesting that this thing need to modified at kernel level because otherwise will keep seing the battery as a 1650 mah capacity. Do you think that you could add this option to your kernel?
 
Last edited:

FalconFour

Senior Member
Oct 28, 2008
54
12
San Jose
Old thread, but much appreciated work - just hope anyone's still out there to help out.

Currently using Viper OneS 3.1.3 on Android 4.2.2 with Sense 5. I tried downloading the stable kernel from the link in OP, sent it, installed it without errors. When I rebooted, I got the HTC splash screen for a few seconds, then the screen went blank and stayed blank (/off, though can't tell the difference on an OLED). The power button would immediately trigger a vibrate pulse or two - couldn't find a pattern to vibrating short, long, once, or twice. If I hold it, it'll vibrate twice before flashing the button lights, then it'll go full vibrate just before hard-powering off. Like it got stuck in a diagnostic/recovery mode instead of booting.

I got it working again by booting recovery and restoring my last night's backup of system, boot, and cache... but I'd really like to give this kernel a try to help resolve some overheating and performance issues (specifically involving Google Maps navigation). Any tips on what I've got wrong? I tried searching the thread for clues like "vibrate" and "viper", but all I've got are people that are successfully running it but trying to work out some runtime quirks... :/
 

cannondaleV2000

Senior Member
Mar 24, 2013
1,099
963
Old thread, but much appreciated work - just hope anyone's still out there to help out.

Currently using Viper OneS 3.1.3 on Android 4.2.2 with Sense 5. I tried downloading the stable kernel from the link in OP, sent it, installed it without errors. When I rebooted, I got the HTC splash screen for a few seconds, then the screen went blank and stayed blank (/off, though can't tell the difference on an OLED). The power button would immediately trigger a vibrate pulse or two - couldn't find a pattern to vibrating short, long, once, or twice. If I hold it, it'll vibrate twice before flashing the button lights, then it'll go full vibrate just before hard-powering off. Like it got stuck in a diagnostic/recovery mode instead of booting.

I got it working again by booting recovery and restoring my last night's backup of system, boot, and cache... but I'd really like to give this kernel a try to help resolve some overheating and performance issues (specifically involving Google Maps navigation). Any tips on what I've got wrong? I tried searching the thread for clues like "vibrate" and "viper", but all I've got are people that are successfully running it but trying to work out some runtime quirks... :/

i think there have been ramdisk changes since the last release of this kernel. and showp is not supporting the ville anymore. use flar2's kernel. it is more up to date
 

Top Liked Posts

  • There are no posts matching your filters.
  • 140



    Welcome to the most customizable 1S on xda :)
    Bricked-Kernel 1S (ville)

    Features:

    * Based upon HTCs source
    * Various other fixes (look @ github)
    * Compiled with linaro toolchain
    * -O3 optimized
    * Snapdragon S4 & CortexA15 optimizations
    * Sweep2wake
    * 192Mhz min clock
    * replaced qcoms hotplug binary with msm_mpdecision (IN-KERNEL, better battery life + performance)
    * Extensive sysfs interface for mpdecision with all the tuneables you want (/sys/kernel/msm_mpdecision/)
    * replaced the thermald binary with my IN-KERNEL solution. (/sys/kernel/msm_thermal/)
    * export krait version to: /sys/kernel/debug/krait_variant
    * modified ondemand governor
    * Allow OC up to 1,836 Ghz
    * Undervolting (faux123)
    * Default clocks: 384min & 1512max

    Zip features:
    * Aroma Installer by amarullz (yes I know, it has a blue tint. I don't care, there are more important things :))
    * removes governor overrides from the ramdisk
    * adds init.d support to your ramdisk (if not already supported)

    Check the compare links for the rest :)

    Where is tha Changelog???

    There will be no more changelogs.
    Instead the download pages were outfitted with compare links to github for each download.

    What is sweep2wake?


    How to install?

    Flash through recovery. #done.

    Where to complain about errors/bugs?

    Please use the Issuetracker for bugs/errors/feature wishes!
    Issuetracker @ https://code.google.com/p/bricked/issues/entry

    showp1984@googlemail.com
    IRC Chat: Freenode IRC #bricked

    Download:

    No Guarantees! If it kills your grandmother or your device, I am NOT responsible! If you understand this:
    (If you download, please hit Thanks below my post! Thank you!)

    >>> DOWNLOAD <<<



    Donor List:

    > Hall of fame <

    Thank you very much!

    Source:



    64
    What is msm_thermal?

    Kernel based 3-phase thermal control!
    This replaces your /system/bin/thermald binary which is renamed by the installer to thermald_bck.
    It will throttle your cpu speed to keep it cool and unleash it if the cpu has cooled down enough. (3 phases: low, mid and high)

    Check /sys/kernel/msm_thermal/conf/ for the thermal configuration :)

    allowed_max_high = highest threshold (phase 3)
    allowed_max_low = remove the throttling if we cooled down to this (clr_thrshold)
    allowed_max_freq = max frequency if throttled (limit)

    [...]mid[...] = same as above, just for phase 2
    [...]low[...] = Lowest threshold (phase 1)

    check_interval_ms = how often shall we check? (sampling rate)
    Default: 100ms (=0.1sec)

    shutdown_temp = if we reach this shut down the device!
    Default: 80°C

    If you want to see msm_thermal doing it's job:
    Code:
    adb shell
    cat /proc/kmsg | grep 'thermal'
    What is msm_mpdecision?

    100% kernel based multi core decision! (should cpu1 be online or not?)
    This replaces your /system/bin/mpdecision binary which is renamed by the installer to mpdecision_bck.

    Check /sys/kernel/msm_mpdecision/conf/ for the configuration.

    startdelay = time until mpdecision starts doing it's magic (20000)
    delay = time between checks (70)
    pause = if something else plugs in the cpu, fall asleep for 10000ms (10 secs)
    scroff_single_core = if the screen is off, don't plug in cpu1. Additionally: Unplug all cpus except cpu0 when screen is turned off (1)
    enabled = enable(1) or disable(0) mpdecision. This does not affect scroff_single_core!
    min_cpus = min cpus to be online, cannot be < 1. Default: 1
    max_cpus = max cpus to be online, cannot be > 2. (if you set it to 1 and min_cpus to 1 you will basically have a singlecore) Default: 2
    idle_freq = a value against that will be checked if a core +/- is requested. (486000)
    If cpu0 is below that value and a core up of another cpu is requested, nothing will happen.
    If any other cpu is above that value and a core down of that cpu is requested, nothing will happen. (otherwise it would now put down that cpu even though it is still working, which isn't what we want)


    Hot plug thresholds (aka now it gets 'complicated')
    This small formula calculates which value will be used: (number_of_cpus_online - 1) * 2
    The result of this formula will be the nwns_threshold where a new cpu is hotplugged.
    The result of this formula + 1 will be the nwns_threshold where a cpu is unplugged.

    nwns_threshold_x = runqueue threshold, if this is reached cpuX will be hot/unplugged
    twts_threshold_x = time threshold, this amount of time must have passed for the related action to be taken (hot/unplug)

    Example:
    One cpu is online.
    (1 - 1) * 2 = 0 ergo:
    nwns_threshold_0 = cpu1 will be hotplugged at this value
    ((1 - 1) * 2) + 1 = 1
    nwns_threshold_1 = cpu0 will be unplugged at this value
    Since we can't unplug cpu0 this is '0'.

    Two cpus are online.
    (2 - 1) * 2 = 2 ergo:
    nwns_threshold_2 = cpu2 will be hotplugged at this value (The 1S doesn't have a cpu2, so that is irrelevant)
    ((2 - 1) * 2) + 1 = 3
    nwns_threshold_3 = cpu1 will be unplugged at this value

    etc...

    Where the position and function of the number equals the result of the above explained formula.

    (all times are in ms)
    If you want to see the mpdecision magic happening:
    Code:
    adb shell
    cat /proc/kmsg | grep 'MPDEC'
    mpdecision's input event boost, aka project butter :p

    This will boost your min cpu speed if you touch the screen or press a button and gives you full control.
    In those events the min cpu freq will be risen to a predefined value (look below) on every online cpu. This boosts overall reaction times and smoothness a lot.
    Configuration files:
    root@android:/sys/kernel/msm_mpdecision/conf # ls
    boost_enabled
    boost_freqs
    boost_time

    All of them work like the usual sysfs files, except one special case:
    boost_freqs will list all frequencies from cpu 0 to cpu x. Cpu 3 and any following cpu will share one frequency.
    To change those frequencies echo the cpu number + the frequency in khz. To change the boost freq of cpu3 (and 4,5,6,7,8, etc) the echo would look as follows:
    Code:
    echo "3 1026000" > /sys/kernel/msm_mpdecision/conf/boost_freqs
    for cpu0:
    Code:
    echo "0 1026000" > /sys/kernel/msm_mpdecision/conf/boost_freqs

    Defaults:
    Code:
    cat /sys/kernel/msm_mpdecision/conf/boost_freqs
    918000
    918000
    702000
    594000
    How does sweep2wake work? Does it keep my phone awake?

    Short answer: No.
    Long answer:
    Sweep2wake works with IRQs (Interrupts).
    An interrupt can be best imagined as you doing something, like shopping at the local super market, when someone jumps in front of you and punches you into your family jewels. You will most certainly not just continue shopping.
    In technical terms: An Interrupt interrupts the normal operation of a program and executes "special" code instead.

    So if you touch your screen, an interrupt is send on which the touch driver reacts. That's it.
    Since we have a capacitive touchscreen you also do not need to worry about any pressure onto the screen.

    If you want to disable sweep2wake execute this command on your phone (adb shell or directly), you can also add it to an init.d script.
    Code:
    echo "0" > /sys/android_key/sweep2wake
    (echoing "1" activates it, which is the default setting if chosen in aroma)
    Recommended governor?

    Ondemand.
    35
    Bryans old stuff (ics):

    Beastmode Bricked Ville Edition RC5 :D
    With 100% real working S2W on the soft keys now with speed improvements thanks again Show!
    Mpdecision is now enabled by default and the vsync will need to be toggled manually if you would like it off

    http://www.androidfilehost.com/?fid=9390214368362234218


    Beastmode Bricked Ville Edition RC5.1 :D
    http://www.androidfilehost.com/?fid=9390214368362234425

    the above is modded with my stuff mentioned in the changelog
    if you want plain jane with just s2w showp's is compiled with linaro 4.7.3 and -O3 as well
    and just has s2w currently

    24
    Real sweep2wake (softkeys) incoming. spent the last 9 hours on it, drunk and without the actual phone. :D
    I raped Bryan's PC and phone for it over Teamviewer.
    23
    ill still be around just not as much since i wont have a unit to test on :(

    Thanks to my awesome team ill have another one s to dev on !