Code Monkey home page Code Monkey logo

suspend-usb-device's People

Contributors

liyan avatar mlogic avatar technologyclassroom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

suspend-usb-device's Issues

line 180: echo: write error: Invalid argument

Solution?:
replace line:
echo 'suspend' > "$POWER_LEVEL_FILE"
by
echo "0" > "/sys/bus/usb/devices/$DEV_BUS_ID/power/autosuspend"
echo "auto" > "/sys/bus/usb/devices/$DEV_BUS_ID/power/level"

suspend no longer supported

I'm using ubuntu 11.04 and found the the echo suspend line didn't work.

I searched and found; https://bbs.archlinux.org/viewtopic.php?id=95659 -
In kernels up to 2.6.32, you could also specify "suspend", meaning that the device should remain suspended and autoresume was not allowed. This setting is no longer supported.

solution - replace suspend with;
echo "0" > "/sys/bus/usb/devices/$port/power/autosuspend"
echo "auto" > "/sys/bus/usb/devices/$port/power/level"

is this an error?

Hi, thanks for a great script, it should do what I was looking for.. I just tested it with my USB disk, and I get this output - is that an error or is the disk powered off (the LED is still on so I think it's not):
$ sudo ./suspend-usb-device -v /dev/sdb
Found device /devices/pci0000:00/0000:00:1d.7/usb2/2-1 associated to /dev/sdb; USB bus id is 2-1
Syncing device /dev/sdb
synchronize cache(10): transport: Host_status=0x07 [DID_ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]

Stopping device /dev/sdb
start stop unit: transport: Host_status=0x07 [DID_ERROR]
Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.