xwiimote / xf86-input-xwiimote

X.org XInput2 Wii Remote driver based on XWiimote
Other
37 stars 14 forks source link

X crashes randomly when using MotionPlus. Maybe related to other inputs. #32

Open orblivion opened 2 years ago

orblivion commented 2 years ago

Ubuntu Impish 21.10. Lenovo Thinkpad. Using MotionPlus as mouse.

It seems to almost inevitably happen so long as Wiimote is connected via bluetooth. There appear to be specific triggers:

I should try with the accelerometer and/or IR to see if that crashes as well.

[204097.793] dix: invalid event type 0
[204097.793] 00 00 00 00 00 00 00 00
[204097.793] 00 00 00 00 00 00 00 00
[204097.793] 00 00 00 00 00 00 00 00
[204097.793] 00 00 00 00 00 00 00 00
[204097.794] (EE)
[204097.794] (EE) Backtrace:
[204097.794] (EE) 0: /usr/lib/xorg/Xorg (valuator_mask_num_valuators+0xc0) [0x559bebe60e60]
[204097.795] (EE) 1: /usr/lib/xorg/Xorg (mieqProcessDeviceEvent+0x3b) [0x559bebf89d3b]
[204097.795] (EE) 2: /usr/lib/xorg/Xorg (mieqProcessInputEvents+0x99) [0x559bebf89fb9]
[204097.796] (EE) 3: /usr/lib/xorg/Xorg (ProcessInputEvents+0x1d) [0x559bebe821ad]
[204097.796] (EE) 4: /usr/lib/xorg/Xorg (SendErrorToClient+0x103) [0x559bebe43823]
[204097.796] (EE) 5: /usr/lib/xorg/Xorg (InitFonts+0x3b5) [0x559bebe47ad5]
[204097.797] (EE) 6: /lib/x86_64-linux-gnu/libc.so.6 (__libc_init_first+0x90) [0x7fdfe414bfd0]
[204097.798] (EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0x7d) [0x7fdfe414c07d]
[204097.798] (EE) 8: /usr/lib/xorg/Xorg (_start+0x25) [0x559bebe30f25]
[204097.798] (EE)
[204097.798] (EE)
Fatal server error:
[204097.798] (EE) Wrong event type 0. Aborting server
[204097.798] (EE)
[204097.798] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[204097.798] (EE) Please also check the log file at "/home/ill_logic/.local/share/xorg/Xorg.0.log" for additional information.
[204097.798] (EE)
[204097.798] (II) AIGLX: Suspending AIGLX clients for VT switch

If somebody has a hack idea to fix it I'm all ears.

orblivion commented 2 years ago

This may have something to do with interaction with my faulty touch screen, actually. I'm going to see about disabling it at various levels, including kernel.

orblivion commented 2 years ago

Mostly for the benefit of anyone else with this problem:

My aforementioned touchscreen problem is that it often gets into a state where it keeps clicking on one particular part of the screen. I would have to scramble to turn off the touchscreen using the xinput command. If I had the wiimote turned on at the same time, it would often quickly induce the crash.

If I turn off the touch screen, connect the wiimote, and then start using my touch pad, it could also induce the crash fairly quickly and reliably.

When I avoided touching any inputs other than the wiimote while the wiimote is connected, that's when behavior became hard to predict. Sometimes it would crash within 10 minutes. Sometimes it would take an hour or something. Did it depend on whether I set my controller on the table for a few minutes? Did it depend on whether I was watching a youtube video or playing a game on ScummVM? I have hunches there based on perceived patterns.

Now, my touch screen problem isn't constant. Sometimes it's reasonably well behaved. The last hunch I developed was that at those times that my touchscreen was badly behaved, I would more likely crash sooner, even if I turned off my touch screen with the xinput command.

What I have now tried in response to this (and also because I've wanted to do it anyway) is to disable the touchscreen in xorg conf. Find all cases of "touchscreen" in xorg confs and use the "Option Ignore on" thing. No more scrambling, it's disabled as soon as I log in.

Since then, when the wiimote is connected, it has only crashed if I touch the touch pad. If I don't touch any inputs on my laptop while wiimote is connected, I've so far (like half a day) had zero crashes. Even if I break this streak, this is a much better record than before.

BTW I mentioned that I was going to try disabling my touchscreen in the kernel. I didn't see an obvious kernel module for it. This works okay so I didn't bother taking it any further.

photodiode commented 2 years ago

I seem to be having the exact same problem, but on a Raspberry Pi 3 B with the RPi OS. Logging in with the wiimote connected seems to crash every time, taking be back to the login screen. Other than that the crashes feels very random..

orblivion commented 1 year ago

Do you have any other mouse inputs connected? Can you try disconnecting them to see if the wiimote alone crashes?

On Thu, Mar 24, 2022 at 5:58 AM photodiode @.***> wrote:

I seem to be having the exact same problem, but on a Raspberry Pi 3 B with the RPi OS. Logging in with the wiimote connected seems to crash every time, taking be back to the login screen. Other than that the crashes feels very random..

— Reply to this email directly, view it on GitHub https://github.com/dvdhrm/xf86-input-xwiimote/issues/32#issuecomment-1077445684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAKH6CBP4PXPUCCAML6NUTVBQ4FPANCNFSM5NQZ6XXA . You are receiving this because you authored the thread.Message ID: @.***>

orblivion commented 1 year ago

I sent this comment by email back in March! I'm curious, did anybody else get the notification from me back then? I only got a notification now, I think. Maybe Github had that comment in its queue for that long.

orblivion commented 1 year ago

("this comment" referring to the "Do you have any other mouse inputs connected..." comment)