LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-25-2018, 04:47 AM   #16
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435

Glad you finally found something that works for you, even if only once! If it worked once, it can be made to work again...

It seems that when the computer reboots it sets all the USB ports to be wake - disabled again.

Any commands in the file /etc/rc.local are executed as root, as the last step of the boot process.
So that is a good place to put the commands to enable USB wake.
Code:
sudo nano /etc/rc.local
Use the cursor keys to navigate to near the end of the file, the line before exit 0 which is the final command, meaning exit with an error code of 0 (and 0 = "no errors")

There put:
Code:
echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb3/power/wakeup
echo enabled > /sys/bus/usb/devices/usb4/power/wakeup
echo enabled > /sys/bus/usb/devices/usb5/power/wakeup
echo enabled > /sys/bus/usb/devices/usb6/power/wakeup
echo enabled > /sys/bus/usb/devices/usb7/power/wakeup
echo enabled > /sys/bus/usb/devices/usb8/power/wakeup
Or whatever worked for you.

So the file might look like this:
Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#
# Here follows a quick & dirty kludge to enable USB wake events

echo enabled > /sys/bus/usb/devices/usb1/power/wakeup
echo enabled > /sys/bus/usb/devices/usb2/power/wakeup
echo enabled > /sys/bus/usb/devices/usb3/power/wakeup
echo enabled > /sys/bus/usb/devices/usb4/power/wakeup
echo enabled > /sys/bus/usb/devices/usb5/power/wakeup
echo enabled > /sys/bus/usb/devices/usb6/power/wakeup
echo enabled > /sys/bus/usb/devices/usb7/power/wakeup
echo enabled > /sys/bus/usb/devices/usb8/power/wakeup

exit 0
Save the file with <CTRL> O ("Oh") and then <RETURN>
Exit nano with <CTRL> X
Reboot
Shutdown.
Can you wake on USB?
 
Old 03-25-2018, 05:24 AM   #17
igo470
LQ Newbie
 
Registered: Apr 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
Talking

Yes, Yes, Yes!!!Thanks for your help in clarifying the steps. I'm going to bed a happy boy.
 
Old 03-25-2018, 04:42 PM   #18
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Pleased we all finally got it to work.

This is linux, where you are in control of what happens and how, and have unfettered access to the tools you might need to fix things that might be broken.

Welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Mint 13 - Laptop Won't Wake Up from Suspend pcfast Linux - Newbie 5 12-16-2013 09:08 PM
LXer: Taking Control: Interview with FLIRC Creator Jason Kotzin LXer Syndicated Linux News 0 03-19-2013 03:00 AM
LXer: Linux: Using Remote Wakeup (Wake on LAN) LXer Syndicated Linux News 0 09-25-2010 01:10 AM
Anyone got the Remote Wonder (ATI's USB remote control) to work under Linux? dezireduser Linux - Hardware 2 11-06-2005 08:47 AM
video projector's remote control & linux laptop gour Linux - Laptop and Netbook 0 10-05-2005 09:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration