yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] madelgijs:
Setting core clocks?

Hello here,

I just flasehd this kernel on my brand new Google Nexus 7 with 4.1.2 stock ROM. So far everything is running smooth. My primary intention for a custom kernel was the fact that it allows for undervolting. So I don't have any needs for overclocking CPU or GPU. I do know how to set the CPU clock via SetCPU, but how can set the GPU to the standard 416 MHz?

Any hint is greatly appreciated.

Thanks, madelgijs
[Nexus 7 Android Development] Milamber33:
Unfortunately, not many kernels support changing the GPU clock, and this isn't one of them. Right now it's in alpha, so only the one version is available, and it uses 446MHz for the GPU. Once it's judged to be stable enough, a full set of kernels will be released with all different GPU speeds, but for now you're stuck.
[Nexus 7 Android Development] phonic:
Thanks for the reply and info. Honestly, I'm not sure. Due to the major issues I had with the bootloader, I had to keep changing things back and forth. I know that, outside of userdata, everything else was stock 4.1.2 when I flashed your kernel. Does the stock ramdisk not support init.d? Should I reflash that other kernel in your OP and then flash your kernel again on top of it?
[Nexus 7 Android Development] O2Blevel:
I couldn't get it to work either so I went back to stock and used this http://androidforums.com/4355246-post24.html. I didn't flash the zip because I wanted an easy way to go back if necessary. I already had busybox and spare parts from the nexus root toolkit, so all I did was to use the "install-recovery.sh" and "sysinit" and of course create the init.d directory. Make sure to use correct permissions, 0755, to all. I then flashed the M+ kernel and everything seems to be working fine.
[Nexus 7 Android Development] Metallice:
Yep. That's why I posted it. So people on the stock ROM can get init.d support.

And FYI, no, the ramdisk of stock ROMs DO NOT have init.d, while all custom ROMs worth anything do.
[Nexus 7 Android Development] phonic:
Thanks. I'll flash that and your kernel on top of it again.

Question - did you see the second issue I ran into? I posted more details about it here:

http://xdaforums.com/showthread.php?t=1942963

While it isn't related to your kernel, since you seem to have a lot of experience and knowledge about the N7, I was hoping you might have a better explanation as to what is going on and a better solution.

Thanks again.
[Nexus 7 Android Development] Metallice:
It stands for Low Power core. The Tegra 3 actually has 5 processing cores. On the stock kernel, one to four of the typical arm A9 cores are used for frequencies 340Mhz to 1.3Ghz. When the CPU load becomes sufficiently low (Or the screen is turned off), something like running 340Mhz with only one of the A9, or as Nvidia refers to them "G", cores active, the tegra 3 cpu driver will transfer the workload over to a "Low-Power" core, or sometimes called the companion core. This Low-Power core then runs from 102Mhz to 475Mhz (51Mhz min with screen off), and you'll notice there is some overlap here. That's why on the stock kernel you'll see so much 340Mhz/475Mhz usage, as it counts usage by both the G cores and the LP core. Then if the LP core has to ramp up to 475Mhz and the load remains sufficiently high, tegra will transfer the load back to the G cores, and so on and so forth. These transitions are silent and invisible to Android. Android thinks its just the same single A9 core that was running before after switching to the LP core.

What I did was raise these max and min frequencies and thresholds. As I said earlier, on the stock kernel the G core minimum and switch-over to LP core frequency is 340Mhz, and the LP core maximum and switch-over to G cores frequency is 475Mhz. I increased the LP core maximum speed to 625Mhz, and the relevant G core frequency to 475Mhz.

The idea is more Low-Power core usage by letting it do more work because it can run at higher frequency, the better the battery life as a result.

