[PATCH 2/4] xserver: limit the kernel subsystems we look for devices in

Michael Thayer michael.thayer at oracle.com
Mon Oct 17 08:05:26 PDT 2011


On 10/17/2011 03:39 PM, Jochen Friedrich wrote:
> Am Mon, 18 Jul 2011 schrieb Lennart Poettering:
>
>> Don't enumerate/monitor all devices of the system (since that can be
>> quite a few), but limit our search to devices from the "input"
>> subsystem, as well as the "tty" subsystem (to cover Wacom tablets).
>>
>> This should make X start up a bit faster and reduce the number of
>> unnecessary wake-ups of the X server.
>> ---
>> config/udev.c | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/config/udev.c b/config/udev.c
>> index 5ac52a1..0763cc9 100644
>> --- a/config/udev.c
>> +++ b/config/udev.c
>> @@ -281,6 +281,9 @@ config_udev_init(void)
>> if (!udev_monitor)
>> return 0;
>>
>> + udev_monitor_filter_add_match_subsystem_devtype(udev_monitor,
>> "input", NULL);
>> + udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty",
>> NULL); /* For Wacom serial devices */
>> +
>> if (udev_monitor_enable_receiving(udev_monitor)) {
>> ErrorF("config/udev: failed to bind the udev monitor\n");
>> return 0;
>> @@ -289,6 +292,10 @@ config_udev_init(void)
>> enumerate = udev_enumerate_new(udev);
>> if (!enumerate)
>> return 0;
>> +
>> + udev_enumerate_add_match_subsystem(enumerate, "input");
>> + udev_enumerate_add_match_subsystem(enumerate, "tty");
>> +
>> udev_enumerate_scan_devices(enumerate);
>> devices = udev_enumerate_get_list_entry(enumerate);
>> udev_list_entry_foreach(device, devices) {
>
> Debian just switched to a version containing this patch in sid.
> This prevents autoloading vboxmouse driver as the corresponding device
> is in
> subsystem "misc". Adding matches for "misc" enables autoloading again.

As of VirtualBox 4.1.4 the Guest Additions use a kernel input driver for 
X.Org Server 1.6 and above so if you use that version (the changes 
should backport to older Additions if necessary) you should be up and 
running again.

Regards,

Michael
-- 
ORACLE Deutschland B.V. & Co. KG   Michael Thayer
Werkstrasse 24                     VirtualBox engineering
71384 Weinstadt, Germany           mailto:michael.thayer at oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven


More information about the xorg-devel mailing list