yashsingh1/xdaforums huggingface dataset:
[HTC Droid DNA] wpsantennas:
For some reason I wasn't able to disable the light sensor changes. I did the "adb touch /sdcard/crpalmer-stock-lightsensor", verified that the file was created but still had the dimmer brightness settings (even after a couple of reboots and re-flashing the kernel.) I went so far as to edit system/etc/crpalmer/lightsensor.sh to not even check for the file but to simply "echo 1 3 21 3a1 5a0 15ee 2169 307f 3f96 ffff > /sys/class/optical_sensors/lightsensor/ls_adc_table" and it still didn't work. Looking at ls_adc_table I can see that it still has the new dim values. No clue what I've done wrong.
[HTC Droid DNA] [indiferenc]:
OH! i didnt mean the kernel flash did it, the adb commands did. sorry, i think i wrote that wrong :angel:
[HTC Droid DNA] RLKirk:
How do you check the cpuinfo file?
[HTC Droid DNA] n8mack33:
I'm having trouble with a bluetooth keyboard since installing this kernel (.15 and just updated to today's version). It is an HP Touchpad Keyboard but it works with android devices including my old EVO, etc. I am running stock 1.15.605.4. I am pretty sure it worked with the phone before.

Can anyone confirm whether this is an issue with the kernel. I have read and searched the thread and there are some references to the fact that HID wasn't function at some point but was recently added and that more devices are being added. If it is an issue with the kernel is this possible to fix? Thanks in advance.
[HTC Droid DNA] crpalmer:
I just tested it and verified that it worked correctly for me. Maybe a typo in the filename? You can look in /sdcard/crpalmer.log and see if it tried to apply it.
[HTC Droid DNA] crpalmer:
adb cat /proc/cpuinfo
[HTC Droid DNA] wpsantennas:
I have no doubt that it is something weird with my phone but have idea what it is. Filename should be correct as I just cut and pasted it from your post. I just flashed again and I don't have a crpalmer.log file anywhere. I looked for it as /sdcard/crpalmer.log and also did a full search and found nothing.
[HTC Droid DNA] crpalmer:
That sounds like it isn't running my scripts at all. Can you do

adb shell cat /proc/version

adb shell ls -l /etc/init.d /etc/crpalmer

?
[HTC Droid DNA] wpsantennas:
adb shell cat /proc/version

Linux version 3.4.10-dsb9938.Cubed.DNA.Stock.System.Write (dsb9938@BuildBox) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #1 SMP PREEMPT Mon Dec 24 12:55:20 EST 2012​

adb shell ls -l /etc/init.d /etc/crpalmer

ls: /etc/init.d: No such file or directory

ls: /etc/crpalmer: No such file or directory​

adb shell ls -l /system/etc/init.d /system/etc/crpalmer

/system/etc/crpalmer:

-rwxr-xr-x 1 root root 865 Aug 1 2008 cpufreq.sh

-rwxr-xr-x 1 root root 280 Aug 1 2008 lightsensor.sh

-rwxr-xr-x 1 root root 289 Aug 1 2008 under-volt.sh

/system/etc/init.d:

-rwxr-xr-x 1 root root 332 Aug 1 2008 99crpalmer​

adb shell ls -l /sdcard/crpalmer*

-rw-rw-rw- 1 root root 0 May 23 16:18 /sdcard/crpalmer-stock-lightsensor​

Not sure why /proc/version says dsb9938.Cubed.DNA.Stock.System.Write. Just in case I'd mucked something up I went and flashed Stock.Kernel.2.04.605.2_710RD.S-OFF.zip and then reflashed your kernel - still says same thing.

Thx,
[HTC Droid DNA] crpalmer:
Are you s-off? If not, the OP has instructions (changed today and not tested...) for flashing it if you aren't s-off.
[HTC Droid DNA] orangechoochoo:
Working well! I like the fact that I don't have to redo my settings everytime I flash a new version of your kernel, flash it and forget it.
[HTC Droid DNA] wpsantennas:
Yes, I'm S-OFF. I've flashed the kernel just in recovery and also using Flash Image GUI (and then flashing in recovery.) I can try the not S-OFF method if you think it's worth a try but I am definitely S-OFF. Also, once I boot up the Kernel Version listed under settings is your kernel info.
[HTC Droid DNA] crpalmer:
Can you reflash the kernel in recovery, verify that the installer says that it is my kernel, reboot into your ROM and then check what /proc/version says?
[HTC Droid DNA] wpsantennas:
Yes, I will do that when I get back home later. The other proc versions I did in recovery (flashed kernel in recovery and then rebooted to recovery again for the adb shell commands) as I've been having problems getting adb to work once the phone boots up.