Unfortunately nobody has really given me any comments or feedback on battery life yet.
[Nexus 7 Android Development] CAR1977:
I just wanted to say a super big"thanks" to you for your m Kernel plus. The battery life is awesome, the best I have ever had and I don't have any cold boot issues anymore. I never thought that was kernel related but ever since I switched to motley's kernel and aokp I had trouble booting it up. Whatever you changed in your m Kernel fixed this and I couldn't be happier. Thank you for your amazing work. Best kernel I have used yet on my N7. I will give you some more info on battery life, but even after I use my N7 all day with lots of screen time on at night I am still are about 40% battery life. I will let my n7 run completely down and then I can give you more specific info on battery life. Anyway, thank you so much !

Sent from my Nexus 7 using Xparent Cyan Tapatalk 2
[Nexus 7 Android Development] rebel1699:
Many thanks for this kernel update! I appreciate the work!
[Nexus 7 Android Development] invisiblesurfer:
Thank you for the clarification
[Nexus 7 Android Development] aaronpoweruser:
Just want to pop in an say love your kernel, I use it on my device, wont ever be included by stock sorry about that we are trying to be true to aosp, but i will list you as the recommend kernel. Couple of suggestions you can use franco's lp interface to cut down on compiles see: https://github.com/franciscofranco/Grouper-3.1.10/commit/a7d5b5a78aca5c9a99c3c06b7fb9e0b366515dcb also you can look into showp's cmdline interface which uses amora to config the kernel interfaces
[Nexus 7 Android Development] Metallice:
Thanks so much Aaron. And to be honest I wouldn't want the kernel included in PA anyway. I love the ROM, but that would be waaaaay to much pressure :).

I wish I could use Franco's LP interface, but the interface is still limited by the current frequency table. In my kernel the slot between 475 and 860 depends on the maximum LP. Franco's code can't do that. Also it doesn't adjust the G core min which should always be one less than the LP max.

Showp's cmdline interface is very cool, but I'm not really sure what I would use it for haha. But its still something I want to take a look at in the future.
[Nexus 7 Android Development] invisiblesurfer:
Hi guys it's me again ^^.

I unlocked and rooted my brand new 100% stock N7 16GB WiFi device using Wug's Nexus Root Toolkit 1.6.1

I powered off the device and tried to enter TWRP recovery by holding down Vol+, Vol- ^ the Power button. I then selected recovery mode but instead of the familiar TWRP menu I got the icon of the android with a red exclamation mark.

What did I do wrong?

Thankfully it booted back to the android OS normally so hopefully I haven't damaged the device so I can fix it whatever the problem is. Or should I start from scratch? And how? Is there a guide you'd recommend?

Thanks again for your help to leave the newbieland I'm in.
[Nexus 7 Android Development] opz187:
Twrp never got pushed to your device. Just curious, In wugs toolkit what did you specify the build as?
[Nexus 7 Android Development] Milamber33:
Alternatively, do you know if Wug's toolkit renames the recovery restore files? Stock Android comes with files which restore the stock recovery whenever it gets changed.
[Nexus 7 Android Development] invisiblesurfer:
The build was specified as N7 4.2.1 with the correct identifier.

I looked it up on the web and it was supposed to be a matter of the boot-from-recovery.p overwriting the TWRP every time the device booted hence giving this error I described.

So I went to rename the fle from .p to .bak, but I actually found that there was only a boot-from-recovery.bak version in there...

I re-installed TWRP via goomanager and it did the trick apparently, I now have TWRP recovery access.

I am happy to report that I installed the M-kernel so thank you all guys for the work and the help!
[Nexus 7 Android Development] krazeecracker:
Just ran a benchmark and smashed it with 766 gpu and 1600 cpu ;) so smooth
[Nexus 7 Android Development] R3dbeaver:
Wait. What? How did u get 766 gpu? Did u tweak the voltage at all? A19?
[Nexus 7 Android Development] Metallice:
That's because I accidently broke RAM scaling in a19 so that it is constantly running at max frrquency. :P
[Nexus 7 Android Development] Metallice:
Lol I'm pretty sure I set the upper limit to 700MHz as to not be responsible for melting your chips... meh maybe I didnt.
[Nexus 7 Android Development] krazeecracker:
Trickstermod ;) and nope all stock lol and yes a19.

