View previous topic :: View next topic |
Author |
Message |
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Fri Feb 24, 2012 5:38 pm Post subject: How to check CPU voltage... |
|
|
... on Core 2 Duo?
lm sensors only give me temperatures, which is strange because I am running ThinkPad R61/T61 which supposed to have a very good linux support.
Code: | $ sensors
thinkpad-isa-0000
Adapter: ISA adapter
fan1: 3115 RPM
temp1: +64.0°C
temp2: +49.0°C
temp3: +38.0°C
temp4: +67.0°C
temp5: +50.0°C
temp6: N/A
temp7: +36.0°C
temp8: N/A
temp9: +44.0°C
temp10: +52.0°C
temp11: +52.0°C
temp12: N/A
temp13: N/A
temp14: N/A
temp15: N/A
temp16: N/A
acpitz-virtual-0
Adapter: Virtual device
temp1: +64.0°C (crit = +127.0°C)
temp2: +58.0°C (crit = +100.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +57.0°C (high = +105.0°C, crit = +105.0°C)
Core 1: +58.0°C (high = +105.0°C, crit = +105.0°C)
|
I know there is a grub boot option acpi_enforce_resources=lax but it did not make any difference.
I really need to know the voltage because I am undervolting the cpu. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Fri Feb 24, 2012 9:40 pm Post subject: |
|
|
impact0r,
Welcome to Gentoo
Poke about in /sys/class/hwmon
You will need the kernel drivers for your sensors loaded.
Somewhere in that tree you should find files like in0_input and in0_label _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Fri Feb 24, 2012 10:38 pm Post subject: |
|
|
Ah, well, you see you will need to tad more specific about it. There is some folders and files in /sys/class/hwmon but I don't know what to do with them. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Fri Feb 24, 2012 11:16 pm Post subject: |
|
|
impact0r,
Files you can read with your pager {less|more} or even cat.
Directories you cd into.
in0_input contains the voltage for input0 to the voltage sensor chip.
in0_label contains the name of the voltage, like Vcore. Its the Vcore voltage you want and there may be more than one of them.
Look at the content of the files _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Fri Feb 24, 2012 11:46 pm Post subject: |
|
|
I have many folders and files in there, but none of them resemble even remotely the filenames you've given. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sat Feb 25, 2012 7:15 am Post subject: |
|
|
It sure should have them, as it is a generic Arch kernel.
How can I find out what module do I need? |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Sat Feb 25, 2012 12:26 pm Post subject: |
|
|
impact0r wrote: | It sure should have them, as it is a generic Arch kernel.
How can I find out what module do I need? |
Ask on Arch forums?
However you may try loading thinkpad-acpi before. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sat Feb 25, 2012 2:31 pm Post subject: |
|
|
I already have all acpi modules I could find/think of loaded. And unfortunately Arch forum was useless in this case. |
|
Back to top |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Sat Feb 25, 2012 2:34 pm Post subject: |
|
|
The other alternative is to consider that there aren't any OS-readable voltage
sensors at all. _Very_ common on laptops. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sat Feb 25, 2012 2:51 pm Post subject: |
|
|
impact0r,
Post the output of , or better
generic kernel ... hmm thats a bad sign. That means it really suits nobody. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sat Feb 25, 2012 2:52 pm Post subject: |
|
|
Moved from Kernel & Hardware to Unsupported Software.
We are discussion an Arch kernel here so nothing to do with gentoo.
Unsupported does not mean no help. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sat Feb 25, 2012 3:53 pm Post subject: |
|
|
Code: | $ lspci -k
00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)
Subsystem: Lenovo ThinkPad T61
00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)
Kernel driver in use: pcieport
00:19.0 Ethernet controller: Intel Corporation 82566MC Gigabit Network Connection (rev 03)
Subsystem: Lenovo Device 20ba
Kernel driver in use: e1000e
00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: uhci_hcd
00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)
Subsystem: Lenovo ThinkPad T60
Kernel driver in use: uhci_hcd
00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: ehci_hcd
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)
Kernel driver in use: pcieport
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)
Kernel driver in use: pcieport
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)
Kernel driver in use: pcieport
00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)
Kernel driver in use: pcieport
00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)
Kernel driver in use: pcieport
00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: uhci_hcd
00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: uhci_hcd
00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: uhci_hcd
00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)
00:1f.0 ISA bridge: Intel Corporation 82801HM (ICH8M) LPC Interface Controller (rev 03)
Subsystem: Lenovo Device 20a5
00:1f.1 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: ata_piix
00:1f.2 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: i801_smbus
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 140M] (rev a1)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: nvidia
03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)
Subsystem: Intel Corporation Lenovo ThinkPad T61
Kernel driver in use: iwl4965
15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)
Subsystem: Lenovo Device 20c6
Kernel driver in use: yenta_cardbus
15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)
Subsystem: Lenovo Device 20c8
Kernel driver in use: sdhci-pci
15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: r592
15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)
Subsystem: Lenovo Device 20cb
Kernel driver in use: r852 |
The sensors are there, because in Windows RMClock gives me the full lot of voltages. |
|
Back to top |
|
|
roarinelk Guru
Joined: 04 Mar 2004 Posts: 520
|
Posted: Sat Feb 25, 2012 5:24 pm Post subject: |
|
|
RMClock reads the current processor speed (aka. SpeedStep/Coolnquiet) and C-state and
shows you the corresponding voltage level according to the datasheet(s). And I remember
back in the early Pentium-M days, Intel had 4 voltages listed for a single speed state, depending
on CPU bin number (which only the OEM could determine). So don't read too much into RMClock "results". |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sat Feb 25, 2012 5:54 pm Post subject: |
|
|
impact0r,
Code: | 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: i801_smbus | is good. From here on it gets harder.
There are two possible end points th this ...
a) you don't have any voltage sensors
b) the driver for the voltage sensor you do have is missing from your kernel.
Voltage sensors are connected the the System Management Bus, or occasioanally to the ISA bus.
Either way, there is no auto detection.
sensors-detect, part of lm-sensors is pretty good at working out what you have but its not fool proof. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gorkypl Guru
Joined: 04 Oct 2010 Posts: 444 Location: Kraków, PL
|
Posted: Sat Feb 25, 2012 7:00 pm Post subject: |
|
|
OK, now I finally have my T60 back and I can confirm that on Gentoo-driven, well configured system neither /sys/class/hwmon nor lm_sensors provide information about core voltages. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sat Feb 25, 2012 10:07 pm Post subject: |
|
|
NeddySeagoon wrote: | a) you don't have any voltage sensors |
Hmm... then how would RMClock in windows be able to read them?
NeddySeagoon wrote: | b) the driver for the voltage sensor you do have is missing from your kernel. |
So I should make sure the module i801_smbus is selected during kernel compilation?
I can see i2c_i801 if I do lsmod, but is it the same thing?
NeddySeagoon wrote: | Voltage sensors are connected the the System Management Bus, or occasioanally to the ISA bus.
Either way, there is no auto detection.
sensors-detect, part of lm-sensors is pretty good at working out what you have but its not fool proof. |
Aren't those two statements somewhat contradictory?
Code: | Now follows a summary of the probes I have just done.
Just press ENTER to continue:
Driver `coretemp':
* Chip `Intel digital thermal sensor' (confidence: 9)
Do you want to overwrite /etc/conf.d/lm_sensors? (YES/no):
You should now start the lm_sensors service to load the required
kernel modules.
Unloading i2c-dev... OK
Unloading cpuid... OK |
This is how it looks right now.
And finally - should I bother adding i2c-core to MODULES array in rc.conf? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sat Feb 25, 2012 10:17 pm Post subject: |
|
|
impact0r,
PCIe, PCI, Cardbus and USB devices are required to provide vendor and device IDs that can be read to inform you of whats there.
ISA devices never had this functionality, but they pretended it existed after plug and pray was grafted on.
SMBus is a simple bus like ISA. There is no auto detection, you can detect the existance of a device on the bus but not what it does.
Determining what it does is down to hueristics that don't always work. Did you see the sensors detect warning that it might hang your system?
It doesn't matter if i2c_i801 is loaded as a loadable module or built into the kernel. It works the same way. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sat Feb 25, 2012 11:51 pm Post subject: |
|
|
Thanks for the clarification.
NeddySeagoon wrote: |
It doesn't matter if i2c_i801 is loaded as a loadable module or built into the kernel. It works the same way. |
Ok, but how about i801_smbus? Is i801_smbus just an alias of i2c_i801 or do I need both loaded? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sun Feb 26, 2012 1:22 am Post subject: |
|
|
impact0r,
i801_smbus and i2c_i801 are different things.
Your lspci -k shows Code: | 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: i801_smbus |
Be aware that modules listed in lsmod are merely loaded - taking up RAM. They may not actually be used.
The above snippit says that i801_smbus is actually used. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54387 Location: 56N 3W
|
Posted: Sun Feb 26, 2012 1:22 am Post subject: |
|
|
impact0r,
i801_smbus and i2c_i801 are different things.
Your lspci -k shows Code: | 00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)
Subsystem: Lenovo ThinkPad T61
Kernel driver in use: i801_smbus |
Be aware that modules listed in lsmod are merely loaded - taking up RAM. They may not actually be used.
The above snippit says that i801_smbus is actually used. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sun Feb 26, 2012 6:58 am Post subject: |
|
|
Which means there is no point recompiling the kernel with special attention to i801_smbus, because it is already being used. Which, in turn, means there is nothing I can do...? |
|
Back to top |
|
|
haarp Guru
Joined: 31 Oct 2007 Posts: 535
|
Posted: Sun Mar 04, 2012 3:34 pm Post subject: |
|
|
Do you want to read the actual voltage from a sensor or read the requested voltage by the CPU?
Few laptops offer software-facing sensors for this sort of thing yours very likely doesn't. But the latter is possible through the CPU's MSRs (machine specific registers). RMClock does the same. To do that, you'll need rdmsr from msr-tools (which for some reason is not in portage) and the msr module in the kernel.
msr-tools should be trivial to compile manually. Here are the sources
You can then, as root, read the CPU's MSR.
Code: | # rdmsr -0 0x198
061b4c2686004b26
|
This reads register 0x198 from the first CPU. The current voltage ID (VID) is in hexadecimal the last 2 digits and might fluctuate with the core clock if Speedstep is enabled.
In my case it is 26, or 38 in decimal. On a mobile Core2Duo, the formula is 0.7125V + VID*0.0125V. In my case that corresponds to 1.1875V. (keep in mind that VID is in hex! desktop CPUs use another formula, too) |
|
Back to top |
|
|
impact0r n00b
Joined: 24 Feb 2012 Posts: 63
|
Posted: Sun Mar 04, 2012 11:31 pm Post subject: |
|
|
haarp, this is an amazing piece of information.
However, this is what I am getting:
Code: | $ sudo rdmsr -0 0x198
rdmsr: open: No such file or directory |
|
|
Back to top |
|
|
haarp Guru
Joined: 31 Oct 2007 Posts: 535
|
Posted: Sun Mar 04, 2012 11:33 pm Post subject: |
|
|
You don't have the msr module loaded |
|
Back to top |
|
|
|