News:

So the widespread use of emojis these days kinda makes forum smileys pointless, yeah?

Main Menu

Disable C4 State? Undervolt?

Started by rabbit, March 30, 2008, 07:33:25 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

rabbit

I have a Dell Latitude with a Core 2 Duo, and as such my processor constantly emits a VERY high whine while it jumps in and out of the C4 state.  The only thing I've been able to find that fixes this is RMClock for Windows (does not run under wine).  From what I understand, undervolting with linux-phc should eliminate the whine as well, but the guide on Ubuntu's site doesn't work (namely, it tells me to grab a kernel source package from apt-get that isn't there anymore).

Can anyone help?

nslay

FreeBSD has a way to set the lowest state.  I set my lowest state to C1 and let powerd do its work (using both ACPI and powerd can cancel out the power saving effects!).  Perhaps Linux has a way to do this too?
An adorable giant isopod!

rabbit

There's a way to do it by recompiling the kernel, but I want to make sure I use the proper kernel settings (I've never used Ubuntu before), so I was trying to follow the [outdated] tutorial.  Blah.

nslay

Quote from: rabbit on March 30, 2008, 08:45:05 PM
There's a way to do it by recompiling the kernel, but I want to make sure I use the proper kernel settings (I've never used Ubuntu before), so I was trying to follow the [outdated] tutorial.  Blah.

Shouldn't need to compile it since these states generally need to change when switching between battery or AC (i.e. C1 is lowest for AC, and C3 lowest for battery).
In FreeBSD, its changed with the 'sysctl' command effortlessly.  It's also changed by devd when changed between AC or battery...according to whats in rc.conf of course :P
An adorable giant isopod!

rabbit

No luck with sysctl.  The only thing I can find about changing it is the linux-phc kernel patch.

rabbit

Bah!  This is the only thing left I have to do before I can stick to Linux for good.

rabbit

Passing max_cstate=3 to the kernel at boot results in a black screen with a blinking cursor line.  Nothing can be done with that :\

nslay

#7
Quote from: rabbit on March 31, 2008, 08:12:16 PM
Passing max_cstate=3 to the kernel at boot results in a black screen with a blinking cursor line.  Nothing can be done with that :\
Nono, you want to set the min level...this way ACPI subsystem can't drop below the specified level to begin with.

EDIT: Well depends if "C4" is larger by number or smaller by power...
FreeBSD shows this:
hw.acpi.cpu.cx_lowest: C1

Try a FreeBSD LiveCD (e.g. FreeSBIE) and see if you can set hw.acpi.cpu.cx_lowest
You would do
sysctl hw.acpi.cx_lowest=C3
An adorable giant isopod!

rabbit

Quote from: nslay on April 01, 2008, 12:35:08 AM
Quote from: rabbit on March 31, 2008, 08:12:16 PM
Passing max_cstate=3 to the kernel at boot results in a black screen with a blinking cursor line.  Nothing can be done with that :\
Nono, you want to set the min level...this way ACPI subsystem can't drop below the specified level to begin with.

EDIT: Well depends if "C4" is larger by number or smaller by power...
FreeBSD shows this:
hw.acpi.cpu.cx_lowest: C1

Try a FreeBSD LiveCD (e.g. FreeSBIE) and see if you can set hw.acpi.cpu.cx_lowest
You would do
sysctl hw.acpi.cx_lowest=C3

That's what I don't want!  It's the processor switching between C4 and C3 that causes the whine.  I want to disable C4 so it can't switch to it and whine.

nslay

Quote from: rabbit on April 01, 2008, 08:05:01 AM
Quote from: nslay on April 01, 2008, 12:35:08 AM
Quote from: rabbit on March 31, 2008, 08:12:16 PM
Passing max_cstate=3 to the kernel at boot results in a black screen with a blinking cursor line.  Nothing can be done with that :\
Nono, you want to set the min level...this way ACPI subsystem can't drop below the specified level to begin with.

EDIT: Well depends if "C4" is larger by number or smaller by power...
FreeBSD shows this:
hw.acpi.cpu.cx_lowest: C1

Try a FreeBSD LiveCD (e.g. FreeSBIE) and see if you can set hw.acpi.cpu.cx_lowest
You would do
sysctl hw.acpi.cx_lowest=C3

That's what I don't want!  It's the processor switching between C4 and C3 that causes the whine.  I want to disable C4 so it can't switch to it and whine.
Right, and what the sysctl means is that it won't drop to C4 or better power saving mechanisms.  It will operate only between C1-C3.
Thats why I made a note about what "min" means.
An adorable giant isopod!

rabbit

root@manbearnix:/home/spencer# sysctl hw.acpi.cx_lowest=C3
error: "hw.acpi.cx_lowest" is an unknown key

Blaze

Quote from: rabbit on April 01, 2008, 09:54:13 PM
root@manbearnix:/home/spencer# sysctl hw.acpi.cx_lowest=C3
error: "hw.acpi.cx_lowest" is an unknown key


Offtopic:  DopefishMan Bear Pig Lives!
And like a fool I believed myself, and thought I was somebody else...

Newby

Quote from: rabbit on April 01, 2008, 09:54:13 PM
root@manbearnix:/home/spencer# sysctl hw.acpi.cx_lowest=C3
error: "hw.acpi.cx_lowest" is an unknown key

Quote from: nslay on April 01, 2008, 12:35:08 AM
...
FreeBSD shows this:
hw.acpi.cpu.cx_lowest: C1
...
You would do
sysctl hw.acpi.cx_lowest=C3

Try hw.acpi.cpu.cx_lowest?
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

rabbit

root@manbearnix:/home/spencer# sysctl hw.acpi.cpu.cx_lowest=C3
error: "hw.acpi.cpu.cx_lowest" is an unknown key

nslay

#14
I trust you got a FreeBSD LiveCD to try that out?
sysctl is mostly a *BSD tool.  Linux has it, but its very limited.
Linux relies mostly on /proc for getting system information.
The big difference between sysctl and /proc is that most /proc nodes are read-only and it isn't common to see someone setting system features by doing 'echo "some" > /proc/thing'.  Sysctl is designed for not only retrieving system settings, but also setting them ... hence, why you don't need to reboot your system to set the min C# state.
From a programmer's perspective sysctl() is awesome while /proc is awful...nobody should ever have to fopen(), fread(), and do string parsing to get system information.

And to re-iterate for anyone who missed the implications of this post: BSD is not Linux, Linux is not BSD...they aren't related in any way, except they both feel like UNIX.
An adorable giant isopod!