3

I've been slamming my head over this issue. According to previous up-voted methods: askubuntu_link1 and similarly askubuntu_link2, I enable power/wakeup to the usb device connected to my wireless mouse receiver and also attempt to create udev rules for my specific device. However, I still can't get any wakeup response from my wireless mouse upon suspend; I'm only able to wake up by opening the laptop lid and wake using the touchpad. My laptop is a Dell XPS 13 9380 with Ubuntu 18.04.

I begin:

$ grep . /sys/bus/usb/devices/*/power/wakeup

Initially yielding,

/sys/bus/usb/devices/1-7/power/wakeup:disabled    
/sys/bus/usb/devices/1-9/power/wakeup:disabled   
/sys/bus/usb/devices/5-1/power/wakeup:disabled   
/sys/bus/usb/devices/6-1.2/power/wakeup:disabled   
/sys/bus/usb/devices/6-1/power/wakeup:disabled
/sys/bus/usb/devices/usb1/power/wakeup:disabled
/sys/bus/usb/devices/usb2/power/wakeup:disabled
/sys/bus/usb/devices/usb3/power/wakeup:disabled
/sys/bus/usb/devices/usb4/power/wakeup:disabled
/sys/bus/usb/devices/usb5/power/wakeup:disabled
/sys/bus/usb/devices/usb6/power/wakeup:disabled

Finding the usb port for my wireless receiver:

$ lsusb

Bus 006 Device 004: ID 0480:a006 Toshiba America Inc External Disk 1.5TB  
Bus 006 Device 003: ID 0bda:8153 Realtek Semiconductor Corp.  
Bus 006 Device 002: ID 0424:5807 Standard Microsystems Corp.   
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub  
Bus 005 Device 004: ID 046d:0825 Logitech, Inc. Webcam C270  
Bus 005 Device 003: ID 0bda:4014 Realtek Semiconductor Corp.   
Bus 005 Device 002: ID 0424:2807 Standard Microsystems Corp.    
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub    
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub   
Bus 001 Device 004: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 0489:e0a2 Foxconn / Hon Hai    
Bus 001 Device 002: ID 0c45:6723 Microdia        
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

I identify my device ID is c534.

Find the port my device is plugged into:

$ grep c534 /sys/bus/usb/devices/*/idProduct  

/sys/bus/usb/devices/1-9/idProduct:c534

This indicates my device is plugged into bus 1, port 9.

Double-check if wakeup is enabled:

$ cat /sys/bus/usb/devices/1-9/power/wakeup  
disabled

Enable wakeup on port:

$ sudo sh -c 'echo "enabled" > /sys/bus/usb/devices/1-9/power/wakeup'

Check if wakeup enabled: $ cat /sys/bus/usb/devices/1-9/power/wakeup enabled

Upon testing the computer in suspend mode, I get no wake up.

Then, I attempt editing wakeup rules specific to my device:

$ lsusb | grep Receiver
Bus 001 Device 004: ID **046d:c534** Logitech, Inc. Unifying Receiver

Using device id's, I edit number 10 priority udev rules for usb port 1-9:

$ sudo nano /etc/udev/rules.d/10-wakeup.rules

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c534" RUN+="/bin/sh -c 'echo enabled > /sys/bus/usb/devices/1-9/power/wakeup'"

After system restart, and checking that port 1-9 has wakeup enabled, I continue to get no response from my mouse under computer suspend. WHY??? I'm stuck.

Martin
  • 56
  • Thank you for your attempt to help. But no, I've tried unplugging and plugging the logitech unifying receiver with many variations as well, and I still can't get a response out of suspend. – Martin Aug 10 '19 at 02:42
  • @WinEunuuchs2Unix I still am unable to get the desired unwake with mouse result. Could you please help me debug? I create your script, change the device id to mine, mark file executable. I get no desired change when I suspend my computer. When testing the script manually, I am able to disable mouse response completely but passing resume does not repower the mouse as you already seem to anticipate. Can you assist? Please see my screen capture: https://imgur.com/a/9Xc2MRE (Bus 001 Device 004) Unplugging and plugging receiver does nothing. – Martin Aug 14 '19 at 16:39
  • @WinEunuuchs2Unix I tried with the new script but it still failed. See your submitted answer for details on my attempt. – Martin Aug 16 '19 at 01:05

3 Answers3

1

Notice that on Dell (probably not unique to Dell) the usb is disable by default for wakeup on BIOS level. I tried and tried to run the great solutions above without any luck and then I found out the "trivial" answer of bios change.

0

Mouse receiver needs power

Your Unifying Receiver needs to be plugged into a USB port that has power when the machine is suspended. You can move your mouse but if the Unifying Receiver has no power nothing will happen.

From: USB PowerShare not working on XPS13 9380

  1. Make sure you actually enabled USB PowerShare in the BIOS Setup interface. On some systems it's disabled by default.

  2. Make sure you're using a port that actually supports PowerShare. Not all Dell systems have PowerShare implemented on all of their USB ports. Look for a port with a battery icon or possibly a lightning bolt icon, although the latter might cause some confusion because the 9380 also supports Thunderbolt 3, which uses a very similar lightning-style icon.

  3. On some Dell systems, PowerShare only works when the system is either shut down and on AC power, or sleeping (on either battery or AC power). Not all systems enable PowerShare while the system is fully shut down and not plugged in.

  • Thanks for the continued help attempts. I tried moving any previous script attempts. Then I created the script, copied the lines of code exactly, marked the file executable, and restarted computer. Upon computer suspend, still no response... – Martin Aug 16 '19 at 01:07
  • @Martin Sorry I totally misread your question. I've posted an entirely new answer and removed my previous comments. – WinEunuuchs2Unix Aug 16 '19 at 01:32
  • Sorry for the long delay in responding to your help. As a post in that link states, there is not specific settings in the BIOS that enables/disables usb powershare but I did change in the BIOS "Uncheck Wake on Dell USB C dock". I can confirm powershare works on the ports that I have tested because they are able to charge my phone during suspend mode. However, when I continue to attempt waking by shaking my mouse and signalling to my USB wireless receiver I still get no response to wake my computer. – Martin Aug 28 '19 at 14:47
0

/sys/bus/usb/devices/usb1/power/wakeup also needs to be enabled.

Eliah Kagan
  • 117,780
mueslo
  • 101