[SOLVED-ISH] Gamepad not working

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

[SOLVED-ISH] Gamepad not working

Post by DocTwisted »

Hello,

I'm very new and have had problems finding a working solution for this minor hardware issue.

I have a computer with Mint 18, and I'm trying to get my wired Xbox 360 controller to work with it for Minecraft and various emulators. I've installed xboxdrv, but when I open it and try to test the buttons, nothing responds. I tried calibrating, but that just set all the axis values to zero. The controller itself is giving me an error message in the form of all quadrants of the light circle blinking green. I checked that xpad wasn't running already, so I know there's no conflict there. Any suggestions on how to resolve this?
Last edited by DocTwisted on Wed Oct 26, 2016 1:40 am, edited 1 time in total.
User avatar
JoeFootball
Level 9
Level 9
Posts: 2798
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Gamepad not working

Post by JoeFootball »

DocTwisted wrote:Any suggestions on how to resolve this?
Looks like there's lots of info here.

Joe
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: Gamepad not working

Post by DocTwisted »

JoeFootball wrote:
DocTwisted wrote:Any suggestions on how to resolve this?
Looks like there's lots of info here.

Joe
Yeah, if you had read both my post and the content of that google search, you'd realize I tried that already and it's not working. Thanks for the non-help though.
User avatar
JoeFootball
Level 9
Level 9
Posts: 2798
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Gamepad not working

Post by JoeFootball »

DocTwisted wrote:Yeah, if you had read both my post and the content of that google search, you'd realize I tried that already and it's not working. Thanks for the non-help though.
If you actually read the search results, you'd realize that xboxdrv isn't the only option to try. And you're welcome.

Joe
User avatar
trytip
Level 13
Level 13
Posts: 4894
Joined: Tue Jul 05, 2016 1:20 pm

Re: Gamepad not working

Post by trytip »

have you tried to see if jstest-gtk responds to your controller? even though mine (logitech dual shock) responds to all the buttons and axis in jstest-gtk my talos principle game was without controller support and had to hack the game to get it working. most games are independent of the system when it comes to controllers.

in my case i went into /talos_game/Content/Config/Input/Linux/ and had to change one of the existing controller configs to match my controller name to Logitech_Logitech_Dual_Action.xml ... that's a dirty way of doing it but i have full control of the game with my logitech

on the other hand some games like limbo i have no clue how to make work with controller
Last edited by trytip on Fri Oct 21, 2016 4:42 pm, edited 1 time in total.
Image
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: Gamepad not working

Post by DocTwisted »

trytip wrote:have you tried to see if jstest-gtk responds to your controller? even though mine (logitech dual shock) responds to all the buttons and axis in jstest-gtk my talos principle game was without controller support and had to hack the game to get it working. most games are independent of the system when it comes to controllers.

in my case i went into /talos_game/Content/Config/Input/Linux/ and had to change one of the existing controller configs to match my controller name to Logitech_Logitech_Dual_Action.xml ... that's a dirty way of doing it but i have full control of the game with my logitech

but on the other hand some games like limbo i have no clue how to make work with controller
Yes, my whole problem is the driver isn't detecting the controller. I was trying various searches to get more information and found a note on Microsoft's support page that the wired 360 controllers require a powered USB (I had been accidentally plugging it into the "right" one on my windows laptop, where it worked pnp) so I moved it from the front panel to one of the back panel ports marked with power, then reset. Now instead of getting a blinking green ring I've got a solid green ring, but jstest still doesn't respond and if I ask xboxdrv to list available controllers in terminal it says none are found.
User avatar
trytip
Level 13
Level 13
Posts: 4894
Joined: Tue Jul 05, 2016 1:20 pm

Re: Gamepad not working

Post by trytip »

i wish i had an xbox controller to try out, i'm surprised not a one mint user can help with this. (which is why i still have my windows for playing games :( )

wish you luck, does jstest respond if you uninstall xboxdrv (probably need a reboot)
Image
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: Gamepad not working

Post by DocTwisted »

