SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
Vampire Mice:
        How USB
Power Management
      Impacts You
            Sarah Sharp
sarah.a.sharp@intel.com


           Jan 25, 2013
Mouse: flickr.com rick-in-rio    Software and Services Group (SSG)
2   Mouse: flickr.com 27048731@N03
                                         System Software Division (SSD)
Mouse: flickr.com rick-in-rio    Software and Services Group (SSG)
3   Mouse: flickr.com 27048731@N03
                                         System Software Division (SSD)
Agenda
    •   How USB PM works
    •   ...and how it doesn't work
    •   New USB 3.0 and 2.1 features
    •   New features in Intel systems




                                        Software and Services Group (SSG)
4                                           System Software Division (SSD)
How USB
Power Management
Works




    Software and Services Group (SSG)
5       System Software Division (SSD)   Lightbulb: flickr.com hozae
USB Power Management
    • Three types of PM:
     • USB device suspend
     • USB host suspend
     • Link Power Management




                                           Software and Services Group (SSG)
6    Light bulb: flickr.com molotalk
                                               System Software Division (SSD)
USB Device Suspend
    • Devices suspended when
      they're inactive
    • Hubs suspend when
      all children are suspended
    • USB hosts suspend when
      all ports are suspended




                                   Software and Services Group (SSG)
7                                      System Software Division (SSD)
USB Device Suspend
    • Implications of active USB host
     • Active DMA transfers
     • Increased C state residency
     • Increased power consumption




                                        Software and Services Group (SSG)
8                                           System Software Division (SSD)
USB Device Suspend
    • USB device suspend requirements
     • Device must support suspend
     • Driver must support auto-suspend
     • No active USB transfers
     • Userspace can't poll
    • Remote wakeup (optional)




                                          Software and Services Group (SSG)
9                                             System Software Division (SSD)
How USB
Power Management
Doesn't Work




     Software and Services Group (SSG)
10       System Software Division (SSD)   Broken light bulb: flickr.com ginsnob
USB Device Suspend Issues
     • Missing driver auto-suspend support
     • Impossible to get to idle
     • Userspace polls devices




                                              Are we
                                            there yet?


                                               Is an SD card
                                                inserted yet?


                                                            Software and Services Group (SSG)
11   SD card reader: flickr.com osde-info                       System Software Division (SSD)
USB Device Suspend Issues
     • Many USB devices are broken
      • Disconnect on resume
      • Unsafe suspend behavior
      • No remote wakeups
      • Event loss during resume
     • Firmware updates may help
      • Device descriptors often
        unchanged




                                          Software and Services Group (SSG)
12   Mouse: flickr.com declanjewell           System Software Division (SSD)
USB Device Suspend Issues
     • Different systems produce
       different behavior
      • Electrical issues?
      • Host hardware bugs?
      • Powered USB hubs?
      • Device driver bugs?




                                           Software and Services Group (SSG)
