Re: Is there any performance difference between udev and evdev in xorg?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Alexey Dokuchaev-4
On Tue, Sep 15, 2020 at 10:55:31PM -0400, Aryeh Friedman wrote:
> What if any is the performance difference between udev and evdev when
> configuring xorg?  Also do I need to use one or the other consistently
> or can I intermix them?

If you don't need them (e.g. because this is desktop system without
fancy input devices), you'd better off with disabling both of them
altogether and use good old traditional way, that is, simply install
xf86-input-{keyboard,mouse} and let X.org handle those peripherals.

Yes, you would still be able to plug and unplug your USB mice and
they will be detected and working as expected.

TL;DR: DEVD/UDEV support is overrated and usually not needed at all.

./danfe
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Niclas Zeising-6
On 2020-09-16 06:01, Alexey Dokuchaev wrote:

> On Tue, Sep 15, 2020 at 10:55:31PM -0400, Aryeh Friedman wrote:
>> What if any is the performance difference between udev and evdev when
>> configuring xorg?  Also do I need to use one or the other consistently
>> or can I intermix them?
>
> If you don't need them (e.g. because this is desktop system without
> fancy input devices), you'd better off with disabling both of them
> altogether and use good old traditional way, that is, simply install
> xf86-input-{keyboard,mouse} and let X.org handle those peripherals.
>
> Yes, you would still be able to plug and unplug your USB mice and
> they will be detected and working as expected.
>
> TL;DR: DEVD/UDEV support is overrated and usually not needed at all.
>

This is bad advice.
Please use udev/evdev (it's basically the same thing).  The DEVD support
in xorg-server might go away, since it is a FreeBSD only solution and
the udev/evdev is similar to what is used on Linux.  If you are using
Wayland, it is also the only way to use input devices.

If you are using the default configuration of xorg on FreeBSD 12.1 or
later, using udev is the default.  This means using xf86-input-libinput
as the input device driver in X, and not xf86-input-{keyboard,mouse}.
This gives much better support for things like synaptics touchpads and
similar devices.  You can configure such devices either by adding X
configuration snippets to /usr/local/etc/X11/xorg.conf.d/ or by using
xinput on the command line (when running X).  If you are using a desktop
environment, such as KDE, it is usually possible to configure devices in
the GUI as well.

Regards
--
Niclas Zeising
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Alexey Dokuchaev-4
On Wed, Sep 16, 2020 at 08:41:28AM +0200, Niclas Zeising wrote:

> On 2020-09-16 06:01, Alexey Dokuchaev wrote:
> > On Tue, Sep 15, 2020 at 10:55:31PM -0400, Aryeh Friedman wrote:
> >> What if any is the performance difference between udev and evdev when
> >> configuring xorg?  Also do I need to use one or the other consistently
> >> or can I intermix them?
> >
> > If you don't need them (e.g. because this is desktop system without
> > fancy input devices), you'd better off with disabling both of them
> > altogether and use good old traditional way, that is, simply install
> > xf86-input-{keyboard,mouse} and let X.org handle those peripherals.
> >
> > Yes, you would still be able to plug and unplug your USB mice and
> > they will be detected and working as expected.
> >
> > TL;DR: DEVD/UDEV support is overrated and usually not needed at all.
>
> This is bad advice.

OK, let's see why is it bad. :-)

> The DEVD support in xorg-server might go away, since it is a FreeBSD
> only solution and the udev/evdev is similar to what is used on Linux.

Does this imply that DEVD support in X.org is technically inferior to
udev/evdev, or it might get deprecated just because they prefer Linux
way, regardless of the actual design and implementation quality?  Kind
of tangentially related question, but this might help to foresee what
to expect from future X.org development.

> If you are using Wayland, it is also the only way to use input devices.

Wayland is overrated and unneeded as well.  Plus, we're discussing X11
here and X.org server in particular, how's that even relevant?

> If you are using the default configuration of xorg on FreeBSD 12.1 or
> later, using udev is the default.  This means using xf86-input-libinput
> as the input device driver in X, and not xf86-input-{keyboard,mouse}.
> This gives much better support for things like synaptics touchpads and
> similar devices.

