Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
10-21-2009, 08:06 AM
|
#1
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Rep:
|
C2 state used much more than C3 when computer seems to be idling
According to powertop, when the system seems to be idling (at least according to the top command):
Code:
Cn Avg residency
C0 (cpu running) ( 2,6%)
polling 0,0ms ( 0,0%)
C1 mwait 0,0ms ( 0,0%)
C2 mwait 5,3ms (79,9%)
C3 mwait 3,1ms (17,4%)
And
Code:
Top causes for wakeups:
35,8% ( 94,1) <kernel core> : hrtimer_start_range_ns (tick_sched_timer)
23,4% ( 61,7) <interrupt> : uhci_hcd:usb2, uhci_hcd:usb8, nvidia
10,1% ( 26,6) <kernel IPI> : Rescheduling interrupts
6,6% ( 17,4) <kernel core> : hrtimer_start (tick_sched_timer)
Anything I can do about the kernel core interrupts?
The processor is a Pentium Dual-Core T4200
|
|
|
10-24-2009, 05:33 AM
|
#2
|
Member
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Rep:
|
Are you using a kernel compiled by yourself? You should have "tickless system" enabled for power efficiency, maybe that's the point. The flag is called "TICK_ONESHOT", look for it in /proc/config.gz (e.g. run "zgrep TICK_ONESHOT /proc/config.gz")
|
|
|
10-26-2009, 01:46 AM
|
#3
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Original Poster
Rep:
|
Quote:
Originally Posted by clvic
Are you using a kernel compiled by yourself? You should have "tickless system" enabled for power efficiency, maybe that's the point. The flag is called "TICK_ONESHOT", look for it in /proc/config.gz (e.g. run "zgrep TICK_ONESHOT /proc/config.gz")
|
Unfortunately:
Code:
zgrep TICK_ONESHOT /proc/config.gz
CONFIG_TICK_ONESHOT=y
So, I guess the problem lies somewhere else.
|
|
|
10-29-2009, 01:37 PM
|
#4
|
Member
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Rep:
|
Uhm, have you tried unplugging all USB devices? I recall that USB devices cause the system to stay in higher C states... try, let's see if this is the reason
|
|
|
10-30-2009, 05:05 AM
|
#5
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Original Poster
Rep:
|
Quote:
Originally Posted by clvic
Uhm, have you tried unplugging all USB devices? I recall that USB devices cause the system to stay in higher C states... try, let's see if this is the reason
|
Thank you for the tip! With USB unplugged:
Code:
Cn Avg residency
C0 (cpu running) ( 2,1%)
polling 0,0ms ( 0,0%)
C1 mwait 0,0ms ( 0,0%)
C2 mwait 1,6ms ( 0,4%)
C3 mwait 6,8ms (97,5%)
Unfortunately, it is nice to have the external keyboard attached to the laptop, so I guess this is something that I will have to live with. The extra power consumption is OK since the laptop is stationary anyway then.
Is there some way to lower the USB polling frequency/priority?
|
|
|
10-31-2009, 07:14 PM
|
#6
|
Member
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Rep:
|
I know of no way to lower USB pressure on buses and CPU... maybe we could ask someone else.
But, you could use a PS2 keyboard, or use the same keyboard with a USB-PS2 adaptor... maybe ps2 makes less pressure on C states.
|
|
|
10-31-2009, 08:32 PM
|
#7
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
Hi.
What kind of chipset is on your motherboard?
I had the same problem and I solve it by tweak some registry with "pcitweak".
|
|
|
11-02-2009, 06:30 AM
|
#8
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Original Poster
Rep:
|
Quote:
Originally Posted by nimnull22
Hi.
What kind of chipset is on your motherboard?
I had the same problem and I solve it by tweak some registry with "pcitweak".
|
Code:
lspci -v (somewhat edited)
00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, fast devsel, latency 0
Capabilities: [e0] Vendor Specific Information <?>
Kernel modules: intel-agp
00:01.0 PCI bridge: Intel Corporation Mobile 4 Series Chipset PCI Express Graphics Port (rev 07) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 00002000-00002fff
Memory behind bridge: cc000000-ceffffff
Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff
Capabilities: [88] Subsystem: Acer Incorporated [ALI] Device 0253
Capabilities: [80] Power Management version 3
Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [a0] Express Root Port (Slot+), MSI 00
Capabilities: [100] Virtual Channel <?>
Capabilities: [140] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 16
I/O ports at 1800 [size=32]
Capabilities: [50] PCI Advanced Features
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 21
I/O ports at 1820 [size=32]
Capabilities: [50] PCI Advanced Features
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03) (prog-if 20 [EHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 19
Memory at f0404800 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port: BAR=1 offset=00a0
Capabilities: [98] PCI Advanced Features
Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=04, sec-latency=0
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Acer Incorporated [ALI] Device 0253
Capabilities: [a0] Power Management version 2
Capabilities: [100] Virtual Channel <?>
Capabilities: [180] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp
00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=07, subordinate=07, sec-latency=0
Memory behind bridge: c0000000-c00fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Acer Incorporated [ALI] Device 0253
Capabilities: [a0] Power Management version 2
Capabilities: [100] Virtual Channel <?>
Capabilities: [180] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp
00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03) (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=09, subordinate=09, sec-latency=0
I/O behind bridge: 00003000-00003fff
Memory behind bridge: c0100000-c01fffff
Capabilities: [40] Express Root Port (Slot+), MSI 00
Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [90] Subsystem: Acer Incorporated [ALI] Device 0253
Capabilities: [a0] Power Management version 2
Capabilities: [100] Virtual Channel <?>
Capabilities: [180] Root Complex Link <?>
Kernel driver in use: pcieport-driver
Kernel modules: shpchp
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 23
I/O ports at 1840 [size=32]
Capabilities: [50] PCI Advanced Features
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 19
I/O ports at 1860 [size=32]
Capabilities: [50] PCI Advanced Features
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 18
I/O ports at 1880 [size=32]
Capabilities: [50] PCI Advanced Features
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.3 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03) (prog-if 00 [UHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 16
I/O ports at 18a0 [size=32]
Capabilities: [50] PCI Advanced Features
Kernel driver in use: uhci_hcd
Kernel modules: uhci-hcd
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03) (prog-if 20 [EHCI])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0, IRQ 23
Memory at f0404c00 (32-bit, non-prefetchable) [size=1K]
Capabilities: [50] Power Management version 2
Capabilities: [58] Debug port: BAR=1 offset=00a0
Capabilities: [98] PCI Advanced Features
Kernel driver in use: ehci_hcd
Kernel modules: ehci-hcd
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93) (prog-if 01 [Subtractive decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=0a, subordinate=0a, sec-latency=0
Capabilities: [50] Subsystem: Acer Incorporated [ALI] Device 0253
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, medium devsel, latency 0
Capabilities: [e0] Vendor Specific Information <?>
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03) (prog-if 01 [AHCI 1.0])
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 28
I/O ports at 18f0 [size=8]
I/O ports at 18e4 [size=4]
I/O ports at 18e8 [size=8]
I/O ports at 18e0 [size=4]
I/O ports at 18c0 [size=32]
Memory at f0404000 (32-bit, non-prefetchable) [size=2K]
Capabilities: [80] MSI: Enable+ Count=1/16 Maskable- 64bit-
Capabilities: [70] Power Management version 3
Capabilities: [a8] SATA HBA <?>
Capabilities: [b0] PCI Advanced Features
Kernel driver in use: ahci
00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
Subsystem: Acer Incorporated [ALI] Device 0253
Flags: medium devsel, IRQ 19
Memory at c0200000 (64-bit, non-prefetchable) [size=256]
I/O ports at 1c00 [size=32]
Kernel modules: i2c-i801
I am not really sure, is the motherboard chip maybe Intel Corporation 82801I (ICH9 Family)?
|
|
|
11-02-2009, 07:59 AM
|
#9
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
lspci | grep Intel, please
|
|
|
11-02-2009, 08:44 AM
|
#10
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
And another thing.
Unplug any usb devices, measure C1, C2, C3 and then plug USB mouse, and measure C2, C3. Do they behave the same ?
If so try to find on your laptop web site any BIOS updates for low power consumption.
|
|
|
11-02-2009, 09:52 AM
|
#11
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Original Poster
Rep:
|
Quote:
Originally Posted by nimnull22
lspci | grep Intel, please
|
Search for Intel in my post above, that will yield the same result.
|
|
|
11-02-2009, 09:53 AM
|
#12
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Original Poster
Rep:
|
Quote:
Originally Posted by nimnull22
And another thing.
Unplug any usb devices, measure C1, C2, C3 and then plug USB mouse, and measure C2, C3. Do they behave the same ?
If so try to find on your laptop web site any BIOS updates for low power consumption.
|
Check out what I did in the post from Oct 30th for the answer to that question.
|
|
|
11-02-2009, 10:05 AM
|
#13
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
OK.
Check in your system or find somewhere "pcitweak" size 35016 b.
From Intel ICH9 Family Datasheet:
..."To take advantage of the Deferred C3/C4 mode, the BM_STS_ZERO_EN bit must be
set. This will cause the BM_STS bit to read as 0 even if some bus master activity is
present. If this is not done, then the software may avoid even attempting to go to the
C3 or C4 state if it sees the BM_STS bit as 1."...
And
..." the ICH9 enables a mode of operation where standard (non-isochronous) bus master activity will not be treated as a full break event from the C3 or C4 states. Instead, these will be treated merely as
bus master events and return the platform to a C2 state, and thus allow snoops to be performed."...
|
|
|
11-02-2009, 10:37 AM
|
#14
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: Slackware64 14.2
Posts: 126
Original Poster
Rep:
|
Quote:
Originally Posted by nimnull22
OK.
Check in your system or find somewhere "pcitweak" size 35016 b.
From Intel ICH9 Family Datasheet:
..."To take advantage of the Deferred C3/C4 mode, the BM_STS_ZERO_EN bit must be
set. This will cause the BM_STS bit to read as 0 even if some bus master activity is
present. If this is not done, then the software may avoid even attempting to go to the
C3 or C4 state if it sees the BM_STS bit as 1."...
And
..." the ICH9 enables a mode of operation where standard (non-isochronous) bus master activity will not be treated as a full break event from the C3 or C4 states. Instead, these will be treated merely as
bus master events and return the platform to a C2 state, and thus allow snoops to be performed."...
|
Ok, where do I find this utility? I have googled, but found nothing.
|
|
|
11-02-2009, 12:20 PM
|
#15
|
Senior Member
Registered: Jul 2009
Distribution: OpenSuse 11.1, Fedora 14, Ubuntu 12.04/12.10, FreeBSD 9.0
Posts: 1,571
Rep:
|
I have upload it to http://www.filefactory.com/file/a081...file372053_zip
To open it type where necessary "$pcitw$", without " ".
Copy it to /usr/bin and try to execute: under root type "pcitweak -l", if it works it shows all PCI devices.
Give me some time to find out how to look what we need.
|
|
|
All times are GMT -5. The time now is 10:41 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|