Bob

wpsantennas.com
[HTC Droid DNA] crpalmer:
Ah... Okay, that's why it said that. Can you also rerun the adb ls -l... when you have rebooted into your rom?
[HTC Droid DNA] crpalmer:
What app are you using? I just (finally) got a chance to take a quick look at this and it's not obviously broken (but not 100% guaranteed to not be broken either). Also, can you run

adb shell cat /sys/kernel/fast_charge/*

?
[HTC Droid DNA] ML417:
Try turning your debugging off then on again, usually solves problems with adb not finding your device.
[HTC Droid DNA] wpsantennas:
OMG, I should have read this as soon as you posted! I did everything under the sun, nothing worked, was about to give up and then did exactly this and it worked.

---------- Post added at 08:47 PM ---------- Previous post was at 08:34 PM ----------

Reflashed and verified that it is your 2.0.26 kernel.

adb shell cat /proc/version

Linux version 3.4.46-crpalmer-2.0.26-gc510c59-00343-g009aecc (crpalmer@compile) (gcc version 4.8.1 20130401 (prerelease) (Linaro GCC 4.8-2013.04) ) #437 SMP PREEMPT Wed May 22 20:21:22 EDT 2013​

adb shell ls -l /etc/init.d /etc/crpalmer

-rwxr-xr-x root root 332 2008-08-01 07:00 99crpalmer

-rwxr-xr-x root root 865 2008-08-01 07:00 cpufreq.sh

-rwxr-xr-x root root 280 2008-08-01 07:00 lightsensor.sh

-rwxr-xr-x root root 289 2008-08-01 07:00 under-volt.sh​

Thx
[HTC Droid DNA] [indiferenc]:
I have similar concerns. What should it say after the command? I get this

1

Dedicated charging port

Discharging

1

No
[HTC Droid DNA] wpsantennas:
FWIW, I tried "echo 1 3 21 3a1 5a0 15ee 2169 307f 3f96 ffff > /sys/class/optical_sensors/lightsensor/ls_adc_table" both in recovery as well as after the phone booted but neither stuck.

Anyway, if the problem is just me it probably isn't worth the hassle - I can use 2.0.17 with absolutely no complaints!
[HTC Droid DNA] RLKirk:
Thank you. I took out ash and ran the rest with terminal so I didn't have to boot the laptop and it worked fine that way also
[HTC Droid DNA] crpalmer:
Sorry, I actually meant when it was plugged into the charger.
[HTC Droid DNA] crpalmer:
Can you check to see if you have a file /sdcard/crpalmer.log now?

The echo command won't do anything in recovery (recovery doesn't run my kernel) but should work. Can you try running it using adb as:

adb shell su -c 'echo "1 3 21 3a1 5a0 15ee 2169 307f 3f96 ffff" > /sys/class/optical_sensors/lightsensor/ls_adc_table'

adb shell cat /sys/class/optical_sensors/lightsensor/ls_adc_table

to see if that makes it change for you?
[HTC Droid DNA] wpsantennas:
No go. Still no log file and the changes didn't survive a reboot.

If it makes a difference, instead of running "adb shell ..." I just started the adb shell and then ran the rest of the command inside the shell because when I tried to run "adb shell su -c ..." I got a command prompt error.

adb shell

root@android:/ # su -c 'echo "1 3 21 3a1 5a0 15ee 2169 307f 3f96 ffff" > /sys/class/optical_sensors/lightsensor/ls_adc_table'

e 2169 307f 3f96 ffff" > /sys/class/optical_sensors/lightsensor/ls_adc_table' <

root@android:/ # cat /sys/class/optical_sensors/lightsensor/ls_adc_table

cat /sys/class/optical_sensors/lightsensor/ls_adc_table

[cm3629]Get adc_table[0] = 0x1 ; 1, Get cali_table[0] = 0x1 ; 1,

[cm3629]Get adc_table[1] = 0x3 ; 3, Get cali_table[1] = 0x5 ; 5,

[cm3629]Get adc_table[2] = 0x21 ; 33, Get cali_table[2] = 0x3f ; 63,

[cm3629]Get adc_table[3] = 0x3a1 ; 929, Get cali_table[3] = 0x705 ; 1797,

[cm3629]Get adc_table[4] = 0x5a0 ; 1440, Get cali_table[4] = 0xae2 ; 2786,

[cm3629]Get adc_table[5] = 0x15ee ; 5614, Get cali_table[5] = 0x2a70 ; 10864,

[cm3629]Get adc_table[6] = 0x2169 ; 8553, Get cali_table[6] = 0x40a8 ; 16552,

[cm3629]Get adc_table[7] = 0x307f ; 12415, Get cali_table[7] = 0x5dda ; 24026,

[cm3629]Get adc_table[8] = 0x3f96 ; 16278, Get cali_table[8] = 0x7b0f ; 31503,

[cm3629]Get adc_table[9] = 0xffff ; 65535, Get cali_table[9] = 0xffff ; 65535,​

After reboot:

adb shell

root@android:/ # cat /sys/class/optical_sensors/lightsensor/ls_adc_table

cat /sys/class/optical_sensors/lightsensor/ls_adc_table

[cm3629]Get adc_table[0] = 0x21 ; 33, Get cali_table[0] = 0x3f ; 63,

[cm3629]Get adc_table[1] = 0x3a1 ; 929, Get cali_table[1] = 0x705 ; 1797,

[cm3629]Get adc_table[2] = 0x5a0 ; 1440, Get cali_table[2] = 0xae2 ; 2786,

[cm3629]Get adc_table[3] = 0x15ee ; 5614, Get cali_table[3] = 0x2a70 ; 10864,

[cm3629]Get adc_table[4] = 0x2169 ; 8553, Get cali_table[4] = 0x40a8 ; 16552,

[cm3629]Get adc_table[5] = 0x307f ; 12415, Get cali_table[5] = 0x5dda ; 24026,

[cm3629]Get adc_table[6] = 0x3f96 ; 16278, Get cali_table[6] = 0x7b0f ; 31503,

[cm3629]Get adc_table[7] = 0x63d3 ; 25555, Get cali_table[7] = 0xc130 ; 49456,

[cm3629]Get adc_table[8] = 0xae13 ; 44563, Get cali_table[8] = 0x50e3 ; 20707,

[cm3629]Get adc_table[9] = 0xffff ; 65535, Get cali_table[9] = 0xffff ; 65535,​

---------- Post added at 08:46 AM ---------- Previous post was at 07:56 AM ----------

Ok, got it working. Problem was that init.d scripts weren't working. I used term-init to get the scripts working and now I'm getting the old brightness settings as well as seeing the crpalmer.log file. Thank you so much for your help!
[HTC Droid DNA] Milly7:
crpalmer, thanks for the awesome script. I couldn't get it going at first, but it worked using "adb shell su" instead of "adb su" that you have in post 2.
[HTC Droid DNA] crpalmer:
Doh! You're right. That is completely wrong. I fixed post 2 to be correct.
[HTC Droid DNA] .torrented:
I just ran them in terminal emulator and then did a reboot...

su -c "echo -75" > /sdcard/crpalmer-uv

for example and it worked
[HTC Droid DNA] supertoast92:
Quick question: would it be necessary to run any of these scripts if I were to update? Or would the kernel work just by flashing like previous versions? (I'm on .17 now). Awesome kernel by the way.
[HTC Droid DNA] .torrented:
Read the second post
[HTC Droid DNA] [indiferenc]:
Lol that is when it's plugged in. But the top line was supposed to say "no"
[HTC Droid DNA] spinkick:
lol i did it the noob way I guess. Created all the files myself and put the values in there with a text editor.
[HTC Droid DNA] crpalmer:
If you want to see what the kernel really sees, you can do this:

adb shell

cd /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/

cat gpuclk

cat max*

cat */trustzone/gov*