I'm not complaining :D
[Nexus 7 Android Development] sert00:
I'm installing in this moment the beta update of trickster with all of these things inserted.very cool now!:D
[Nexus 7 Android Development] R3dbeaver:
and you just posted in SG:DZ thread that you're running 520 and you're having lag??? GO PUT 700 IN THE GAME AND RUN ULTRA HIGH! :victory::victory::victory:

(and share some screenshots!)
[Nexus 7 Android Development] Metallice:
FYI on the voltage stuff. It appears that the core run at the highest voltage of whatever is requested by dvfs at the time. This is because there is only VDD_CPU and VDD_Core

E.g. if you have the GPU wanting 1400mV, the LP core running low and wanting 1000mV, and everything else wanting 1200mV, VDD_core will be at 1400mV for the core.

At last this is how it appears to work based on the dvfs stats sysfs file.
[Nexus 7 Android Development] krazeecracker:
Haha I'm worried about the heat with the internals. It went up to 95° I'm probably being paranoid but I need some insight lol
[Nexus 7 Android Development] Metallice:
I personally prefer my chip to not be able to boil water.

5 more degrees and your chip shuts off to prevent damage by the way
[Nexus 7 Android Development] krazeecracker:
I just added a build.prop tweak and lowered gpu what's an ideal temperature?
[Nexus 7 Android Development] Metallice:
50-60 is great. 60-70 is OK. 70-80 is troubling. 80-90 is way too hot. Anything above 90 is melting.
[Nexus 7 Android Development] krazeecracker:
Thanks bro!
[Nexus 7 Android Development] nphil:
Jesus Christ 95C, how do you even hold that thing?

I can get GPU to work at 700 by upping the voltages to 1400mV, but as you said, does that mean the CPU is overvolted to those voltages as well? What if I manually change them with trickster mod? Just not sure how it works, that's why I ask. Because I've been having a few crashes and this didn't happen with other kernels and I'm trying to figure out if this is related to CPU overvolting.
[Nexus 7 Android Development] bcvictory:
That would be right. Just finished doing my test on a19 and then a20 comes out! Not complaining...
[Nexus 7 Android Development] Metallice:
No the CPU and Core are separate voltage rails. Core includes RAM, EMC, and GPU among others.

Let's say the GPU isn't working hard so it's only at 320MHz and at 1000mV, but the LP core is at maximum frequency so it's at 1150mV, and the USB driver is connected at 1000mV... The core will run at 1150mV... Or at least that's how I think it works looking at sysfs for dvfs. It's not something you really need to worry about.

