Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uinputdriver crashing with Segfault #1

Open
freundTech opened this issue May 20, 2017 · 10 comments
Open

uinputdriver crashing with Segfault #1

freundTech opened this issue May 20, 2017 · 10 comments

Comments

@freundTech
Copy link

When running uinputdriver it just prints "uinput creation failed" (line 381 in the code). Errno is set to 19 (No such device), however I have both joycons in the changing grip and connected to the pc using the usb-C to usb-A cable.

lsusb finds the device as "Bus 001 Device 009: ID 057e:200e Nintendo Co., Ltd".

I'm running Arch Linux with kernel version 4.10.13-1-ARCH.

I also tried running as root.

@shinyquagsire23
Copy link
Owner

uinput has a kernel module which needs to be loaded on boot, try sudo modprobe uinput and if that works, add a file for uinput in /etc/modules-load.d/

@freundTech
Copy link
Author

Thanks. After loading uinput I'm no longer getting that error message, however now I'm getting a Segfault.
Running it with gdb tells me that the segfault occured in udev_device_get_devnode () from /usr/lib/libudev.so.1

@shinyquagsire23
Copy link
Owner

Make sure you're running as root? That function only takes one argument and it's checked to be NULL so I'm not sure what else it could be.

@freundTech
Copy link
Author

Yes. I'm running it as root.
Here is a log of gdb running the program as root and the ldd output. Maybe that helps
libraries.txt
log.txt

Also hidtest works, so it seems to be a problem with udev/uinput.

@freundTech freundTech changed the title uinputdriver not finding device uinputdriver crashing with Segfault May 24, 2017
@Rapti
Copy link

Rapti commented Oct 1, 2017

Having the exact same scenario. Any updates?

@lubosz
Copy link

lubosz commented Oct 12, 2017

I have the same issue on Arch Linux, running Linux 4.13.5. Segfault in udev_device_get_devnode, hidtest works fine.

It works when I hardcode the uinput path:

    //char *uinput_path = udev_device_get_devnode(uinput);
    char *uinput_path = "/dev/uinput";

@Serisium
Copy link

Serisium commented Dec 9, 2017

I can confirm that @lubosz's fix worked on my system as well.

@Bionov
Copy link

Bionov commented Feb 4, 2018

Same error but since I'm new to linux I don't know where to put the workaround in the .c file.
I'm on Ubuntu 17.10 4.13.0-32-generic x86_64

@lubosz
Copy link

lubosz commented Feb 4, 2018

@Bionov grep uinput_path * -IR in the src directory

How would you do that on Windows?

@Bionov
Copy link

Bionov commented Feb 12, 2018

Thanks, I managed to do it, running into another error but not linked with this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants