Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
5 answers
2674 views
Is it possible to trick a window that it has focus in KDE?
Is it possible to make a window believe that it has a focus while it has not? My use case description: I am playing a game named Detroit Become Human. I am playing with gamepad. The game is actually an interactive movie. It has a very complicated flowcharts. I want to see other scenes that I missed...
Is it possible to make a window believe that it has a focus while it has not? My use case description: I am playing a game named Detroit Become Human. I am playing with gamepad. The game is actually an interactive movie. It has a very complicated flowcharts. I want to see other scenes that I missed after my original walkthrough. I am reading the walkthrough guide in a browser and switching to game very often and want to see flowchart in a game. Because the flowcharts are very complicated, I need to keep lots of tabs in browser, constantly scroll pages up and down trying to read descriptions for some nodes. And I get really annoyed that I constantly need to refocus a game itself to be able to control it (even with gamepad) and press alt+tab to release mouse from the game. Also, the game makes me rewatching lots of scenes that I already have seen and I want to do some other readings while such scenes are playing. Also, there are scenes with minor interactions, but still I need to focus a game window for them. I wanted to make it easier. I want the game to be controllable by gamepad while its window not in focus. I thought that I need to capture a gamepad input and redirect it to inactive window. And that thing was what I wanted originally to ask. However, I have noticed, that chromium while not in focus is still able to see the gamepad input by using this web site: https://gamepad-tester.com/ . This means (as I think) that all windows have access to the gamepad input. Now I think that the problem is the game itself. I think it checks if it is in focus, and if not, it do not interprets the input. I want the game to always interpret gamepad, even when missing focus. Is that possible? My system details: Arch Linux. Game launched via steam. Tried with Steam Input and without it. KDE Plasma. Logitech F710 Gamepad in XInput mode. The game launched in borderless window mode, also tried fullscreen and windowed. Additional info. This trick may be useful not only for games (which often pauses when not in focus), but also for applications. For example, DaVinci Resolve hides a window with effects parameters. I am watching a tutorial video on youtube in browser. When I focus a browser, I cannot see my parameters window to compare it with such on a youtube. Tricking the DaVinci Resolve that it has focus (while still disabling keyboard input for it) may solve this.
Ashark (1069 rep)
May 17, 2021, 09:40 PM • Last activity: Apr 13, 2025, 10:25 AM
1 votes
1 answers
298 views
Is it possible to merge two (or more) joysticks into one virtual one?
With a more powerful graphics adapter comes the luxury of playing games in Linux (mostly using Lutris/Wine). I have the classical bundle of CH Products joystick (Fighterstick, Pro Throttle and Pro Pedals) mostly for flight simulations. Most modern games support multiple joysticks and as such all is...
With a more powerful graphics adapter comes the luxury of playing games in Linux (mostly using Lutris/Wine). I have the classical bundle of CH Products joystick (Fighterstick, Pro Throttle and Pro Pedals) mostly for flight simulations. Most modern games support multiple joysticks and as such all is good there. However, this somewhat older game only supports one joystick. So, I was thinking to merge them together (like with the good old days using CH Control Manager) to create a single, albeit powerful, joystick to be used in the game. Trying to install said software inside the Wine prefix unfortunately did not do anything (the joysticks were not detected by the software). So, I was pondering another approach: Binding the joysticks from the host platform (that is, Linux). I would use them almost exclusively together anyway. Is this possible? If so, how? Looking online I found a few items for remapping buttons and the like (chiefly for Ubuntu), but nothing newer than 2016, which all seem abandoned projects. If, on the other side, someone has experience getting CH Control Manager to work inside Wine would equally be nice.
Phoenix (296 rep)
Jul 16, 2023, 03:50 PM • Last activity: Jan 18, 2025, 09:57 AM
0 votes
0 answers
104 views
How to intercept force feedback events between an application and a gamepad?
I want to be able to intercept a FF (force feedback) event (vibration/rumble in this case) that would normally go directly to the gamepad device file, to send an event to some other device while keeping the gamepad as the final receiver of the event. This is in hopes of creating a Linux-native alter...
I want to be able to intercept a FF (force feedback) event (vibration/rumble in this case) that would normally go directly to the gamepad device file, to send an event to some other device while keeping the gamepad as the final receiver of the event. This is in hopes of creating a Linux-native alternative to a Windows-only tool called Intiface Game Haptics Router (NSFW use case, does basically what it says on the tin) I have already tried unsuccessfully to create a python script using python-evdev to read the events going to the gamepad, but it so happens that UInput events don't carry the length or intensity information unless you begin uploading them to the device, and I have not been able to capture the event from the real gamepad and upload it to a virtual one with the same FF "capabilities" (I assume the application still talks directly to the gamepad, so the virtual device has nothing to receive?). This might be a lack of experience with the library, as I basically cobbled together some example scripts from the tutorial section on the documentation website In a prior attempt at doing a similar thing to this, I stumbled upon xboxdrv, a userspace driver for Xbox gamepads. It apparently has some support to send FF events to a certain device due to some edge cases . Sadly this is not useful because this option has limited use as to what you can point it to, not allowing device files. I have seen that I could use the kernel module usbmon and wireshark to intercept the USB communication, however I consider this a bit clunky to setup (both programmatically and manually, I would like ease of use to be considered, as I have heard even some Steam Deck users trying to use the Windows tool). I also have concerns about performance and latency, as some games can put heavy stress into a system and if the two devices are too far out of sync it can be disorienting. For some context, I am a bit of a Linux amateur, I have been running mainly Arch Linux and derivatives for some years, mainly with KDE Plasma. As for the code mentioned earlier, I could share the snippet of code I have been trying to make work, but as I said it is cobbled together from examples so there isn't anything revolutionary in there. I know this is a weirdly niche thing to try to do and a hard thing to accomplish, so a huge thanks in advance if you can at least enlighten me in my way. And sorry if this is not the correct forum, I am sort of new to Stack Exchange and had some trouble deciding to which one my question fit best.
Sasha (1 rep)
Oct 24, 2024, 09:07 PM
12 votes
4 answers
27180 views
Are there any command line utilities that can capture joystick button presses?
Here's my situation: I have a Raspberry Pi with Raspbian installed on it. I also have RetroArch installed and a simple USB gamepad hooked up. Everything works fine, but I wanted to set it up so that pressing a key combination (ex L1+L2+R1+R2) would gracefully exit the emulator so that I don't have t...
Here's my situation: I have a Raspberry Pi with Raspbian installed on it. I also have RetroArch installed and a simple USB gamepad hooked up. Everything works fine, but I wanted to set it up so that pressing a key combination (ex L1+L2+R1+R2) would gracefully exit the emulator so that I don't have to keep a keyboard around. RetroArch's default key to gracefully exit is ESC, and I can't remap it to a key combination due to a limitation in RetroArch (I could, however, remap it to a single gamepad key). So I was wondering if there were any utilities out there that could listen to the gamepad's key presses and, when a certain combination is pressed, performs an action (sending the ESC key to the emulator). Or is there an easier way to achieve what I want and I'm just being silly? EDIT: Now that I think about it, it would also be nice if I could have a different key combination execute a bash script that starts the emulator so that I could start it without a keyboard as well.
Doppelganger (125 rep)
Jun 27, 2013, 07:44 PM • Last activity: Sep 5, 2023, 02:09 AM
3 votes
1 answers
691 views
test evdev-joystick calibration
I want to calibrate a joystick (custom hardware) with no buttons and only one axis (Z). I used evtest to read the movement range i.e. min/max values and the centre (the point where the joystick rests), which is approximately in the middle of that range: [min, centre, max] = [2028, 3228, 4225]. I use...
I want to calibrate a joystick (custom hardware) with no buttons and only one axis (Z). I used evtest to read the movement range i.e. min/max values and the centre (the point where the joystick rests), which is approximately in the middle of that range: [min, centre, max] = [2028, 3228, 4225]. I used then evdev-joystick --e to apply these min/max values and fuzz = 100 just for testing purposes (no idea how to apply the deadzone value, is that the point where the value should return 0? in my case 3228? evdev-joystick shows some percentage but I don't get what it means, ignore everything under that deadzone value? That is not what I would expect though... a deadzone should consist of two values around the centre, right? or at least some percentage around the centre). When I run evtest again, the summary shows the new values I set with evdev-joystick, but only the fuzz value seems to have any effect. If I set min/max values within the movement range, I can get events outside of that new range. I tried different values for the deadzone (0, 3228, almost the max value...) with no effect at all. I expected some range or centre correction but it looks like evtest is ignoring the calibration (apart from fuzz, I do not get consecutive values within the fuzz range) even though it displays it at the beginning. Is evtest supposed to ignore the min/max/deadzone calibration and deliver raw values? Should I test the calibration with a different tool? I can only use command line tools by the way. I have also tried the old Joystick API with jstest and jscal, which actually looks much better than the new one in the sense that jscal offers interactive calibration where the min/max/centre/fuzz values are automatically saved and the calibration can be tested with jstest and the original range gets corrected to [-32767, 0, 32767]. Unfortunately I am only allowed to use the evdev API because of some concerns about the old Joystick API getting removed altogether at some point in the near future. **Edit:** I dove into the tools' code and they make use of the input_absinfo struct located in the input.h uapi, where there is the following note: * Note that input core does not clamp reported values to the * [minimum, maximum] limits, such task is left to userspace. So the evtest tool is not doing that clamping and therefore no range correction. But the flat definition in that file is still ambiguous: * @flat: values that are within this value will be discarded by * joydev interface and reported as 0 instead. Values within this value?? Joydev interface? is that not part of the old API? **Edit 2:** it seems that the old jstest tool displays the corrected values because it relies on the joydev device driver, which calculates the correction coefficients and does the clamping. Evtest does not use joydev and hence the "raw" values. What is the way to go after the calibration then? I have seen there is an SDL2 library that some games use. Will I get the functionality joydev delivers (dead zones, clamping) with that library after the calibration with evdev-joystick? I have also seen that SDL has some testing tools, but none of them seem to be command line tools to use on my embedded system so I could not get any further so far.
ldd3 (71 rep)
Feb 16, 2023, 07:38 AM • Last activity: Feb 27, 2023, 08:07 AM
8 votes
3 answers
18934 views
accelerometer + screen rotation on non-touchscreen laptop?
I've recently got a non-touchscreen hp laptop with a hdd accelerometer. After upgrading it to Debian testing I noticed that whenever I tilt my laptop upwards past +45 deg, the screen rotates upside down. The opposite happens when I tilt my laptop -45 deg. To clarify, I am facing my laptop with the s...
I've recently got a non-touchscreen hp laptop with a hdd accelerometer. After upgrading it to Debian testing I noticed that whenever I tilt my laptop upwards past +45 deg, the screen rotates upside down. The opposite happens when I tilt my laptop -45 deg. To clarify, I am facing my laptop with the screen facing me with the keyboard parallel to the ground. The screen also rotates whenever I tilt my laptop clockwise or counterclockwise. Is there a file where I can edit to change the screen's rotational direction? The accelerometer in /proc/bus/input/devices shows this: I: Bus=0019 Vendor=0000 Product=0000 Version=0000 N: Name="ST LIS3LV02DL Accelerometer" P: Phys=lis3lv02d/input0 S: Sysfs=/devices/platform/lis3lv02d/input/input7 U: Uniq= H: Handlers=event6 js0 B: PROP=0 B: EV=9 B: ABS=7 EDIT: I found that watch -n 1 'cat /sys/devices/platform/lis3lv02d/position' is similar to what is found with the command below. Except it just displays coordinates such as (18,18,1098). evtest /dev/input/event6 shows this: william@wksp0:~/Downloads$ sudo evtest /dev/input/event6 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0 Input device name: "ST LIS3LV02DL Accelerometer" Supported events: Event type 0 (EV_SYN) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 20 Min -2304 Max 2304 Fuzz 18 Flat 18 Event code 1 (ABS_Y) Value -38 Min -2304 Max 2304 Fuzz 18 Flat 18 Event code 2 (ABS_Z) Value 1105 Min -2304 Max 2304 Fuzz 18 Flat 18 Properties: Testing ... (interrupt to exit) Event: time 1483747056.088195, type 3 (EV_ABS), code 1 (ABS_Y), value -23 Event: time 1483747056.088195, -------------- SYN_REPORT ------------ Event: time 1483747056.124189, type 3 (EV_ABS), code 0 (ABS_X), value 20 Event: time 1483747056.124189, type 3 (EV_ABS), code 1 (ABS_Y), value -38 Event: time 1483747056.124189, type 3 (EV_ABS), code 2 (ABS_Z), value 1105 Event: time 1483747056.124189, -------------- SYN_REPORT ------------ Event: time 1483747056.210931, type 3 (EV_ABS), code 0 (ABS_X), value -18 Event: time 1483747056.210931, type 3 (EV_ABS), code 1 (ABS_Y), value -28 Event: time 1483747056.210931, type 3 (EV_ABS), code 2 (ABS_Z), value 1107... EDIT2: After some googling, I've come across [this](https://forums.gentoo.org/viewtopic-t-871145-start-0.html) which lead me to some interesting files that have little to no help on this. :P
MrWm (271 rep)
Jan 6, 2017, 02:27 AM • Last activity: Mar 27, 2022, 07:46 AM
0 votes
0 answers
1595 views
XBox One controller (USB) is detected, but sends no input events
I have a recently purchased X Box One wired controller, which I would like to have available on Linux. When I plug it in, it is detected, and does show up as /dev/input/js1. (/dev/input/js0 is my Wacom graphics pad.) However, jstest receives no input events from the controller. I've installed xpad,...
I have a recently purchased X Box One wired controller, which I would like to have available on Linux. When I plug it in, it is detected, and does show up as /dev/input/js1. (/dev/input/js0 is my Wacom graphics pad.) However, jstest receives no input events from the controller. I've installed xpad, done sudo modprobe xpad,and even installed xpadneo. I've attempted turning off Steam's X Box Configuration in its controller settings to get it to work; to no effect. I've updated xpad and xpadneo to the latest versions. Holding the center button does cause it to be reported as detected by Steam; but Steam does not receive joystick or button events either. There's no Bluetooth involved here; the whole thing is connected via USB to my front panel. Normally that makes things simpler, but as of yet I have had no luck. Can someone with some hardware knowledge explain to me what is going on, and how I can get my system to recognize the controller? I heard that it's supported natively, but this is very confusing. Thank you!
Michael Macha (323 rep)
Sep 12, 2021, 01:10 PM
4 votes
3 answers
10127 views
How can you run a script triggered by a joystick input?
I'm using a Raspberry Pi running Raspbian to power my arcade cabinet. I want to shut the Pi down using the `sudo poweroff` command without using the keyboard. I'm thinking the best way would be to create a simple script that would somehow be triggered by a combination of controller button inputs. It...
I'm using a Raspberry Pi running Raspbian to power my arcade cabinet. I want to shut the Pi down using the sudo poweroff command without using the keyboard. I'm thinking the best way would be to create a simple script that would somehow be triggered by a combination of controller button inputs. It seems easy to bind a keyboard to a script, but not so easy to use a joystick input instead. Does anyone have any ideas? ### EDIT #1 The joystick and controller buttons all work fine and show up using the jstest tool from the jstest-gtk package and all work fine in Mame4all. I haven't tried xev but will look into it.
Jody (41 rep)
Jan 4, 2014, 12:04 PM • Last activity: Nov 8, 2020, 12:06 AM
3 votes
1 answers
1619 views
How to force evdev API instead Joystick legacy API?
Steam has support only evdev driver when using joystick, so I have a cool wii u "usb adapter" and 2 gamecube controllers working OK in steam thanks to the "wii-u-gc-adapter" tool. I also have 2 wiimote (with classic controller) working great (with emulators) but in legacy Joystick API, which happen...
Steam has support only evdev driver when using joystick, so I have a cool wii u "usb adapter" and 2 gamecube controllers working OK in steam thanks to the "wii-u-gc-adapter" tool. I also have 2 wiimote (with classic controller) working great (with emulators) but in legacy Joystick API, which happen to create 2 files (per Joystick) in /dev/input/js0 and /dev/input/event11. I have the "hid-wiimote" module up (which in theory is the evdev wiimote driver) still not recognized by steam nor even with sdl2-jstest utility ( sdl2-jstest --list) but with "evtest" on file /dev/input/event11 do. There is no simbolic link in /dev/input/by-id/ or /dev/input/by-path. The point is I wish to know if there is a way to force a change between those API. Any Idea would be appreciated.
Martin (31 rep)
Oct 22, 2015, 04:19 AM • Last activity: Sep 18, 2020, 02:09 PM
0 votes
2 answers
5808 views
How can I stop my controller from moving my (mouse) pointer?
I'm using antix17, based on Debian. I'm using lightdm with the kde greeter, IceWM for window manager, and x display server. My controller is a PS2 knock off, I'm connecting it to the PC with a USB adapter. The adapter has two ports for two controllers, for this reason, the computer thinks there's tw...
I'm using antix17, based on Debian. I'm using lightdm with the kde greeter, IceWM for window manager, and x display server. My controller is a PS2 knock off, I'm connecting it to the PC with a USB adapter. The adapter has two ports for two controllers, for this reason, the computer thinks there's two controllers connected at all times, regardless of how many are actually connected to the computer. Now, onto the issues. My controller can directly interact with my mouse. I can move it around with the joystick and I can press some buttons to simulate clicks. This is unwanted behavior because it causes issues when I actually want to game. After trying for some time, I managed to get RetroArch to run on this old PC, but it's riddles with controller issues. On the menus, I seem to be getting double input. When I enter a menu, I see a quick flash of what I presume to be the sub-menu I entered and then I'm back at where I started with the first option selected. This makes controller navigation on RetroArch impossible since I can't enter sub-menus. Also, the stick moving the mouse makes it so I can reach the bottom of the screen and render the taskbar on top of the games, making it lose focus. The biggest issue by far is when using two player mode. The two controllers seem to be linked in some way. For example, in a platformer, I pressed the jump button and that made both characters jump, same thing happened when I pressed jump on the other controller. I tried on another game, and this time only the second controller made both characters jump. The D-pad seems to be independent. I have no clue on how any of this works and I'm losing my mind. By the way, the driver on RetroArch is set to udev, I tried with many more and none removed any issues. I seem to be using eudev tho, whatever that is. Can somebody help me troubleshoot this? Controllers in *nix environments is something I should really learn how to configure.
tralph3 (173 rep)
Jul 16, 2020, 07:41 AM • Last activity: Jul 16, 2020, 10:06 PM
1 votes
1 answers
1680 views
Force PS3 clone arcade gamepad to be hid generic
I have a NETWAY GAMING ARCADE FIGHTER PS3/PC. This device works fine under windows and also does on recalbox 4.1, but does not in any current linux that I have tried. I have tried to recompile hid-sony with various older versions, including the very same that works on recalbox 4.1 (v4.4.13). When us...
I have a NETWAY GAMING ARCADE FIGHTER PS3/PC. This device works fine under windows and also does on recalbox 4.1, but does not in any current linux that I have tried. I have tried to recompile hid-sony with various older versions, including the very same that works on recalbox 4.1 (v4.4.13). When using that version in recent ubuntu it seems to improve detection but it still fails. Here are the logs of the device: RECALBOX user.info kernel: [ 99.858844] usb 1-1.4: new full-speed USB device number 5 using dwc_otg RECALBOX user.info kernel: [ 99.980280] usb 1-1.4: New USB device found, idVendor=054c, idProduct=0268 RECALBOX user.info kernel: [ 99.980789] usb 1-1.4: Mew USB device strings: Mfr=0, Product=2, SerialNunmber=0 RECALBOX user.info kernel: [ 99.960296] usb 1-1.4: Product: USB Controller RECALBOX user.info kernel: [ 100.135534] usb 1-1.4: USB disconnect, device number 5 RECALBOX user.info kernel: [ 100.135955] input: USB Controller as /devices/platform/soc/3f980000.usb/usb1/1—1/1-1.4/1-1.4:1.0/0003:054C:0268.0003/input/input2 RECALBOX user.info kernel: [ 100.136001] sony 0003:054C:0268.0003: input,hiddev0,hidraw2: USB HID v1.11 Joystick [USB Controller! on ush—3f980000.usb—1.4/input0 RECALBOX user.err kernel: [ 100.136022] sony 0003:054C:0268.0003: can’t set operational mode: step 1 RECALBOX user.info kernel: [ 101.138844] usb 1-1.4: new full-speed USB device number 6 using dwc_otg RECALBOX user.info kernel: [ 101.253950] usb 1-1.4: New USB device found, idVendor=1345, idProduct=3008 RECALBOX user.info kernel: [ 101.253959] usb 1-1.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0 RECALBOX user.info kernel: [ 101.253965] usb 1-1.4: Product: USB Controller RECALBOX user.info kernel: [ 101.275011] input: USB Controller as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:1345:3008.0004/input/input3 RECALBOX user.info kernel: [ 101.275358] hid-generic 0003:1345:3008.0004: input,hidraw2: USB HID v1.10 Gamepad [USB Controller] on usb—3f980000.usb—1.4/inputO (recalbox 4.1, working) ubuntu kernel: [ 4639.424468] usb 1-8: new full-speed USB device number 32 using xhci_hcd ubuntu kernel: [ 4639.758139] usb 1-8: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00 ubuntu kernel: [ 4639.758142] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0 ubuntu kernel: [ 4639.758145] usb 1-8: Product: USB Controller ubuntu kernel: [ 4639.919303] sony 0003:054C:0268.0023: failed to retrieve feature report 0xf2 with the Sixaxis MAC address ubuntu kernel: [ 4639.919558] sony 0003:054C:0268.0023: hiddev3,hidraw5: USB HID v81.11 Joystick [USB Controller] on usb-0000:15:00.0-8/input0 ubuntu kernel: [ 4639.919560] sony 0003:054C:0268.0023: failed to claim input ubuntu kernel: [ 4639.919678] usb 1-8: USB disconnect, device number 32 ubuntu kernel: [ 4640.892687] usb 1-8: new full-speed USB device number 33 using xhci_hcd ubuntu kernel: [ 4641.225377] usb 1-8: New USB device found, idVendor=1345, idProduct=3008, bcdDevice= 1.00 ubuntu kernel: [ 4641.225381] usb 1-8: New USB device strings: Mfr=0, Product=2, SerialNumber=0 ubuntu kernel: [ 4641.225383] usb 1-8: Product: USB Controller ubuntu kernel: [ 4641.252351] sony 0003:1345:3008.0024: failed to retrieve feature report 0xf2 with the Sixaxis MAC address ubuntu kernel: [ 4641.252760] sony 0003:1345:3008.0024: hiddev4,hidraw6: USB HID v81.10 Gamepad [USB Controller] on usb-0000:15:00.0-8/input0 ubuntu kernel: [ 4641.252762] sony 0003:1345:3008.0024: failed to claim input (ubuntu 18.10 default module, not working) ubuntu kernel: [20957.230577] usb 1-9: new full-speed USB device number 14 using xhci_hcd ubuntu kernel: [20957.563354] usb 1-9: New USB device found, idVendor=054c, idProduct=0268, bcdDevice= 1.00 ubuntu kernel: [20957.563358] usb 1-9: New USB device strings: Mfr=0, Product=2, SerialNumber=0 ubuntu kernel: [20957.563360] usb 1-9: Product: USB Controller ubuntu kernel: [20957.597896] input: USB Controller as /devices/pci0000:00/0000:00:01.2/0000:15:00.0/usb1/1-9/1-9:1.0/0003:054C:0268.000D/input/input27 ubuntu kernel: [20957.598255] sony 0003:054C:0268.000D: input,hiddev1,hidraw3: USB HID v1.11 Joystick [USB Controller] on usb-0000:15:00.0-9/input0 ubuntu kernel: [20957.724424] sony 0003:054C:0268.000D: can't set operational mode: step 1 ubuntu kernel: [20957.810926] sony: probe of 0003:054C:0268.000D failed with error -71 ubuntu kernel: [20957.811129] usb 1-9: USB disconnect, device number 14 ubuntu kernel: [20958.702612] usb 1-9: new full-speed USB device number 15 using xhci_hcd ubuntu kernel: [20959.033593] usb 1-9: New USB device found, idVendor=1345, idProduct=3008, bcdDevice= 1.00 ubuntu kernel: [20959.033597] usb 1-9: New USB device strings: Mfr=0, Product=2, SerialNumber=0 ubuntu kernel: [20959.033599] usb 1-9: Product: USB Controller (ubuntu 18.10 module v4.4.13, not working) Bus 001 Device 035: ID 1345:3008 Sino Lite Technology Corp. Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x1345 Sino Lite Technology Corp. idProduct 0x3008 bcdDevice 1.00 iManufacturer 0 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.10 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 112 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 10 (lsusb -v) What I can notice is that with recalbox the device is finally managed by hid-generic, however with the same version of hid-sony compiled for ubuntu it does not trigger hid-generic and fails with hid-sony. Is there a way to force it to be managed by hid-generic instead of hid-sony as seems to happen with recalbox? May be via some usb quirk? **Update:** I think this patch is what makes the difference between working in recalbox 4.1 and not working in ubuntu with the same hid-sony.c driver version. https://patchwork.kernel.org/patch/8026101/ It looks to me that since the addition of #define USB_VENDOR_ID_SINO_LITE 0x1345 #define USB_DEVICE_ID_SINO_LITE_CONTROLLER 0x3008 the gamepad is managed by hid-sony.c, as hid-core.c does check for hid_have_special_driver and the vendor/device combo matches. So besides recompiling the whole kernel with the device identifier for my device replaced, are there other solutions? Can I make the gamepad report a different device id to the os using hid quirks or udev perhaps? Thanks for any ideas!
Eugenio (21 rep)
Apr 2, 2020, 06:10 PM • Last activity: Apr 3, 2020, 02:28 PM
0 votes
0 answers
198 views
Help with usb Joystick
My joystick does not send any input to my computer regardless it being recognized by the system. As a additional information it begins to send input if i boot windows then reboot to Manjaro. Someone has any idea how to resolve this or even what is being sent to the joystick to make him work? I don't...
My joystick does not send any input to my computer regardless it being recognized by the system. As a additional information it begins to send input if i boot windows then reboot to Manjaro. Someone has any idea how to resolve this or even what is being sent to the joystick to make him work? I don't know if here is the right place to ask that, if it isnt i'm sorry. Thanks in advance
Castu (1 rep)
Aug 8, 2019, 03:23 PM
1 votes
1 answers
464 views
Where is code for Switch Pro bluetooth joystick handling in linux kernel?
I want to try to implement gyro feature for Switch Pro joystick. For now it works, but no gyro input is supported, so it's implemented somewhere. However, I can't find where that code is, while wiimote or sony ones are pretty obvious. So, where is Switch Pro handling code in linux kernel? Is it usin...
I want to try to implement gyro feature for Switch Pro joystick. For now it works, but no gyro input is supported, so it's implemented somewhere. However, I can't find where that code is, while wiimote or sony ones are pretty obvious. So, where is Switch Pro handling code in linux kernel? Is it using some generic driver for different joysticks now? UPD: on connecting dmesg says [ 8838.878057] hid-generic 0005:057E:2009.0006: unknown main item tag 0x0 [ 8838.878116] input: Pro Controller as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/bluetooth/hci0/hci0:62/0005:057E:2009.0006/input/input24 [ 8838.878277] hid-generic 0005:057E:2009.0006: input,hidraw4: BLUETOOTH HID v0.01 Gamepad [Pro Controller] on 00:1a:7d:da:71:13 So I guess that it's generic driver.
val - disappointed in SE (136 rep)
Feb 23, 2019, 02:02 PM • Last activity: Feb 23, 2019, 08:57 PM
1 votes
0 answers
599 views
Reassign Joystick path
So, I have a 'Wacom_Co._Ltd._Cintiq_13HD_Touch_Tablet'. The kernel thinks it is a joystick, so `/dev/input/js0` gets assigned to this. Now I want to play a game, and it is (understandably) looking for a joystick at `js0`, but that is where the tablet is, not my joystick (which is at `js1`). Is there...
So, I have a 'Wacom_Co._Ltd._Cintiq_13HD_Touch_Tablet'. The kernel thinks it is a joystick, so /dev/input/js0 gets assigned to this. Now I want to play a game, and it is (understandably) looking for a joystick at js0, but that is where the tablet is, not my joystick (which is at js1). Is there a way to tell the kernel to assign the tablet to something like js10 so a real joystick/controller gets assigned to js0? I have tried messing with udev rules by making a /etc/udev/rules.d/73-persistent-joystick.rules, but the syslog gives this error: > NAME="input/js9" ignored, kernel device nodes can not be renamed; please fix it in /etc/udev/rules.d/73-persistent-joystick.rules:1 Note: currently, I am running this workaround before starting the game: > cd /dev/input; sudo sh -c "mv js0 js10; mv js1 js0"
Sir Intellegence-BrainStormexe (237 rep)
Aug 5, 2018, 02:37 AM • Last activity: Aug 7, 2018, 02:23 AM
1 votes
0 answers
495 views
Gamepad axis getting constant events
I recently purchased a "Playmax Thunder Pad" USB gamepad, presuming it would be plug-and-play with linux (as gamepads tend to be), and much to my delight I have found that everything works correctly... except the right hand analog stick. I can move the analog stick and the movement events are regist...
I recently purchased a "Playmax Thunder Pad" USB gamepad, presuming it would be plug-and-play with linux (as gamepads tend to be), and much to my delight I have found that everything works correctly... except the right hand analog stick. I can move the analog stick and the movement events are registered in jstest-gtk as well as evtest, but the x-axis of the stick appears to be sending constant events that it is moving 1 or 2 points from the center. This makes it impossible to play any games as the view only moves for a second before the stick is detected as being centered again. I have tried calibrating the thing with no success. Here is an example evtest output: Input driver version is 1.0.1 Input device ID: bus 0x3 vendor 0x79 product 0xa version 0x110 Input device name: "Generic USB Joystick " Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 288 (BTN_TRIGGER) Event code 289 (BTN_THUMB) Event code 290 (BTN_THUMB2) Event code 291 (BTN_TOP) Event code 292 (BTN_TOP2) Event code 293 (BTN_PINKIE) Event code 294 (BTN_BASE) Event code 295 (BTN_BASE2) Event code 296 (BTN_BASE3) Event code 297 (BTN_BASE4) Event code 298 (BTN_BASE5) Event code 299 (BTN_BASE6) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 128 Min 0 Max 255 Flat 15 Event code 1 (ABS_Y) Value 128 Min 0 Max 255 Flat 15 Event code 2 (ABS_Z) Value 129 Min 0 Max 255 Flat 15 Event code 5 (ABS_RZ) Value 128 Min 0 Max 255 Flat 15 Event code 16 (ABS_HAT0X) Value 0 Min -1 Max 1 Event code 17 (ABS_HAT0Y) Value 0 Min -1 Max 1 Event type 4 (EV_MSC) Event code 4 (MSC_SCAN) Properties: Testing ... (interrupt to exit) Event: time 1493717417.256734, type 3 (EV_ABS), code 2 (ABS_Z), value 128 Event: time 1493717417.256734, -------------- SYN_REPORT ------------ Event: time 1493717417.264830, type 3 (EV_ABS), code 2 (ABS_Z), value 129 Event: time 1493717417.264830, -------------- SYN_REPORT ------------ Event: time 1493717417.280830, type 3 (EV_ABS), code 2 (ABS_Z), value 128 Event: time 1493717417.280830, -------------- SYN_REPORT ------------ Event: time 1493717417.288769, type 3 (EV_ABS), code 2 (ABS_Z), value 129 Event: time 1493717417.288769, -------------- SYN_REPORT ------------ Event: time 1493717417.384837, type 3 (EV_ABS), code 2 (ABS_Z), value 130 Event: time 1493717417.384837, -------------- SYN_REPORT ------------ ad infinitum. **P.S.** This is a linux-only issue, I can use this gamepad in my *other* installed OS with no issues whatsoever.
RamblingMad (151 rep)
May 2, 2017, 09:38 AM • Last activity: May 2, 2017, 09:46 AM
1 votes
1 answers
208 views
Rename droidmote linux gamepad
I'm using the Droidmote Android app to use my tablet as a gamepad for my odroid c2 (similar to raspberry pi but uses arm64 architecture.) running debian jessie. I intend to use 2 Android devices for a 2-player game of supertuxkart. Jstest-gtk recognizes them as 2 separate controllers, js0 and js1. B...
I'm using the Droidmote Android app to use my tablet as a gamepad for my odroid c2 (similar to raspberry pi but uses arm64 architecture.) running debian jessie. I intend to use 2 Android devices for a 2-player game of supertuxkart. Jstest-gtk recognizes them as 2 separate controllers, js0 and js1. But supertuxkart sees them as droidmote x2 and they function as 1 controller. How could I make this work? It seems it would work if I renamed one controller. Thanks!
Muffin (63 rep)
Jan 23, 2017, 11:16 PM • Last activity: Jan 24, 2017, 10:27 AM
2 votes
1 answers
1253 views
Mapping two joysticks with Xorg
I already managed to map the input of a joystick to keyboard inputs by writing a file in my `xorg.conf.d/` directory (the file is named `51-joystick.conf`). Now I would like to map the inputs of a second joystick (same model) to use them together. So I wrote a second file in `xorg.conf.d/`; roughly...
I already managed to map the input of a joystick to keyboard inputs by writing a file in my xorg.conf.d/ directory (the file is named 51-joystick.conf). Now I would like to map the inputs of a second joystick (same model) to use them together. So I wrote a second file in xorg.conf.d/; roughly the same content, only differing by device path and mapping. Unfortunately, it doesn't work this way: - if I call the file for the second joystick 51-joystick2.conf, no joystick work any more - if I call the file for the second joystick 52-joystick2.conf, only the second one works Can someone explain me how to proceed? edit: the content of 51-joystick.conf is Section "InputClass" Identifier "Joystick 1 mapping" Option "device" "/dev/input/js0" Option "path" "/dev/input/js0" Option "StartKeyEnabled" "False" Option "StartMouseEnabled" "False" #MatchIsJoystick on #Option "MapAxis1" "keylow=113 keyhigh=114" #Option "MapAxis2" "keylow=111 keyhigh=116" Option "MapButton1" "key=52" Option "MapButton2" "key=53" Option "MapButton3" "key=38" Option "MapButton4" "key=39" Option "MapButton5" "key=40" Option "MapButton6" "key=54" Option "MapButton7" "key=14" Option "MapButton8" "key=10" EndSection edit (11/03/15): - both of my joysticks are shown with the command xinput ; each of them have two entries (two different IDs) and are marked as slave to the keyboard. The four entries have exactly the same name ("Logitech Gamepad F310 (keys)") - if I give a higher number to the config file of the first joystick ("52-joystick1.conf" and "51-joystick2.conf"), only the first joystick's inputs are mapped to keyboard inputs - this is now what is written to the xorg log when I plug the first joystick - this is now what is written to the xorg log when I plug the second joystick I note that in both cases, InputClasses "Joystick 1" and "Joystick 2" seems to be applied to the two joysticks, and in the end, only the mapping to /dev/input/js0 is applied.
SLakx (21 rep)
Mar 9, 2015, 07:49 PM • Last activity: Nov 13, 2016, 01:18 PM
4 votes
1 answers
2107 views
Emulate joystick input via numeric input
I have an arduino which gives me numbers from a potentiometer (300-600), device /dev/ttyACM0 baudrate 9600. I want to use these numbers as a 1-axis joystick. My system is archlinux and X-Displaymanager.
I have an arduino which gives me numbers from a potentiometer (300-600), device /dev/ttyACM0 baudrate 9600. I want to use these numbers as a 1-axis joystick. My system is archlinux and X-Displaymanager.
linuscl (550 rep)
Jun 18, 2016, 01:59 PM • Last activity: Oct 26, 2016, 03:24 PM
5 votes
2 answers
5336 views
joystick as a mouse with Fedora
I would like to use a joystick as a mouse with Fedora 12. I tried js2mouse but didn't work. Is there another solution? How should I configure the system?
I would like to use a joystick as a mouse with Fedora 12. I tried js2mouse but didn't work. Is there another solution? How should I configure the system?
Luke
Dec 7, 2010, 07:54 PM • Last activity: Jun 12, 2016, 07:38 PM
2 votes
0 answers
589 views
usb Joystick Detected, but registers no input
I have two `Oracle Enterprise Linux 6.7` systems, each running kernel `2.6.32-573.7.1.el6.x86_64` The same overall packages/configuration are applied to both, and I have installed `kmod-joydev` from the `elrepo` repository. On one of the systems(`dell t3600 workstation`) joysticks detect and work pe...
I have two Oracle Enterprise Linux 6.7 systems, each running kernel 2.6.32-573.7.1.el6.x86_64 The same overall packages/configuration are applied to both, and I have installed kmod-joydev from the elrepo repository. On one of the systems(dell t3600 workstation) joysticks detect and work perfectly. On the other, a Dell m6400 notebook, the same usb devices are detected, but not functional, even at a raw level if I issue a cat /dev/input/js0 It does not output any noise as the device is moved/Buttons pressed lsusb: Bus 006 Device 002: ID 068e:00f3 CH Products, Inc. Fighterstick lsmod | grep joydev: joydev 10670 0 Other than hardware configuration I have tried to get these two systems to be exactly identical. Unfortunately I'm not much good with peripheral troubleshooting, so I'm not entirely sure what else to check. I have tried multiple usb ports on the system that is not functional, and have tried other, non-joystick devices on the system and those function properly. Any thing that might give me a new avenue to explore would be fantastic.
Gravy (1572 rep)
Dec 29, 2015, 08:38 PM • Last activity: Jan 8, 2016, 11:48 PM
Showing page 1 of 20 total questions