Like I've said initially, these might come handy, but for "desktop system
without fancy input devices", what's the point of bringing another layer
of abstraction (xf86-input-libinput) rather then let X.org talk to device
drivers drivers directly and not having to deal with evdev/libinput bugs,
tinker with sysctls (kern.evdev.rcpt_mask), etc.?

> You can configure such devices either by adding X configuration snippets
> to /usr/local/etc/X11/xorg.conf.d/ or by using xinput on the command line

Right, and with the old way, device configuration snippets are not needed.
Just that simple.  So, the advice does not look that bad after all. :-)

TL;DR: if there's a simpler solution/approach which is sufficient for one's
needs, e.g. for simple three-button mouse and pc104 keyboard, just dump the
extra xf86-input-libinput bloat and stick to old, well-tested, solid code
which just works(tm).

./danfe
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Grzegorz Junka-2

On 16/09/2020 07:37, Alexey Dokuchaev wrote:

> On Wed, Sep 16, 2020 at 08:41:28AM +0200, Niclas Zeising wrote:
>> On 2020-09-16 06:01, Alexey Dokuchaev wrote:
>>> On Tue, Sep 15, 2020 at 10:55:31PM -0400, Aryeh Friedman wrote:
>>>> What if any is the performance difference between udev and evdev when
>>>> configuring xorg?  Also do I need to use one or the other consistently
>>>> or can I intermix them?
>>> If you don't need them (e.g. because this is desktop system without
>>> fancy input devices), you'd better off with disabling both of them
>>> altogether and use good old traditional way, that is, simply install
>>> xf86-input-{keyboard,mouse} and let X.org handle those peripherals.
>>>
>>> Yes, you would still be able to plug and unplug your USB mice and
>>> they will be detected and working as expected.
>>>
>>> TL;DR: DEVD/UDEV support is overrated and usually not needed at all.
>> This is bad advice.
> OK, let's see why is it bad. :-)
>
>> The DEVD support in xorg-server might go away, since it is a FreeBSD
>> only solution and the udev/evdev is similar to what is used on Linux.
> Does this imply that DEVD support in X.org is technically inferior to
> udev/evdev, or it might get deprecated just because they prefer Linux
> way, regardless of the actual design and implementation quality?  Kind
> of tangentially related question, but this might help to foresee what
> to expect from future X.org development.
>

Linux way doesn't mean it's a bad way. As a user I don't really care if
it's Linux way or not as long as it supports the hardware that I spent
my money on.

As a developer I do care about a solution that is simpler to code and
use, but not if it's Linux or not. Can you actually define what you mean
by Linux way?

However, the most important thing that I care about is that the code I
am learning and using is copyfree. If someone was kind enough to rewrite
the whole Linux using a FreeBSD license then I wouldn't mind switching
to do that to make a better use of the hardware that I have.

GrzegorzJ

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Niclas Zeising-6
In reply to this post by Alexey Dokuchaev-4
On 2020-09-16 09:58, Aryeh Friedman wrote:
> Sorry to top post but there seems to be a message missing in the thread

I think the whole thread is on [hidden email].  At least my mail didn't
show up on questions@ since I'm not subscribed to that ML.
I saw your first mail and danfe's reply (which I in turn replied to) on
x11@ at least, and I've gotten further replies on that list.
Regards
--
Niclas Zeising
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Alexey Dokuchaev-4
On Wed, Sep 16, 2020 at 10:19:25AM +0200, Niclas Zeising wrote:
> On 2020-09-16 09:58, Aryeh Friedman wrote:
> > Sorry to top post but there seems to be a message missing in the thread
>
> I think the whole thread is on [hidden email].  At least my mail didn't
> show up on questions@ since I'm not subscribed to that ML.
> I saw your first mail and danfe's reply (which I in turn replied to) on
> x11@ at least, and I've gotten further replies on that list.

Yes, please follow -x11@ list; also, replies should be delivered to your
email address directly as an original poster.  I recall there's something
wrong with -questions, that is, it's not really a public list anymore for
some reason.  One can still read the archives, but posting is forbidden.

./danfe
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Aryeh Friedman-2
On Wed, Sep 16, 2020 at 4:28 AM Alexey Dokuchaev <[hidden email]> wrote:

