Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Can I pull out a USB cable without first disconnecting the device via software?  (Read 3258 times)

0 Members and 1 Guest are viewing this topic.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
I would like to have a keyboard and mouse connected to my jukebox cabinet but I do not want to have a keyboard drawer installed on it since I think that looks bad for a jukebox cabinet.  Anyway, the keyboard/mouse would be used for configuration only (ie: not needed for operation of the jukebox) so I planned on storing them inside the cabinet, however, I am not too crazy about having to open the cabinet to pull out the keyboard/mouse for use everytime either.  As a result, I was thinking about getting a USB keyboard/mouse which I could simply plug into some USB port adapter I could install on the side of the jukebox (or somewhere obscure). 

Note: I do not want to go wireless since I am cheap.

Now, I know I can simply plug in the keyboard/mouse via USB to get it working (ie: plug-n-play), however, when I am done would I be able to simply pull the USB cable out without hurting anything?  I was wondering whether pulling out a connected USB cable would be a good thing to do instead of first disconnecting the USB devices via software first.   I noticed people sometimes asking the software to disconnect the device first before removing the actual hardware cable from the USB slot.





missioncontrol

  • MC-Retro says Wot!
  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7855
  • Last login:November 06, 2024, 06:22:12 pm
you should have no problem removing it. The main reason people disconnect USB devices through USB devices is because certain pieces of hardware such as flash drives have the potential of being pulled out at the wrong time, (while reading or writing to the drive). But with a keyboard and mouse, that will not be a problem.

javeryh

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7961
  • Last login:Today at 10:55:16 am
I'm no expert but the only thing I ever disconnect before unplugging is a hard drive (or something containing one like a PSP or a camera or a memory card and even then I rarely disconnect the device in Windows).  A keyboard and mouse should be fine.

bfauska

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1372
  • Last login:April 15, 2025, 10:49:31 pm
  • "You're not wrong Walter, you're just an @##hole!"
Unless the device has memory you should be fine. A keyboard or mouse or joystick is not usually a problem.  Things like thumb drives, memory cards, and removable hard-drives may be more finicky.

I'm too slow, while I was typing several people said the same thing as me.  It'll work fine.

Herk

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 66
  • Last login:December 30, 2024, 06:58:17 pm
Unclet,

Quick answer is, no problem with a keyboard or mouse.

If there would be a problem, it usually comes in when you disconnect a device that windows reads or writes to, like a portable hard drive, or versions of windows earlier than XP.  To make things easier, make sure the keyboard and mouse do not require any nonnative windows drivers or software.

Plug and unplug away,

Herk

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Excellent .... thanks for the input

ChadTower

  • Chief Kicker - Nobody's perfect, including me. Fantastic body.
  • Trade Count: (+12)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38212
  • Last login:July 30, 2025, 03:29:53 pm

Does "shutting down" a USB device also cut power to that port?  I'm curious if there is potential for damage to the power circuit of higher current USB items if you don't "shut it down" before removing.

missioncontrol

  • MC-Retro says Wot!
  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7855
  • Last login:November 06, 2024, 06:22:12 pm
I don't believe it shuts down the power to the port since after you remove the item it is able to power the next device without telling it to.

fjl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1152
  • Last login:March 04, 2017, 10:14:04 pm
  • Pixels Rule!

bfauska

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1372
  • Last login:April 15, 2025, 10:49:31 pm
  • "You're not wrong Walter, you're just an @##hole!"

Does "shutting down" a USB device also cut power to that port?  I'm curious if there is potential for damage to the power circuit of higher current USB items if you don't "shut it down" before removing.

When I've told windows to disconnect MP3 players in the past they have kept charging, but been removed from the directory structure, so I'm fairly sure it doesn't kill the power.

MonMotha

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2378
  • Last login:February 19, 2018, 05:45:54 pm
There is no damage to be had from connecting/disconnecting a USB cable at will in terms of power applied.  The connector is specifically designed to be hot-pluggable (and unpluggable).  The only issues that can arise are software.

All OSes I'm aware of (that support USB) handle hotplug/unplug events just fine for devices without memory.  Most OSes also handle IO on memory devices synchronously to prevent corruption due to cache desync, but there is still the possibilty of getting unlucky, so such devices should be "stopped" (whatever that means on your OS of choice) before unplugging.

fjl

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1152
  • Last login:March 04, 2017, 10:14:04 pm
  • Pixels Rule!
My sister claims she ruined her I-pod from pulling it out of the USB socket without first disconnecting it through windows.

Namco

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 623
  • Last login:March 03, 2025, 10:40:32 pm
  • Now addicted to Williams pins... all of them.
    • Freddo Mame Project

Does "shutting down" a USB device also cut power to that port?  I'm curious if there is potential for damage to the power circuit of higher current USB items if you don't "shut it down" before removing.

In my experience, Windows 2000 will cut USB bus power to the device when you use Unplug Devices option, but in Windows XP, it stays powered, but will disappear. In both cases  unplugging it and reinserting will restore power/functionality.

ChadTower

  • Chief Kicker - Nobody's perfect, including me. Fantastic body.
  • Trade Count: (+12)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 38212
  • Last login:July 30, 2025, 03:29:53 pm
There is no damage to be had from connecting/disconnecting a USB cable at will in terms of power applied.  The connector is specifically designed to be hot-pluggable (and unpluggable).  The only issues that can arise are software.


They're not designed to be 15 cent Chinese manufactured sockets/plugs, though, which is what almost all of them are now.

missioncontrol

  • MC-Retro says Wot!
  • Trade Count: (+13)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7855
  • Last login:November 06, 2024, 06:22:12 pm
My sister claims she ruined her I-pod from pulling it out of the USB socket without first disconnecting it through windows.

If the PC was writing to the Ipod at the time, yes it could damage the file structure thus rendering it unusable. I've seen a few thumb drives get ruined because users pulled them out without disconnecting them. Usually a low level format will fix it, but the data will be gone.

Kajoq

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 284
  • Last login:June 14, 2024, 11:28:46 pm
I know you said you didn't want to go wireless because you're cheap, But  you can find some good keyboard/mouse packages for pretty cheap.

I paid 30 bucks for a Logitech wireless keyboard/mouse combo at Target for my cab.

@efjayel:  While I never completely bricked an iPod from unplugging mine without waiting to disconnect - for some reason iPods are especially sensitive to doing this.  I've had 2 different ipods that have corrupted themselves from me doing this in the past. 

RandyT

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7014
  • Last login:Today at 11:25:58 am
  • Friends don't let friends hack keyboards.
    • GroovyGameGear.com

The USB ports have no control over the power.  In all implementations I am aware of, the 5v is just hardwired to the port as it is with the PS/2 Keyboard / Mouse port.  Unplugging a device will not affect the power of other devices on the same bus.  They simply keep drawing the same current they always draw.  You can't force-feed power to something with a regulated supply.

The USB controller simply gets, as part of the setup info from the device, an indication of the power required by the device and tracks what is being used against what is available.  Based on that information, the controllers supposedly will not enumerate a new device if it thinks more power will be drawn from the port than is available, but I have yet to see this condition occur.   Maybe I just haven't tried hard enough :)

In any case, as others have already stated, HID classed devices like mice and keyboards were absolutely designed to just have the plug pulled on them.  But anything that stores info,  even in non-volatile memory, should be shut down in the OS before disconnecting.  I've seen very bad things happen under 98 when not doing so, and while I'm sure 2K/XP is likely to be safer in this regard, it's still not safe for the device being disconnected.

RandyT