[Solved] Problem with the Saitek X52 joystick under Gentoo linux.

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: another_commander, winston, Getafix

Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

[Solved] Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

Hello. First of all, i`m sorry for any possible mistakes, because English isnt my native. I hope you still could understand me. I`m playing the vanilla game, no OXPs, no OXZ`s. It is the latest stable version, downloaded from the main site, installed by using the home directory mode (not the system wide, if that`s matters). Everything seems to be fine, except for the joystick configuration page and it`s behaviour in the game later. I`m using Saitek x52, as i mentioned in the topic. All axis works fine, the main problem is with its buttons. This joystick have at least 25 buttons, but only FIRST 15 of them could be mapped in the joystick configuration page of the game. By "first 15" i mean not just the 15 buttons of all, but their sequential number, as it detected by the linux itself. Like for example if the Fire trigger is button number 1, that means, i can only use the buttons from 1 to 15. If i`m trying to map a button which have a higher number, then the game reads it as button number one. Moreover (and worse) is that if i accidendaly press any of the "higher number buttons" in game, it`s acts as the "button number one pressed" (so fires a laser). I`m not familiar with the programming, but it`s likely that the game assumes that a joysticks can only have 15 or less buttons at all. If there are people who are using the same kind of joystick under linux, please help me to figure that out. Or if it`s a bug indeed, i hope the developers will know about it. Also i could provide any necessary screenshots if needed. Thank you in advance.
Last edited by Getafix on Tue Jan 01, 2019 4:32 pm, edited 1 time in total.
Reason: Marked as Solved
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by another_commander »

Hi and welcome. Oolite should be able to map 64 buttons + 16 hats in total. This seems to be able to cover the Saitek X52 easily, but for some reason it does not in your case. It would be helpful to post a couple of screenshots showing the stick configuration screens, as well as setting joystick.init to yes in logcontrol.plist and posting the Latest.log file to see what other information we might be able to retrieve.

In case anyone out there with a Saitek X52 on Windows could confirm what happens there, this would also help.
Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

Thank you for your reply. Please tell me, which one of the available picture hostings should i use here for uploading the screenshots?

Here is my Latest log, because the "joystick.init" thing was already set to yes.

https://pastebin.com/63FQmdMM
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16059
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Cody »

Amon2501 wrote: Sun Dec 09, 2018 3:08 pm
Please tell me, which one of the available picture hostings should i use here for uploading the screenshots?
Whichever you prefer, I guess (I use Postimage) - and welcome aboard!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Norby »

Amon2501 wrote: Sun Dec 09, 2018 3:08 pm
which one of the available picture hostings should i use here for uploading the screenshots?
https://postimages.org/ works fine.
Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

Here i go. I ve made a gallery with all of the pictures here https://postimg.cc/gallery/39qo37s6g/ From left to right

The first pic is the physical button on the joystick`s throttle part. That button is taken just for the example, because that glitch appears with every button, numbered higher than 15 AFAIK.

The second pic is the KDE control panel represents that particular button when it`s being pressed (its the 27 button, 24 represents the Saitek`s profile selection switch)

At the third and fourth pics I`m trying to assign "engage hyperdrive" function to that particular button (the button number 27) See? That`s been recognised by the game as the button number 1 and the real fire button was cleared immediately after that.

Moreover, if i press this or any other higher_than_15 buttons in the game, it fires the laser. Even when they arent set in the list (none of them). That looks like the game itself, not the linux, recognises these buttons as the first one.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by another_commander »

Is clutch mode enabled? If yes, try turning it off.
Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

another_commander wrote: Mon Dec 10, 2018 5:12 am
Is clutch mode enabled? If yes, try turning it off.
I don`t know what is that. Tried to google it, but everyone there says either about the Pro version of this joystick (and i have non-pro, just the X52), either about disabling it by the windows software (but i`m playing under linux). What should i do exactly?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by another_commander »

To be honest, I don't know. I just googled it myself and hoped that it would work. If you don't know what it is or are sure it is not relevant to your joystick type, or no equivalent control software exists for Linux, just ignore the suggestion.
Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

Tried the windows version too with the same joystick. Everything was fine, no problems. So that obviously isn`t a hardware issue. What should i do to make it work properly under linux?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by another_commander »

This starts to look like a driver issue. One thing you may want to try is to install the game system-wide and see if it changes anything. Other than that, I think we may have to wait for ideas by anyone of our Linux devs.
Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

Actually i didnt installed any drivers or software for this joystick in linux. It`s the only joydev kernel module. I`m also using it for the F310 gamepad (currently disconnected) and it worked fine with it.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sat Aug 09, 2014 4:16 pm

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Commander_X »

I've been doing a bit of google digging on this, and it turns you'd need to get yourself a better driver than the default joystick "cabled" by the kernel.
It seems this one would be a sane choice. Hope it helps.

*disclaimer: not too much of a joystick user -- my Attack3 is very rarely dusted off :D .
Amon2501
Competent
Competent
Posts: 40
Joined: Sat Dec 08, 2018 12:13 am

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Amon2501 »

I`ve read thru his code and it seems that the kernel module is made only for the pro version

Code: Select all

static struct usb_device_id id_table[] = {
    { USB_DEVICE(VENDOR_ID_SAITEK, PRODUCT_ID_X52_PRO) },
    /*
     * Future versions of this driver may support the original
     * X52 HOTAS joystick, but for now, only the X52 Pro is
     * supported.
     */
I `m gonna try that anyway, but it`s very likely that in my case only the joydev module will be used again.
Commander_X
---- E L I T E ----
---- E L I T E ----
Posts: 664
Joined: Sat Aug 09, 2014 4:16 pm

Re: Problem with the Saitek X52 joystick under Gentoo linux.

Post by Commander_X »

Amon2501 wrote: Tue Dec 11, 2018 11:20 am
I `m gonna try that anyway, but it`s very likely that in my case only the joydev module will be used again.
The mentioned driver might still worth a try, in the issues of the project there is a discussion around Support for x52 (non pro) #11, where the developer states (on Jan 11th, 2017) that he added support for X52. As per his comment only the LEDs couldn't be updated individually.

EDIT: uhm, in the kernel_driver Readme.md there is a mention of a userspace library to handle LEDs and MFD for the standard usbhid driver. That could help, hopefully.
Post Reply