For me that said 300MHz for the current clock (gpuclk), 450MHz for the max and ondemand for the governor.
[HTC Droid DNA] idkwhothatis123:
Re: [Kernel] [Linaro] [Linux 3.4.31] Version 1.0.7 / Bluetooth test 1.1.7 - Feb 15

Hey CR. This kernel is boss. Question though. Any plans to merge with the newer boot from 2.04?
[HTC Droid DNA] dsb9938:
Can't do anything till HTC gives us the source.

D

.
[HTC Droid DNA] crpalmer:
And then we find out how badly we screwed ourselves by updating to 3.4.31...
[HTC Droid DNA] dsb9938:
No, then we just do it all over again. LOL

D

.
[HTC Droid DNA] Zarboz:
or you can take htc's old source stock and new source stock

and

diff -Naur old/ new/ > upstreamhtc.patch

cp upstreamhtc.patch /workingdirectory/

patch -p1 < upstreamhtc.patch

#profit

you patched your source with htc's changes but still kept all your mods
[HTC Droid DNA] Bigandrewgold:
Re: [Kernel] [Linaro] [Linux 3.4.31] Version 1.0.7 / Bluetooth test 1.1.7 - Feb 15

Then see how many things broke in the process.
[HTC Droid DNA] crpalmer:
You can also get git to do the patching for you too. The "see how badly we screwed ourselves" depends entirely on how much HTC has changed their kernel since the original release. DSB and I have both merged in newer versions of the kernel. In terms of lines of code that translates to

