linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hotplug, input  and XFree86
@ 2001-10-05 14:07 Stephane Chauveau
  2001-10-05 15:51 ` Stephane Chauveau
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stephane Chauveau @ 2001-10-05 14:07 UTC (permalink / raw)
  To: linux-hotplug

Hi, 

is there a project to handle hotpluging of X11 input devices?

For example, I have a Wacom USB tablet. Hotplug works well except 
that the input subsystem is not yet integrated so I have to guess 
which  input device number is use by the tablet. 

Even with a proper input subsystem, the X server would have to 
be stopped and restarted when a new device is plugged in :-(

A first approach could be to change XFree86 but I have the 
feeling that I could take months or years.

So I propose to develop an 'input' daemon responsible 
of connecting hot-plugable devices to custom devices.

When the daemon is started, it creates a virtual device
for each physical device that may be plugged in the system.

 


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hotplug, input  and XFree86
  2001-10-05 14:07 hotplug, input and XFree86 Stephane Chauveau
@ 2001-10-05 15:51 ` Stephane Chauveau
  2001-10-05 18:43 ` Tim Jansen
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Stephane Chauveau @ 2001-10-05 15:51 UTC (permalink / raw)
  To: linux-hotplug

Humm... Stupid mailer :-) 
Here is the complete mail:


Hi, 

is there a project to handle hotpluging of X11 input devices?

For example, I have a Wacom USB tablet. Hotplug works well except 
that the input subsystem is not yet integrated so I have to guess 
which  input device number is use by the tablet. 

Even with a proper input subsystem, the X server will have to 
be stopped and restarted when a new device is plugged in :-(

A first approach could be to change XFree86 but I have the 
feeling that I could take months or years.

So I propose to develop a generic 'input' driver for 
XFree86. This input driver will only understand a subset
of the kernel-input events corresponding more or less
to the native X11 events (motions in n-dimensions, 
n-buttons press/release and key press/release).

Those events will not be provided directly by the kernel
drivers by a daemon started before the X server.

The daemon will be responsible for
  - Creating one or more devices (daemon device) for each 
    physical device  that could be plugged in the system 
    Those file devices can be opened by the XFree86 generic 'input' 
    driver even if the physical device is yet not plugged in.
  - respond to hotplug requests by mapping those demon daemon devices
    to the kernel input devices.
  - translate kernel input events to XFree86 input events
    and redirect them to the appropriate daemon device.


Example: For my wacom, the daemon would load a wacom.o
driver and create 3 devices.

/dev/daemon-input/wacom-stylus
/dev/daemon-input/wacom-eraser
/dev/daemon-input/wacom-mouse

consider that the wacom is plugged in /dev/input/event0.

the daemon driver has to interpret the wacom specific event
ABS_PRESSURE, BTN_TOOL_STYLUS, BTN_TOOL_ERASER, ABS_TILTX,
and map them to more standard event. In the XFree wacom driver,
the pressure is on the Z axis so all ABS_PRESSURE events will
be transformed into ABS_Z events. 
The BTN_TOOL_??? events will be used to select the output 
device to use. 

 
From an XFree point of view, all devices have to be
configured in the XF86Config file. 

Example: for the wacom stylus

Section "InputDevice"
        Identifier  "gstylus"
        Driver  "generic-input"
        Option  "Device" "/dev/daemon-input/wacom-stylus"
       
        # my wacom supports only 3 dimensions: X, Y and Pressure
        Option "Dimensions" "3"
        
        Option "Mode0" "absolute"
        Option "Max0"  "10206"

        Option "Mode1" "absolute"
        Option "Max1"  "7422"

        Option "Mode2" "absolute"
        Option "Max2"  "511"

        # and 3 buttons
        Option "Buttons"  "3"

EndSection




  


 


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hotplug, input  and XFree86
  2001-10-05 14:07 hotplug, input and XFree86 Stephane Chauveau
  2001-10-05 15:51 ` Stephane Chauveau