trytip wrote:i wish i had an xbox controller to try out, i'm surprised not a one mint user can help with this. (which is why i still have my windows for playing games :( )

wish you luck, does jstest respond if you uninstall xboxdrv (probably need a reboot)
I just tried this, and all it changed is when I open jstest there's no devices listed in it now. As far as I can tell, the computer still can't tell there's a controller connected.
JoeFootball wrote:If you actually read the search results, you'd realize that xboxdrv isn't the only option to try. And you're welcome.

Joe
Ok, I've got some time on my hands... time to try every link in DDG and log the results here!

First link: the terminal is unable to find the "required packages," so that's a dead end.

Second Link: Has a terminal command via xpad to see if my controller is working. Trying it gives no results. Googling "Linux Mint 18 xpad" gives a bunch of links to xboxdrv (which I already know didn't help) or a stickynotes program. Fail.

Third Link: Oh wow, it's another suggestion of using xboxdrv! Well since I purged it and reset I might as well try again... after re-installing the xboxdrv the joystick preferences screen still doesn't contain any listings, no matter how many times I click refresh. Maybe a reboot is in order? I'll be back to this once I try that I guess... I'm back! No change.

Fourth Link: Another suggestion to install xboxdrvr. NEXT!

Fifth Link: It's another info page on xboxdrv. Wow, you're right, such a wide variety of information, so far five different ways to tell me to use the thing that I already established isn't working for me. Thank you EVER so much!

Sixth Link: This page is seriously deep in the weeds. As someone who just started trying out Linux Mint a month ago. I see under the XBox section there's mention of a SteamOS version of xpad, but it says something about installing dkms first and when I follow the link to the page on that it's also not instructions written for a new user to understand.

Seventh link: Another xboxdrv reccommendation. Wow, the blinding variety... of pages repeating the same thing that already isn't working.

Eighth link: Oh look, another set of instructions for installing xboxdrv! What are the odds?

Ninth Link: Another xboxdrvr article. Oh, the options!

Tenth link: Ok, this is soemthing different. Ten entries down I finally find instructions for instaling xpad, which EVERY previous link mentions as worse than xboxdrv. I'll try it out... back after reset... Ok, that made a change. I now have 4 listings in jstest-gtk, labelled as wireless Xbox 360 receivers labelled /dev/input/jsx, where x is a value from 0 to 3. But none of them respond to my button pushing or stick spinning. Also, the ring on the controller is still lit solid green.

So I need to stop this for now and deal with RL matters, but as review, of the top ten web searches in the link sarcastically provided, SEVEN for what I already tried and didn't work, one was so outdated that the terminal commands returned error messages, one was written with the assumption that I'm already an experienced power user of linux, and one gave me an alternative that feels like it got me closer but didn't work out as a solution.
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: Gamepad not working

Post by DocTwisted »

Minor update: While driving home this evening I realized that I'd never checked if my USB ports were all in working order, so I checked them with a thumb drive that had a pdf saved to it. All the ones I'd been using (powered and not powered) detected the drive right away and showed me the file it contained. So the problem is not the USB port.
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: [SOLVED-ISH] Gamepad not working

Post by DocTwisted »

Ok, so with some help from my IT instructor I managed to get the gamepad working... sorta.

Steps taken were:

0) Uninstalled whatever version of xboxdrv I had already with sudo apt-get remove xboxdrv
1) Downloaded the latest source code for xboxdrv.
2) Extracted it in a directory labelled xboxdrv
3) Went into my Software Manager, searched for and installed the following (if it wasn't already showing as installed): G++, libboost1.42-dev, scons, pkg-config, libusb-1.0-0-dev, git-core, libx11-dev, libudev-dev, x11proto-core-dev, libdbus-glib-1-dev.
4) cd to the xboxdrv directory and ran scons
5) once scons was finished, ran make
6) once make was done, ran sudo make install
7) in the terminal, ran sudo xboxdrv --silent

