Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


  Search this Thread
Old 07-29-2013, 04:55 AM   #1
Senior Member
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,339

Rep: Reputation: 55
How can I disable a usb port using a shell script? I'm getting Invalid argument errs

How can I disable a usb port using a shell script? I'm getting Invalid argument errs

root@abe-All-Series:/home/abe# echo  suspend >/sys/bus/usb/devices/usb3/power/level
bash: echo: write error: Invalid argument

root@abe-All-Series:/home/abe# echo  suspend | tee /sys/bus/usb/devices/usb3/power/level
tee: /sys/bus/usb/devices/usb3/power/level: Invalid argument

root@abe-All-Series:/home/abe# echo  on | tee /sys/bus/usb/devices/usb3/power/level
Its not allowing me to change the file to suspend.

Old 07-29-2013, 05:45 PM   #2
Registered: Aug 2002
Posts: 13,690

Rep: Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167Reputation: 1167
The suspend setting is no longer supported.

This might work.
echo "0" > "/sys/bus/usb/devices/usbX/power/autosuspend_delay_ms"
echo "auto" > "/sys/bus/usb/devices/usbX/power/control"
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Shell Script - Getting an argument from ps result sajjadshahid Linux - Newbie 3 01-10-2012 02:10 AM
[SOLVED] Bind(port 8090): Invalid argument error in ffserver patch found unkajim Linux - Software 1 01-01-2012 04:52 PM
Trying to Mount USB mounting /dev/sda1 on /mnt/usb failed: Invalid argument JamesMore Linux - Newbie 9 07-28-2010 04:27 PM
IRSSI - Unable to connect server 6667 port 6667 [Invalid argument] creatureofthedark Linux - Software 4 04-17-2010 12:48 PM
message sending failed : Error[22 ] invalid argument .....but each and every argument rakeshranjanjha Linux - Software 2 01-08-2008 12:22 AM

All times are GMT -5. The time now is 06:21 PM.

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