You are not logged in.
Hi!
for my laptop's powermanagement, I went for a manual configuration, using almost all tips found on the power saving page on arch wiki.
for usb autosuspend there is:
/etc/udev/rules.d/usb_power_save.rules
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/control" ATTR{power/control}="auto"
ACTION=="add", SUBSYSTEM=="usb", TEST=="power/autosuspend" ATTR{power/autosuspend}="2"
My question is: how to disable the autosuspend for a usb device with a certain name by default? currently, i always go into powertop and disable the suspend for my external keyboard if i want to use it and it is connected. otherwise, if i do not press a button for 2sec it will logically suspend as defined.
How can i exclude devices with certain names/properties from the rule? Or is there a better way alltogether? Note: I do not want to use laptopmode-tools.
Cheers
Thanks for your time!
EDIT: solved with
91-local.rules containing:
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="045e", ATTR{idProduct}=="074b", TEST=="power/control", ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="046d", ATTR{idProduct}=="c051", TEST=="power/control", ATTR{power/control}="on"
Last edited by replax (2013-10-28 22:05:16)
Offline
Use udevadm's attributewalk to dump info for the specific path to the keyboard. Then it might help to compare it against another usb port that doesn't have anything attached (or something entirely different), and see which ATTR or ATTRS are unique to the keyboard path. Then add those to the rule.
Offline
Sorry to bump this old thread again, but my problem is not yet solved.
I tried to add the following lines at the end of file of my usb_power_save.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="Mouse" ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="Keyboard" ATTR{power/control}="on"
after that didnt work, I created a new file and added the lines there:
/usr/lib/udev/rules.d/91-local.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="Mouse" ATTR{power/control}="on"
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="Keyboard" ATTR{power/control}="on"
however, my keyboard and mouse are still being supended. Note, my keyboard has "Keyboard" in it's device name and my mouse has "Mouse" in it, too.
It also makes no difference if my mouse is plugged in at boot time or if I connect it afterwards.
How could I proceed to make this work? It's really annoying to always start up powertop and change it, when I use an external mouse&keyboard.
Thanks for your time.
Offline
Do yo constantly change USB ports for you keyboard and mouse? If not, it would probably be easier to just determine the particular USB ports your devices are plugged into and then work it that way.
In any case, just slapping rules into a post makes it hard to solve the problem without a frame of reference. So can you also post the output of the udevadm command you used to determine the values in your rule?
Offline
This is the udevadm output for my keyboard:
# udevadm info -a -n /dev/input/by-id/usb-Microsoft_Microsoft®_SiderWinderTM_X6_Keyboard-event-kbd
looking at device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2.2/4-1.2.2:1.0/input/input14/event14':
KERNEL=="event14"
SUBSYSTEM=="input"
DRIVER==""
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2.2/4-1.2.2:1.0/input/input14':
KERNELS=="input14"
SUBSYSTEMS=="input"
DRIVERS==""
ATTRS{phys}=="usb-0000:00:1d.0-1.2.2/input0"
ATTRS{uniq}==""
ATTRS{properties}=="0"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2.2/4-1.2.2:1.0':
KERNELS=="4-1.2.2:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="usbhid"
ATTRS{bInterfaceClass}=="03"
ATTRS{bInterfaceSubClass}=="01"
ATTRS{bInterfaceProtocol}=="01"
ATTRS{bNumEndpoints}=="01"
ATTRS{supports_autosuspend}=="1"
ATTRS{bAlternateSetting}==" 0"
ATTRS{bInterfaceNumber}=="00"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2/4-1.2.2':
KERNELS=="4-1.2.2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="1.2.2"
ATTRS{idVendor}=="045e"
ATTRS{speed}=="12"
ATTRS{bNumInterfaces}==" 2"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{busnum}=="4"
ATTRS{devnum}=="4"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="500mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0260"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="1787"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Microsoft"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="074b"
ATTRS{bDeviceClass}=="00"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2':
KERNELS=="4-1.2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="01"
ATTRS{devpath}=="1.2"
ATTRS{idVendor}=="05e3"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="4"
ATTRS{devnum}=="3"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="4"
ATTRS{bcdDevice}=="3298"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="78"
ATTRS{ltm_capable}=="no"
ATTRS{removable}=="removable"
ATTRS{idProduct}=="0608"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="USB2.0 Hub"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4/4-1':
KERNELS=="4-1"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="01"
ATTRS{devpath}=="1"
ATTRS{idVendor}=="8087"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{busnum}=="4"
ATTRS{devnum}=="2"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="8"
ATTRS{bcdDevice}=="0000"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="50"
ATTRS{ltm_capable}=="no"
ATTRS{removable}=="fixed"
ATTRS{idProduct}=="0024"
ATTRS{bDeviceClass}=="09"
looking at parent device '/devices/pci0000:00/0000:00:1d.0/usb4':
KERNELS=="usb4"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="0"
ATTRS{idVendor}=="1d6b"
ATTRS{speed}=="480"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="64"
ATTRS{authorized_default}=="1"
ATTRS{busnum}=="4"
ATTRS{devnum}=="1"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="0mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="e0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="3"
ATTRS{bcdDevice}=="0310"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{serial}=="0000:00:1d.0"
ATTRS{version}==" 2.00"
ATTRS{urbnum}=="36"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="Linux 3.10.3-1-ARCH ehci_hcd"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="0002"
ATTRS{bDeviceClass}=="09"
ATTRS{product}=="EHCI Host Controller"
looking at parent device '/devices/pci0000:00/0000:00:1d.0':
KERNELS=="0000:00:1d.0"
SUBSYSTEMS=="pci"
DRIVERS=="ehci-pci"
ATTRS{irq}=="23"
ATTRS{subsystem_vendor}=="0x17aa"
ATTRS{broken_parity_status}=="0"
ATTRS{class}=="0x0c0320"
ATTRS{companion}==""
ATTRS{consistent_dma_mask_bits}=="32"
ATTRS{dma_mask_bits}=="32"
ATTRS{local_cpus}=="00000000,0000000f"
ATTRS{device}=="0x1c26"
ATTRS{uframe_periodic_max}=="100"
ATTRS{msi_bus}==""
ATTRS{local_cpulist}=="0-3"
ATTRS{vendor}=="0x8086"
ATTRS{subsystem_device}=="0x21da"
ATTRS{numa_node}=="-1"
ATTRS{d3cold_allowed}=="1"
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Actually, I (ignorantly) wrote the rules according to the name in Powertop/lsusb output.
Well, they don't constantly change, I have three USB ports on my laptop and plug my usb hub in either of them. My mouse & keyboard are connected to an usb hub.. Although I sometimes also plug in different keyboards (e.g. at university) directly into my pc.
Thanks a lot for your time !!
Last edited by replax (2013-08-01 20:25:26)
Offline