Unable to reach C3/C4 states while wireless is up.

Bug #118808 reported by Wagner Volanin
4
Affects Status Importance Assigned to Milestone
MadWifi
New
Unknown
linux (Ubuntu)
Invalid
Undecided
Unassigned
linux-restricted-modules-2.6.22 (Ubuntu)
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: linux-source-2.6.22

While using GUTSY daily build 05-JUN-2007, with powertop 1.5 installed, I noticed that my computer was in the C2 power-saving state for an average of 95%+ of the time, and was not able to reach the battery-friendly C3 and C4 states. After some experimentation, I realized that this problem was caused by the wireless interface just being up, **even when not associated to any Access Point**. Just issuing 'ifconfig ath0 down', or disabling wireless in the Network Manager applet, would allow the computer to reach C3/C4 just fine, increasing my battery time significantly.

My laptop is an Acer 3624, with a built-in Atheros Wi-fi Card.

# uname -a
Linux ubuntu 2.6.22-6-generic #1 SMP Fri Jun 1 19:24:12 GMT 2007 i686 GNU/Linux

[lspci]
00:00.0 Host bridge [0600]: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller [8086:2590] (rev 03)
     Subsystem: Acer Incorporated [ALI] Unknown device [1025:006a]
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller [8086:2592] (rev 03) (prog-if 00 [VGA])
     Subsystem: Acer Incorporated [ALI] Unknown device [1025:006a]

Revision history for this message
Wagner Volanin (volanin) wrote : dmesg output
Revision history for this message
Wagner Volanin (volanin) wrote : lspci -vvnn output
Revision history for this message
Ben Collins (ben-collins) wrote :

This would definitely be a bug in the atheros (madwifi) driver then. Please see about posting a bug on their site as well and adding a reference to it from here.

Thanks

Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Wagner Volanin (volanin) wrote :

Thank you Ben.
The bug has been opened in the madwifi trac also.

For reference:
http://madwifi.org/ticket/1363

Changed in madwifi:
status: Unknown → New
Revision history for this message
Matthew Garrett (mjg59) wrote :

It's not purely a madwifi issue - tickless kernels without cpuidle support make it possible for DMA devices to block entry to C3 even when it's not entirely necessary.

Revision history for this message
Tim Hull (thully) wrote :

I looked at the Madwifi report, and it seems like this issue has been largely resolved upstrem with the latest madwifi trunk. However, the trunk snapshot used in Gutsy still produces >200 wakeups per second. Could the updates be applied to the Gutsy kernel? This has been somewhat of a show-stopper for me, as I need efficient power usage on my laptop. I'd prefer not to have to build my own drivers for each kernel to achieve this...

Revision history for this message
Stefan Glasenhardt (glasen) wrote :

I've just compiled the latest snapshot of madwifi-ng and with this driver revision the problem completely vanished for me. With the "original" gutsy driver i got 90-100 wakeups per second (wps). With the new driver i get about 10 wps.

Revision history for this message
Wagner Volanin (volanin) wrote :

I am also running the latest snapshot of madwifi-ng, and indeed I get ~10-20 wps.
BUT... while wireless in on, my CPU still spends ~70-80% in C2 while completely idle.
As soon as I turn wireless off (in Network Manager), the CPU goes back to ~99% in C3/C4.

Could it be a hardware characteristic of my laptop?
Or maybe the lack of cpuidle support as Matthew Garrett suggested?

Revision history for this message
Wagner Volanin (volanin) wrote :

No deal: I just compiled 2.6.23-rc8 from source with the cpuidle patch. Nothing changed.
As soon as I enable wireless (even at the console in single mode), CPU usage jumps from ~99% C3/C4 to ~70-80% C2.
Latest madwifi used, version r2708, recompiled for the new kernel.

Revision history for this message
John Dong (jdong) wrote :

Here is my powertop output on a macbook 3rd generation with madwifi-ng trunk. madwifi is still generating a decent number of wakeups but not as bad as before.

Cn Avg residency P-states (frequencies)
C0 (cpu running) ( 4.5%) 2.17 Ghz 0.9%
C1 0.0ms ( 0.0%) 2.00 Ghz 0.0%
C2 5.2ms ( 8.1%) 1.84 Ghz 0.0%
C3 6.9ms (87.4%) 1000 Mhz 99.1%

Wakeups-from-idle per second : 143.7 interval: 15.0s
Power usage (ACPI estimate): 13.8W (1.2 hours) (long term: 13.3W,/1.3h)

Top causes for wakeups:
  45.1% ( 83.4) <interrupt> : wifi0
  16.4% ( 30.4) <interrupt> : uhci_hcd:usb4, eth0, i915@pci:0000:00:02.0
   6.4% ( 11.8) <kernel module> : usb_hcd_poll_rh_status (rh_timer_func)
   6.0% ( 11.1) S20powernowd : queue_delayed_work_on (delayed_work_timer_fn
   4.2% ( 7.7) sleep.sh : queue_delayed_work_on (delayed_work_timer_fn
   3.5% ( 6.5) <interrupt> : acpi

Suggestion: Enable USB autosuspend by pressing the U key or adding
usbcore.autosuspend=1 to the kernel command line in the grub config

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Bryce Harrington (bryce)
description: updated
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in linux-restricted-modules-2.6.22 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Sergio Zanchetta (primes2h) wrote :

The 18 month support period for Gutsy Gibbon 7.10 has reached its end of life -
http://www.ubuntu.com/news/ubuntu-7.10-eol . As a result, we are closing the
linux-restricted-modules-2.6.22 task. It would be helpful if you could test the
new Jaunty Jackalope 9.04 release and confirm if this issue remains -
http://www.ubuntu.com/getubuntu/releasenotes/904overview. If the issue still exists with the Jaunty
release, please update this report by changing the Status of the "linux (Ubuntu)"
task from "Incomplete" to "New". Thanks in advance.

Changed in linux-restricted-modules-2.6.22 (Ubuntu):
status: Incomplete → Won't Fix
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in linux (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.