Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
> > 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.
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.
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?
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.
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