> On Wed, Sep 16, 2020 at 10:19:25AM +0200, Niclas Zeising wrote:
> > On 2020-09-16 09:58, Aryeh Friedman wrote:
> > > Sorry to top post but there seems to be a message missing in the thread
> >
> > I think the whole thread is on [hidden email].  At least my mail didn't
> > show up on questions@ since I'm not subscribed to that ML.
> > I saw your first mail and danfe's reply (which I in turn replied to) on
> > x11@ at least, and I've gotten further replies on that list.
>

> Yes, please follow -x11@ list; also, replies should be delivered to your
> email address directly as an original poster.  I recall there's something
> wrong with -questions, that is, it's not really a public list anymore for
> some reason.  One can still read the archives, but posting is forbidden.
>

I posted to it a few days ago with no cross posting and it works.

>
> ./danfe
>


--
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Niclas Zeising-6
In reply to this post by Alexey Dokuchaev-4
On 2020-09-16 09:37, Alexey Dokuchaev wrote:

> On Wed, Sep 16, 2020 at 08:41:28AM +0200, Niclas Zeising wrote:
>> On 2020-09-16 06:01, Alexey Dokuchaev wrote:
>>> On Tue, Sep 15, 2020 at 10:55:31PM -0400, Aryeh Friedman wrote:
>>>> What if any is the performance difference between udev and evdev when
>>>> configuring xorg?  Also do I need to use one or the other consistently
>>>> or can I intermix them?
>>>
>>> If you don't need them (e.g. because this is desktop system without
>>> fancy input devices), you'd better off with disabling both of them
>>> altogether and use good old traditional way, that is, simply install
>>> xf86-input-{keyboard,mouse} and let X.org handle those peripherals.
>>>
>>> Yes, you would still be able to plug and unplug your USB mice and
>>> they will be detected and working as expected.
>>>
>>> TL;DR: DEVD/UDEV support is overrated and usually not needed at all.
>>
>> This is bad advice.
>
> OK, let's see why is it bad. :-)
>
>> The DEVD support in xorg-server might go away, since it is a FreeBSD
>> only solution and the udev/evdev is similar to what is used on Linux.
>
> Does this imply that DEVD support in X.org is technically inferior to
> udev/evdev, or it might get deprecated just because they prefer Linux
> way, regardless of the actual design and implementation quality?  Kind
> of tangentially related question, but this might help to foresee what
> to expect from future X.org development.

The DEVD support in xorg is only used by FreeBSD, which is a fairly
small installation base.  To my knowledge only FreeBSD and derivates
(and maybe dfly) has devd, the other BSDs does something else to handle
devices.  The devd support hasn't been upstreamed, since we in FreeBSD
grew udev/evdev support instead.

I'm not sure who "they" are in this context, but upstream is using
udev/evdev by default, at least on Linux (which today is the big
consumer).  By using that stack we get the benefit of that big
installation base when it comes to features, bug fixes and so on.

Having a uniform way, similar to Linux, to handle this also means that
we get the benefit that we don't need to add and maintain FreeBSD compat
stuff to other software dealing with input devices, such as Wayland, and
possibly other ports.  It also means that we can use the configuration
utilities in desktop environments, etc.

It is also the only thing available for Wayland, which is relevant since
a lot of upstream effort is going in that direction.

>
>> If you are using Wayland, it is also the only way to use input devices.
>
> Wayland is overrated and unneeded as well.  Plus, we're discussing X11
> here and X.org server in particular, how's that even relevant?

Upstream doesn't seem to agree here.  A lot of upstream effort is aimed
at Wayland currently.

>
>> If you are using the default configuration of xorg on FreeBSD 12.1 or
>> later, using udev is the default.  This means using xf86-input-libinput
>> as the input device driver in X, and not xf86-input-{keyboard,mouse}.
>> This gives much better support for things like synaptics touchpads and
>> similar devices.
>
> Like I've said initially, these might come handy, but for "desktop system
> without fancy input devices", what's the point of bringing another layer
> of abstraction (xf86-input-libinput) rather then let X.org talk to device
> drivers drivers directly and not having to deal with evdev/libinput bugs,
> tinker with sysctls (kern.evdev.rcpt_mask), etc.?

