Re: Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-24 Thread Jason McIntyre
On Tue, Apr 24, 2018 at 05:40:44PM +0300, IL Ka wrote:
> Hello Jason,
> Thank you.
> 
> So, "wsmouse(4)"'s "/dev/wsmouse" multiplexer allows only exclusivie access
> now, right?
> 
> Should not we also document it in wsmouse(4) like
> "/dev/wsmouse is multiplexer for all mice,
> and can only be accessed exclusively by eitherws(4)/synaptics(4) or
> wsmoused(8)"
> 
> 
> Ilya.

morning.

no one objected to the diff i mailed, so i committed it.

as to your points above, i'm unsure. it only really affects (practically
speaking) wsmoused, right? so that seems the sane place. still if you
feel strongly, mail a diff and see if anyone bites.

jmc



Re: Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-24 Thread IL Ka
Hello Jason,
Thank you.

So, "wsmouse(4)"'s "/dev/wsmouse" multiplexer allows only exclusivie access
now, right?

Should not we also document it in wsmouse(4) like
"/dev/wsmouse is multiplexer for all mice,
and can only be accessed exclusively by eitherws(4)/synaptics(4) or
wsmoused(8)"


Ilya.


Re: Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-22 Thread Jason McIntyre
On Sun, Apr 22, 2018 at 05:45:26PM +0100, Jason McIntyre wrote:
> On Sun, Apr 22, 2018 at 01:27:40AM +0300, IL Ka wrote:
> > man wsmoused:
> > "wsmoused will happily coexist with the X Window System, provided that the
> > mouse device is supported by wsmouse(4). "
> > 
> > I have wsmouse0 on pms0 (PS/2 controller emulation running on VirtualBox)
> > 
> > When moused works on /dev/wsmouse, X reports
> > that device /dev/wsmouse is busy and mouse does not work.
> > 
> > To investigate it, I tried to open(2) it and perror(3) said "Device busy":
> > I then stopped wsmoused, and open(2) worked.
> > So, X is right: it can't share /dev/wsmouse with wsmoused.
> > 
> > I then created custom ServerLayout for X
> > with InputDevice backed by "ws" driver pointing to "/dev/wsmouse0"
> > 
> > and it worked.
> > 
> > So, X can access my mouse directly (via /dev/wsmouse0) but not
> > via multiplex (/dev/wsmouse)
> > 
> > I have 2 approaches to fix it:
> > 1) Update wsmoused(8) man page and write that user must stop it before X
> > 2) Patch "ws" to probe first N mice: it will start X with mouse even if
> > wsmoused runs
> > 
> > Which one should I take?
> > 
> > I also suggest to move following phrase from wsmoused(8) to wsmouse(4) man:
> > "/dev/wsmouse (the multiplexer device that receives all mouse events from
> > all wsmouse compatible mice on the system)"
> > 
> > This information is vital to understand how wsmouse works, and it is not
> > easy to find now.
> > Should I do that?
> > 
> > 
> > Ilya.
> 
> at some point, behaviour changed so that you could have one, but not
> both. that was deliberate.
> 
> i think we should probably just alter the text that says you can have
> both.
> 
> devs?
> 
> jmc

i should have attached a diff, just to be clear what i was suggesting:

Index: wsmoused.8
===
RCS file: /cvs/src/usr.sbin/wsmoused/wsmoused.8,v
retrieving revision 1.21
diff -u -r1.21 wsmoused.8
--- wsmoused.8  14 Nov 2015 01:30:11 -  1.21
+++ wsmoused.8  23 Apr 2018 05:48:52 -
@@ -49,6 +49,8 @@
 .Xr wscons 4
 driver.
 Its purpose is to provide copy/paste functionality on the console.
+It does not happily coexist with the X Window System though,
+so it has to be killed before starting the X Window System.
 .Pp
 By default, the left mouse button is used to select text
 (in the familiar click-and-drag fashion);
@@ -165,16 +167,6 @@
 Hitachi tablet protocol.
 .El
 .El
-.Pp
-.Nm
-will happily coexist with the X Window System, provided that the mouse
-device is supported by
-.Xr wsmouse 4 .
-Serial mice do not have a
-.Xr wsmouse 4
-compatible driver, so
-.Nm
-has to be killed before starting the X Window System.
 .Sh EXAMPLES
 To start wsmoused on the
 .Nm wsdisplay1



Re: Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-22 Thread Jason McIntyre
On Sun, Apr 22, 2018 at 01:27:40AM +0300, IL Ka wrote:
> man wsmoused:
> "wsmoused will happily coexist with the X Window System, provided that the
> mouse device is supported by wsmouse(4). "
> 
> I have wsmouse0 on pms0 (PS/2 controller emulation running on VirtualBox)
> 
> When moused works on /dev/wsmouse, X reports
> that device /dev/wsmouse is busy and mouse does not work.
> 
> To investigate it, I tried to open(2) it and perror(3) said "Device busy":
> I then stopped wsmoused, and open(2) worked.
> So, X is right: it can't share /dev/wsmouse with wsmoused.
> 
> I then created custom ServerLayout for X
> with InputDevice backed by "ws" driver pointing to "/dev/wsmouse0"
> 
> and it worked.
> 
> So, X can access my mouse directly (via /dev/wsmouse0) but not
> via multiplex (/dev/wsmouse)
> 
> I have 2 approaches to fix it:
> 1) Update wsmoused(8) man page and write that user must stop it before X
> 2) Patch "ws" to probe first N mice: it will start X with mouse even if
> wsmoused runs
> 
> Which one should I take?
> 
> I also suggest to move following phrase from wsmoused(8) to wsmouse(4) man:
> "/dev/wsmouse (the multiplexer device that receives all mouse events from
> all wsmouse compatible mice on the system)"
> 
> This information is vital to understand how wsmouse works, and it is not
> easy to find now.
> Should I do that?
> 
> 
> Ilya.

at some point, behaviour changed so that you could have one, but not
both. that was deliberate.

i think we should probably just alter the text that says you can have
both.

devs?

jmc



Despite the man, wsmouse(4) can't be shared between X(1) and wsmoused(8) (workaround included)

2018-04-21 Thread IL Ka
man wsmoused:
"wsmoused will happily coexist with the X Window System, provided that the
mouse device is supported by wsmouse(4). "

I have wsmouse0 on pms0 (PS/2 controller emulation running on VirtualBox)

When moused works on /dev/wsmouse, X reports
that device /dev/wsmouse is busy and mouse does not work.

To investigate it, I tried to open(2) it and perror(3) said "Device busy":
I then stopped wsmoused, and open(2) worked.
So, X is right: it can't share /dev/wsmouse with wsmoused.

I then created custom ServerLayout for X
with InputDevice backed by "ws" driver pointing to "/dev/wsmouse0"

and it worked.

So, X can access my mouse directly (via /dev/wsmouse0) but not
via multiplex (/dev/wsmouse)

I have 2 approaches to fix it:
1) Update wsmoused(8) man page and write that user must stop it before X
2) Patch "ws" to probe first N mice: it will start X with mouse even if
wsmoused runs

Which one should I take?

I also suggest to move following phrase from wsmoused(8) to wsmouse(4) man:
"/dev/wsmouse (the multiplexer device that receives all mouse events from
all wsmouse compatible mice on the system)"

This information is vital to understand how wsmouse works, and it is not
easy to find now.
Should I do that?


Ilya.