Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 288406

Summary: gentoo-sources-2.6.30-r6: processor.max_cstate=9 doesn't override DMI limit
Product: Gentoo Linux Reporter: Jakob Ameres <schlaueskerlchen>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: dmesg output
My notebook's dmidecode output

Description Jakob Ameres 2009-10-10 10:10:41 UTC
ACPI doesn't use C3/C4 and deeper c-states, because they are blocked by BIOS. I know that, because when i plug in akku powertop shows up C3 c-state.
In Windows i can easily unlock C3,C4,C5 and C6 using rmclock, so IMO they have to work in Linux too.
So i added processor.max_cstate=9 as a kernel option to grub, because of kernel-parameter documentation:
	processor.max_cstate=	[HW,ACPI]
			Limit processor to maximum C-state
			max_cstate=9 overrides any DMI blacklist limit.

I also tried
processor.nocst	[HW,ACPI]
			Ignore the _CST method to determine C-states,
			instead using the legacy FADT method

but there was no effect. I checked c-states with powertop.

Reproducible: Always




There is no max_cstate option, but i think it was removed in prior kernel version.
Comment 1 Jakob Ameres 2009-10-10 10:33:16 UTC
Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.30-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T8100_@_2.10GHz-with-gentoo-1.12.11.1
Timestamp of tree: Thu, 08 Oct 2009 09:45:03 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch prelink protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.gentoo.mesh-solutions.com/gentoo/ "
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="de en"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac acl acpi alsa arts battery berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups dbus dri dts dv dvd dvdr dvdread eds emboss encode evo fam ffmpeg firefox flac fortran gcj gdbm gif glut gnome gpm gstreamer gtk hal ibam iconv ipv6 isdnlog java jpeg jpeg2k kde ldap libnotify mad mikmod mmx modules mp3 mp4 mpeg mudflap ncurses nls nptl nptlonly ogg openal opengl openmp oss pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sasl scanner sdl session spell spl sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs tcpd theora thunar tiff truetype unicode usb v4l v4l2 vcd vorbis wavpack win32codecs x264 x86 xine xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="fuji ptp2 ricoh samsung spca50x" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="radeonhd vga radeon fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Jakob Ameres 2009-10-10 10:35:04 UTC
ls /sys/module/processor/parameters/
ignore_ppc  ignore_tpc  latency_factor
Comment 3 Jakob Ameres 2009-10-10 10:35:51 UTC
Created attachment 206637 [details]
dmesg output
Comment 4 Mike Pagano gentoo-dev 2009-10-24 14:04:00 UTC
Has this worked on previous linux kernels?

Can you test with gentoo-sources-2.6.31-r3.

What is the output of cat /proc/acpi/processor/CPU#/power

Are you using the latest bios for your system.

What system is this?

I see you're limited in your cstates from your dmesg.
ACPI: CPU0 (power states: C1[C1] C2[C2])

Comment 5 Jakob Ameres 2009-10-24 14:41:40 UTC
Created attachment 208143 [details]
My notebook's dmidecode output
Comment 6 Jakob Ameres 2009-10-24 14:42:33 UTC
> Has this worked on previous linux kernels?
No i don't think so.

> Can you test with gentoo-sources-2.6.31-r3.
I will try.
 
> What is the output of cat /proc/acpi/processor/CPU#/power

cat /proc/acpi/processor/CPU0/power
active state:            C0
max_cstate:              C9
maximum allowed latency: 16000 usec
states:
    C1:                  type[C1] promotion[--] demotion[--] latency[001] usage[00004875] duration[00000000000000000000]
    C2:                  type[C2] promotion[--] demotion[--] latency[017] usage[03223075] duration[00000018477719935429]

cat /proc/acpi/processor/CPU1/power
active state:            C0
max_cstate:              C9
maximum allowed latency: 16000 usec
states:
    C1:                  type[C1] promotion[--] demotion[--] latency[001] usage[00004238] duration[00000000000000000000]
    C2:                  type[C2] promotion[--] demotion[--] latency[017] usage[03249385] duration[00000000056722701507]

With battery plugged in without AC power supply:

active state:            C0
max_cstate:              C9
maximum allowed latency: 16000 usec
states:
    C1:                  type[C1] promotion[--] demotion[--] latency[001] usage[00000001] duration[00000000000000000000]
    C2:                  type[C2] promotion[--] demotion[--] latency[001] usage[00000004] duration[00000000000000002901]
    C3:                  type[C3] promotion[--] demotion[--] latency[162] usage[00000190] duration[00000000000001485591]

> Are you using the latest bios for your system.
Yes. But Bios won't be the problem because i'm just searching for a way to tell BIOS under linux to use deep sleep states.

> What system is this?
HP Compaq 6820s
for dmidecode output see attachment
 
> I see you're limited in your cstates from your dmesg.
> ACPI: CPU0 (power states: C1[C1] C2[C2]) 
Also when running on battery C3 sleep states are unlocked.
So maybe somebody out there knows how i can tell Bios to unlock the rest of the C-states. In case this never worked or will never work i'm wondering why documentation says: "... overrides any DMI blacklist limit."

Any further ideas?
Comment 7 Mike Pagano gentoo-dev 2009-10-25 16:45:34 UTC
> > Are you using the latest bios for your system.
> Yes. But Bios won't be the problem because i'm just searching for a way to tell
> BIOS under linux to use deep sleep states.

Hmmm. Here's a thread concerning with the same issue where a BIOS upgrade solved the issue.  

https://bugzilla.redhat.com/show_bug.cgi?id=425812

It might not be possible on your system.
http://arkiv.netbsd.se/?ml=linux-acpi&a=2008-06&t=7787773

I see you tried to use processor.nocst and got an error msg:
Booting kernel: `' invalid for parameter `processor.nocst'

Can you change that to processor.nocst=1 but this might limit you to a single state which is not what you desire.





e