Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34

Thread: Disconnect USB ports in sleep mode

  1. #21
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Disconnect USB ports in sleep mode

    Doesn't it automatically unmount when you shutdown?

  2. #22
    Join Date
    Mar 2008
    Location
    The Burning Earth.
    Beans
    3,660

    Re: Disconnect USB ports in sleep mode

    Personally, I don't trust mine to. I'm not interested in having to replace 260 GB of data because the unmount took too long in shutdown and the OS forced it to shut off. But yes, it should.
    God does not play dice with the universe - Albert Einstein
    Sure I do, I just use loaded dice. - warfacegod

    An open forum. Its a free for all. Check us out. https://openlinuxforums.org/

  3. #23
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Disconnect USB ports in sleep mode

    Fair enough, but arguably, if you feel that the OS isn't good enough to accommodate a robust auto-unmount system then it's probably not robust enough to do proper copies, writes, reads, etc. etc. You get my point right?

    Anyway little of topic!

    Anyone else have any ideas?

  4. #24
    Join Date
    Mar 2008
    Location
    The Burning Earth.
    Beans
    3,660

    Re: Disconnect USB ports in sleep mode

    Quote Originally Posted by abhiroopb View Post
    Fair enough, but arguably, if you feel that the OS isn't good enough to accommodate a robust auto-unmount system then it's probably not robust enough to do proper copies, writes, reads, etc. etc. You get my point right?

    Anyway little of topic!

    Anyone else have any ideas?
    Not at all. I don't trust any OS to auto-unmount properly on shutdown. Whether it be Linux, Mac, or Windows. Especially Windows.

    I really think your best solution is to use Hibernate after unmounting your external. Unmounting ought to make the wake up process faster.
    God does not play dice with the universe - Albert Einstein
    Sure I do, I just use loaded dice. - warfacegod

    An open forum. Its a free for all. Check us out. https://openlinuxforums.org/

  5. #25
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Disconnect USB ports in sleep mode

    Quote Originally Posted by warfacegod View Post
    Not at all. I don't trust any OS to auto-unmount properly on shutdown. Whether it be Linux, Mac, or Windows. Especially Windows.

    I really think your best solution is to use Hibernate after unmounting your external. Unmounting ought to make the wake up process faster.
    I was talking more generally about external hard drive usage. I mean if, as you say, you don't trust the OS to auto-unmount then why do you trust it to properly write the data? (I'm not talking about different OSes here, just using the term generically).

  6. #26
    Join Date
    Mar 2008
    Location
    The Burning Earth.
    Beans
    3,660

    Re: Disconnect USB ports in sleep mode

    Quote Originally Posted by abhiroopb View Post
    I was talking more generally about external hard drive usage. I mean if, as you say, you don't trust the OS to auto-unmount then why do you trust it to properly write the data? (I'm not talking about different OSes here, just using the term generically).
    I trust the OS to auto-unmount just fine. I don't trust it to not force kill the process if it's taking too long or locks up during shutdown.
    God does not play dice with the universe - Albert Einstein
    Sure I do, I just use loaded dice. - warfacegod

    An open forum. Its a free for all. Check us out. https://openlinuxforums.org/

  7. #27
    Join Date
    Nov 2007
    Location
    Okieville, USA
    Beans
    3,178
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disconnect USB ports in sleep mode

    Your problem is you're using an active USB hub. The hub don't know the laptop is in suspend, therefore the power stays on. What I would do is see if there's such a thing as a "smart" hub. I don't think a script will cut the power in your case.
    MCP, A+/Linux+ Certified IT Technician
    System Specs | Dress up your "Super Button" FREE
    "If sometimes you can't be good, then be VERY good at being naughty!"

  8. #28
    Join Date
    Apr 2006
    Location
    Coventry
    Beans
    1,379
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Disconnect USB ports in sleep mode

    No offence but if you'd read above you would have noticed that I was specifically talking about the fan and small external hard drive which are NOT connected through the hub. I don't really mind the hub staying on. But I don't want the HD and fan to always stay on.

  9. #29
    Join Date
    Nov 2007
    Location
    Okieville, USA
    Beans
    3,178
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Disconnect USB ports in sleep mode

    Quote Originally Posted by abhiroopb View Post
    No offence but if you'd read above you would have noticed that I was specifically talking about the fan and small external hard drive which are NOT connected through the hub. I don't really mind the hub staying on. But I don't want the HD and fan to always stay on.
    My USB on my laptop turns off on suspend. I've tried to charge my phone and it's a "no go". It's odd that yours don't turn off, cause suspend is only supposed to provide power to RAM and the blinking light.
    MCP, A+/Linux+ Certified IT Technician
    System Specs | Dress up your "Super Button" FREE
    "If sometimes you can't be good, then be VERY good at being naughty!"

  10. #30
    Join Date
    Dec 2008
    Location
    UK
    Beans
    589
    Distro
    Ubuntu Mate 22.04 Jammy Jellyfish

    Re: Disconnect USB ports in sleep mode

    Have a look at this:
    http://www.linuxquestions.org/questi...b-port-613304/

    In particular, post #8 (I know post #5 says it's not possible but I'd still try this):

    power off:
    Code:
    echo suspend >/sys/bus/usb/devices/1-2/power/level
    power on:
    Code:
    echo auto >/sys/bus/usb/devices/1-2/power/level
    replacing 1-2 with the appropriate port number

    If /sys/bus/... as above doesn't exist, it might still work if you can find the right location.

    If this does work, you can incorporate it into the suspend and resume process (I've seen posts about that before) but obviously try it manually first. Probably needs 'sudo echo...' to get the necessary permission.

Page 3 of 4 FirstFirst 1234 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •