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 07-29-2013, 03:55 AM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

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

Code:
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
suspend
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
on
Its not allowing me to change the file to suspend.

TIA
 
Old 07-29-2013, 04:45 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,750

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

https://www.kernel.org/doc/Documenta...management.txt

This might work.
echo "0" > "/sys/bus/usb/devices/usbX/power/autosuspend_delay_ms"
echo "auto" > "/sys/bus/usb/devices/usbX/power/control"

http://stackoverflow.com/questions/4...off-with-linux
 
1 members found this post helpful.
  


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

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

All times are GMT -5. The time now is 03:13 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