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

Troubleshooting UInput() OSError Error 22 Invalid argument #134

Open
mad-ady opened this issue Sep 3, 2020 · 1 comment
Open

Troubleshooting UInput() OSError Error 22 Invalid argument #134

mad-ady opened this issue Sep 3, 2020 · 1 comment

Comments

@mad-ady
Copy link

mad-ady commented Sep 3, 2020

I'm unable to create a uinput device and I'm not sure what's preventing me from doing it:

root@go2-white:~# uname -a
Linux go2-white 4.4.189 #1 SMP Fri May 22 14:46:51 CEST 2020 aarch64 GNU/Linux
root@go2-white:~# python3
Python 3.7.3 (default, Jul 25 2020, 13:03:44) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from evdev import InputDevice, categorize, ecodes, UInput
>>> ui=UInput()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/dist-packages/evdev/uinput.py", line 146, in __init__
    _uinput.setup(self.fd, name, vendor, product, version, bustype, absinfo)
OSError: [Errno 22] Invalid argument
>>> 
root@go2-white:~# ls -l /dev/uinput              
crw------- 1 root root 10, 223 Sep  3 18:20 /dev/uinput

It started to happen once I used pip3 to install evdev 1.3.0 (the stock version is 1.1.2 in Debian 10 (aarch64)). Any ideas why?

@mad-ady
Copy link
Author

mad-ady commented May 13, 2021

Here's a note for my future self (because I spent an hour again around this problem, having forgotten about it!) - in order for the code above to work I had to downgrade to version 1.1.2 of evdev:

sudo pip3 install evdev==1.1.2

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

1 participant