I'm not sure there's much more abstraction when using udev/evdev rather
than when using the old method.  Most things are in libinput, and the
evdev drivers are in the FreeBSD kernel, which libinput and
xf86-input-libinput interfaces with.

Without this you still need xf86-input-{mouse,keyboard} to talk directly
to the kernel driver, which is the same thing.  You also might need
special xf86-input-* which can be handled by libinput if you have
special hardware.

The kern.evdev.rcpt_mask problem is a transition problem.  To change the
default there, we first had to change the default in ports, and to
change the defaults in ports, we first needed to add the relevant
drivers to GENERIC.
In FreeBSD 13, as well as the upcoming 12.2, kern.evdev.rcpt_mask has a
sensible default to work with the new input stack.

>
>> You can configure such devices either by adding X configuration snippets
>> to /usr/local/etc/X11/xorg.conf.d/ or by using xinput on the command line
>
> Right, and with the old way, device configuration snippets are not needed.
> Just that simple.  So, the advice does not look that bad after all. :-)
>
> TL;DR: if there's a simpler solution/approach which is sufficient for one's
> needs, e.g. for simple three-button mouse and pc104 keyboard, just dump the
> extra xf86-input-libinput bloat and stick to old, well-tested, solid code
> which just works(tm).

You don't need configuration snippets for the defaults when using
udev/evdev either, but it's one way to change for instance keyboard
layouts, or mice handling.
I personally prefer to use setxkbmap and xinput for these (to for
instance get my preferred layout and a mouse pointer speed I'm
comfortable with).

Regards
--
Niclas Zeising
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Is there any performance difference between udev and evdev in xorg?

Niclas Zeising-6
In reply to this post by Grzegorz Junka-2
On 2020-09-16 10:07, Grzegorz Junka wrote:

>
> On 16/09/2020 07:37, Alexey Dokuchaev wrote:
>> On Wed, Sep 16, 2020 at 08:41:28AM +0200, Niclas Zeising wrote:
>>> On 2020-09-16 06:01, Alexey Dokuchaev wrote:
>>>> On Tue, Sep 15, 2020 at 10:55:31PM -0400, Aryeh Friedman wrote:
>>>>> What if any is the performance difference between udev and evdev when
>>>>> configuring xorg?  Also do I need to use one or the other consistently
>>>>> or can I intermix them?
>>>> If you don't need them (e.g. because this is desktop system without
>>>> fancy input devices), you'd better off with disabling both of them
>>>> altogether and use good old traditional way, that is, simply install
>>>> xf86-input-{keyboard,mouse} and let X.org handle those peripherals.
>>>>
>>>> Yes, you would still be able to plug and unplug your USB mice and
>>>> they will be detected and working as expected.
>>>>
>>>> TL;DR: DEVD/UDEV support is overrated and usually not needed at all.
>>> This is bad advice.
>> OK, let's see why is it bad. :-)
>>
>>> The DEVD support in xorg-server might go away, since it is a FreeBSD
>>> only solution and the udev/evdev is similar to what is used on Linux.
>> Does this imply that DEVD support in X.org is technically inferior to
>> udev/evdev, or it might get deprecated just because they prefer Linux
>> way, regardless of the actual design and implementation quality?  Kind
>> of tangentially related question, but this might help to foresee what
>> to expect from future X.org development.
>>
>
> Linux way doesn't mean it's a bad way. As a user I don't really care if
> it's Linux way or not as long as it supports the hardware that I spent
> my money on.
>
> As a developer I do care about a solution that is simpler to code and
> use, but not if it's Linux or not. Can you actually define what you mean
> by Linux way?
>
> However, the most important thing that I care about is that the code I
> am learning and using is copyfree. If someone was kind enough to rewrite
> the whole Linux using a FreeBSD license then I wouldn't mind switching
> to do that to make a better use of the hardware that I have.

In this case, it is copyfree.  We have a udev/evdev compat layer in the
FreeBSD kernel that is BSD licensed, since it was developed on and for
FreeBSD.  For the rest of the stack, which means libinput and the device
handling in X and wayland, it is MIT licensed, since upstream code
generally is MIT licensed.
Regards
--
Niclas Zeising
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-x11
To unsubscribe, send any mail to "[hidden email]"