Re: [PATCH] evdev - relax checks when reopening devices

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [PATCH] evdev - relax checks when reopening devices

by Éric Piel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Op 03-11-09 08:11, Dmitry Torokhov schreef:
> Hi Peter,
>
> Evdev is way too paranoid when checking whether it deals with the same
> device when switching consoles which causes people lose keyboards if
> they happen to adjust keymap after X starts. PLease consider applying
> the patch below.
>
Hi,
What Dmitry didn't mention is that it should help with the bug described
here: https://bugs.freedesktop.org/show_bug.cgi?id=24687

Aka:
* start X
* do "setkeycodes ..." (as recommended in dmesg)
* suspend/resume
* you've lost your keyboard

I haven't tried this patch yet (because I only have xserver 1.6 and
compiling latest evdev with it is not so straightforward), but it looks
like it should solve the problem for my case :-)

See you,
Eric
_______________________________________________
xorg mailing list
xorg@...
http://lists.freedesktop.org/mailman/listinfo/xorg

Parent Message unknown Re: [PATCH] evdev - relax checks when reopening devices

by Peter Hutterer-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Nov 02, 2009 at 11:11:55PM -0800, Dmitry Torokhov wrote:
> Evdev is way too paranoid when checking whether it deals with the same
> device when switching consoles which causes people lose keyboards if
> they happen to adjust keymap after X starts. PLease consider applying
> the patch below.

Thanks for the patch Dmitry. I certainly agree with the principle but I do
have a few minor comments.