1227 files changed, 32076 insertions(+), 8327 deletions(-)

as a diff from HTC's source to my master branch, and

1252 files changed, 42877 insertions(+), 23446 deletions(-)

from HTC's source to my bt (1.1.x) branch. That's a lot of room to start the descent into conflict hell!
[HTC Droid DNA] Zarboz:
that looks like a blast :D
[HTC Droid DNA] crpalmer:
So, I finally had the same crash that you had earlier today. I happened to see zarboz on IRC and he gave me some sage and politely worded advice about some potential problems with the overclocking.

I'll try to act on that tonight and push out an update tomorrow if things look good. If you aren't having problems on the no-oc kernel, I'd appreciate you trying the next release. I feel like your phone is less tolerant of L2 problems so I'm very curious to see if it works better for you!
[HTC Droid DNA] pio_masaki:
Re: [Kernel] [Linaro] [Linux 3.4.31] Version 1.0.7 / Bluetooth test 1.1.7 - Feb 15

Not a problem, I haven't had any further reboots, so it seems ok now. Just let me know what you want tested and I'll slap it on my DNA.

Again it can take a day or so for mine to hit that bug, but if it makes it past 48 hours chances are it won't, at least, its never made it that long before.

Tapatalked from my HTC DNA
[HTC Droid DNA] crpalmer:
How long have you been running it now? If it's never made it to 48 hours, going to 72 would be great to be able to have some belief that this was really the problem.

I have a new build running on my phone with different overclocking. After you've confident that the -no-oc version is (probably) stable for you, I'd love it if you can run 1.0.8 (or later) for the same period of time to see if it is stable for you too.
[HTC Droid DNA] Tybaltus Prime:
Re: [Kernel] [Linaro] [Linux 3.4.31] Version 1.0.7 / Bluetooth test 1.1.7 - Feb 15

Hi I'm super interested in this kernel and wanna make sure it has init.d capability.. is system r/w enabled ? If I missed it in the op I apologize. I did read it... twice to b sure. Thx for sharing
[HTC Droid DNA] pio_masaki:
Re: [Kernel] [Linaro] [Linux 3.4.31] Version 1.0.7 / Bluetooth test 1.1.7 - Feb 15

I ran the RUU to get the update, saw s-off, and went back so its been about 24 hours again. If it makes it through this time tomorrow its looking good for the no oc kernel on my pansy sensitive DNA.