Also overvolting shouldn't cause any instabilities... really just more power use and more heat.
[Nexus 7 Android Development] xfrancis14:
A20 gave me boot loops D:
[Nexus 7 Android Development] Metallice:
uh oh maybe i uploaded the wrong file.
[Nexus 7 Android Development] xfrancis14:
Can you upload the right ones please (;
[Nexus 7 Android Development] Metallice:
I never said they were the wrong files. Just maybe. I'm going to download them myself to check.

EDIT: They work fine for me. Are you sure you tried both and made sure your download wasn't corrupt?
[Nexus 7 Android Development] xfrancis14:
Oh okay if they're the right ones than that's weird.. Luckily I still had a19 downloaded so I used that one and I used the 666 a20 if that makes a difference
[Nexus 7 Android Development] Metallice:
Try to get a last_kmsg or logcat if you can. Also try both versions and try redownloading.
[Nexus 7 Android Development] xfrancis14:
Idkk what those are and okay ill try that
[Nexus 7 Android Development] krazeecracker:
Fahrenheit lol and it probably doesn't help that it's in a case that doesn't allow it to breath either. Took it out and it stopped temperature instantly
[Nexus 7 Android Development] Metallice:
*facepalm*

We use metric here. As an american science major its something I've learned to deal with.

My previous post was referring to Celsius.

Also make sure your looking at chip temp and not battery temp as 95 degrees F is way too cold haha.
[Nexus 7 Android Development] krazeecracker:
Current battery temp is at 79 Fahrenheit. Good?
[Nexus 7 Android Development] xfrancis14:
I neither worked so I'm on a19 right now
[Nexus 7 Android Development] Metallice:
No lol. There's no way your CPU is running 3 degrees above room temperature.
[Nexus 7 Android Development] nphil:
I think he's asking you to check your CPU core temp with an app like System Tuner.
[Nexus 7 Android Development] xfrancis14:
Any ideas?
[Nexus 7 Android Development] wy2sl0:
Curious Met, I see you upped the proc state for audio to stop glitching. I use my nexus as my music player (n7 music player) in my coat pocket on my walk to classes with the screen off. Is this going to destroy battery?
[Nexus 7 Android Development] krazeecracker:
Says 122 f. Where do i look for it. I know thats not right.
[Nexus 7 Android Development] nphil:
Actually that sounds about right for CPU temp (50C), lol. Mine idles around 40-48C and on load it goes as high as 80ish.Try running a game at 766 for a while and check that temp. If you're using system tuner, it should be the temp under CPU screen. I believe this is the CPU temp based on how quickly it fluctuates and how high it is, but I could be wrong. There's also an app called TempMonitor that used to work on the Nexus 7 for CPU temps but recent kernel changes have caused the app to stop working and the developer is MIA, so..

As for battery temps, I think these are logged periodically and don't really reflect anything that matters.
[Nexus 7 Android Development] leelaa:
Been keeping an eye on this thread and now I'm about to give this kernel a go :)
[Nexus 7 Android Development] wy2sl0:
A20 666 won't boot for me either.
[Nexus 7 Android Development] Metallice:
No I made sure that wouldn't happen before adding it in. Music playback typically needs more than 340MHz from what I've found. Video playback needs LP max.
[Nexus 7 Android Development] Metallice:
I'd hold off considering some are having issues. Don't want you first impression to be negative :)
[Nexus 7 Android Development] Metallice:
Last_KMSG please. If you cant get it because of the boot loop grab it immediately after flashing a working kernel. Last kmsg should still refer to a20 if the previous boot was a20.
[Nexus 7 Android Development] wy2sl0:
If you link me where to get this or how to I will np.
[Nexus 7 Android Development] krazeecracker:
Just wanted to make sure lol. And a20 666 lp core is smooth as all of your kernel builds :thumbup:
[Nexus 7 Android Development] leelaa:
Lol, already flashed. No booting issues. and seems smooth, obviously far to soon for me to judge properly but will keep using until i run into problems. (If i do)

User/560

What are users experiencing?
[Nexus 7 Android Development] nphil:
Ok, I have the same issue. Tablet is stuck at google logo. I'm using the modified twrp recovery by Tassadar to dual boot ubuntu but i dont have ubuntu installed because the damn thing refuses to dualboot. Here is the last_kmsg

http://pastebin.com/hUfF3BJ6
[Nexus 7 Android Development] leelaa:
I take it trickster mod app is preferred, can anyone suggest a good read ahead buffer size please?
[Nexus 7 Android Development] Metallice:
In command line type - "adb shell" and then "cat /proc/last_kmsg > /sdcard/log.txt"

Then grab log.txt from your sdcard.
[Nexus 7 Android Development] nphil:
Just posted mine on the previous page.
[Nexus 7 Android Development] wy2sl0:
Yeah. i just tried 550, no go either.
[Nexus 7 Android Development] Metallice:
Thats not my kernel. You can see that in the first line.
[Nexus 7 Android Development] nphil:
Woops, I took that inside recovery, guess it makes sense because the recovery has its own kernel. I'll try and grab one while its stuck on boot.
[Nexus 7 Android Development] wy2sl0:
The log output is blank...weird...I did have to flash back to franco r30 to get it to boot, otherwise ADB wouldn't work.
[Nexus 7 Android Development] xfrancis14:
Has there been a fix of workaround for a20 I could try?
[Nexus 7 Android Development] nphil:
So, I can't manage to access adb when it's stuck on the google logo.. There's no device connected bading from Windows. How can I get you that last_kmsg?

