From: Andreas S. <an...@sc...> - 2002-09-23 13:38:36
|
I think the dev->phys entry in the input layer is an important key to associating a given keyboard with a certain VT (in kbd_connect()). I see that for USB keyboards and for ps2 keyboars this field is filled in nicely. But are there any other keyboards that are valid as controlling keyboards (or in other ways desireable to bind to a VT) that do NOT have a valid dev->phys entry? about binding devices to VTs: it is important to bind Keyboards to VTs to be able to start Xservers on that VT. Mice (for X) can be configured in the XF86Config. but it would perhaps be nice to be able to configure which mouse goes with which /dev/input/mouse* device, which in turn get used in the XF86Config. Do people agree on this or is that unneeded featureism? Do joysticks need to be bound to certain VTs, too? I would not know, I do not even have one. How are they accessed? |
From: Vojtech P. <vo...@su...> - 2002-09-27 07:53:42
|
On Mon, Sep 23, 2002 at 03:38:01PM +0200, Andreas Schuldei wrote: > I think the dev->phys entry in the input layer is an important > key to associating a given keyboard with a certain VT (in > kbd_connect()). > > I see that for USB keyboards and for ps2 keyboars this field is > filled in nicely. But are there any other keyboards that are > valid as controlling keyboards (or in other ways desireable to > bind to a VT) that do NOT have a valid dev->phys entry? Everyu input device is required to have a phys entry. > it is important to bind Keyboards to VTs to be able to start > Xservers on that VT. Mice (for X) can be configured in the > XF86Config. but it would perhaps be nice to be able to configure > which mouse goes with which /dev/input/mouse* device, which in > turn get used in the XF86Config. Do people agree on this or is > that unneeded featureism? No, X should be taught to open the correct /dev/input/event* device (not mouse*), based on a phys (or ID or ...) entry given in XF86Config. > Do joysticks need to be bound to > certain VTs, too? I would not know, I do not even have one. How > are they accessed? So far only through /dev/input/js* and /dev/input/event* -- Vojtech Pavlik SuSE Labs |
From: Andreas S. <an...@sc...> - 2002-09-27 08:56:08
|
* Vojtech Pavlik (vo...@su...) [020927 09:54]: > > it is important to bind Keyboards to VTs to be able to start > > Xservers on that VT. Mice (for X) can be configured in the > > XF86Config. but it would perhaps be nice to be able to configure > > which mouse goes with which /dev/input/mouse* device, which in > > turn get used in the XF86Config. Do people agree on this or is > > that unneeded featureism? > > No, X should be taught to open the correct /dev/input/event* device (not > mouse*), based on a phys (or ID or ...) entry given in XF86Config. And that is because the /dev/input/event* is the thing of the future and mouse* will pass away? But my point was really to have a way to determine/configure which mouse would become mouse0 (or even event0, if you please) instead of mouse3, etc. the point in that would be to have - a more tidy XF86Config, where the Xserver :0 connects to the mouse0 etc (this point is minor and rather cosmetic) - a way that a given mouse model remains the dedicated poninting device of a given (configured) Xserver, even after plugging and unplugging of your devices, in which the initialisiation order (and device/event number) might change as of now. This is actually the same as for the keyboards. Right now i am putting together a system which (among other) uses a userspace mechanism to determine the vt which it should bind keyboards to. for conveniance i am useing the hotplug interface and consider extending hotplug to return vt numbers. I would like to get feedback from someone more involved in these matters. who could help me? |
From: Vojtech P. <vo...@su...> - 2002-09-27 09:10:52
|
On Fri, Sep 27, 2002 at 10:55:45AM +0200, Andreas Schuldei wrote: > * Vojtech Pavlik (vo...@su...) [020927 09:54]: > > > it is important to bind Keyboards to VTs to be able to start > > > Xservers on that VT. Mice (for X) can be configured in the > > > XF86Config. but it would perhaps be nice to be able to configure > > > which mouse goes with which /dev/input/mouse* device, which in > > > turn get used in the XF86Config. Do people agree on this or is > > > that unneeded featureism? > > > > No, X should be taught to open the correct /dev/input/event* device (not > > mouse*), based on a phys (or ID or ...) entry given in XF86Config. > > And that is because the /dev/input/event* is the thing of the > future and mouse* will pass away? Correct. > But my point was really to have a way to determine/configure > which mouse would become mouse0 (or even event0, if you please) > instead of mouse3, etc. There is a way to determine what event0 is (EVIOCGPHYS), or to find out what a certain mouse has become (/proc/bus/input/devices). As to the device number assignment, it's not sanely possible to do with hotplug, etc. The minor numbers will simply have to stay more or less random. > the point in that would be to have > - a more tidy XF86Config, where the Xserver :0 connects to the > mouse0 etc (this point is minor and rather cosmetic) If you really need it, you can make a hotplug agent that'll rename or link or mknod the correct mouse device (based on major/minor) to /dev/mouse0. > - a way that a given mouse model remains the dedicated poninting > device of a given (configured) Xserver, even after plugging and > unplugging of your devices, in which the initialisiation order > (and device/event number) might change as of now. > This is actually the same as for the keyboards. This I fear needs to have support in Xserver. For example an userspace app called by the hotplug agent that'll connect to Xserver and via some X-extension tell it about what happened to hotpluggable mice. > Right now i am putting together a system which (among other) uses > a userspace mechanism to determine the vt which it should bind > keyboards to. for conveniance i am useing the hotplug interface > and consider extending hotplug to return vt numbers. > > I would like to get feedback from someone more involved in these > matters. who could help me? Me, Greg KH and Pat Mochel. -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-09-27 11:01:22
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 27 Sep 2002 19:10, Vojtech Pavlik wrote: > There is a way to determine what event0 is (EVIOCGPHYS), or to find out > what a certain mouse has become (/proc/bus/input/devices). > > As to the device number assignment, it's not sanely possible to do with > hotplug, etc. The minor numbers will simply have to stay more or less > random. Is EVIOCGPHYS unique? If not, when wouldn't it be better to use EVIOCGUNIQ instead? If so, then what is EVIOCGUNIQ for? Brad - -- http://conf.linux.org.au. 22-25Jan2003. Perth, Aust. Tickets booked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9lDjhW6pHgIdAuOMRApG3AJ9B5wo5Hvjulp9cefG1Yith9Xkz3QCfUJkZ DS2lwBVyJygrzb+dUUo4ri4= =2b0Y -----END PGP SIGNATURE----- |
From: Vojtech P. <vo...@su...> - 2002-09-27 11:12:48
|
On Fri, Sep 27, 2002 at 08:54:25PM +1000, Brad Hards wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Fri, 27 Sep 2002 19:10, Vojtech Pavlik wrote: > > There is a way to determine what event0 is (EVIOCGPHYS), or to find out > > what a certain mouse has become (/proc/bus/input/devices). > > > > As to the device number assignment, it's not sanely possible to do with > > hotplug, etc. The minor numbers will simply have to stay more or less > > random. > Is EVIOCGPHYS unique? Yes. No two devices in the system can have the same phys: entry > If not, when wouldn't it be better to use EVIOCGUNIQ instead? > If so, then what is EVIOCGUNIQ for? It's an identifier that a device may or may not have, and if there is one, it must be universally (*) unique for this devices bus, vendor and device id. Like USB storage UUID. It may be a serial number. Not that many input devices have it, but the possibility is there. (*) - in whole universe, not just the system. Also it must not ever change. -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-09-27 11:41:28
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 27 Sep 2002 21:12, Vojtech Pavlik wrote: > > If so, then what is EVIOCGUNIQ for? > > It's an identifier that a device may or may not have, and if there is > one, it must be universally (*) unique for this devices bus, vendor and > device id. Like USB storage UUID. It may be a serial number. Not that > many input devices have it, but the possibility is there. > > (*) - in whole universe, not just the system. Also it must not ever change. So it must be a property of the device, not a property of the system configuration. And it is broken, at least on USB. We're reporting the same on both EVIOCGPHYS and EVIOGUNIQ - the path. Brad - -- http://conf.linux.org.au. 22-25Jan2003. Perth, Aust. Tickets booked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9lEJHW6pHgIdAuOMRAntDAKCwPwCAV2+qr1VBfd/M8+hAv5mUYACgp9ei dIyZET6GrEq0DH0iUqHH1Ls= =e6Gm -----END PGP SIGNATURE----- |
From: Vojtech P. <vo...@su...> - 2002-10-07 08:07:55
|
On Fri, Sep 27, 2002 at 09:34:31PM +1000, Brad Hards wrote: > On Fri, 27 Sep 2002 21:12, Vojtech Pavlik wrote: > > > If so, then what is EVIOCGUNIQ for? > > > > It's an identifier that a device may or may not have, and if there is > > one, it must be universally (*) unique for this devices bus, vendor and > > device id. Like USB storage UUID. It may be a serial number. Not that > > many input devices have it, but the possibility is there. > > > > (*) - in whole universe, not just the system. Also it must not ever change. > So it must be a property of the device, not a property of the system > configuration. Exactly. > And it is broken, at least on USB. We're reporting the same on both EVIOCGPHYS > and EVIOGUNIQ - the path. Hmm, It doesn't seem so to me: hid-core sets UNIQ to be usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) and PHYS to be usb_make_path(dev, buf, 64); snprintf(hid->phys, 64, "%s/input%d", buf, intf->altsetting[0].bInterfaceNumber); Others usually don't set UNIQ and only set PHYS as they don't have an unique identifier. -- Vojtech Pavlik SuSE Labs |
From: Brad H. <bh...@bi...> - 2002-10-08 00:25:19
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 7 Oct 2002 18:07, Vojtech Pavlik wrote: > On Fri, Sep 27, 2002 at 09:34:31PM +1000, Brad Hards wrote: > > And it is broken, at least on USB. We're reporting the same on both > > EVIOCGPHYS and EVIOGUNIQ - the path. > > Hmm, It doesn't seem so to me: <snip> You were right, of course. I cut'n'pasted my test code, and forgot to change the ioctl from EVIOCGPHYS to EVIOCGUNIQ. I feel quite embarressed :-( > Others usually don't set UNIQ and only set PHYS as they don't have an > unique identifier. So a NULL string means "I don't have a unique identifier"? I can't actually find a HID device that has a serial number. Maybe I need to make one... Brad - -- http://linux.conf.au. 22-25Jan2003. Perth, Aust. I'm registered. Are you? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9oiQZW6pHgIdAuOMRAmXRAJ9U1FYsiOGBEDcBYkNn8oKew79fAQCdESCn zorwQsJhKIq5X2t0c8Mr1Tc= =1hs7 -----END PGP SIGNATURE----- |
From: Vojtech P. <vo...@su...> - 2002-10-08 08:12:59
|
On Tue, Oct 08, 2002 at 10:17:24AM +1000, Brad Hards wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Mon, 7 Oct 2002 18:07, Vojtech Pavlik wrote: > > On Fri, Sep 27, 2002 at 09:34:31PM +1000, Brad Hards wrote: > > > And it is broken, at least on USB. We're reporting the same on both > > > EVIOCGPHYS and EVIOGUNIQ - the path. > > > > Hmm, It doesn't seem so to me: > <snip> > You were right, of course. I cut'n'pasted my test code, and forgot to change > the ioctl from EVIOCGPHYS to EVIOCGUNIQ. I feel quite embarressed :-( > > > Others usually don't set UNIQ and only set PHYS as they don't have an > > unique identifier. > So a NULL string means "I don't have a unique identifier"? Yes. > I can't actually find a HID device that has a serial number. Maybe I need to > make one... That would work. I think some Wacoms might have serial numbers, at least their tools (in the wacom protocol, not USB) do. -- Vojtech Pavlik SuSE Labs |