• 9 Posts
  • 67 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle















  • Hello again. Don’t know if you solved this but here’s what I did to my system (also OpenSuseTumbleweed). Create a file in /usr/local/sbin/ , lets say usbwakeup.sh. In that file put this:

    #!/bin/bash
    #
    #######################
    # GENERAL INFORMATION #
    #######################
    #
    # - This script enables / disables wake up from suspend# for USB devices.
    #
    # - The script needs execution permissions.
    #
    # - For this script to be executed when the system starts, there must be
    #   a symbolic link to it in /etc/rc3.d/ with priority S01
    #   (for example: /etc/rc3.d/S01usbwakeup)
    #
    ###########################
    # RELATED USEFUL COMMANDS #
    ###########################
    #
    # - Identify USB devices:
    #   grep . /sys/bus/usb/devices/*/product
    #
    # - Check the status of "wake up of the suspension" of USB devices:
    #   grep . /sys/bus/usb/devices/*/power/wakeup
    #
    #
    ##################
    # SCRIPT ACTIONS #
    ##################
    #
    # Disables wake up from suspend for optical mouse
    #echo disabled > /sys/bus/usb/devices/3-3/power/wakeup
    #
    # Enables wake up from suspend for the wireless keyboard
    #that I have connected to a USB 3.0 HUB in the USB port nr.4
    echo enabled > /sys/bus/usb/devices/1-2/power/wakeup
    

    Then in /etc/systemd/system/ create a file eg. my-wakeup.service and insert :

    [Unit]
    Desription=Usb wakeup    
    
    [Service]
    ExecStart=/usr/local/sbin/usbwakeup.sh
    
    [Install]
    WantedBy=multi-user.target
    
    

    Save of course everything, keep the dogle in and restart. This will work in every wakeup from suspend and also when restarting. If you unplug the dongle you will have to put it back in and restart to make this to work again.

    Hope that helps.