I should also mention that flashing A19 works fine, boots and everything.
[Nexus 7 Android Development] Metallice:
You can't if it is stuck at google logo. Bootloop /= stuck at google.
[Nexus 7 Android Development] nphil:
I never did have a bootloop, it was the other guys that (claimed) did.
[Nexus 7 Android Development] wy2sl0:
Yeah mine doesn't loop, it is stuck at the Google screen also.
[Nexus 7 Android Development] Metallice:
Well a20 works on mine so I'll have to work backwards to try to figure it out.

Try this...

http://www.mediafire.com/?yku12v46o89jzru
[Nexus 7 Android Development] xfrancis14:
Can I/ should I try the media fire link?
[Nexus 7 Android Development] Metallice:
Well duh. That's why I posted it. :)
[Nexus 7 Android Development] wy2sl0:
Just tried, same stuck. Just a FYI 666 a19 doesn't work also.
[Nexus 7 Android Development] nphil:
Same story
[Nexus 7 Android Development] wy2sl0:
Is there an aggressive UV or something that would cause the non-boot? I ran your older kernels on older PA and it booted no problem.
[Nexus 7 Android Development] nphil:
a19 666 works for me, i just tried.

EDIT: Sorry I'm clogging up your thread, I really appreciate you looking into this!
[Nexus 7 Android Development] Metallice:
Nope. Nothing obvious like that.
[Nexus 7 Android Development] krazeecracker:
Try the lower lp clock version.
[Nexus 7 Android Development] Metallice:
No worries. Ill have another kernel to test for you guys with boot issues shortly.
[Nexus 7 Android Development] wy2sl0:
a19 666 I got working I did full factory reset, without any rom.

Thanks for your help, I am heading to bed. Will flash any updates tommorow.
[Nexus 7 Android Development] Metallice:
A factory reset definitely wasn't necessary. Flashing a19 would have been enough...
[Nexus 7 Android Development] xfrancis14:
K I tried the mediafire link and still a no go
[Nexus 7 Android Development] Metallice:
Try this... about half a19 / half a20

http://www.mediafire.com/?j5n3bz6mdhi6a4z

if this works then I'll work forward until I can isolate the one patch causing issues.
[Nexus 7 Android Development] xfrancis14:
It works :D is it stable tho? Should I just go back to a19?
[Nexus 7 Android Development] nphil:
Excellent, this one works! What changed?
[Nexus 7 Android Development] Metallice:
Like 10 different patches removed...so I still need more help to figure out the specific cause... another test kernel soon.
[Nexus 7 Android Development] xfrancis14:
Sounds good ;p
[Nexus 7 Android Development] XxStechxX:
I've been having that problem for About 2 weeks, if you try tapping the power button on the Google screen does it make a difference? I have a hell of a time coming out of recovery sometimes. & it Never boots from fast boot to recovery. Unless prompted to from in Rom or from the toolkit. I have the weekend off so ill give a go from scratch. Hopefully is just user error & the clean will fix

