RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 663064 - usb autosuspend configuration should be persistent
Summary: usb autosuspend configuration should be persistent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udev
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: 6.1
Assignee: Harald Hoyer
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 632299
Blocks: Rhel6KvmTier1
TreeView+ depends on / blocked
 
Reported: 2010-12-14 15:30 UTC by Glauber Costa
Modified: 2013-01-09 23:25 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
This release of udev turns on the autosuspend feature of the qemu virtual mouse, tablet and keyboard devices to reduce load on virtual machines.
Clone Of:
Environment:
Last Closed: 2011-05-19 11:50:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
udev patch (2.83 KB, patch)
2011-01-25 10:51 UTC, Gerd Hoffmann
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0525 0 normal SHIPPED_LIVE udev bug fix and enhancement update 2011-05-19 09:37:42 UTC

Description Glauber Costa 2010-12-14 15:30:13 UTC
Description of problem:

In order to reduce idle load of USB devices running on emulated USB buses (mostly virtualization environments), we want the autosuspend feature of USB devices enabled whereas possible.

The sysfs representation of the device, however, won't enable it automatically, nor persist the current value upon reboots.

It would be nice that we could add a udev rule that could enable idle virtualization guests to reduce their load without the need for manual interaction by the sysadmin.

Comment 2 Gerd Hoffmann 2010-12-14 16:29:47 UTC
> > I'm using this in my testing:
> > 
> > [root@fedora64 ~]# cat /lib/udev/usb_autosuspend
> > #!/bin/sh
> > path="$1"
> > if test -f "/sys${path}/power/control"; then
> > 	echo "auto" > "/sys${path}/power/control"
> > elif test -f "/sys${path}/power/level"; then
> > 	echo "auto" > "/sys${path}/power/level"
> > fi
> > [root@fedora64 ~]# cat /lib/udev/rules.d/99-qemu.rules
> > ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", 
> > RUN+="usb_autosuspend %p"
> > 
> > The tricky part here is to figure whenever remote wakeup is going to 
> > work or not.  The emulated HID devices in current qemu advertise remote 
> > wakeup support but they don't actually support it ...
> > 
> > cheers,
> >    Gerd
> > 
Let's add it all to https://bugzilla.redhat.com/show_bug.cgi?id=663064

[x] done.

Comment 3 Phil Knirsch 2010-12-17 14:11:10 UTC
That rule should be added to qemu though, like we do with all other application specific udev rules.

Reassigning to qemu.

Thanks & regards, Phil

Comment 7 Gerd Hoffmann 2011-01-25 10:51:08 UTC
Created attachment 475139 [details]
udev patch

Part one of the (host-side) patches is merged upstream now.
Part two (migration support) hopefully follows shortly.

Submitted patch for the guest-side config to udev upstream (see attachment).
Lets see how it goes.  When upstream accepts it we should backport it to our udev package.  Failing that we can stick the udev files into some guest agent package.

Comment 8 Harald Hoyer 2011-01-25 13:55:24 UTC
I would suggest these rules as mentioned on the hotplug mailing list by Kay:

ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST="power/control", ATTR{power/control}="auto"

ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}=="42", TEST="power/level", ATTR{power/level}="auto"

ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST="power/control", ATTR{power/control}="auto"

ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST="power/level", ATTR{power/level}="auto"

ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST="power/control", ATTR{power/control}="auto"

ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST="power/level", ATTR{power/level}="auto"


Do we need both variants for RHEL6.0?

Comment 9 Harald Hoyer 2011-01-25 13:56:01 UTC
s/TEST=/TEST==/

Comment 10 Gerd Hoffmann 2011-01-25 14:34:49 UTC
Wow, that is fast, I just finished reading that mail ;)

RHEL-6 has power/level only, power/control was added in more recent kernels.

Comment 12 Gerd Hoffmann 2011-01-25 15:52:32 UTC
Reassigning to udev for backporting.

Comment 14 Harald Hoyer 2011-02-16 14:25:28 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
This release of udev turns on the autosuspend feature of the qemu virtual mouse, tablet and keyboard devices to reduce load on virtual machines.

Comment 15 Karel Volný 2011-04-21 15:01:35 UTC
the rules got added:

# grep USB /lib/udev/rules.d/42-qemu-usb.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse",    ATTR{serial}=="42", TEST=="power/level", ATTR{power/level}=="auto"
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet",   ATTR{serial}=="42", TEST=="power/level", ATTR{power/level}=="auto"
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/level", ATTR{power/level}=="auto"

Comment 16 errata-xmlrpc 2011-05-19 11:50:38 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0525.html


Note You need to log in before you can comment on or make changes to this bug.