You are not logged in.

#1 2008-02-01 07:29:31

Anders
Member
From: Sweden
Registered: 2006-05-19
Posts: 48
Website

max_cstate in 2.6.24

Hi,

I was wondering if the following patch could be applied to the Arch kernel. For some reason they made this file invisible, and I relied on it so I could make my MacBook quiet (by default it makes such a annoying sound, probably enough to make dogs go crazy)

http://lkml.org/lkml/2007/11/30/218

Anders


Running: Arch Linux i686, x86_64, ppc

Offline

#2 2008-02-01 07:42:17

Anders
Member
From: Sweden
Registered: 2006-05-19
Posts: 48
Website

Re: max_cstate in 2.6.24

OK, looked into it a bit more. Seems like the kernel has something like this, but only if CONFIG_CPU_IDLE isn't set. Man, this sucks sad

Will have to do custom kernels in the future I suppose.


Running: Arch Linux i686, x86_64, ppc

Offline

#3 2008-03-16 01:42:17

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: max_cstate in 2.6.24

I think you can set it as a module option:

$ modinfo processor
filename:       /lib/modules/2.6.24-ARCH/kernel/drivers/acpi/processor.ko
alias:          processor
license:        GPL
description:    ACPI Processor Driver
author:         Paul Diefenbaugh
alias:          acpi*:ACPI0007:*
depends:        
vermagic:       2.6.24-ARCH SMP preempt mod_unload 686 
parm:           max_cstate:uint
parm:           nocst:uint

add 'options processor max_cstate=2' to modprobe.conf or append 'processor.max_cstate=2' on the kernel command line

also, cstates appear in /sys/devices/system/cpu/cpu*/cpuidle/state*. dunno if tere's a mean to control them yet.

Last edited by lloeki (2008-03-16 01:44:41)


To know recursion, you must first know recursion.

Offline

#4 2008-03-16 19:43:59

dingus
Member
From: London
Registered: 2006-02-02
Posts: 18

Re: max_cstate in 2.6.24

Had the same problem with my macbook, it is incredibly annoying.

A solution for the macbook that doesn't require using max_cstate is to load the isight firmware (I load mine on bootup). Try it out, it solved all my whine issues with the additional side effect of making the web cam work.

Offline

#5 2008-03-17 14:53:57

lloeki
Member
From: France
Registered: 2007-02-20
Posts: 456
Website

Re: max_cstate in 2.6.24

why does it work: the webcam makes use of the cpu (even if it's ever so slightly) enough for the cpu not to enter cstates<2, so you'll be better off setting max_cstate=2, which does just that without overhead.


To know recursion, you must first know recursion.

Offline

#6 2008-03-17 15:10:27

dingus
Member
From: London
Registered: 2006-02-02
Posts: 18

Re: max_cstate in 2.6.24

You don't need to actually use the webcam (hence no overhead) just load the firmware into it.

I assumed that doing this must, as you say, have the side effect of keeping it out of the lowest energy saving mode (although according to /proc/acpi/processor/CPU0/power it is spending time in cstate 3, so who knows).

Why doing this should have this effect I could only speculate, some quirky hardware issue I guess, but I know that the whine really annoyed me, I used to do the max_cstate thing too on <2.6.24 and tried setting it as a module/boot option (which didn't work for me). Now it is fixed and the only side effect I have noticed is that the webcam works.

EDIT: The macbook page in the wiki gives a pretty good idea how to get the isight going.
http://wiki.archlinux.org/index.php/Macbook#iSight

Last edited by dingus (2008-03-17 15:30:40)

Offline

#7 2008-09-16 21:23:30

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: max_cstate in 2.6.24

Just use echo during startup in /etc/rc.local, e.g.:

echo 2 > /sys/module/processor/parameters/max_cstate

Offline

Board footer

Powered by FluxBB