[Q] How to obtaing GPU and RAM frequency from the Android filesystem - Android Q&A, Help & Troubleshooting

I would like to know how to read de GPU and RAM operation frequency from the Android filesystem. I know that I can obtain the CPU frequency from files such as:
Code:
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
I'm trying to do that with Pandaboard, but in fact I need to do it in more development boards (Odroid-PC, Beagleboard-xM, Sabreboard and Wandboard).
Any idea? at least how to do that with an app? I tried with CPU-z but it do not has this information. Also, I tried with commands such as dumpsys without success.
Thanks in advance.

Related

[Module] X8Overclock | v004 - Multiple freq | X8 | X10 mini | X10 mini pro | 11-04-11

Rom cookers: if you include this module in your ROM, please make a link to this post in your release post, so your users can know how to work with it and update the module themselves
Intro: (dev post)
Since the X10 kernel is working, we might have a hope that someday we will have our custom kernels. If we can have custom kernels, we can do the overclocking easily.
Until that day, we will still have to overclock with modules. To make overclocking works with our current kernel, as far as I can see, we need to do the following things:
1. Patch cpufreq data to change maximum reported freq (these value will be read by Android for further controls). cpufreq will then call the low-level acpuclock functions to change real cpu freq.
2. Patch acpuclock data + code to change real cpu freq.
Right now I'm working a proof-of-concept module, with finished 1 and half of 2. I will need to patch acpuclock code in the running kernel to make the frequency applicable.
That means, right now, Android reported that I have a 800MHz MSM7227, although it's running at 600MHz, and cpufreq's governor accepts to change to the maximum 800MHz (it's 600MHz for real). We will need to patch acpuclock code to change PLL and apply the correct divisor.
Source on github : https://github.com/doixanh/X8Features
Release history
April 11. v004. Default to 691MHz. Multiple frequencies are available for SetCPU: from 614MHz to 826MHz. You can now change frequencies with SetCPU - much like with custom kernels! You can even SetCPU freq at boot.
April 07. v003. Compatible with SetCPU. Easier for code maintenance.
April 06. v002 for mini pro. x8oc module for x10 mini pro released! Be warned: I didn't have your x10mini pro hardware so I didn't test it throughoutly.
April 06. v002 for mini. x8oc module for x10 mini released! Be warned: I didn't have your x10mini hardware so I didn't test it throughoutly. 710MHz was reported not too stable. A lower freq is more stable.
April 06. v002. Experimental! It maybe very unstable! Undervoltage for all frequencies except the max freq (Reduced voltages for 128MHz, 245MHz, 320MHz, 480MHz). This can potentially save battery. I need test results for saving battery from you guys
April 05. v001. Default to 710MHz.
Requirements:
- Rooted
- Baseband x15
- xRecovery (for automatic installtation)
- Dare!
Installation:
a. Manual installation : it will be better if you can do this way.
- Download appropriate x8oc-vXXX.zip (for X8), or x8oc-vXXX-x10m.zip (for X10 mini), or x8oc-vXXX-x10mp.zip (for x10 mini pro) below, unzip
- Remount /system as rw
- Push x8oc.ko in to /system/lib/modules
- Edit /system/etc/hw_config.sh, add one line at the beginning
Code:
insmod /system/lib/modules/x8oc.ko # x8 overclock
For people who want to set specific freq at boot, write the following instead of the code above:
Code:
# x8 overclock
insmod /system/lib/modules/x8oc.ko
sleep 2
echo xAB > /proc/x8oc
Where AB is your desired code for that frequency. Test the frequency carefully before applying it at boot!
(you can edit hw_config.sh by pulling it to your PC, edit, and push it back)
- Reboot your phone
b. Automatic installation : much like x8gesture, I will have to prepare update.zip for each ROM. I'm pretty busy now, so be patient.
General instruction
- When you install x8oc, SetCPU will not recognized the new max frequency. Don't touch the slide and/or change the governor. If you do that, the new frequency will be lost. You will have to reboot your phone to get the new freq.
- For geeks only: it is possible to change maximum frequency after you install x8oc. With following command, you can replace AB to other values to change max freq:
Code:
echo xAB > /proc/x8oc
20 to change to 614MHz
21 to change to 634MHz
22 to change to 653MHz
23 to change to 672MHz
24 to change to 691MHz
25 to change to 710MHz
26 to change to 730MHz
27 to change to 749MHz
For example, set to 749MHz:
Code:
echo x27 > /proc/x8oc
This feature still works with v004
Somebody asked about the meaning of AB above. If you look at the source you will understand
In short :
- AB is stored in hexadecimal
- Max frequency = AB (in decimal) * 19.2MHz
Example:
AB = 27 means AB = 0x27 = 39 (in decimal)
Real frequency = 39*19.2 = 748.8 MHz
You can put 28, 29, for even higher frequency... but I don't recommend to do that. It was unstable for me.
x10 mini / x10 mini pro users:
Support for x10 mini / x10 mini pro has been added since 06-04-11. However, I don't have your hardware so you must test this module before install it:
- Push x8oc.ko to /system/lib/modules
- Run the following command
Code:
insmod /system/lib/modules/x8oc.ko
If the phone is still working, no crash, no black screen, then it works.
Until you're sure that it works with your hardware, don't install it to hw_config.sh or you will get boot loops and may severely damage your hardware
Disclaimer
This module is dangerous! It may cause severe damage to your hardware. I'm not responsible if this module kills your lovely phone. Use it at your own risk!
Donations are welcome
PLEASE DON'T SPAM IN THIS THREAD WITH UNCONTRIBUTED POSTS.
Can you share the source code of your module?
I was too lazy to build a separated module for OCing Everything is a mess inside my current x8gesture module
I'll try to do something more and then separate OC into a new module.
info about MSM7227 CPU:
http://pdadb.net/index.php?m=cpu&id=a7227&c=qualcomm_msm7227
Holy sh*t. They included bunches of controllers inside this MSM 7227
Max. 800MHz Qualcomm MSM7227 Turbo, Embedded 320MHz DSP (GSM, GPRS/EGPRS Multislot Class 12, EDGE, UMTS Release 6, 7.2 Mbps HSDPA, HSUPA 5.76 Mbps, MBMS baseband), 400MHz modem processor, Adreno 200, OpenGL ES 2.0, OpenGL ES 1.1, OpenVG 1.1, EGL 1.3, Direct3D Mobile, SVGT 1.2, DirectDraw,
Click to expand...
Click to collapse
Is there anyway to enable that turbo mode by moding? It must be locked somewhere, the safe clock is 600mhz, but it might run 800mhz or more stable too, might be battery draining issue, or overvoltage necessity but with scaling that should not be a real issue, if only used to extreme situations, and, for a bit of time.
f.e. Samsung Galaxy Ace has same CPU and it run at 800Mhz
This is a great project and it looks very promissing.
ZTE Blade has same cpu and they had problems overclocking just the main core, but in the end they solved it, I guess you could take a look at their solution as well.
And thanks again for the dualtouch module.
I read many overclocked kernel sources for MSM7227 in difference devices. What they did was to modify acpuclock.c :
1. add new freqs to freq_table
2. add new freqs to clkctl_acpu_speed arrays
3. modify acpuclk_set_div to set PLL for overclocked freqs
Because acpuclock is initialized very early during boot process, cpufreq (initialized much later) will read those available freqs from acpuclock to apply to its governors.
In our case, because we cannot modify acpuclock in the kernel before it's initialized, our module will be loaded much later than both acpuclock and cpufreq. Therefore, my approach is to modify (inline patch) both acpuclock and cpufreq in memory, while the kernel is running.
So far, as mentioned in OP, I modified cpufreq and acpuclock data (as in 1. and 2.), so that Android thinks that max freq is set at 800MHz. We will have to do some inline memory patches to acpuclock function to change PLL for freqs more than 600MHz during runtime. More precisely, we need to patch acpuclk_set_div function.
I did a quick study about ARM instruction set, looked for branch (and branch with links) instructions. I managed to redirect calls to acpuclk_set_div to my own function in module, so that acpuclock_set_rate calls to my function, instead of the original one. However, it seems that the param received by my function is always NULL.
Looking for reasons and solutions. Any suggestions?
@racht: no, we thank you for your hard work in your Hackdroid ROMs.
It seems that I made a mistake. acpuclk_set_div was not separated as a function. Instead, the compiler included it in the caller function (acpuclk_set_rate). This will be a big big big problem for us to hijack the call.....
Hope everything works out! 200mhz is a big jump
Can u share your sources?
Maby i can help you
Sent from my U20i using XDA Premium App
I will need to rewrite the module, because everything is placed in my x8gesture I will do it soon.
The initial commit is pushed to github at : https://github.com/doixanh/X8Overclock
All contributions are welcome.
as an example of omap3
http://code.google.com/p/milestone-overclock/
This project consists of a kernel module for OMAP3 phones with Android to unlock any processor frequency/voltage combination and a companion graphical app to ease the configuration. The phone must be rooted so that the kernel module can be loaded.
The module has an interface in /proc/overclock/* that allows enabling and disabling of overclock in runtime without rebooting. No flashing of custom roms or kernels is needed, since that is not even possible with the Milestone, Droid X and others.
andrej456 said:
as an example of omap3
http://code.google.com/p/milestone-overclock/
This project consists of a kernel module for OMAP3 phones with Android to unlock any processor frequency/voltage combination and a companion graphical app to ease the configuration. The phone must be rooted so that the kernel module can be loaded.
The module has an interface in /proc/overclock/* that allows enabling and disabling of overclock in runtime without rebooting. No flashing of custom roms or kernels is needed, since that is not even possible with the Milestone, Droid X and others.
Click to expand...
Click to collapse
Thats good idea but edit is needed because X8 does not have 1,2 processor
EDIT: With 800 processor thats so close x10 1000 processor,cant imagine how fast x8 will be
as-mario said:
Thats good idea but edit is needed because X8 does not have 1,2 processor
EDIT: With 800 processor thats so close x10 1000 processor,cant imagine how fast x8 will be
Click to expand...
Click to collapse
to not fit in the x8, but the wiki to be useful
if we take this as an example you can write a module
sorry for my english
It seems that my approach is like milestone-overclock. Their CPU is different, but we can know that we're having a good direction.
Good news: I managed to hijack calls to acpuclk_set_rate (the function contains acpuclk_set_div). This way, we can write our own set_rate and set_div function.
Destination is not too far away
YES, YES and YES! It's running at 684MHz! Will upload a screenshot soon!
This below screenshot is taken at 710MHz with only CPU test
It seems that our CPU is not stable above 748MHz.

[Tutorial] Get Hardware info from your Atrix to help developers

Hello folks! how are you doing?
Since we've seen Alpha kernel is still an alpha and we need to provide developers with every detail of our device we can.
I've decided to search through threads and get some commands from there to gather the information required:
You can gather these data by downloading Terminal Emulator from the market or by properly installing Google SDK and doing an adb shell then running the commands.
If commands do not seem to work at first glance, please reboot the phone then try again running the commands below.
Edit 1:
For all the people having problems not mentioned on the bug list, please report the problems in this spreadsheet
https://docs.google.com/spreadsheet/ccc?key=0AkQTVc3TvAUxdFNBOWFFRzNneWRHcW56MEtLVGJqdVE#gid=0
There are several sheets to fill with the mentioned problems
Edit 2:
For all users who might have problem gathering Tegra Revision, Speedo ID, CPU Process, Core Process; please install leaked rom / AtrICS, reboot and try searching again.
Else; please send me the dmesg command output via PM and I'll upload the results.
Please note that I'll discard dmesg from kernels that are not the leaked and/or 3.1
---
Identify Memory type:
Grab a terminal then run after a reboot
Code:
su -
dmesg | grep LPDDR2
Types of Memory
LPDDR2 MR5: 0x0003 (0x0303) = Elpida (Manufactuer)
LPDDR2 MR6: 0x0000 (0x0000) \
LPDDR2 MR7: 0x0000 (0x0000) / = 50nm
LPDDR2 MR8: 0x0054 (0x5454) = 1GB
LPDDR2 MR5: 0x0003 (0x0303) = Elpida (Manufactuer)
LPDDR2 MR6: 0x0001 (0x0101)\
LPDDR2 MR7: 0x0000 (0x0000)/ = 40nm
LPDDR2 MR8: 0x0054 (0x5454) = 1GB
LPDDR2 MR5: 0x0006 (0x0606) = Hynix (Manufacuter)
LPDDR2 MR6: 0x0000 (0x0000)\
LPDDR2 MR7: 0x0000 (0x0000)/ = 54nm (Note that this is still 54nm for MR7 = 0x0001 (0x0101))
LPDDR2 MR8: 0x0054 (0x5454) = 1GB
---
Identify which Panel Type do we have:
After a fresh reboot
Grab a terminal
Code:
su -
dmesg | grep atag
or
Code:
su -
dmesg | grep panel
Examples:
Code:
dmesg | grep atag
mot_parse_atag_motorola: panel type: 0x80000740
or
Code:
dmesg | grep panel
<6>[ 0.000000] parse_tag_motorola: panel_size: 0x740
---
Identify Tegra Revision:
Code:
su -
dmesg | grep Tegra
then search for something similar to
Code:
"Tegra Revision: AXX prime"
---
Well, let's see if we can help Atrix Kernel Team to improve the kernel with this useful information
Also, if anybody would like to contribute showing how to gather more data; that'd be awesome and I'll edit this post
Thanks guys, have a good day!
You are the man!!!....good work my friend...:good:
Thanks for this.
Thanks
This is super helpful. Now if I can just get my post count up high enough to post to dev forums....
Types of Memory
LPDDR2 MR5: 0x0003 (0x0303) = Elpida (Manufactuer)
LPDDR2 MR6: 0x0000 (0x0000) \
LPDDR2 MR7: 0x0000 (0x0000) / = 50nm
LPDDR2 MR8: 0x0054 (0x5454) = 1GB
Identify which Panel Type do we have:
dmesg | grep panel
<6>[ 0.000000] parse_tag_motorola: panel_size: 0x740
However, using command: "dmesg | grep Tegra" doesnt give me anything close to any revision information.
Seems like you ran dmesg a little too late. You need to run it as soon as possible upon bootup.
ravilov said:
Seems like you ran dmesg a little too late. You need to run it as soon as possible upon bootup.
Click to expand...
Click to collapse
Is it supposed to be a capital T in tegra? I rebooted several times and get the same stuff every time
I tried dmesg | grep revision
and got this:
CPU: ARMv7 Processor [411fc090] revision 0 (ARMv7), cr=10c53c7d.
vintage47 said:
Is it supposed to be a capital T in tegra? I rebooted several times and get the same stuff every time
Click to expand...
Click to collapse
No idea, but you can use grep -i Tegra, that should make capitalization irrelevant.
Solved, I was looking on dmesg from old kernel
--------------------------------------------------------------------------------------------------------------------------
Hello,
how I find the Tegra Revision, Speedo ID, CPU Process, Core Process that request Kristianp in my dmesg? I am stupid or it show diferent?
best regards,
Ferenc.
I cant find the tegra revision either. I can see the first thing in the log, but not the tegra revision.
Do after a fresh reboot in leaked kernel and Rom ( 10.1 epinter is mine)
Reboot when SD Card is present
Dear JhonnyX:
As I cannot write in the Google Docs Spreadsheet, please find the information from my Atrix Below. The Bug is the reboot when entering deep sleep with SD card inserted.
Sorry but I could not find my Atrix Revision on the early dmesg.
Best regards
Javier
ingelectronico said:
Dear JhonnyX:
As I cannot write in the Google Docs Spreadsheet, please find the information from my Atrix Below. The Bug is the reboot when entering deep sleep with SD card inserted.
Sorry but I could not find my Atrix Revision on the early dmesg.
Best regards
Javier
Click to expand...
Click to collapse
PM'ed you regarding the missing info
Also, users who might have spreadsheet access problem, please let me know via PM.
new fields
I want to add my info on the modem drops spreadsheet.
How do I find what values my phone has for these fields?
Speedo ID
CPU Process
Core Process
CPU governor
Connect the phone to usb and activate adb. Reboot. As soon as finished reboot, use adb shell and type dmesg > /mnt/sdcard/dmesg.txt
Now search that file.
This has been answered many tines before.
Next time use search
Enviado desde mi MB860 usando Tapatalk 2

[Q] Overclock/Downclock gpu GS4 stock kernel via msm8974-gpu.dtsi

Hello.
Is it possible to modify GT-I9505-2/kernel/arch/arm/boot/dts/msm8974-gpu.dtsi to reduce the powerlevel of the GPU ? (I get the source from samsung open-source website)
When I change theses values, nothing happen, this is exacly the same value. (cat ./sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gputop or {k,j}probes drivers/gpu/msm/kgsl_pwrctrl.c functions).
Thanks.
i'm not expert in QCT CPU numbering, but msm8974 is Snapdragon 800.

pvs version on rn3 sd650

Is there a way to check pvs version on rn3 sd650?
I'm currently on XenonHD's rom cm14.1, I've tried this command on terminal emulator : dmesg|grep pvs , but i had no luck,it shows only voltage numbers,check the image in attachment section for more info. I googled this but there are two ways, that I tried and failed!
1- Grab a terminal emulator from Google Play
Type “su” in terminal emulator
OK the Super User request
Type “dmesg | grep PVS”
2- checking this address : /proc/cpu/msm_acpu_pvs
but there is no such folder as cpu.
does this PVS version value still exist? or is it for just snapdragon 800 series?
also I quote from some thread/post on google that I've found about the PVS values :
"It's said that the higher the PVS bin value the better - in terms of it gives of less heat and requires less voltage:
0 requires the MOST/HIGHEST voltage range to boot, and 7 required the LEAST/LOWEST voltage range to boot.
Because lower binning SOCs use higher voltage values, they tend to run hotter than higher binning versions."
Did you find anything else?

problem with manually hotplugging cpuX in rooted android device

Hi every one
I have a Lenovo vibe p1a42 which is rooted properly along with the SuperSU.
I'm going to write a custom userspace governor, using cpufreq and hotplug facility but I have some problem with online and some other entries in sysfs.
I have 8 cores and it is possible to change the corresponding entries in sysfs. I can successfully selecting the userspace governor by:
Code:
adb shell
su
echo userspace > /sys/devices/system/cpu/cpuX/cpufreq/scaling_governor
I do the last line for each core and then I set the valid frequency by writing to corresponding scaling_setspeed files.
I know it is possible to dynamically on/off each core by writing 1/0 to the corresponding /sys/devices/system/cpu/cpuX/online entry.
However, I cannot change the status of some processor to online by:
Code:
echo "1" > /sys/devices/system/cpu/cpuX/online
two cores of eight are always off and it seems that it cann't be controlled, manually, in this manner.
I know there is some kind of hotplug manager in android devices which activate appropriate core numbers according to the load.
How can I get ride of such hotplug manager and get full access to all cores due to the maximum performance?

Categories

Resources