View previous topic :: View next topic |
Author |
Message |
kamagurka Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/62478751940bccc621141d.jpg)
Joined: 25 Jan 2004 Posts: 1026 Location: /germany/munich
|
Posted: Wed Jun 16, 2004 3:43 pm Post subject: changing my mouse without restarting |
|
|
i have purchased a new mouse. i am not yet sure how i'm gonna hook it up (usb or ps/2), but 'd like to switch without rebooting and preferrably also without restarting the xserver.
1. how do i make linux (or the xserver) reload the ps/2 port should i choose to put my new mouse there (my old one is there too).
2. how do i switch X over to taking the mouse input from the usb port instead of the ps/2 port (without restarting it)? can it be done? _________________ If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rmalolepszy Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Jan 2004 Posts: 167
|
Posted: Wed Jun 16, 2004 3:59 pm Post subject: |
|
|
Be careful doing this. Old motherboards would short if you pulled the mouse while it was powered on. Any non-hotplug device really has this issue because of the sudden change in voltage (although a mouse doesn't use much).
I'm not really sure about kililng x and restarting it (without looking - i'm at work). That's in essence what you need to do. I know in X you can ctrl-alt-backspace to restart x (re-reading the config). _________________ Cheers,
Ryan |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kamagurka Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/62478751940bccc621141d.jpg)
Joined: 25 Jan 2004 Posts: 1026 Location: /germany/munich
|
Posted: Wed Jun 16, 2004 4:19 pm Post subject: |
|
|
well, this mobo isn't *that* old.
good tip about the ctrl+alt+backsp. didnt know that. _________________ If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
hermes_jr l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1218839918407d5742349af.gif)
Joined: 26 Feb 2004 Posts: 701 Location: Moscow, Russia
|
Posted: Wed Jun 16, 2004 4:32 pm Post subject: |
|
|
Code: |
# rmmod hid
# modprobe hid
|
Should work if mouse support is compiled as a standalone module and module unloading is supported (also a kernel option)... In theory . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rmalolepszy Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Jan 2004 Posts: 167
|
Posted: Wed Jun 16, 2004 4:33 pm Post subject: |
|
|
BTW, you should just be able to kill your X process then start it back up with 'startx' or something similar to re-read your config. _________________ Cheers,
Ryan |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kamagurka Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/62478751940bccc621141d.jpg)
Joined: 25 Jan 2004 Posts: 1026 Location: /germany/munich
|
Posted: Wed Jun 16, 2004 5:36 pm Post subject: |
|
|
rmalolepszy wrote: | BTW, you should just be able to kill your X process then start it back up with 'startx' or something similar to re-read your config. |
well, duh. i would like to be able to do it without resorting to this. _________________ If you loved me, you'd all kill yourselves today.
--Spider Jerusalem, the Word |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54831 Location: 56N 3W
|
Posted: Wed Jun 16, 2004 6:19 pm Post subject: |
|
|
Kamagurka,
Connect your new mouse as USB and leave your old mouse connected too. Then configure X to use both. whichever one you pick up will work.
PS/2 ports are not hot pluggable by design. Tou may break your port and/or mouse if you try. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
474 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Jun 16, 2004 7:02 pm Post subject: |
|
|
On a similar note, X will handle the hotplugging of USB mice provided that you choose to use the /dev/input/mice node in the configuration file. Otherwise, if you unplug the mouse then plug one back in again then the pointer will remain motionless until X is restarted! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54831 Location: 56N 3W
|
Posted: Wed Jun 16, 2004 7:12 pm Post subject: |
|
|
kerframil,
If you use /dev/input/mouse0 for your USB mouse rather than /dev/input/mice you have to wait for the system to dectect that the mouse has been uplugged before you plugit back in again, or it will be detected as /dev/input/mouse1 (mouse0 still exists). That can be 20 seconds or more. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
474 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Jun 16, 2004 7:13 pm Post subject: |
|
|
Interesting. I've not been struck by that phenomenon but I'll certainly check it out. Presumably /dev/input/mice maintains a valid link to the most recently activated mouse device. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
NeddySeagoon Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/3946266373f47d606a2db3.jpg)
Joined: 05 Jul 2003 Posts: 54831 Location: 56N 3W
|
Posted: Wed Jun 16, 2004 7:23 pm Post subject: |
|
|
kerframil,
/dev/input/mice gets all the commads from all connected mice. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
474 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 19 Apr 2002 Posts: 714
|
Posted: Wed Jun 16, 2004 7:26 pm Post subject: |
|
|
Well, how about that (crosses off "learn something new" on the list of things to do) ... ![Wink ;)](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
forbjok Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/4334057084183fdc2a0725.jpg)
Joined: 21 May 2004 Posts: 207 Location: Hordaland, Norge
|
Posted: Fri Jun 18, 2004 9:01 am Post subject: |
|
|
I switch my usb mice (yeah, I have several, depending on where i am) between my laptop and other computers all the time, and I've never had to restart X because of it. With 2.6 kernels, /dev/mouse (-> /dev/psaux?) seems to merge all connected ps2/usb mice into a single device, so you don't even have to have seperate X configurations for them.
I don't remember having trouble with X detecting PS/2 mice on unplug/replug either (in fact, in one case re-plugging it fixed the "cursor-jumping-randomly-all-over-the-screen" problem without restarting X), but then again I rarely use PS/2 mice.
Supposedly, hotplugging PS/2 devices can damage the motherboard and/or devices, but I've done it a hundred times myself with both keyboards and mice, and nothing ever happened ![Laughing :lol:](images/smiles/icon_lol.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|