> From: Dmitry Torokhov <dmitry.torokhov@...>
> Subject: [PATCH] evdev - relax checks when reopening devices
>
> When checking whether we are dealing with the same device as before
> when we try to reopen it evdev should not require exact match of
> entire keymap. Users should be allowed to adjust keymaps to better
> match their hardware even after X starts. However we don't expect
> changes in [BTN_MISC, KEY_OK) range since these codes are reserved for
> mice, joysticks, tablets and so forth, so we will limit the check to
> this range.
>
> The same goes for absinfo - limits can change and it should not result
> in device being disabled.
>
> Also check the length of the data returned by ioctl and don't try to
> compare more than we were given.
>
> Signed-off-by: Dmitry Torokhov <dtor@...>
> ---
>  src/evdev.c |  126 +++++++++++++++++++++++++++++++++--------------------------
>  1 files changed, 71 insertions(+), 55 deletions(-)
>
> diff --git a/src/evdev.c b/src/evdev.c
> index 0dff271..747f3b1 100644
> --- a/src/evdev.c
> +++ b/src/evdev.c
> @@ -1671,6 +1671,7 @@ static int
>  EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
>  {
>      EvdevPtr pEvdev = pInfo->private;
> +    size_t len;
>      int i;
>  
>      char name[1024]                  = {0};
> @@ -1679,107 +1680,122 @@ EvdevCacheCompare(InputInfoPtr pInfo, BOOL compare)
>      unsigned long rel_bitmask[NLONGS(REL_CNT)] = {0};
>      unsigned long abs_bitmask[NLONGS(ABS_CNT)] = {0};
>      unsigned long led_bitmask[NLONGS(LED_CNT)] = {0};
> -    struct input_absinfo absinfo[ABS_CNT];
>  
> -    if (ioctl(pInfo->fd,
> -              EVIOCGNAME(sizeof(name) - 1), name) < 0) {
> +    if (ioctl(pInfo->fd, EVIOCGNAME(sizeof(name) - 1), name) < 0) {

this line is white-space only, no?

>          xf86Msg(X_ERROR, "ioctl EVIOCGNAME failed: %s\n", strerror(errno));
>          goto error;
>      }
>  
[...]
 

> -    if (ioctl(pInfo->fd,
> -              EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask) < 0) {
> -        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
> +    len = ioctl(pInfo->fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
> +    if (len < 0) {
> +        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
> +                pInfo->name, strerror(errno));
>          goto error;
>      }
>  
> -    if (compare && memcmp(pEvdev->key_bitmask, key_bitmask, sizeof(key_bitmask))) {
> -        xf86Msg(X_ERROR, "%s: device key_bitmask has changed\n", pInfo->name);
> -        goto error;
> +    if (compare) {
> +        /*
> +         * Keys are special as user can adjust keymap at any time (on
> +         * devices that support EVIOCSKEYCODE. However we do not expect
> +         * buttons reserved fir mice/tablets/digitizers and so on to

typo: "for"

> +         * appear/disappear so we will check only those in
> +         * [BTN_MISC, KEY_OK) range.
> +         */
> +        size_t start_word = BTN_MISC / LONG_BITS;
> +        size_t start_byte = start_word * sizeof(unsigned long);
> +        size_t end_word = KEY_OK / LONG_BITS;
> +        size_t end_byte = end_word * sizeof(unsigned long);
> +
> +        if (len >= start_byte &&
> +            memcmp(&pEvdev->key_bitmask[start_word], &key_bitmask[start_word],
> +                   min(len, end_byte) - start_byte + 1)) {
> +            xf86Msg(X_ERROR, "%s: device key_bitmask has changed\n", pInfo->name);
> +            goto error;
> +        }
>      }
>  
> -    if (ioctl(pInfo->fd,
> -              EVIOCGBIT(EV_LED, sizeof(led_bitmask)), led_bitmask) < 0) {
> -        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n", pInfo->name, strerror(errno));
> +    /* Copy the data so we have reasonably up-to-date info */
> +    memcpy(pEvdev->key_bitmask, key_bitmask, len);

I think we should move this whole keyinfo bit below the absinfo stuff
before. Otherwise there is a narrow case where the key info is updated but
the compare still then still fail because something else has changed.

Other than that, I'm happy with the patch. Eric - have you managed to test
this patch yet?

Cheers,
  Peter

> +
> +    len = ioctl(pInfo->fd, EVIOCGBIT(EV_LED, sizeof(led_bitmask)), led_bitmask);
> +    if (len < 0) {
> +        xf86Msg(X_ERROR, "%s: ioctl EVIOCGBIT failed: %s\n",
> +                pInfo->name, strerror(errno));
>          goto error;
>      }
>  
> -    if (compare && memcmp(pEvdev->led_bitmask, led_bitmask, sizeof(led_bitmask))) {
> +    if (!compare) {
> +        memcpy(pEvdev->led_bitmask, led_bitmask, len);
> +    } else if (memcmp(pEvdev->led_bitmask, led_bitmask, len)) {
>          xf86Msg(X_ERROR, "%s: device led_bitmask has changed\n", pInfo->name);
>          goto error;
>      }

> -    memset(absinfo, 0, sizeof(absinfo));
> -
> -    for (i = ABS_X; i <= ABS_MAX; i++)
> -    {
> -        if (TestBit(i, abs_bitmask))
> -        {
> -            if (ioctl(pInfo->fd, EVIOCGABS(i), &absinfo[i]) < 0) {
> -                xf86Msg(X_ERROR, "%s: ioctl EVIOCGABS failed: %s\n", pInfo->name, strerror(errno));
> +    /*
> +     * Do not try to validate absinfo data since it is not expected
> +     * to be static, always refresh it in evdev structure.
> +     */
> +    for (i = ABS_X; i <= ABS_MAX; i++) {
> +        if (TestBit(i, abs_bitmask)) {
> +            len = ioctl(pInfo->fd, EVIOCGABS(i), &pEvdev->absinfo[i]);
> +            if (len < 0) {
> +                xf86Msg(X_ERROR, "%s: ioctl EVIOCGABSi(%d) failed: %s\n",
> +                        pInfo->name, i, strerror(errno));
>                  goto error;
>              }
> -            /* ignore current position (value) in comparison (bug #19819) */
> -            absinfo[i].value = pEvdev->absinfo[i].value;
>          }
>      }
>  
> -    if (compare && memcmp(pEvdev->absinfo, absinfo, sizeof(absinfo))) {
> -        xf86Msg(X_ERROR, "%s: device absinfo has changed\n", pInfo->name);
> -        goto error;
> -    }
> -
> -    /* cache info */
> -    if (!compare)
> -    {
> -        strcpy(pEvdev->name, name);
> -        memcpy(pEvdev->bitmask, bitmask, sizeof(bitmask));
> -        memcpy(pEvdev->key_bitmask, key_bitmask, sizeof(key_bitmask));
> -        memcpy(pEvdev->rel_bitmask, rel_bitmask, sizeof(rel_bitmask));
> -        memcpy(pEvdev->abs_bitmask, abs_bitmask, sizeof(abs_bitmask));
> -        memcpy(pEvdev->led_bitmask, led_bitmask, sizeof(led_bitmask));
> -        memcpy(pEvdev->absinfo, absinfo, sizeof(absinfo));
> -    }
> -
>      return Success;
>  
>  error:

_______________________________________________
xorg mailing list
xorg@...
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: [PATCH] evdev - relax checks when reopening devices

by Éric Piel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Op 04-11-09 05:49, Peter Hutterer schreef:
> Other than that, I'm happy with the patch. Eric - have you managed to test
> this patch yet?
Hello,
This is an update on the status of my testing. Now my laptop is enjoying
xserver 1.7.1, with evdev 1.3.0. Finally, after some lots of
suspends/resumes I've managed to reproduce reliably the bug again (by
restarting the hal deamon before suspending).

I can now confirm that Dmitry's patch is effective, and prevents the bug
from happening :-)

See you,
Eric


X.Org X Server 1.7.1
Release Date: 2009-10-23
X Protocol Version 11, Revision 0
Build Operating System: Linux_2.6.22.12-server-1mdv Mandriva
Current Operating System: Linux dutifh 2.6.32-rc6-git-eric-00029-g28d85d6 #28 SMP PREEMPT Thu Nov 5 15:23:22 CET 2009 x86_64
Kernel command line: BOOT_IMAGE=2632-rc6-git-eric-00029-g28d85d root=UUID=01dc5fcc-55d3-4bae-932b-1119dbe7ff0b resume=UUID=0d777318-dc2d-4ec3-aa25-fbad7e0fa039 splash=silent 3
Build Date: 10 November 2009  06:13:24PM
 
Current version of pixman: 0.16.2
        Before reporting problems, check http://qa.mandriva.com
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Wed Nov 11 23:54:14 2009
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "layout1"
(**) |-->Screen "screen1" (0)
(**) |   |-->Monitor "monitorLVDS"
(**) |   |-->Device "device1"
(**) Option "AllowMouseOpenFail"
(==) Automatically adding devices
(==) Automatically enabling devices
(==) FontPath set to:
        catalogue:/etc/X11/fontpath.d
(**) ModulePath set to "/usr/lib64/dri/,/usr/lib64/xorg/modules/drivers/,/usr/lib64/xorg/modules/"
(II) Cannot locate a core pointer device.
(II) Cannot locate a core keyboard device.
(II) The server relies on HAL to provide the list of input devices.
        If no devices become available, reconfigure HAL or disable AllowEmptyInput.
(II) Loader magic: 0x7c5880
(II) Module ABI versions:
        X.Org ANSI C Emulation: 0.4
        X.Org Video Driver: 6.0
        X.Org XInput driver : 7.0
        X.Org Server Extension : 2.0
(++) using VT number 7

(--) PCI:*(0:0:2:0) 8086:2a02:103c:30c9 Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller rev 12, Mem @ 0xe0400000/1048576, 0xd0000000/268435456, I/O @ 0x00002000/8
(--) PCI: (0:0:2:1) 8086:2a03:103c:30c9 Intel Corporation Mobile GM965/GL960 Integrated Graphics Controller rev 12, Mem @ 0xe0500000/1048576
(WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
(II) LoadModule: "extmod"
(II) Loading /usr/lib64/xorg/modules/extensions/libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension Multi-Buffering
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "dbe"
(II) Loading /usr/lib64/xorg/modules/extensions/libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "glx"
(II) Loading /usr/lib64/xorg/modules/extensions/libglx.so
(II) Module glx: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.0.0
        ABI class: X.Org Server Extension, version 2.0
(==) AIGLX enabled
(II) Loading extension GLX
(II) LoadModule: "record"
(II) Loading /usr/lib64/xorg/modules/extensions/librecord.so
(II) Module record: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.13.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension RECORD
(II) LoadModule: "dri"
(II) Loading /usr/lib64/xorg/modules/extensions/libdri.so
(II) Module dri: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.0.0
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
(II) Loading /usr/lib64/xorg/modules/extensions/libdri2.so
(II) Module dri2: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.1.0
        ABI class: X.Org Server Extension, version 2.0
(II) Loading extension DRI2
(II) LoadModule: "intel"
(II) Loading /usr/lib64/xorg/modules/drivers/intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 2.9.1
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 6.0
(II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
        i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
        E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM, Pineview G,
        965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33, GM45,
        4 Series, G45/G43, Q45/Q43, G41, B43, Clarkdale, Arrandale
(II) Primary Device is: PCI 00@00:02:0
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 9, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 9, (OK)
drmOpenByBusid: drmOpenMinor returns 9
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
(**) intel(0): Depth 24, (--) framebuffer bpp 32
(==) intel(0): RGB weight 888
(==) intel(0): Default visual is TrueColor
(II) intel(0): Integrated Graphics Chipset: Intel(R) 965GM
(--) intel(0): Chipset: "965GM"
(II) intel(0): Output VGA1 using monitor section monitorLVDS
(II) intel(0): Output LVDS1 has no monitor section
(II) intel(0): found backlight control interface /sys/class/backlight/acpi_video0
(II) intel(0): Output TV1 has no monitor section
(II) intel(0): Output VGA1 disconnected
(II) intel(0): Output LVDS1 connected
(II) intel(0): Output TV1 disconnected
(II) intel(0): Using user preference for initial modes
(II) intel(0): Output LVDS1 using initial mode 1280x800
(II) intel(0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
(==) intel(0): video overlay key set to 0x101fe
(==) intel(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib64/xorg/modules/libfb.so
(II) Module fb: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.4
(==) Depth 24 pixmap format is 32 bpp
(II) intel(0): [DRI2] Setup complete
(**) intel(0): Framebuffer compression disabled
(**) intel(0): Tiling enabled
(**) intel(0): SwapBuffers wait enabled
(==) intel(0): VideoRam: 262144 KB
(II) intel(0): Attempting memory allocation with tiled buffers.
(II) intel(0): Tiled allocation successful.
(II) UXA(0): Driver registered support for the following operations:
(II)         solid
(II)         copy
(II)         composite (RENDER acceleration)
(==) intel(0): Backing store disabled
(==) intel(0): Silken mouse enabled
(II) intel(0): Initializing HW Cursor
(II) intel(0): No memory allocations
(II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
(**) intel(0): DPMS enabled
(==) intel(0): Intel XvMC decoder disabled
(II) intel(0): Set up textured video
(II) intel(0): direct rendering: DRI2 Enabled
(WW) intel(0): Option "monitor-LVDS" is not used
(WW) intel(0): Option "monitor-VGA" is not used
(--) RandR disabled
(II) Initializing built-in extension Generic Event Extension
(II) Initializing built-in extension SHAPE
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension BIG-REQUESTS
(II) Initializing built-in extension SYNC
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-MISC
(II) Initializing built-in extension SECURITY
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension XFree86-Bigfont
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
record: RECORD extension enabled at configure time.
record: This extension is known to be broken, disabling extension now..
record: http://bugs.freedesktop.org/show_bug.cgi?id=20500
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) AIGLX: enabled GLX_SGI_make_current_read
(II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
(II) AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects
(II) AIGLX: Loaded and initialized /usr/lib64/dri/i965_dri.so
(II) GLX: Initialized DRI2 GL provider for screen 0
(II) intel(0): Setting screen physical size to 338 x 211
(II) intel(0): Allocate new frame buffer 1280x800 stride 1280
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(II) LoadModule: "evdev"
(II) Loading /usr/lib64/xorg/modules/input/evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 2.3.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 7.0
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event4"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(II) config/hal: Adding input device HP WMI hotkeys
(**) HP WMI hotkeys: always reports core events
(**) HP WMI hotkeys: Device: "/dev/input/event10"
(II) HP WMI hotkeys: Found keys
(II) HP WMI hotkeys: Configuring as keyboard
(II) XINPUT: Adding extended input device "HP WMI hotkeys" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(II) config/hal: Adding input device Sleep Button
(**) Sleep Button: always reports core events
(**) Sleep Button: Device: "/dev/input/event0"
(II) Sleep Button: Found keys
(II) Sleep Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Sleep Button" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(II) config/hal: Adding input device Video Bus
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event3"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(II) config/hal: Adding input device Power Button
(**) Power Button: always reports core events
(**) Power Button: Device: "/dev/input/event2"
(II) Power Button: Found keys
(II) Power Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(II) config/hal: Adding input device SynPS/2 Synaptics TouchPad
(II) LoadModule: "synaptics"
(II) Loading /usr/lib64/xorg/modules/input/synaptics_drv.so
(II) Module synaptics: vendor="X.Org Foundation"
        compiled for 1.7.1, module version = 1.2.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 7.0
(II) Synaptics touchpad driver version 1.2.0
(**) Option "Device" "/dev/input/event8"
(II) SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
(II) SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
(II) SynPS/2 Synaptics TouchPad: pressure range 0 - 255
(II) SynPS/2 Synaptics TouchPad: finger width range 0 - 0
(II) SynPS/2 Synaptics TouchPad: buttons: left right middle double triple
(--) SynPS/2 Synaptics TouchPad: touchpad found
(**) SynPS/2 Synaptics TouchPad: always reports core events
(II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD)
(**) SynPS/2 Synaptics TouchPad: (accel) keeping acceleration scheme 1
(**) SynPS/2 Synaptics TouchPad: (accel) acceleration profile 0
(--) SynPS/2 Synaptics TouchPad: touchpad found
(II) config/hal: Adding input device PS/2 Generic Mouse
(**) PS/2 Generic Mouse: always reports core events
(**) PS/2 Generic Mouse: Device: "/dev/input/event7"
(II) PS/2 Generic Mouse: Found 3 mouse buttons
(II) PS/2 Generic Mouse: Found relative axes
(II) PS/2 Generic Mouse: Found x and y relative axes
(II) PS/2 Generic Mouse: Configuring as mouse
(**) PS/2 Generic Mouse: YAxisMapping: buttons 4 and 5
(**) PS/2 Generic Mouse: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "PS/2 Generic Mouse" (type: MOUSE)
(**) PS/2 Generic Mouse: (accel) keeping acceleration scheme 1
(**) PS/2 Generic Mouse: (accel) acceleration profile 0
(II) PS/2 Generic Mouse: initialized for relative axes.
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Resuming AIGLX clients after VT switch
(II) intel(0): No memory allocations
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(--) SynPS/2 Synaptics TouchPad: touchpad found
(II) AT Translated Set 2 keyboard: Device reopened after 1 attempts.
(II) HP WMI hotkeys: Device reopened after 1 attempts.
(II) Sleep Button: Device reopened after 1 attempts.
(II) Video Bus: Device reopened after 1 attempts.
(II) Power Button: Device reopened after 1 attempts.
(II) PS/2 Generic Mouse: Device reopened after 1 attempts.
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Resuming AIGLX clients after VT switch
(II) intel(0): No memory allocations
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(--) SynPS/2 Synaptics TouchPad: touchpad found
(II) AT Translated Set 2 keyboard: Device reopened after 1 attempts.
(II) HP WMI hotkeys: Device reopened after 1 attempts.
(II) Sleep Button: Device reopened after 1 attempts.
(II) Video Bus: Device reopened after 1 attempts.
(II) Power Button: Device reopened after 1 attempts.
(II) PS/2 Generic Mouse: Device reopened after 1 attempts.
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): Allocate new frame buffer 800x1280 stride 896
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): Allocate new frame buffer 1280x800 stride 1280
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): Allocate new frame buffer 800x1280 stride 896
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): Allocate new frame buffer 1280x800 stride 1280
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Resuming AIGLX clients after VT switch
(II) intel(0): No memory allocations
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(--) SynPS/2 Synaptics TouchPad: touchpad found
(II) AT Translated Set 2 keyboard: Device reopened after 1 attempts.
(II) HP WMI hotkeys: Device reopened after 1 attempts.
(II) Sleep Button: Device reopened after 1 attempts.
(II) Video Bus: Device reopened after 1 attempts.
(II) Power Button: Device reopened after 1 attempts.
(II) PS/2 Generic Mouse: Device reopened after 1 attempts.
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): Allocate new frame buffer 800x1280 stride 896
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) intel(0): Allocate new frame buffer 1280x800 stride 1280
(II) config/hal: Adding input device W595
(**) W595: always reports core events
(**) W595: Device: "/dev/input/event11"
(II) W595: Found 3 mouse buttons
(II) W595: Found relative axes
(II) W595: Found x and y relative axes
(II) W595: Found keys
(II) W595: Configuring as mouse
(II) W595: Configuring as keyboard
(**) W595: YAxisMapping: buttons 4 and 5
(**) W595: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "W595" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(**) W595: (accel) keeping acceleration scheme 1
(**) W595: (accel) acceleration profile 0
(II) W595: initialized for relative axes.
(II) config/hal: removing device W595
(II) W595: Close
(II) UnloadModule: "evdev"
(II) config/hal: Adding input device W595
(**) W595: always reports core events
(**) W595: Device: "/dev/input/event11"
(II) W595: Found 3 mouse buttons
(II) W595: Found relative axes
(II) W595: Found x and y relative axes
(II) W595: Found keys
(II) W595: Configuring as mouse
(II) W595: Configuring as keyboard
(**) W595: YAxisMapping: buttons 4 and 5
(**) W595: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200
(II) XINPUT: Adding extended input device "W595" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"
(**) W595: (accel) keeping acceleration scheme 1
(**) W595: (accel) acceleration profile 0
(II) W595: initialized for relative axes.
(II) config/hal: removing device W595
(II) W595: Close
(II) UnloadModule: "evdev"
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Resuming AIGLX clients after VT switch
(II) intel(0): No memory allocations
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(--) SynPS/2 Synaptics TouchPad: touchpad found
(II) AT Translated Set 2 keyboard: Device reopened after 1 attempts.
(II) HP WMI hotkeys: Device reopened after 1 attempts.
(II) Sleep Button: Device reopened after 1 attempts.
(II) Video Bus: Device reopened after 1 attempts.
(II) Power Button: Device reopened after 1 attempts.
(II) PS/2 Generic Mouse: Device reopened after 1 attempts.
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Resuming AIGLX clients after VT switch
(II) intel(0): No memory allocations
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(--) SynPS/2 Synaptics TouchPad: touchpad found
(II) AT Translated Set 2 keyboard: Device reopened after 1 attempts.
(II) HP WMI hotkeys: Device reopened after 1 attempts.
(II) Sleep Button: Device reopened after 1 attempts.
(II) Video Bus: Device reopened after 1 attempts.
(II) Power Button: Device reopened after 1 attempts.
(II) PS/2 Generic Mouse: Device reopened after 1 attempts.
(WW) config/hal: device AT Translated Set 2 keyboard already added. Ignoring.
(WW) config/hal: device HP WMI hotkeys already added. Ignoring.
(WW) config/hal: device Sleep Button already added. Ignoring.
(WW) config/hal: device Video Bus already added. Ignoring.
(WW) config/hal: device Power Button already added. Ignoring.
(II) AIGLX: Suspending AIGLX clients for VT switch
(II) AIGLX: Resuming AIGLX clients after VT switch
(II) intel(0): No memory allocations
(II) intel(0): EDID vendor "CMO", prod id 4641
(II) intel(0): Printing DDC gathered Modelines:
(II) intel(0): Modeline "1280x800"x0.0   69.39  1280 1320 1346 1412  800 802 807 819 -hsync -vsync (49.1 kHz)
(--) SynPS/2 Synaptics TouchPad: touchpad found
(EE) AT Translated Set 2 keyboard: device key_bitmask has changed
(EE) AT Translated Set 2 keyboard: Device has changed - disabling.
(II) HP WMI hotkeys: Device reopened after 1 attempts.
(II) Sleep Button: Device reopened after 1 attempts.
(II) Video Bus: Device reopened after 1 attempts.
(II) Power Button: Device reopened after 1 attempts.
(II) PS/2 Generic Mouse: Device reopened after 1 attempts.
(II) config/hal: removing device AT Translated Set 2 keyboard
(II) AT Translated Set 2 keyboard: Close
(II) UnloadModule: "evdev"
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event4"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "evdev"
(**) Option "xkb_model" "evdev"
(**) Option "xkb_layout" "us(alt-intl)"
(**) Option "xkb_options" "compose:rwin"

_______________________________________________
xorg mailing list
xorg@...
http://lists.freedesktop.org/mailman/listinfo/xorg

Re: [PATCH] evdev - relax checks when reopening devices

by Peter Hutterer-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 12, 2009 at 07:05:33PM +0100, Éric Piel wrote:

> Op 04-11-09 05:49, Peter Hutterer schreef:
> > Other than that, I'm happy with the patch. Eric - have you managed to test
> > this patch yet?
> Hello,
> This is an update on the status of my testing. Now my laptop is enjoying
> xserver 1.7.1, with evdev 1.3.0. Finally, after some lots of
> suspends/resumes I've managed to reproduce reliably the bug again (by
> restarting the hal deamon before suspending).
>
> I can now confirm that Dmitry's patch is effective, and prevents the bug
> from happening :-)

thanks for the testing! i'll cherry-pick it into 2.3.1 once I got that
sorted out.
(fwiw, the patch was pushed as a0f7f34dc5effc5822c618bfbf3a0872669c30ad)

Cheers,
  Peter
_______________________________________________
xorg mailing list
xorg@...
http://lists.freedesktop.org/mailman/listinfo/xorg