Sent from my SCH-I500 using Xparent Blue Tapatalk 2
[Nexus 7 Android Development] Metallice:
http://www.mediafire.com/?yku12v46o89jzru
[Nexus 7 Android Development] xfrancis14:
Was a no go :(
[Nexus 7 Android Development] Metallice:
Next one - http://www.mediafire.com/?gk3130ng8qjfont
[Nexus 7 Android Development] xfrancis14:
Works (:
[Nexus 7 Android Development] NicoGa:
a20 boot for me (666lp on stock rom).

However, if it can help, Antutu benchmark are lower than with a19 666lp principally due to 2D graphics: 600 instead of 750; and 3D graphics: ~2000 instead of ~2500 (they are almost no difference in the rest). The UI is also noticeably less fluid (for both ondemand and interactive governor).
[Nexus 7 Android Development] R3dbeaver:
Awww another new one.

/read 3 pages of issue

Ok. Nvm lol...

A19 works great. Good battery. 600 gpu. 666 lp.
[Nexus 7 Android Development] Metallice:
Hopefully this one works too... http://www.mediafire.com/?r67m7vj7ysfp4xj
[Nexus 7 Android Development] xfrancis14:
Bout to flash it, let's hope for the best brb

---------- Post added at 10:08 PM ---------- Previous post was at 10:03 PM ----------

Didn't work
[Nexus 7 Android Development] Metallice:
And another.. By the way these are open to anyone with boot issue lol not just xfrancis14 haha

http://www.mediafire.com/?b5fe5ry8x8kb014
[Nexus 7 Android Development] xfrancis14:
Hahaha

This one works :)
[Nexus 7 Android Development] Metallice:
Boom - http://www.mediafire.com/?hp6u34tlwp87z86
[Nexus 7 Android Development] xfrancis14:
Works :D

Hahaha ive said works so many times now the first suggestion SwiftKey comes up with is works

---------- Post added at 10:44 PM ---------- Previous post was at 10:34 PM ----------

Anymore you'd like me to test out or is everything good now?
[Nexus 7 Android Development] Metallice:
Not even close... :( All it means is I haven't gotten to the problem yet... I want you to say no it doesn't work haha.

Bam - http://www.mediafire.com/?rcgic0jh2vakjg2
[Nexus 7 Android Development] xfrancis14:
Works ;(
[Nexus 7 Android Development] Metallice:
Why won't you let me stop your device from working :(

Badabing - http://www.mediafire.com/?3maqh5ju97lbkoh
[Nexus 7 Android Development] xfrancis14:
My poor baby fought off another Bootloop ;p
[Nexus 7 Android Development] Metallice:
I'll get you eventually - http://www.mediafire.com/?wa68lwmgujgs02c
[Nexus 7 Android Development] xfrancis14:
She fought off another Bootloop ;p
[Nexus 7 Android Development] Metallice:
ARRRGH! - http://www.mediafire.com/?19lc1p5x5t1ly1f
[Nexus 7 Android Development] xfrancis14:
....You finally did it.. You managed to Bootloop my baby
[Nexus 7 Android Development] Metallice:
I knew acting like a pirate would work... alright hopefully this works now - http://www.mediafire.com/?x41y8r1sbqcvs7j
[Nexus 7 Android Development] xfrancis14:
Works! Is it finally done? Haha
[Nexus 7 Android Development] Metallice:
Last one. If this one works than I'll be able to build a21 and make it available shortly. Thanks so much for testing these.

http://www.mediafire.com/?jgcwtn4kkr602yf
[Nexus 7 Android Development] xfrancis14:
It works :) so this is a20 basically? What will a21 feature? Just curious and btw your welcome for testing them for you :D probably the best thing I can do for you considering I don't have any money or anything to donate so it's nice I could help you out with testing the kernel
[Nexus 7 Android Development] Metallice:
a21 will have a great new feature called "booting up". As well as an additional tweak to hotplug values that aren't in the file i last sent you.

Thanks again. I appreciate it. It would have been impossible for me to for me to figure it out as it was working fine for me.
[Nexus 7 Android Development] xfrancis14:
Oh cool :) what's booting up do? And I'm only 14 so Idkk like everything ;p but for this being my first Android device I think I'm doing pretty good
[Nexus 7 Android Development] Metallice:
I can't tell if you're being serious or not. Booting up is the ability for your device to not get stuck at the google logo and actually work haha. Yes you are doing *well* haha. I remember those days... college is overrated. Doing my best to avoid studying for finals...