Author Topic: Disable C4 State? Undervolt?  (Read 9283 times)

0 Members and 1 Guest are viewing this topic.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Disable C4 State? Undervolt?
« on: March 30, 2008, 07:33:25 pm »
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?

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #1 on: March 30, 2008, 08:24:58 pm »
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!

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #2 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.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #3 on: March 31, 2008, 12:48:22 am »
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!

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #4 on: March 31, 2008, 08:31:35 am »
No luck with sysctl.  The only thing I can find about changing it is the linux-phc kernel patch.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #5 on: March 31, 2008, 06:12:17 pm »
Bah!  This is the only thing left I have to do before I can stick to Linux for good.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #6 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 :\

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #7 on: April 01, 2008, 12:35:08 am »
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
« Last Edit: April 01, 2008, 12:38:11 am by nslay »
An adorable giant isopod!

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #8 on: April 01, 2008, 08:05:01 am »
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.

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #9 on: April 01, 2008, 10:17:11 am »
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!

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #10 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

Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Disable C4 State? Undervolt?
« Reply #11 on: April 01, 2008, 09:56:10 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...

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #12 on: April 01, 2008, 11:23:28 pm »
root@manbearnix:/home/spencer# sysctl hw.acpi.cx_lowest=C3
error: "hw.acpi.cx_lowest" is an unknown key

...
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

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. 

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #13 on: April 02, 2008, 07:47:16 am »
root@manbearnix:/home/spencer# sysctl hw.acpi.cpu.cx_lowest=C3
error: "hw.acpi.cpu.cx_lowest" is an unknown key

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Disable C4 State? Undervolt?
« Reply #14 on: April 02, 2008, 11:05:16 am »
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.
« Last Edit: April 02, 2008, 11:09:19 am by nslay »
An adorable giant isopod!