Bug 198264

Summary: USB driver defeats Athlon power-saving (athcool)
Product: [Fedora] Fedora Reporter: Martin <ewing>
Component: kernelAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: davej, triage, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard: bzcl34nup
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-06 16:06:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin 2006-07-10 18:40:56 UTC
Description of problem:  Connecting any USB devices causes Athlon with Athcool
package to jump out of maximum power-saving mode, even with no I/O activity.
Disconnecting device does not restore power-saving.

Version-Release number of selected component (if applicable): kernel
2.6.17-1.2145_FC5 is worse, although problem can be demonstrated in earlier
versions.

How reproducible: Always

Steps to Reproduce:
Running Athlon XP 2000+ with Athcool package with NO USB DEVICES shows normal
power savings (on=121; off=167 watts AC on my system), runs stably.  Plugging in
any of my USB devices (HP LaserJet 1200, Keyspan 4-port serial, or SanDisk
thumbdrive) boosts power to 142 watts.  Power stays high even when devices are
unmounted and disconnected.  Prior kernels would boot with LJ and Keyspan
connected, staying in low-power mode, but would jump to the 142 watt level when
a thumbdrive was inserted.
  
Actual results: Unexpected high power dissipation (142 vs 122 watts AC for the
system), requiring faster/noiser fan, etc.  (Extra ~15 watts on the CPU chip.)
Suspect USB driver is polling or otherwise staying out of idle state enough to
defeat power-saving.

Expected results: CPU should spend sufficient time in idle/halt state to allow
power-saving feature to work.  Idle USB devices should not have significant
power impact.

Additional info:
USB info:
Bus 004 Device 005: ID 0781:5202 SanDisk Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 002: ID 06cd:012a Keyspan
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 003: ID 03f0:0317 Hewlett-Packard LaserJet 1200
Bus 001 Device 001: ID 0000:0000

Athcool info:
athcool version 0.3.11 - control power-saving mode on AMD Athlon/Duron CPUs
VIA KM400[A] (1106 3205) found
'Disconnect when STPGNT Detected' bit is enabled.
'HALT Command Detection' bit is enabled.

PCI info:
00:00.0 Host bridge: VIA Technologies, Inc. VT8378 [KM400/A] Chipset Host
Bridge00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
00:09.0 SCSI storage controller: Future Domain Corp. TMC-18C30 [36C70]
00:0a.0 Multimedia audio controller: Ensoniq ES1370 [AudioPCI] (rev 01)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
(rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237
AC97 Audio Controller (rev 50)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV100 QY [Radeon
7000/VE]

Comment 1 Pete Zaitcev 2006-07-11 23:07:50 UTC
Dave, I'll look at this, but I do not know when. So please keep an eye out.

The first step is to dump the status of controllers and find if it's UHCI
doing it, EHCI, or both. I'm pretty sure that FSBR ought to work as advertised,
so it must be an idle controller pushing frames that causes this.


Comment 2 Martin 2006-07-18 15:13:15 UTC
I can narrow this down a bit more for you.  Using

rmmod uhci_hcd

The machine drops into its low-power state.  When I modprobe the same module, it
returns to its power-consuming state.  (I am now using kernel 2.6.17-1.2157_FC5.)

Note that the "excess" power in my system (above base power) is 23 watts due to
uhci_hcd activity.  If I switch off the Athlon power-saving entirely, I get 39
watts above the base.  So this bug "robs" me of about 60% of the power-saving
potential.

Most of this excess power (after allowing for power supply efficiency) is dumped
into the CPU chip.  The temperature rise is quite noticeable. 


Comment 3 Pete Zaitcev 2006-07-18 19:21:37 UTC
Thanks a lot.

Did you try to plug a 2.0 hub and then connect the thumb drive there?
Doing so makes EHCI to take over the root port and then use the TT
capability in the hub to drive the thumb drive. This way UCHI is not used.

I think Keyspan may be a power hog regardless. I think it gets input
through a bulk URB which has to be submitted (and thus polled).
Printer is the same way if it's bidirectional.


Comment 4 Martin 2006-07-19 19:34:21 UTC
OK, I got a cheap USB 2.0 hub to try.  Here is the config:
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 002 Device 007: ID 03f0:0317 Hewlett-Packard LaserJet 1200
Bus 002 Device 006: ID 06cd:012a Keyspan 
Bus 002 Device 005: ID 050d:0414 Belkin Components 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  

Now the Athlon is in its "semi-high-power" mode all the time, even if I
disconnect the Keyspan and HP devices and reboot.  (I did not even try the thumb
drive.) So the hub by itself is enough to trigger the problem.  However, I can
get to low-power by 'rmmod ehci_hcd'.  (Instead of 'rmmod uhci_hcd'.)

My phenomenological description: It appears that the USB drivers are getting
more and more "chatty" - or else they are doing more during their polls - than
used to be the case.  Thus the two latest Fedora kernels will not let me run my
USB configuration in the power-saving mode, even when there is no user-level USB
activity. The condition does not clear itself when all USB devices are removed.
 That's why I think it's fair to call this a bug. I have to rmmod the driver or
reboot.

I'll be happy to run any other user/admin tests.

Comment 5 Dave Jones 2006-10-16 21:54:47 UTC
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.

Comment 6 Martin 2006-10-19 05:12:06 UTC
Tested on  2.6.18-1.2200.fc5.  Same problem.  Power consumption increased after
mounting, unmounting, and detaching a USB flash card.  Can be reset to "normal"
(pre mounting) power by following:

rmmod uhci_hcd
rmmod ehci_hcd
modprobe ehci_hcd
modprobe uhci_hcd

So apparently the USB mount starts a polling (?) sequence which does not stop
when the device is unmounted and disconnected.

I'm not sure if everybody would call this a bug, since nobody says that Linux
supports the "athcool" power saving, but it would be nice if the USB drivers
would go back to sleep after disconnecting the device.

Comment 7 Martin 2007-03-16 15:40:55 UTC
Good news: With kernel 2.6.20-1.2300.fc5, the Keyspan 4 port USB serial driver
behaves better in terms of USB activity (also other bugs were fixed).  I.e.,
there is no significant change in Athlon power consumption when the Keyspan
device is connected or disconnected.

Not so good news:  USB/power activity when plugging in a USB hub still increases
(20 W power increase) and does not fall back to original state when the hub is
removed.


Comment 8 Bug Zapper 2008-04-04 03:16:18 UTC
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers

Comment 9 Bug Zapper 2008-05-06 16:06:01 UTC
This bug is open for a Fedora version that is no longer maintained and
will not be fixed by Fedora. Therefore we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen thus bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.