OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 1:58 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Hot-plugging PS/2 keyboard
PostPosted: Sun Mar 21, 2021 4:39 pm 
Offline
Member
Member

Joined: Sat Feb 27, 2010 8:55 pm
Posts: 147
My PS/2 came unplugged on accident, so I plugged it back in. I assumed I'd have to reset the computer to get the OS to recognize they keyboard, but it had no trouble reading keypresses after that. I was a little surprised; I assumed PS/2 devices couldn't be hot-plugged. Am I wrong on that? Is there some signal PS/2 devices send when they're plugged in? Or should I assume the OS (Zorin in my case) periodically tries to detect the keyboard, and assumes its been unplugged if it stops getting responses? (And then resets the keyboard when it begins getting responses again).


Top
 Profile  
 
 Post subject: Re: Hot-plugging PS/2 keyboard
PostPosted: Sun Mar 21, 2021 5:15 pm 
Offline
Member
Member

Joined: Mon Oct 29, 2012 2:26 pm
Posts: 28
PS/2 was not designed for hot swap and it is not officially supported. There is no mechanism for device discovery during a hot plug. However, it seems likely that a device which goes missing like yours and comes back will work ok. From a control standpoint the host is just waiting for a message from the device. If the device goes away and comes back it just looks like there were no messages for a period of time. It really is more of an electrical question. pS/2 is implemented with open/drain IO that is biased high by the host. With any reasonably protected controller on device side you would be unlikely to damage the device and unlikely to get noise.

TLDR: you are correct, it wasn't designed for hot swap but will work in most cases (this is less true for mice than keyboards)


Top
 Profile  
 
 Post subject: Re: Hot-plugging PS/2 keyboard
PostPosted: Sun Mar 21, 2021 9:33 pm 
Offline
Member
Member

Joined: Wed Aug 30, 2017 8:24 am
Posts: 1604
In my experience it won't work, so I'm surprised it did for you. I have not attempted this in a long time, but I do remember both mouse and keyboard becoming unresponsive once either of them is unplugged or replugged. This happened to me more than a decade ago, so I don't remember clearly what exactly happened, but it was reproducible multiple times that both PS/2 devices would just turn off if anything changes with the plugs at run time.

_________________
Carpe diem!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 164 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group