LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-11-2006, 04:53 AM   #1
michaeljensen
LQ Newbie
 
Registered: Dec 2006
Posts: 1

Rep: Reputation: 0
Power off USB


Does anybody know how to power off the individual usb ports? Like on windows. I would like to power on / off usb mounted disks.
 
Old 12-11-2006, 11:19 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Well, I don't have anything that I can test with at the moment, but it looks to me that if you find your device with

lsusb -v | less

You should be able to power it off with:

echo "0" > /sys/bus/usb/devices/device/power/state

For example:

echo "0" > /sys/bus/usb/devices/6-0:1.0/power/state

Why don't you try it and let us know?
 
Old 01-01-2007, 02:43 AM   #3
mjrclark
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Rep: Reputation: Disabled
$:/sys/bus/usb/devices/6-1/power$ echo "0" > /sys/bus/usb/devices/6-0:1.0/power/state
bash: /sys/bus/usb/devices/6-0:1.0/power/state: Permission denied

Even with all combinations of sudo. It seems this attribute is read only, I have not seen this "permission denied" anywhere else.
Discussion continues in other thread, the one I started.
http://www.linuxquestions.org/questi....php?p=2565927
Edit-Clarification
I am not the original poster, and I was trying to use these commands to do something slightly different- power down usb ports, that have various peripherals attached. This turned out to be impossible to do.

Last edited by mjrclark; 01-02-2007 at 03:49 AM.
 
Old 01-01-2007, 02:49 PM   #4
galle
Member
 
Registered: Sep 2003
Location: Bergen, Norway
Distribution: Debian testing
Posts: 69

Rep: Reputation: 16
Couldn't you just use hdparm to power down the disks?
 
Old 07-01-2008, 04:27 PM   #5
Hobart
LQ Newbie
 
Registered: Jul 2008
Location: +39° 57' 54.57", -105° 11' 24.36", 5689'
Distribution: Debian on servers, Ubuntu on desktops, RHEL at work
Posts: 1

Rep: Reputation: 0
Lightbulb

Quote:
Originally Posted by mjrclark View Post
$:/sys/bus/usb/devices/6-1/power$ echo "0" > /sys/bus/usb/devices/6-0:1.0/power/state
bash: /sys/bus/usb/devices/6-0:1.0/power/state: Permission denied

Even with all combinations of sudo. It seems this attribute is read only, I have not seen this "permission denied" anywhere else.
Discussion continues in other thread, the one I started.

Edit-Clarification
I am not the original poster, and I was trying to use these commands to do something slightly different- power down usb ports, that have various peripherals attached. This turned out to be impossible to do.
You may have to do "echo -n 0 > file" instead of "echo 0 > file".

Cheers,
-jon
 
  


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
Udev and USB power farfrael Slackware 1 12-03-2006 11:53 AM
USB Power Issues kidzmom3 Linux - Laptop and Netbook 2 09-12-2005 08:43 AM
A question about power management of usb smhs Linux - Hardware 2 08-29-2005 01:21 AM
no power to USB port? HailKingPhil Slackware 14 08-20-2004 09:33 PM
How To Power Off USB Flash Disk? wpyh Linux - Hardware 3 06-20-2004 10:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:50 AM.

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