Tapatalked from my HTC DNA
[HTC Droid DNA] crpalmer:
Yes, it has system write (although you still need to make sure it's mounted r/w after you boot). It has a slightly modified initrd from that released in the stock kernel but AFAIK should be compatible with all current ROMs.
[HTC Droid DNA] crpalmer:
New versions (1.0.8 / 1.1.8) updated in the OP.

* Now using mdeejay's over/unclocking (hopefully solving the L2 cache corruption panic).

* thermal driver is less aggressive about throttling the phone with an additional early step down to stock speed

(50C => 1.5GHz, 75C => 1.3GHz, 83C => 918MHz, 90C => 384MHz).

* Linux 3.4.32 (although no changes that would affect our phone).
[HTC Droid DNA] pio_masaki:
Re: [Kernel] [Linaro] [Linux 3.4.32] Version 1.0.8 / Bluetooth test 1.1.8 - Feb 19

Damn, and still 36 hours left for testing the no oc kernel! :D

Tapatalked from my HTC DNA
[HTC Droid DNA] t1gartist:
loving the kernel been playing around testing hard and i mean hard for 5 days and im happy best kernel yet im also glad your working on the bluetooth stack i messed with it and got no where that **** is hard so i say thank you sir
[HTC Droid DNA] crpalmer:
Thanks, but I didn't actually get very far with the bluetooth though so don't thank too much... :)

Hopefully HTC did something write with the OTA. I'm pretty much waiting to see what's changed before doing anything other than maintaining the 1.1.x version (because that's the one I personally run).
[HTC Droid DNA] Hussainally:
Re: [Kernel] [Linaro] [Linux 3.4.32] Version 1.0.8 / Bluetooth test 1.1.8 - Feb 19

Which governer is the best for battery life? And do I need to undervolt? Currently using intellidemand and undervolted by 100..please advice.. Thanks

Sent from my venomous DNA viper
[HTC Droid DNA] supertoast92:
So, if I read correctly, no, since they'll be installed with the kernel? I just want to be sure.
[HTC Droid DNA] [indiferenc]:
No, if you have the .log files and others because future realeses read off them.
[HTC Droid DNA] crpalmer:
I assumed it wasn't because the fast-charge state thinks that it is running on battery and therefore discharging. Which looks rather wrong given that the battery icon seems to indicate that it is charging...

Can you try running

dmesg -c

and then plugging it into the charger and let it sit for a minute and then send me the output of running dmesg? (the dmesg -c is just to make it easy for me to see where the log starts for the charger).
[HTC Droid DNA] crpalmer:
The files on your /sdcard are never created, deleted or changed by installing the kernel. They are intended to be a persistent configuration that lets you install new ROMs, kernels, etc. without ever having to care about setting up the options that you like for my kernel again.

The log file is just there to debug problems. It doesn't do anything. It's all the /sdcard/crpalmer-* files that contain the configuration.
[HTC Droid DNA] [indiferenc]:
Hope this helps. Thanks for looking into this!

http://db.tt/7ooekwNz
[HTC Droid DNA] supertoast92:
Thank you for the help cr. Sorry for the headaches guys...lol

So in that case, does that mean I would need to manually create the init.d specified in the second post? Or would running any of those scripts create the necessary files? Or am I lost...all I've been doing up til now is flashing and forgetting.
[HTC Droid DNA] .torrented:
so I take it that ondemand is the only governor that is built into this kernel... because i can not change it
[HTC Droid DNA] spinkick:
you cant change it because you have the min/max cpu set. disable that and you can change the gov.
[HTC Droid DNA] orangechoochoo:
Run the adb commands he posted and the files will be created.then reboot.
[HTC Droid DNA] .torrented:
I think I got a working script for setting Governor... just testing a few more things and will submit to crpalmer once i get it 100% working :)

I just need to get it to set before it locks down the freqs

EDIT* Its 100% working :) now
[HTC Droid DNA] orangechoochoo:
Great job! I know nothing about code but I tried to examine the syntax used in the frequency scripts and I couldn't figure out how to do it.
[HTC Droid DNA] .torrented:
I know C++ which isnt anything like the sh code... so i decided to help myself today to some playing around and I managed to get it working :) i sent crpalmer my code in a pm... so we will see what he thinks...

[MENTION=3857343]crpalmer[/MENTION] i named the file governor.sh that goes in the folder with the other scripts if that makes a difference

Shows being set on boot :)

test #2

