Alan Jenkins wrote:
> Sascha Heid wrote:
>> Hi List!
>>
>> Is there any way to figure out what is causing the CPU to stay in C2?
>>
>> I currently have this happening for 2 reasons:
>>
>> - uhci_hcd is loaded. I dont think that usb autosuspension is working
>> at all but nobody seems to care. I guess i should install a vanilla
>> kernel so that i can annoy the kernel mailing-list directly. Currently
>> since 2.6.24 from Ubuntu Hardy there is no way for both my cores to go
>> into C3 unless i unload uhci_hcd myself.
>>
>> - sometimes for an totally unknown reason and only after longer
>> uptimes one core is suddenly stuck in C2 as well and i have no idea
>> why.
>>
>> What are your experiences with usb-autosuspension?
>>
>> Regards,
>> Sascha
>>   
> I have uhci loaded on 2.6.24.4, configured starting from the Ubuntu 
> 2.6.22 configuration.
> My EEE PC spends most of it's idle time in C3 - even when I have a USB 
> keyboard plugged in.
>
> I'm still not very clear about USB autosuspend.  IIRC, uhci is 
> supposed to necessarily stop the CPU entering C3 because the hardware 
> requires constant DMA activity, and ehci doesn't have this same 
> problem.  I have ehci loaded as well as uhci, but if I remove uhci 
> altogether then the USB keyboard stops working, so it is actually 
> using uhci.  I need to check my notes on this!
>
> I did once play with forcing my USB keyboard to autosuspend.  I could 
> suspend it manually and it would resumed fine, but I couldn't get it 
> to autosuspend.  The last time I looked for information I came to the 
> conclusion that autosuspend of input devices was not yet supported.  
> People were thinking about enabling it - on the condition that all the 
> keyboard LEDs are already off - because the suspend will turn the LEDs 
> off and it would be very confusing.
I cheked and Alan Stern told me that EHCI can disable DMA when idle, but 
UHCI can't ("as long as any active devices are plugged into the 
controller").  But on my new laptop, even if I hold keys down and bash 
away on my USB keyboard, then powertop says I'm spending ~90% in C3.

My best guess is my new laptop is using the "C2 pop-up" feature of intel 
chipsets, which is certainly designed to deal with UHCI.  It's supposed 
to somehow let the CPU stay in C3/C4 and "pop-up" to C2 when necessary 
for DMA activity.

Also, it sounds like you've not looked at any USB specific information 
from powertop.  Are you using latest version?  Powertop 1.9 on kernel 
2.6.24-rc and above should report which USB devices are responsible for 
wakeups.  The statistics for USB suspend are useless though; they always 
seem to be "0% active" regardless of activity.  E.g. this is what 
happened when I was key-bashing:

$ sudo ./powertop -d -t 5
PowerTOP 1.9    (C) 2007 Intel Corporation

Collecting data for 5 seconds


Cn            Avg residency
C0 (cpu running)        ( 8.1%)
C1                0.0ms ( 0.0%)
C2                4.3ms ( 4.0%)
C3               24.1ms (87.9%)
P-states (frequencies)
Wakeups-from-idle per second : 48.0     interval: 5.0s
no ACPI power usage estimate available
Top causes for wakeups:
  24.2% ( 17.4)       <interrupt> : uhci_hcd:usb1
  24.2% ( 17.4)   USB device  1-2 : USB Multimedia Keyboard (LITEON 
Technology)
  14.4% ( 10.4)           konsole : schedule_timeout (process_timeout)
   6.9% (  5.0)   thunderbird-bin : futex_wait (hrtimer_wakeup)
   5.6% (  4.0)   <kernel module> : usb_hcd_poll_rh_status (rh_timer_func)
   4.7% (  3.4)              Xorg : schedule_timeout (process_timeout)
   3.3% (  2.4)       <interrupt> : eth1
   2.5% (  1.8)       <interrupt> : libata
   1.9% (  1.4)              kwin : schedule_timeout (process_timeout)
   1.7% (  1.2)       <interrupt> : acpi
   1.4% (  1.0)            dhcdbd : schedule_timeout (process_timeout)
   1.4% (  1.0)    wpa_supplicant : schedule_timeout (process_timeout)
   1.4% (  1.0)          kwrapper : do_nanosleep (hrtimer_wakeup)
   1.1% (  0.8)              Xorg : do_setitimer (it_real_fn)
   0.8% (  0.6)   update-notifier : schedule_timeout (process_timeout)
   0.8% (  0.6)              kded : schedule_timeout (process_timeout)
   0.6% (  0.4)               lyx : schedule_timeout (process_timeout)
   0.3% (  0.2)     <kernel core> : input_handle_event (input_repeat_key)
...

A USB device is active  0.0% of the time:
USB device  1-2 : USB Multimedia Keyboard (LITEON Technology)

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

Recent USB suspend statistics
Active  Device name
  0.0%  USB device  1-2 : USB Multimedia Keyboard (LITEON Technology)
  0.0%  USB device usb4 : UHCI Host Controller (Linux 2.6.24.4eeepc 
uhci_hcd)
  0.0%  USB device usb3 : UHCI Host Controller (Linux 2.6.24.4eeepc 
uhci_hcd)
  0.0%  USB device usb2 : UHCI Host Controller (Linux 2.6.24.4eeepc 
uhci_hcd)
  0.0%  USB device usb1 : UHCI Host Controller (Linux 2.6.24.4eeepc 
uhci_hcd)

Alan

_______________________________________________
Discuss mailing list
[email protected]
http://mail.lesswatts.org/mailman/listinfo/discuss

Reply via email to