Author Topic: Linux contoller issue  (Read 4970 times)

claytor

  • Newbie
  • *
  • Posts: 2
    • View Profile
Linux contoller issue
« on: June 06, 2016, 09:27:47 PM »
Hello all. I've recently re-purposed an old Asus laptop to be a dedicated emulation box. I'm currently running on Ubuntu and I'm encountering some very strange behavior. I am using a generic Xbox 360 controller and it is mapped correctly in both AM and Mame. However, when I launch Mame from AM, my controller is controlling both applications at the same time.  I cannot see that anyone else on the forum has had this issue.  Any thoughts?  Any assistance would be greatly appreciated. Thanks!
-------------------------------------------------------
Update:

I didn't notice it until this morning, but apparently the audio from my  video snaps is still playing from AM when I launch mame as well.  The funny thing is, however, while the game pad controls both programs simultaneously, the keyboard does not.  I don't know if these issues are separate or related.  #1 I need to figure out how to make my gamepad control only the foreground application; and #2, I need to figure out how to make the audio from my snaps quit playing once Mame is launched.  Maybe some sort of joytokey equivalent for linux could help with the first problem.  Honestly, I'd be fine with no audio from my video snaps if I could just get the controller to work properly.

Thanks for taking the time to read.  Please let me know if you have any insight. 
« Last Edit: June 07, 2016, 08:57:51 AM by claytor »

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Linux contoller issue
« Reply #1 on: June 09, 2016, 06:29:23 PM »
You are using stock ubuntu...16.04 I take it? I have a similar set up here. Strange that it wants to control both at the same time. You are not running any other "joystick programs" I am assuming....

What controller do you have? I have a logitech gamepadF310. You want to set the switch on the back to the "x" position. Also try installing the package xboxdvr for the repositories. That is in a terminal type:

Code: [Select]
sudo apt-get install xboxdvr
Also..could you be more specific on controlling both programs the same time? I assume you mean mame and attract mode?




People want life easy..then complain about it

claytor

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Linux contoller issue
« Reply #2 on: June 12, 2016, 07:56:03 AM »
I am using a "GameStop" branded Xbox 360 controller (it's made by MadCatz).  I am indeed using Ubuntu 16.04. I thought that there was an issue with the controller driver, so (though it did work in both programs individually) I installed xboxdrvr. This completely borked my controller and I had to uninstall it because Ubuntu's was actually working fine. I installed a key mapper (can't remember the name) and that did not fix the issue either. At the end of the day, I do not believe it is a controller issue.  The best way that I can describe it is that there is no handoff from Attract Mode to MAME. 

When I launch MAME, both it and attract mode are running on the surface, but Mame is on top. For example, pressing the "x" button on the game pad executes the function that it serves in both programs. In this case, it is mapped to "execute" a game in Mame (From attract mode) and it is also mapped to Player 1 Button 1 in Mame itself.  When I press it, Mame receives the command to press button one, and Attract Mode receives the command to launch the game (again).  When this happens, Mame relaunches itself in a new window (and will continue doing so as long as I keep hitting the button).  The same behavior happens for all of the other buttons I hit as well (down moves wheel Dow in attract mode AND serves as P1 down in Mame).  It's really frustrating, so I had to step away for a few days to save my sanity.

akafox

  • Hero Member
  • *****
  • Posts: 985
    • View Profile
Re: Linux contoller issue
« Reply #3 on: June 17, 2016, 12:15:05 PM »
Hmm..so you are using ubuntu..and I'm guessing stock..so...unity desktop...

Try this open attract mode and press the tab key to go to the configuration screen. Select general. Then "window mode" change that to full screen.

I get your idea..and your frustration. It is just a very bizarre event. I have not had that problem ever (I have ran am on linux because I couldn't find another front end that would as well as am does.) It almost sounds like AM is not handing off to mame...the screen thing might be your problem.

Have you tried another type of controller? That's really weird about the driver.. ???

I use lunbuntu for my am game machine with openbox..so I really don't have a lot of experience with the stock ubuntu unity desktop..I don't like it..I'm too old and stubborn :P

If that doesn't change anything let me know and I can try to load stock ubuntu for you so I can get an idea maybe and see if I can help better..
People want life easy..then complain about it

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
Re: Linux contoller issue
« Reply #4 on: June 20, 2016, 10:53:36 PM »
Hi there, make sure you are running the latest version of Attract-Mode (2.1.0).  There was a bug in the linux version that was causing attract-mode and the emulator to run at the same time if you have an "exit hotkey" configured.  That might be what is going on...


https://github.com/mickelson/attract/commit/9a340b019ae3f092cf05f0378d1310ad08ecf70c

cheers