This got things working. The catch is, every time I want to use the gamepad, I need to first go into terminal, give the command sudo xboxdrv --silent, enter my password, and then leave that terminal window running in the background. If I close that window, xboxdrv stops running. If there's a way to just have it running in the background all the time like my other drivers, I'd love to know about it. I tried making a command for it in startup applications but that didn't work (maybe because it needs to run sudo? I tried without sudo in the terminal and it refused to access one of the libraries it needs, then stopped).

One other side note: The left and right trigger buttons are... finicky. I guess it has to do with them being analog, but I had a problem with the left trigger frequently getting stuck in the "on" position, and I could see that happening with the right trigger easily too. Not sure if there's a fix for this, but that's for another day.
User avatar
trytip
Level 13
Level 13
Posts: 4894
Joined: Tue Jul 05, 2016 1:20 pm

Re: [SOLVED-ISH] Gamepad not working

Post by trytip »

here's a suggestion hope you can implement some or lead you to the correct response. you will need to add it to startup but first you'll have to edit etc/sudoers and add this line to the bottom so that xboxdrv will start without password

Code: Select all

%users  ALL=NOPASSWD: /usr/bin/xboxdrv
(i think that's where the executable is? if not find the correct path) now that xboxdrv will start without password you can add your xboxdrv --silent to the startup session (not sure if it needs to be sudo xboxdrv --silent)

i did this in arch to have hddtemp run without a password for my conky config
Image
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: [SOLVED-ISH] Gamepad not working

Post by DocTwisted »

trytip wrote:here's a suggestion hope you can implement some or lead you to the correct response. you will need to add it to startup but first you'll have to edit etc/sudoers and add this line to the bottom so that xboxdrv will start without password

Code: Select all

%users  ALL=NOPASSWD: /usr/bin/xboxdrv
(i think that's where the executable is? if not find the correct path) now that xboxdrv will start without password you can add your xboxdrv --silent to the startup session (not sure if it needs to be sudo xboxdrv --silent)

i did this in arch to have hddtemp run without a password for my conky config
Thanks, I found the executable in usr/local/bin/ after poking around a bit. I tried the above edit, but it still wants a password to activate. Could it be because of the calls to libusb? I know if I don't run it sudo the error that shows up is about access to libusb.
User avatar
trytip
Level 13
Level 13
Posts: 4894
Joined: Tue Jul 05, 2016 1:20 pm

Re: [SOLVED-ISH] Gamepad not working

Post by trytip »

IMPORTANT rightclick and compress your etc/sudoers to back it up or even copy it to another root folder
ok i think i got the correct sintax. i tried it on mine and sudo xboxdrv starts with no password even though it saying this because i have no xbox controller
-- [ ERROR ] ------------------------------------------------------
No Xbox or Xbox360 controller found <<< when i start from terminal with sudo xboxdrv

they say it's better to do sudo visudo to edit etc/sudoers so in terminal type sudo visudo enter your password to open etc/sudoers use the arrow keys to go to bottom and enter

Code: Select all

username hostname = (root) NOPASSWD: /usr/bin/xboxdrv
replace uername with your username and replace hostname with your hostname ... to find your hostname type hostname in terminal

once edited use CTRL+X to exit it will ask to save and enter y for yes and then once more ENTER to exit visudo
you should be able to use sudo xboxdrv immediately with no password
Image
DocTwisted
Level 1
Level 1
Posts: 8
Joined: Thu Oct 20, 2016 9:37 pm

Re: [SOLVED-ISH] Gamepad not working

Post by DocTwisted »

Ok, so I tried this, and for some reason it still wants a password. If I try to run it non-sudo I get an error message about access denied to libusb.
User avatar
trytip
Level 13
Level 13
Posts: 4894
Joined: Tue Jul 05, 2016 1:20 pm

Re: [SOLVED-ISH] Gamepad not working

Post by trytip »

not sure what to tell you it seems to work here in mint/mate/17.3 although i do have a few tweaks to allow some other gksu applications without password, or could it be you didn't enter your info correctly in etc/sudoers? what line are you using?

Image Image
Image
Post Reply

Return to “Newbie Questions”