Skip to content

[GNU/Linux] ioctl() errors due to Logitech keyboard receiver #8112

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

Closed
vanfanel opened this issue Aug 11, 2023 · 1 comment
Closed

[GNU/Linux] ioctl() errors due to Logitech keyboard receiver #8112

vanfanel opened this issue Aug 11, 2023 · 1 comment

Comments

@vanfanel
Copy link
Contributor

Hi there,

Recently I noticed that some errors are appearing on the TTY when running SDL2 programs:

root@DietPi:~/prince# prince
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Invalid argument
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe
ioctl (GFEATURE): Broken pipe

Now, let's see.
lsusb reports this:


root@DietPi:~/prince# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 045e:028e Microsoft Corp. Xbox360 Controller
Bus 001 Device 006: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 004: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So, doing this makes the errors go away:
env SDL_HIDAPI_IGNORE_DEVICES=0x046d/0x0000 prince

So I went and tried adding this in src/joystick/SDL_joystick.c inside SDL_bool SDL_ShouldIgnoreJoystick():

MAKE_VIDPID(0x046d, 0xc534), /* Logitech Unifying Receiver for K220 Keyboard and Mouse combo */

and also tried

MAKE_VIDPID(0x046d, 0x0000), /* Logitech Unifying Receiver for K220 Keyboard and Mouse combo */

...but the errors still appear.

Only SDL_HIDAPI_IGNORE_DEVICES=0x046d/0x0000 seems to work!
Any idea on how to correctly fix this?

Thanks!

slouken added a commit that referenced this issue Aug 13, 2023
slouken added a commit that referenced this issue Aug 13, 2023
Fixes #8112

(cherry picked from commit 0b9d8e6)
@slouken
Copy link
Collaborator

slouken commented Aug 13, 2023

Fixed, thanks!

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

2 participants