[Q] Help adjust kernel VDD Levels - Thunderbolt Q&A, Help & Troubleshooting

I am running stock rooted RUU released on 4-19 by jcase.
I loaded Adrynalyne’s kernel 5.10.11 [2.6.32.21] control freak v2. I am able to adjust the VDD levels on the fly using terminal through commands such as
Echo “-25” > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels or adjust each individual speed voltage. Unfortunately, these settings reset after a reboot.
There are two files labeled 00vdd_levels with rwxr-xr-x permissions and a 00vdd_levels~ with rw-r--r—permissions in the /system/etc/init.d folder. I have tried to manually change the voltage levels through root explorer and changed the name of the files to 99vdd_levels, but the stock voltages reload after each reboot. I have spent several hours trying to get these modifications to be permanent. I may be searching for the wrong edit, but I really need some assistance.
Please help me with the scripts or recommend a thread that has the instructions on how to perform these tweaks. TIA

The one with the ~ at the end was probably generated by vi when someone didn't save properly. The file without the ~ is the one to edit. Make sure your settings aren't commented out with a hash (#)
ETA: In fact the ~ file may also be causing a problem. Remove it and see what happens.

Thanks for your reply. I deleted ~file and have spent hours trying multiple methods to get the script working, but I have not been successful. I know have 10 posts so I can post my issue in the development thread made by the kernel dev and hopefully he can help me since he created the kernel.

Related

Help with Audio Mod... [Need help from an Android Dev]

Ok, basically my linux knowledge is very limited and i need help modifying a file that gets written on boot (i don't know if this would even work, so if someone could answer that it would be very much appreciated).
The file i'm looking to change is '/sys/module/q6audio/parameters/speaker_max_gain'. In the latest 2.1 build this file is set to '602', which i think explains the slight volume increase from 1.6 (it was set to '600', but located in 'sys/module/msm8k_cad_volume/parameters/handset_max_gain' instead)
So, does anyone know how to alter this file? I know it gets re-written every time you boot the phone, but i can't find where it's being written from. Is it a kernel thing or am I completely wasting my time with this?
Cheers
UPDATE - Thanks to @VogelDerNacht, i've tried a few things like trying to change the value in the init.rc (echo "value" > sys/module/q6audio/parameters/speaker_max_gain) which didn't work, and i then tried to use a sysctl.conf in /system/etc/ to do the same thing, which also didn't work (don't think the kernel supports this), so now i'm pretty stuck
It seems like i may have to wait for the kernel source to be release now ><
how about creating a simple shell script and having it execute as a service from one of the init scripts ?
its possible the sys entry is not created until later in the boot sequence
DJ_Steve said:
how about creating a simple shell script and having it execute as a service from one of the init scripts ?
its possible the sys entry is not created until later in the boot sequence
Click to expand...
Click to collapse
could you give me an example please? i'm pretty new to all this linux stuff
The problem seems to be that when i add the line in to the init.rc (or any of the init files) it gets overridden by something else (probably the kernel) and i can't get it to apply my changes. I can change it fine whilst the phone is running, but that doesn't do anything because i think these files only get read from once when the phone boots.
I could be completely wrong though, like i said, my linux knowledge is pretty bad ><
First you need to confirm that entry boosts what you want
DJ_Steve said:
First you need to confirm that entry boosts what you want
Click to expand...
Click to collapse
That's the problem. I think it reads from the file only once when the phone boots but i don't know, that's why i want to change it on boot to see if it works
their should be a simple script (.sh extension) in /system/etc that you may be able to edit to add echo *your value > sys path to end of
DJ_Steve said:
their should be a simple script (.sh extension) in /system/etc that you may be able to edit to add echo *your value > sys path to end of
Click to expand...
Click to collapse
Tried that. Tired editing the init.rc, that didn't help. I tried adding a sysctl.conf but i don't think the kernel supports it. I tried editing every .sh file i could find but it looks like the kernel just overwrites everything
ok if you fancy a hand trying to get the volume to boost drop me a pm as i woudln mind being a tester ffor playing with werid options (and since iport android anyway i know my way around

GSB 3.3 lights & SuperCharger problems

I wanted to post this on the 500+ page GSB ROM thread, but alas I need 10 posts under my belt first (9 now!).
Like others who upgraded to GSB v3.2, my soft-key lights quit working. Apparently v3.3 fixed this, but I'm still having the same issue. I wiped dalvik, but did not do a full wipe. Is a full wipe necessary to fix this issue?
Also, I'm having a lot of problems getting zeppelinrox's SuperCharger scripts to work. When I run them in Gscript, I get tons of stderr's. So I rebooted into Clockwork's recovery, mounted /system, mounted /data, and mounted /sdcard. Then I ran the script again from adb. It looks like the script is trying to make changes to /system/etc/rootfs/init.mapphone_umts.rc. This file doesn't exist on my phone, I don't even have the rootfs folder. It appears as though other GSB3.3 users aren't having this problem. Why is mine different?
[poo]
Scratch that first part. The lights are working. I just never paid much attention to them before they stopped working, didn't realize that they were triggered by a sensor. Duh!
I still have the SuperCharger issue, though. I'd really like to get that working!
[poo]
Use script manager to run the script.
I'm making progress, but I'm not quite there yet. I got the same results with Script Manager. Then I noticed that the scripts included with GSB v3.3 were v5 of SuperCharger. So I tried v6 SuperCharger in Script Manager and things seemed to go much much better. The bulletproof launcher setting is sticking after a reboot, but the minfrees get reset back to 6, 8, 16, 36, 40, 40 every time. I've tried all three balanced settings.
[poo]
poo706 said:
Scratch that first part. The lights are working. I just never paid much attention to them before they stopped working, didn't realize that they were triggered by a sensor. Duh!
I still have the SuperCharger issue, though. I'd really like to get that working!
[poo]
Click to expand...
Click to collapse
Sensor so that they only come on when it's dark? Was wondering the same...
I'll follow this thread since I don't have the 10 either and want to get the SuperCharger scripts working as well, because I'm getting the same errors others are getting.
v3.3 also fixed a bug I was having where if I had the Google web widget search on my homescreen and hit the search magnifying glass softkey, the Google widget would move to the top of the homescreen and almost be stuck there, but looks to be good now.
Have you tried SuperCharger v6 with Script Manager, or just v5 with Gscripts?
[poo]
v5 was only for milestone.
You have to use V6.
There might be something overwriting minfrees on boot.
No wonder everyone's having so many issues. I think we all assumed that shed would have bundled the correct version with GSB.
Any idea, off the top of your head, what programs might be also trying to set minfrees at boot?
[poo]
poo706 said:
Have you tried SuperCharger v6 with Script Manager, or just v5 with Gscripts?
[poo]
Click to expand...
Click to collapse
Hmm, no idea? I installed and went into Script Manager and ran cRom-BulletProofLauncherOnly.sh and ran Balanced3, but got the errors all others were getting.
Edit: I used Script Manager and ran those scripts in /gscript. The v6 versions are in a different thread? I just found them, I'll have to install them at home since I don't have my charger here.
Edit x2: Looks like it's one .sh file. Run it in gscript and then select the type of memory management you want, that's it right? wshed says he's running bullet and balanced3. How do you get bullet running?
Download this .txt file and remove the .txt extension:
http://forum.xda-developers.com/attachment.php?attachmentid=586107&d=1304484146
Run that .sh script with Script Manager. It's all in one, no need for all of the individual scripts that were included with GSB. This is the main thread for SuperCharger:
http://forum.xda-developers.com/showthread.php?t=991276
As I said, the script works great. Bulletproof launcher setting sticks, but not memory settings.
[poo]
Use Script Manager and load the single V6 Script.
If you have Auto Memory Manager, disable superuser permissions so it doesn't load settings on boot.
If you have Autokiller Memory Optimizer, you can disable the apply settings on boot option.
If you need to, you can always use Script Manager to load /system/etc/init.d/99SuperCharger on boot.
zeppelinrox said:
Use Script Manager and load the single V6 Script.
If you have Auto Memory Manager, disable superuser permissions so it doesn't load settings on boot.
If you have Autokiller Memory Optimizer, you can disable the apply settings on boot option.
If you need to, you can always use Script Manager to load /system/etc/init.d/99SuperCharger on boot.
Click to expand...
Click to collapse
Yea, the big confusion was everyone was using the v5 scripts and nothing was working... I'll def hit up the v6 tonight, thanks.
I've never installed Auto Memory Manager or Autokiller Memory Optimizer, so those aren't the culprits. Using Script Manager to load /system/etc/init.d/99SuperCharger on boot did work. But I'm a little confused. Aren't all the scripts under init.d run at startup anyway? If true, then using Script Manager to load S99SuperCharger just runs it again, right?
[poo]
Thats right.
Using SM to load it on boot is just a workaround until you figure out what else is loading minfree values.
Since you don't have a minfree app installed, it there may be something else in the init.d folder or perhaps another boot script folder such as a userinit file or folder
I think I found it, /init.rc seems to be the culprit. I take it that init.rc gets executed after all of the scripts in init.d? I'd really rather not have to load SM at boot every time just to override the settings in init.rc. I assume that editing init.rc in some form or fashion would be the best way to go? I could either change the values in init.rc and remove S99SuperCharger, or leave S99SuperCharger in place and comment out the conflicting lines in init.rc.
Thanks for all the help, by the way!
[poo]
Editing init.rc isn't the right approach. It looks as though it gets rewritten at startup. I pulled init.rc via adb, added some text to a commented out line, pushed it back, and rebooted. The text I added was gone after the reboot. So now the question is: how and when is init.rc getting created? If init.rc is already in place by the time 99SuperCharger gets run, maybe 99SuperCharger could just modify init.rc prior to its execution.
[poo]
Actually, init.rc wouldn't interfere with 99SuperCharger.
On the milestone there is:
/init.rc
/init.mapphone_umts.rc
/system/etc/rootfs/init.rc
/system/etc/rootfs/init.mapphone_umts.rc
The first 2 items I can't edit they get created on boot.
The 2 items in the rootfs folder I can and it sticks.
If I have a init.d/99SuperCharger file, it would supercede the *umts.rc file and that file supercedes the init.rc
So the bootscript>*umts.rc>init.rc
I think that only way 99SuperCharger doesn't stick is if your ROM doesn't even load it (there actually was a bug in CM7 for milestone where it didn't load) or you have a userinit.d folder or file
edit: okay look for folders...
/data/local/userinit.d
/sd-ext/userinit.d
or files
/data/local/userinit.sh
/sd-ext/userinit.sh
Also, I wonder if you do have an *rc file (like init.mapphone_umts.rc) that can be hacked... heh
Already looked in both of those places, no files or folders of interest. What creates init.rc, do you know?
[poo]
Its in the boot.img file I believe.
Maybe reflashing the rom will fix it?
Sent from my Milestone Powered by my V6 SuperCharger
I'm trying to run the v6 version but I can't find the Interactive option anywhere in Script Manager. I go to config and it's not there. Help?
Edit: found the new version of script manager you touched the screen for input haha, and got it running.

[Q] Where is the scaling file located?

I'm searching through android commander as I'd like to delete the default scaling file in the kernel so my voltage control profile will stick between reboots. But I forget where its located and can't seem to find it. could someone help me out?
181 views and not a single reply? hmmm...
I could be wrong, but I don't think you can touch that. Your kernel is compiled so you can't touch things like that. You could always just make a simple init.d script to take control instead, or possibly you have one that is overwriting on boot (like my init_doh).
What exactly are you trying to do?
I want the voltage control app to retain the settings I give it rather than reverting to the Governor and scheduler that the kernel wants.
You already tried to save the voltage control settings as a init.d script? Menu -> Save as boot settings -> init.d script / startup service
I haven't tried int.d should I?
EDIT:
So I just tried out saving to the int.d script and it seems to have worked. Thanks!
Alucardis666 said:
I haven't tried int.d should I?
EDIT:
So I just tried out saving to the int.d script and it seems to have worked. Thanks!
Click to expand...
Click to collapse
No problem. Also just give the phone some time to bootup and voltage control might lie to you the first couple launches.
Good to know. Thanks.

MeanRom Overclocking Help

So I was reading on OC and I changed the AWAKE_MAX_FREQ="AUTO" line from AUTO to 1728000 but now that I wanna go back it says error file won't save.
I noticed there's this file underneath init.post_boot.sh and it's called init.post_boot.sh.bak I don't remember seeing that there, or if it was, what did I do wrong?
are you on mean ROM 3.9?
dude just add me on gTalk real quick if you are on your comp... we'll make this easy...
---------- Post added at 03:43 AM ---------- Previous post was at 03:16 AM ----------
[/COLOR]didn't see you online...
i have to go to bed so i will give you a really quick rundown of what you need to do.
first of all, the .bak file you see is a backup of the previously edited version. delete it. then set permissions for the new file you just edited. you will have to do this every time you edit a system file with root ex... i assume thats what you are using...
second..
i assume you are on zigs or chad's kernel, since you are clocking it that high...
if that is the case... here is what you need to know:
mikey's init.post_boot.sh file in 3.9 has a LOT of text in it that is simply just information for you to read so you have an idea of what you are doing....
if you open the file, you will be at the top, and you will read from top to bottom:
#!system/bin/sh (this is at the very top)...
then you will see a bunch of text wrapped in #### symbols.
example:
#####user configurable section#####################
####################################
# Undervolting only works with anthrax kernels####################
**** like that...
anyways, you scroll down a little more and you see this... which is your executable scripts that are modifiable to you, the user.
you'll see this line
# kernel Tweaks
after that, is where you want to do your editing...
the part right above that where you see this:
AWAKE_MAX_FREQ="AUTO"
AWAKE_MIN_FREQ="486000"
(one for two phase)
(then one for your governor)
and then the ones for sleep settings...
you do not want to edit these... these are just references for the script below, which is what actually is executing and changing things...
scroll down more...
you will see this:
fi
else
AWAKE_UPTHRESH="60"
AWAKE_DOWNDIFF="35"
SLEEP_UPTHRESH="80"
SLEEP_DOWNDIFF="50"
if [ $AWAKE_MAX_FREQ = "AUTO" ]; then
AWAKE_MAX_FREQ="1512000" <===this is the line you edit to change your governor max frequency.. punch whatever value you want, then save and exit, delete .bak file, make sure permissions are good to go, reboot.
if you are using root ex, you can also just select the file (tap it once) and a window will come up telling you that it is an executable file and if you would like to execute it. i always do this to make sure i didn't mess something up...
after you execute the init.post_boot.sh file, navigate with your root ex app, or whatever app you are using... to this directory...
/sys/devices/system/cpu/cpu0/cpufreq/(whatever governor you are using)/scaling_max_frequency
long press on the scaling_max_frequency file, and select "view as text"... your new value will be displayed there. check the directory for cpu1 as well. same file path, with the exception to cpu1
hope that helped. good luck
cobraboy85 said:
are you on mean ROM 3.9?
dude just add me on gTalk real quick if you are on your comp... we'll make this easy...
---------- Post added at 03:43 AM ---------- Previous post was at 03:16 AM ----------
[/COLOR]didn't see you online...
i have to go to bed so i will give you a really quick rundown of what you need to do.
first of all, the .bak file you see is a backup of the previously edited version. delete it. then set permissions for the new file you just edited. you will have to do this every time you edit a system file with root ex... i assume thats what you are using...
second..
i assume you are on zigs or chad's kernel, since you are clocking it that high...
if that is the case... here is what you need to know:
mikey's init.post_boot.sh file in 3.9 has a LOT of text in it that is simply just information for you to read so you have an idea of what you are doing....
if you open the file, you will be at the top, and you will read from top to bottom:
#!system/bin/sh (this is at the very top)...
then you will see a bunch of text wrapped in #### symbols.
example:
#####user configurable section#####################
####################################
# Undervolting only works with anthrax kernels####################
**** like that...
anyways, you scroll down a little more and you see this... which is your executable scripts that are modifiable to you, the user.
you'll see this line
# kernel Tweaks
after that, is where you want to do your editing...
the part right above that where you see this:
AWAKE_MAX_FREQ="AUTO"
AWAKE_MIN_FREQ="486000"
(one for two phase)
(then one for your governor)
and then the ones for sleep settings...
you do not want to edit these... these are just references for the script below, which is what actually is executing and changing things...
scroll down more...
you will see this:
fi
else
AWAKE_UPTHRESH="60"
AWAKE_DOWNDIFF="35"
SLEEP_UPTHRESH="80"
SLEEP_DOWNDIFF="50"
if [ $AWAKE_MAX_FREQ = "AUTO" ]; then
AWAKE_MAX_FREQ="1512000" <===this is the line you edit to change your governor max frequency.. punch whatever value you want, then save and exit, delete .bak file, make sure permissions are good to go, reboot.
if you are using root ex, you can also just select the file (tap it once) and a window will come up telling you that it is an executable file and if you would like to execute it. i always do this to make sure i didn't mess something up...
after you execute the init.post_boot.sh file, navigate with your root ex app, or whatever app you are using... to this directory...
/sys/devices/system/cpu/cpu0/cpufreq/(whatever governor you are using)/scaling_max_frequency
long press on the scaling_max_frequency file, and select "view as text"... your new value will be displayed there. check the directory for cpu1 as well. same file path, with the exception to cpu1
hope that helped. good luck
Click to expand...
Click to collapse
Nice post. Good to see people on xda still helping out the fellow user.
Sent from my PG86100 using xda premium
I tried to put them back to AUTO how it was before but it won't save it says error and that it won't save
EDIT:
Idk if this mattered but I clicked mount /system as writable and that saved it, and got rid of the .bak file
using root ex?
infEcted
marioca said:
I tried to put them back to AUTO how it was before but it won't save it says error and that it won't save
EDIT:
Idk if this mattered but I clicked mount /system as writable and that saved it, and got rid of the .bak file
Click to expand...
Click to collapse
This was the solution to the problem.....
It wouldn't allow you to save it the first go around because you didn't give the system permission to save it... When you mounted the system as writable that allows you to save it to the "system"
Sent from my PG86100 using Tapatalk
How come the first time I changed it I didnt have to do it
cobraboy85 said:
are you on mean ROM 3.9?
dude just add me on gTalk real quick if you are on your comp... we'll make this easy...
---------- Post added at 03:43 AM ---------- Previous post was at 03:16 AM ----------
[/COLOR]didn't see you online...
i have to go to bed so i will give you a really quick rundown of what you need to do.
first of all, the .bak file you see is a backup of the previously edited version. delete it. then set permissions for the new file you just edited. you will have to do this every time you edit a system file with root ex... i assume thats what you are using...
second..
i assume you are on zigs or chad's kernel, since you are clocking it that high...
if that is the case... here is what you need to know:
mikey's init.post_boot.sh file in 3.9 has a LOT of text in it that is simply just information for you to read so you have an idea of what you are doing....
if you open the file, you will be at the top, and you will read from top to bottom:
#!system/bin/sh (this is at the very top)...
then you will see a bunch of text wrapped in #### symbols.
example:
#####user configurable section#####################
####################################
# Undervolting only works with anthrax kernels####################
**** like that...
anyways, you scroll down a little more and you see this... which is your executable scripts that are modifiable to you, the user.
you'll see this line
# kernel Tweaks
after that, is where you want to do your editing...
the part right above that where you see this:
AWAKE_MAX_FREQ="AUTO"
AWAKE_MIN_FREQ="486000"
(one for two phase)
(then one for your governor)
and then the ones for sleep settings...
you do not want to edit these... these are just references for the script below, which is what actually is executing and changing things...
scroll down more...
you will see this:
fi
else
AWAKE_UPTHRESH="60"
AWAKE_DOWNDIFF="35"
SLEEP_UPTHRESH="80"
SLEEP_DOWNDIFF="50"
if [ $AWAKE_MAX_FREQ = "AUTO" ]; then
AWAKE_MAX_FREQ="1512000" <===this is the line you edit to change your governor max frequency.. punch whatever value you want, then save and exit, delete .bak file, make sure permissions are good to go, reboot.
if you are using root ex, you can also just select the file (tap it once) and a window will come up telling you that it is an executable file and if you would like to execute it. i always do this to make sure i didn't mess something up...
after you execute the init.post_boot.sh file, navigate with your root ex app, or whatever app you are using... to this directory...
/sys/devices/system/cpu/cpu0/cpufreq/(whatever governor you are using)/scaling_max_frequency
long press on the scaling_max_frequency file, and select "view as text"... your new value will be displayed there. check the directory for cpu1 as well. same file path, with the exception to cpu1
hope that helped. good luck
Click to expand...
Click to collapse
hey that part up top where u said not to change its just for references.. well when i change.. where it says AUTO.. i changed it to 1566000 and it works fine for me.. i saved it rebooted the phone and its sticks just fine.. i didnt have to change the part near the bottom...

Fixing heating issue in ICSROM with script method by jeremywh7. Please help!

jeremywh7 has explained how to fix the issue with the ICSROM governor so that it runs with min 216Mhz and causes less heating - http://forum.xda-developers.com/showpost.php?p=58093061&postcount=1051
Here's the entire post -
Quote:
Originally Posted by jeremywh7
I just wanted to mention that I think I found the cause of ICSROM with the latest 3.1.10 kernel not running at 216MHz:
http://forum.xda-developers.com/show...postcount=1018
I have rebooted*, and its still working fine.
[*edit: forgot to update this post...a power off and cold boot does reset it. I've made an init.d script to fix it for now; will provide details later, as its now the wife's main phone.]
[...]
Better late than never, right? :-/ Here is the script I made as '/etc/init.d/01cpufreq' and set to chmod 755 (manually, using ES File Explorer, actually):
Code:
#!/system/bin/sh
#ramdisk cpu scaling min fix
chown root.root /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "216000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
I installed Universal Init.d (by Androguide.fr) to apply it at boot. I had to run the Test part w/ the tool set to Off, to enable SuperUser privileges. [Update: if you click a file to edit, it will also prompt for su, so that would be easier than running the test; K's July kernels don't support init.d obviously; I'm using kernel-2014_07_04_19_18_atrics.] After setting the tool On, and rebooting...voila, file permission fixed and min frequency 216 MHz.
Since I converted my old CM9-based Atrix to ICSROM (the reason I'm working on all this again), I recalled another mod, rain drop detect issue, for future reference:
http://forum.xda-developers.com/show...&postcount=117
Make sure to leave the extra character at the end the config line [ref: post 119].
Hope this helps...
Click to expand...
Click to collapse
Needless to say, I don't understand the instructions and I really want to be able to do this fix, so if anyone can help me, please let me know. How can I run this script?
aamil4u said:
jeremywh7 has explained how to fix the issue with the ICSROM governor so that it runs with min 216Mhz and causes less heating - http://forum.xda-developers.com/showpost.php?p=58093061&postcount=1051
Here's the entire post -
Needless to say, I don't understand the instructions and I really want to be able to do this fix, so if anyone can help me, please let me know. How can I run this script?
Click to expand...
Click to collapse
This is more like a how to use ES Explorer or Root Browser to put a script in a location and set permissions question and not what you asked
palmbeach05 said:
This is more like a how to use ES Explorer or Root Browser to put a script in a location and set permissions question and not what you asked
Click to expand...
Click to collapse
Thanks for the quick reply!
So basically I have to save this in a file and set permissions for it on a root explorer? I'm a bit of a noon in this, so I'd really appreciate if you could please explain this procedure in a noob-friendly way. What exactly should I do and what should the permissions be.
Thanks!
aamil4u said:
Thanks for the quick reply!
So basically I have to save this in a file and set permissions for it on a root explorer? I'm a bit of a noon in this, so I'd really appreciate if you could please explain this procedure in a noob-friendly way. What exactly should I do and what should the permissions be.
Thanks!
Click to expand...
Click to collapse
Actually you hit the nail on the head after i pointed out what i did in my last post. For permissions, i find it easier to manually change them instead of the chmod thing that it was talking about. For permissions, 755 the same as*rwxr-xr-x
Sent from my ATRIX HD using XDA Free mobile app
Okay. I got so far as that. But what should I name the file and what extension should I use? Am I supposed to replace a system file? Or is this a separate file I have to create? I'm not clear what he means by universal init.d, is it a file? What should I do with it?
Dude, you're seriously overcomplicating this. You're making it way more difficult than it needs to be, both for yourself and for XDA.
The post you quoted contains literally all the information you need, including all the questions you've asked in here. Just read it again.

Categories

Resources