13   dusty computer: flickr.com johnjack       System Software Division (SSD)
USB Device Suspend Issues
     • What to do about broken devices?
      • Huge blacklist in kernel
     • Make it userspace's problem!
      • USB device suspend off by default
      • Userspace must turn it on
      • # echo auto >
        /sys/bus/usb/devices/*/power/control
      • Powertop can turn it on




                                               Software and Services Group (SSG)
14   Blame: flickr.com iandesign                   System Software Division (SSD)
Turning on USB PM




                   Software and Services Group (SSG)
15                     System Software Division (SSD)
Turning on USB PM
     • Powertop auto-suspend enabling
       doesn't persist across
      • Device unplug
      • Reboot
     • Solution: create a udev rule
     • github.com/sarahsharp/usb-pm-tools




                                               Software and Services Group (SSG)
16   Boot: flickr.com jamiecat                     System Software Division (SSD)
USB Device Suspend

        Takeaway:

     All your USB devices
     must be suspended
     to get good platform
     power management.

     1. Test your devices.
     2. Enable auto-suspend




                                Software and Services Group (SSG)
17                                  System Software Division (SSD)
USB
Link Power
Management




     Software and Services Group (SSG)
18       System Software Division (SSD)
Challenges with
                                       USB device suspend
     •    Users must turn it on
     •    Requires driver modification
     •    Timeout is course-grained
     •    Devices can't refuse suspend




                                                     Software and Services Group (SSG)
19       Blame: flickr.com iandesign                     System Software Division (SSD)
USB 3.0
                  Link Power Management
     • USB 3.0 Link PM
      • Link PM states: U1 and U2
     • Idea:
      • Host & hubs track idleness          U1
      • OS sets timeout once
      • No driver modification
      • Devices can refuse U1/U2

                                     U2
                                                      U1




                                          Software and Services Group (SSG)
20                                            System Software Division (SSD)
USB 3.0
                 Link Power Management
     • Some USB 3.0 devices don't do Link PM
     • How to tell?


     # lsusb -v -d 1d6b:0003 | grep "Port [0-9]*"
      Hub Port Status:
       Port 1: 0000.02a0 5Gbps power Rx.Detect
       Port 2: 0000.0243 5Gbps power U2 enable connect
       Port 3: 0000.02a0 5Gbps power Rx.Detect
       Port 4: 0000.02a0 5Gbps power Rx.Detect



                                        Software and Services Group (SSG)
21                                          System Software Division (SSD)
USB 2.1 Link PM
     • New 'L1' low power state
     • No changes to USB 2.0 hubs
     • Only for devices on roothub         L0
                                                              L1

      • Good for integrated devices




                                      L0
                                                      L0




                                           Software and Services Group (SSG)
22                                             System Software Division (SSD)
New Intel
USB PM Features




     Software and Services Group (SSG)
23       System Software Division (SSD)
Current and Future
                                Intel Products
     • Current gen:
      • CPU: Ivy Bridge
      • Chipset: Panther Point
     • Next gen:
      • CPU: Haswell
      • Chipsets: Lynx Point




                    Panther: flickr.com tim_ellis    Software and Services Group (SSG)
24                 Lynx: flickr.com keithmwilliams       System Software Division (SSD)
Intel USB PM
                                 Improvements
     • Panther Point
      • Finally has xHCI host controller!
      • Only four ports under xHCI
      • Supports USB 3.0 Link PM
     • Lynx Point
      • All ports under xHCI
      • Supports USB 3.0 and
        USB 2.1 Link PM




                 Panther: flickr.com tim_ellis    Software and Services Group (SSG)
25              Lynx: flickr.com keithmwilliams       System Software Division (SSD)
Intel Lynx Point
                       USB PM Improvements
     • Motivation
      • Unused internal ports
      • Unused internal USB devices




                  internal laptop: flickr novakreo     Software and Services Group (SSG)
26             finger print scanner: flickr mikedent       System Software Division (SSD)
Intel Lynx Point
                       USB PM Improvements
     • Idea:
      • Completely power off port
     • Lose USB events:
      • Disconnect
      • Connect
      • Remote wakeup events




                  internal laptop: flickr novakreo     Software and Services Group (SSG)
27             finger print scanner: flickr mikedent       System Software Division (SSD)
Summary




     Software and Services Group (SSG)
28       System Software Division (SSD)   www.threadless.com/product/2168/USB_Port
Summary
     •   USB device suspend is often broken
     •   Try powertop
     •   Check out github.com/sarahsharp/usb-pm-tools
     •   Link PM improvements
     •   New Intel USB PM features
     •   Thanks!




                                           Software and Services Group (SSG)
29                                             System Software Division (SSD)
Questions?

sarah.a.sharp@
linux.intel.com


     Software and Services Group (SSG)
30       System Software Division (SSD)

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (6)

Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management Slideshare
 
Advertising System Upgrade
Advertising System UpgradeAdvertising System Upgrade
Advertising System Upgrade
 
Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...
Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...
Accelerate Game Development and Enhance Game Experience with Intel® Optane™ T...
 
ZENworks Configuration Management and Windows 10
ZENworks Configuration Management and Windows 10ZENworks Configuration Management and Windows 10
ZENworks Configuration Management and Windows 10
 
Windows 7 Deployment with Novell ZENworks Configuration Management and ENGL I...
Windows 7 Deployment with Novell ZENworks Configuration Management and ENGL I...Windows 7 Deployment with Novell ZENworks Configuration Management and ENGL I...
Windows 7 Deployment with Novell ZENworks Configuration Management and ENGL I...
 
Eci Mobile Computing 20120724 Bryantafel
Eci   Mobile Computing 20120724   BryantafelEci   Mobile Computing 20120724   Bryantafel
Eci Mobile Computing 20120724 Bryantafel
 

Ähnlich wie Vampire Mice: How USB PM Impacts You

ALIAS WP7 Results
ALIAS WP7 ResultsALIAS WP7 Results
ALIAS WP7 Results
geigeralias
 
SuperSpeed USB and NAND Flash
SuperSpeed USB and NAND FlashSuperSpeed USB and NAND Flash
SuperSpeed USB and NAND Flash
NaziaG
 
Controlling USB Flash Drive Controllers: Expose of Hidden Features
Controlling USB Flash Drive Controllers: Expose of Hidden FeaturesControlling USB Flash Drive Controllers: Expose of Hidden Features
Controlling USB Flash Drive Controllers: Expose of Hidden Features
xabean
 
USB: Undermining Security Barriers
USB: Undermining Security BarriersUSB: Undermining Security Barriers
USB: Undermining Security Barriers
NCC Group
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
National Cheng Kung University
 

Ähnlich wie Vampire Mice: How USB PM Impacts You (20)

ALIAS WP7 Results
ALIAS WP7 ResultsALIAS WP7 Results
ALIAS WP7 Results
 
SuperSpeed USB and NAND Flash
SuperSpeed USB and NAND FlashSuperSpeed USB and NAND Flash
SuperSpeed USB and NAND Flash
 
Mickey, threats inside your platform final
Mickey,  threats inside your platform finalMickey,  threats inside your platform final
Mickey, threats inside your platform final
 
QRadar_CEddfdfdsfdfdfdfdfdfdfdfdfdfdff.pdf
QRadar_CEddfdfdsfdfdfdfdfdfdfdfdfdfdff.pdfQRadar_CEddfdfdsfdfdfdfdfdfdfdfdfdfdff.pdf
QRadar_CEddfdfdsfdfdfdfdfdfdfdfdfdfdff.pdf
 
Mickey threats inside your platform final
Mickey  threats inside your platform finalMickey  threats inside your platform final
Mickey threats inside your platform final
 
Beagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009bBeagle board101 esc-boston-2009b
Beagle board101 esc-boston-2009b
 
Faults inside System Software
Faults inside System SoftwareFaults inside System Software
Faults inside System Software
 
4667031.ppt
4667031.ppt4667031.ppt
4667031.ppt
 
Controlling USB Flash Drive Controllers: Expose of Hidden Features
Controlling USB Flash Drive Controllers: Expose of Hidden FeaturesControlling USB Flash Drive Controllers: Expose of Hidden Features
Controlling USB Flash Drive Controllers: Expose of Hidden Features
 
USB: Undermining Security Barriers
USB: Undermining Security BarriersUSB: Undermining Security Barriers
USB: Undermining Security Barriers
 
Embedded is not special
Embedded is not specialEmbedded is not special
Embedded is not special
 
Block I/O Layer Tracing: blktrace
Block I/O Layer Tracing: blktraceBlock I/O Layer Tracing: blktrace
Block I/O Layer Tracing: blktrace
 
Ch 2
Ch 2Ch 2
Ch 2
 
Android architechture
Android architechtureAndroid architechture
Android architechture
 
create bootable.pptx
create bootable.pptxcreate bootable.pptx
create bootable.pptx
 
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
HP-UX Dynamic Root Disk Boot Disk Cloning Benefits and Use Cases by Dusan Bal...
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
 
Rapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USBRapid SPi Device Driver Development over USB
Rapid SPi Device Driver Development over USB
 
Oracle Database Appliance RAC in a box Some Strings Attached
Oracle Database Appliance RAC in a box Some Strings AttachedOracle Database Appliance RAC in a box Some Strings Attached
Oracle Database Appliance RAC in a box Some Strings Attached
 
Apple M1 & Ionic: Should I switch?
Apple M1 & Ionic: Should I switch?Apple M1 & Ionic: Should I switch?
Apple M1 & Ionic: Should I switch?
 

Mehr von Sage Sharp

Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome culture
Sage Sharp
 

Mehr von Sage Sharp (8)

Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome culture
 
Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome culture
 
Herding cats with django
Herding cats with djangoHerding cats with django
Herding cats with django
 
Open source 101 for students
Open source 101 for studentsOpen source 101 for students
Open source 101 for students
 
Small, smaller, smallest: A Tour of the Embedded World
Small, smaller, smallest: A Tour of the Embedded WorldSmall, smaller, smallest: A Tour of the Embedded World
Small, smaller, smallest: A Tour of the Embedded World
 
Linux Kernel Introduction
Linux Kernel IntroductionLinux Kernel Introduction
Linux Kernel Introduction
 
Breaking into Open Source and Linux: A USB 3.0 Success Story
Breaking into Open Source and Linux: A USB 3.0 Success StoryBreaking into Open Source and Linux: A USB 3.0 Success Story
Breaking into Open Source and Linux: A USB 3.0 Success Story
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Vampire Mice: How USB PM Impacts You

  • 1. Vampire Mice: How USB Power Management Impacts You Sarah Sharp sarah.a.sharp@intel.com Jan 25, 2013
  • 2. Mouse: flickr.com rick-in-rio Software and Services Group (SSG) 2 Mouse: flickr.com 27048731@N03 System Software Division (SSD)
  • 3. Mouse: flickr.com rick-in-rio Software and Services Group (SSG) 3 Mouse: flickr.com 27048731@N03 System Software Division (SSD)
  • 4. Agenda • How USB PM works • ...and how it doesn't work • New USB 3.0 and 2.1 features • New features in Intel systems Software and Services Group (SSG) 4 System Software Division (SSD)
  • 5. How USB Power Management Works Software and Services Group (SSG) 5 System Software Division (SSD) Lightbulb: flickr.com hozae
  • 6. USB Power Management • Three types of PM: • USB device suspend • USB host suspend • Link Power Management Software and Services Group (SSG) 6 Light bulb: flickr.com molotalk System Software Division (SSD)
  • 7. USB Device Suspend • Devices suspended when they're inactive • Hubs suspend when all children are suspended • USB hosts suspend when all ports are suspended Software and Services Group (SSG) 7 System Software Division (SSD)
  • 8. USB Device Suspend • Implications of active USB host • Active DMA transfers • Increased C state residency • Increased power consumption Software and Services Group (SSG) 8 System Software Division (SSD)
  • 9. USB Device Suspend • USB device suspend requirements • Device must support suspend • Driver must support auto-suspend • No active USB transfers • Userspace can't poll • Remote wakeup (optional) Software and Services Group (SSG) 9 System Software Division (SSD)
  • 10. How USB Power Management Doesn't Work Software and Services Group (SSG) 10 System Software Division (SSD) Broken light bulb: flickr.com ginsnob
  • 11. USB Device Suspend Issues • Missing driver auto-suspend support • Impossible to get to idle • Userspace polls devices Are we there yet? Is an SD card inserted yet? Software and Services Group (SSG) 11 SD card reader: flickr.com osde-info System Software Division (SSD)
  • 12. USB Device Suspend Issues • Many USB devices are broken • Disconnect on resume • Unsafe suspend behavior • No remote wakeups • Event loss during resume • Firmware updates may help • Device descriptors often unchanged Software and Services Group (SSG) 12 Mouse: flickr.com declanjewell System Software Division (SSD)
  • 13. USB Device Suspend Issues • Different systems produce different behavior • Electrical issues? • Host hardware bugs? • Powered USB hubs? • Device driver bugs? Software and Services Group (SSG) 13 dusty computer: flickr.com johnjack System Software Division (SSD)
  • 14. USB Device Suspend Issues • What to do about broken devices? • Huge blacklist in kernel • Make it userspace's problem! • USB device suspend off by default • Userspace must turn it on • # echo auto > /sys/bus/usb/devices/*/power/control • Powertop can turn it on Software and Services Group (SSG) 14 Blame: flickr.com iandesign System Software Division (SSD)
  • 15. Turning on USB PM Software and Services Group (SSG) 15 System Software Division (SSD)
  • 16. Turning on USB PM • Powertop auto-suspend enabling doesn't persist across • Device unplug • Reboot • Solution: create a udev rule • github.com/sarahsharp/usb-pm-tools Software and Services Group (SSG) 16 Boot: flickr.com jamiecat System Software Division (SSD)
  • 17. USB Device Suspend Takeaway: All your USB devices must be suspended to get good platform power management. 1. Test your devices. 2. Enable auto-suspend Software and Services Group (SSG) 17 System Software Division (SSD)
  • 18. USB Link Power Management Software and Services Group (SSG) 18 System Software Division (SSD)
  • 19. Challenges with USB device suspend • Users must turn it on • Requires driver modification • Timeout is course-grained • Devices can't refuse suspend Software and Services Group (SSG) 19 Blame: flickr.com iandesign System Software Division (SSD)
  • 20. USB 3.0 Link Power Management • USB 3.0 Link PM • Link PM states: U1 and U2 • Idea: • Host & hubs track idleness U1 • OS sets timeout once • No driver modification • Devices can refuse U1/U2 U2 U1 Software and Services Group (SSG) 20 System Software Division (SSD)
  • 21. USB 3.0 Link Power Management • Some USB 3.0 devices don't do Link PM • How to tell? # lsusb -v -d 1d6b:0003 | grep "Port [0-9]*" Hub Port Status: Port 1: 0000.02a0 5Gbps power Rx.Detect Port 2: 0000.0243 5Gbps power U2 enable connect Port 3: 0000.02a0 5Gbps power Rx.Detect Port 4: 0000.02a0 5Gbps power Rx.Detect Software and Services Group (SSG) 21 System Software Division (SSD)
  • 22. USB 2.1 Link PM • New 'L1' low power state • No changes to USB 2.0 hubs • Only for devices on roothub L0 L1 • Good for integrated devices L0 L0 Software and Services Group (SSG) 22 System Software Division (SSD)
  • 23. New Intel USB PM Features Software and Services Group (SSG) 23 System Software Division (SSD)
  • 24. Current and Future Intel Products • Current gen: • CPU: Ivy Bridge • Chipset: Panther Point • Next gen: • CPU: Haswell • Chipsets: Lynx Point Panther: flickr.com tim_ellis Software and Services Group (SSG) 24 Lynx: flickr.com keithmwilliams System Software Division (SSD)
  • 25. Intel USB PM Improvements • Panther Point • Finally has xHCI host controller! • Only four ports under xHCI • Supports USB 3.0 Link PM • Lynx Point • All ports under xHCI • Supports USB 3.0 and USB 2.1 Link PM Panther: flickr.com tim_ellis Software and Services Group (SSG) 25 Lynx: flickr.com keithmwilliams System Software Division (SSD)
  • 26. Intel Lynx Point USB PM Improvements • Motivation • Unused internal ports • Unused internal USB devices internal laptop: flickr novakreo Software and Services Group (SSG) 26 finger print scanner: flickr mikedent System Software Division (SSD)
  • 27. Intel Lynx Point USB PM Improvements • Idea: • Completely power off port • Lose USB events: • Disconnect • Connect • Remote wakeup events internal laptop: flickr novakreo Software and Services Group (SSG) 27 finger print scanner: flickr mikedent System Software Division (SSD)
  • 28. Summary Software and Services Group (SSG) 28 System Software Division (SSD) www.threadless.com/product/2168/USB_Port
  • 29. Summary • USB device suspend is often broken • Try powertop • Check out github.com/sarahsharp/usb-pm-tools • Link PM improvements • New Intel USB PM features • Thanks! Software and Services Group (SSG) 29 System Software Division (SSD)
  • 30. Questions? sarah.a.sharp@ linux.intel.com Software and Services Group (SSG) 30 System Software Division (SSD)