@ 2001-10-05 18:43 ` Tim Jansen
  2001-10-06  7:39 ` Stephane Chauveau
  2001-10-06  9:45 ` Vojtech Pavlik
  3 siblings, 0 replies; 5+ messages in thread
From: Tim Jansen @ 2001-10-05 18:43 UTC (permalink / raw)
  To: linux-hotplug

On Friday 05 October 2001 19:46, you wrote:
> For example, I have a Wacom USB tablet. Hotplug works well except 
> that the input subsystem is not yet integrated so I have to guess 
> which  input device number is use by the tablet. 

A nice work-around for mice is to use /dev/input/mice instead of the 
pointer's device node, but it does not work with other input devices.


> So I propose to develop a generic 'input' driver for
> XFree86. This input driver will only understand a subset
> of the kernel-input events corresponding more or less
> to the native X11 events (motions in n-dimensions,
> n-buttons press/release and key press/release).

There is a input driver, using the event interface. It has to be ported to 
XFree 4.0 though.

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/linuxconsole/ruby/xfree86/
http://sourceforge.net/projects/linuxconsole/


> The daemon will be responsible for
>   - Creating one or more devices (daemon device) for each
>     physical device  that could be plugged in the system
>     Those file devices can be opened by the XFree86 generic 'input'
>     driver even if the physical device is yet not plugged in.
>   - respond to hotplug requests by mapping those demon daemon devices
>     to the kernel input devices.
>   - translate kernel input events to XFree86 input events
>     and redirect them to the appropriate daemon device.

Why don't you implement the ability to deal with disappearing devices in the 
input driver itself?

bye...


_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hotplug, input  and XFree86
  2001-10-05 14:07 hotplug, input and XFree86 Stephane Chauveau
  2001-10-05 15:51 ` Stephane Chauveau
  2001-10-05 18:43 ` Tim Jansen
@ 2001-10-06  7:39 ` Stephane Chauveau
  2001-10-06  9:45 ` Vojtech Pavlik
  3 siblings, 0 replies; 5+ messages in thread
From: Stephane Chauveau @ 2001-10-06  7:39 UTC (permalink / raw)
  To: linux-hotplug

On 2001.10.05 18:43 Tim Jansen wrote:
> 
> There is a input driver, using the event interface. It has to be ported
> to 
> XFree 4.0 though.
> 
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/linuxconsole/ruby/xfree86/
> http://sourceforge.net/projects/linuxconsole/
> 

Interesting. Is the project still alive? Nothing has been updated for 
almost a year. Anyway, I will have a look to it. 

> 
> > The daemon will be responsible for
> >   - Creating one or more devices (daemon device) for each
> >     physical device  that could be plugged in the system
> >     Those file devices can be opened by the XFree86 generic 'input'
> >     driver even if the physical device is yet not plugged in.
> >   - respond to hotplug requests by mapping those demon daemon devices
> >     to the kernel input devices.
> >   - translate kernel input events to XFree86 input events
> >     and redirect them to the appropriate daemon device.
> 
> Why don't you implement the ability to deal with disappearing devices  in
> the 
> input driver itself?


I have not investigated a lot but I believe that there is a major 
problem with the XInput protocol and with the way XFree86 is 
designed.
They both seem to assume that the list of devices is static. 
For example, XInput does not provide any events to inform the 
clients that a device has been added or removed. 





_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hotplug, input  and XFree86
  2001-10-05 14:07 hotplug, input and XFree86 Stephane Chauveau
                   ` (2 preceding siblings ...)
  2001-10-06  7:39 ` Stephane Chauveau
@ 2001-10-06  9:45 ` Vojtech Pavlik
  3 siblings, 0 replies; 5+ messages in thread
From: Vojtech Pavlik @ 2001-10-06  9:45 UTC (permalink / raw)
  To: linux-hotplug

On Sat, Oct 06, 2001 at 09:35:32AM +0000, Stephane Chauveau wrote:

> On 2001.10.05 18:43 Tim Jansen wrote:
> > 
> > There is a input driver, using the event interface. It has to be ported
> > to 
> > XFree 4.0 though.
> > 
> > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/linuxconsole/ruby/xfree86/
> > http://sourceforge.net/projects/linuxconsole/
> > 
> 
> Interesting. Is the project still alive? Nothing has been updated for 
> almost a year. Anyway, I will have a look to it. 

It should be back alive now. Dan Skarda told me he's resuming the work
on it.

> > > The daemon will be responsible for
> > >   - Creating one or more devices (daemon device) for each
> > >     physical device  that could be plugged in the system
> > >     Those file devices can be opened by the XFree86 generic 'input'
> > >     driver even if the physical device is yet not plugged in.
> > >   - respond to hotplug requests by mapping those demon daemon devices
> > >     to the kernel input devices.
> > >   - translate kernel input events to XFree86 input events
> > >     and redirect them to the appropriate daemon device.
> > 
> > Why don't you implement the ability to deal with disappearing devices  in
> > the 
> > input driver itself?
> 
> 
> I have not investigated a lot but I believe that there is a major 
> problem with the XInput protocol and with the way XFree86 is 
> designed.
> They both seem to assume that the list of devices is static. 
> For example, XInput does not provide any events to inform the 
> clients that a device has been added or removed. 

True. This, unfortunately, can't be fixed or worked around easily.

-- 
Vojtech Pavlik
SuSE Labs

_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-10-06  9:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-05 14:07 hotplug, input and XFree86 Stephane Chauveau
2001-10-05 15:51 ` Stephane Chauveau
2001-10-05 18:43 ` Tim Jansen
2001-10-06  7:39 ` Stephane Chauveau
2001-10-06  9:45 ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).