so im trying to figure out how to write a script that will allow you to make all the changes in one terminal window with out having to change the values one at a time using adb to shell in... no luck so far dont know a whole lot atm...
[HTC Droid DNA] letschky:
This Kernel is very cool,2 Percent lost over the Night in 9 Hrs.I love this.
[HTC Droid DNA] Milly7:
It sure is cool. Running NOS, binned fast, 192 min, 1458 max, undervolt -100, and left the brightness setting unchanged. I am not the heaviest of users but this is excellent compared to what I usually get.
[HTC Droid DNA] matteebee:
What is the benefit of coding over using a third party app to set parameters?

Stay thirsty, my friends
[HTC Droid DNA] .torrented:
Kinda like a set once and forget about it... Or if you switch kernels and come back the settings will be re-applied to this kernel so in case you forget what your awesome settings were they are all on your sdcard and they will survive through ROM flashes

Edit* the governor script will make it into the next release :)
[HTC Droid DNA] CharliesTheMan:
Going at it from the cmdline interface also eliminates having the variables third party apps bring into the mix as well as another app running in the background.
[HTC Droid DNA] orangechoochoo:
And the third party apps misread kernel settings.
[HTC Droid DNA] ML417:
I love how both you and Z have adopted methods of customizing the kernel without needing a kernel tuner app. I hope your method catches on soon, or maybe even a combination of both with aroma having an option to use the pre installed files. Or otherwise create them. Also good for modifying the options post flash.
[HTC Droid DNA] Zer0r:
There should be no difference between computer (where you run adb command - there is no way to run it without PC) and any other charger. This is what "force fast charge" for.
[HTC Droid DNA] crpalmer:
Minor release:

Version 2.0.27: May 26, 2013: init.d governor, 3.4.47

* Ability to specify the cpufreq governor at boot time (see second post).

* Linux 3.4.47

* Remove an annoying HTC debugging message

Note: I have never booted this kernel (I'm running CM10.1 right now) so let me know if I did something heinously stupid with it...
[HTC Droid DNA] orangechoochoo:
New version working well!
[HTC Droid DNA] .torrented:
If you wanna make a cm one for the aosp kernel I can test that cause I switched to cm10.1 last night :)

Edit* nvm you did already build one
[HTC Droid DNA] crpalmer:
I uploaded an aosp kernel in the other thread. Includes Chad's changes from this morning.
[HTC Droid DNA] .torrented:
yea i should have checked there first and its all good on that one the script edits are working fine for me on the aosp kernel
[HTC Droid DNA] crpalmer:
Cool, thanks for your help on it!
[HTC Droid DNA] .torrented:
yea i had fun learning shell script (or w/e its called) haha first time doing that feels good
[HTC Droid DNA] matteebee:
FYI today's updated 2.0.27 running fine

Stay thirsty, my friends
[HTC Droid DNA] hkbladelawhk:
What's everyone's preferred governor?
[HTC Droid DNA] .torrented:
crpalmer likes ondemand but I prefer interactive lol
[HTC Droid DNA] crpalmer:
I do use ondemand, but I do think that interactive or ondemand is the way to go because they are supported by the Linux community and by CAF. As better thermal throttling and more multi-core systems are developed, they are evolving when other governors may not be.
[HTC Droid DNA] orangechoochoo:
I like interactive too, but when I run Zarboz's kernel I use Lionheart.
[HTC Droid DNA] fr4nk1yn:
I'm impatiently waiting to use this kernel but a request:

Fancy kernel for the gnex has an ondemandplus Governor that's awesome.

Locking the screen off between 192 and 384 plus grouping tasks to least cores makes for some impressive battery savings on the gnex.
[HTC Droid DNA] crpalmer:
Limiting the screen-off frequency is most useful if you have bad apps that are running all the time and stopping your phone from going into deep sleep anyway.

When your phone is mostly deep sleeping and only waking up to really perform work, then you may use less battery at a higher clock rate because the higher clock rate then allows for a higher percentage of deep sleep (aka "race to idle").

Ondemandplus looks like the biggest (and I could image it is big) battery savings comes from the fact that the gnex could enter an idle state that locked the other core at a higher frequency and he fixed that. This isn't an issue for our phone because we it hotplugs very well (and this kernel has, IMO, a great hotplug driver)..

So, overall, it is designed to for a phone that has different characteristics of our phone (number of cores, ability to hotplug, etc.) which is my general argument against including all the governors that worked well on a previous phone. Particularly because we are in the first generation of quad-core phones...