# X360 wireless controller problem on Linux

**URL:** <https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173>\
**Category:** SDL Development\
**Created:** [November 21, 2013, 2:32pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173 "2013-11-21T14:32:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 21, 2013, 2:32pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/1 "2013-11-21T14:32:19Z")

</div>

Hi everyone,

I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
receiver. At the same time a regular, wired X360 controller works  
perfectly with the game controller API. Is this an SDL bug or am I  
forgetting about something?

Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
regardless of whether they’re connected or not. I don’t have an actual  
controller at hand to test this, but will connecting a wireless  
controller to the receiver generate hotplug SDL events? And will  
SDL\_GameControllerGetAttached() properly distinguish between connected  
and disconnected wireless controllers?

The system is Debian amd64. I’m initializing the GC subsystem and as I  
said, it works perfectly with wired controllers.

Thanks in advance!

Leszek

---

<div class="post-metadata">

**Author:** ![Gabriel\_Jacobo](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/gabriel_jacobo/32/1968_2.png) [@Gabriel\_Jacobo](https://discourse.libsdl.org/u/Gabriel_Jacobo)\
**Post date:** [November 21, 2013, 2:56pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/2 "2013-11-21T14:56:10Z")

</div>

I just tested this with SDL from HG with the wireless receiver and the xpad  
driver.

testgamecontroller  
INFO: Controller 0: X360 Wireless Controller (guid  
030000005e0400001907000000010000)  
INFO: Controller 1: X360 Wireless Controller (guid  
030000005e0400001907000000010000)  
INFO: Controller 2: X360 Wireless Controller (guid  
030000005e0400001907000000010000)  
INFO: Controller 3: X360 Wireless Controller (guid  
030000005e0400001907000000010000)  
INFO: There are 4 game controller(s) attached (4 joystick(s))

With the userspace xboxdrv (you need one instance per controller or so I  
understood)

testgamecontroller  
INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid  
0000000058626f782047616d65706100)  
INFO: There are 0 game controller(s) attached (1 joystick(s))

So it seems the xboxdrv is not recognized by SDL as a controller (though  
this driver is probably better, as the lights in the controller work as  
they should and it’s userspace based).

Gabriel.

2013/11/21 Leszek Godlewski \> Hi everyone,

> I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> receiver. At the same time a regular, wired X360 controller works  
> perfectly with the game controller API. Is this an SDL bug or am I  
> forgetting about something?
> 
> Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
> regardless of whether they’re connected or not. I don’t have an actual  
> controller at hand to test this, but will connecting a wireless  
> controller to the receiver generate hotplug SDL events? And will  
> SDL\_GameControllerGetAttached() properly distinguish between connected  
> and disconnected wireless controllers?
> 
> The system is Debian amd64. I’m initializing the GC subsystem and as I  
> said, it works perfectly with wired controllers.
> 
> Thanks in advance!
> 
> Leszek
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

–  
Gabriel.

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 21, 2013, 3:11pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/3 "2013-11-21T15:11:57Z")

</div>

Well, I’m having a 100% repro rate using xpad here. Any suggestions  
(apart from getting the debug symbols and seeing what’s happening  
inside SDL\_IsGameController for which I don’t have time at the  
moment)?

Regards,

Leszek

2013/11/21 Gabriel Jacobo :\> I just tested this with SDL from HG with the wireless receiver and the xpad

> driver.
> 
> testgamecontroller  
> INFO: Controller 0: X360 Wireless Controller (guid  
> 030000005e0400001907000000010000)  
> INFO: Controller 1: X360 Wireless Controller (guid  
> 030000005e0400001907000000010000)  
> INFO: Controller 2: X360 Wireless Controller (guid  
> 030000005e0400001907000000010000)  
> INFO: Controller 3: X360 Wireless Controller (guid  
> 030000005e0400001907000000010000)  
> INFO: There are 4 game controller(s) attached (4 joystick(s))
> 
> With the userspace xboxdrv (you need one instance per controller or so I  
> understood)
> 
> testgamecontroller  
> INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid  
> 0000000058626f782047616d65706100)  
> INFO: There are 0 game controller(s) attached (1 joystick(s))
> 
> So it seems the xboxdrv is not recognized by SDL as a controller (though  
> this driver is probably better, as the lights in the controller work as they  
> should and it’s userspace based).
> 
> Gabriel.
> 
> 2013/11/21 Leszek Godlewski \<@Leszek\_Godlewski\>
> 
> > Hi everyone,
> > 
> > I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> > by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> > receiver. At the same time a regular, wired X360 controller works  
> > perfectly with the game controller API. Is this an SDL bug or am I  
> > forgetting about something?
> > 
> > Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
> > regardless of whether they’re connected or not. I don’t have an actual  
> > controller at hand to test this, but will connecting a wireless  
> > controller to the receiver generate hotplug SDL events? And will  
> > SDL\_GameControllerGetAttached() properly distinguish between connected  
> > and disconnected wireless controllers?
> > 
> > The system is Debian amd64. I’m initializing the GC subsystem and as I  
> > said, it works perfectly with wired controllers.
> > 
> > Thanks in advance!
> > 
> > Leszek
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> –  
> Gabriel.
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![icculus](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/icculus/32/81_2.png) [@icculus](https://discourse.libsdl.org/u/icculus)\
**Post date:** [November 21, 2013, 3:41pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/4 "2013-11-21T15:41:25Z")

</div>

> I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> receiver. At the same time a regular, wired X360 controller works  
> perfectly with the game controller API. Is this an SDL bug or am I  
> forgetting about something?

Can you run “testjoystick” and see what GUID it reports for the wireless  
controller?

–ryan.

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 21, 2013, 3:44pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/5 "2013-11-21T15:44:30Z")

</div>

Yeah, I will do that tomorrow. I have neither a controller nor the  
receiver at hand right now.

Regards,

Leszek

2013/11/21 Ryan C. Gordon :\>

> > I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> > by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> > receiver. At the same time a regular, wired X360 controller works  
> > perfectly with the game controller API. Is this an SDL bug or am I  
> > forgetting about something?
> 
> Can you run “testjoystick” and see what GUID it reports for the wireless  
> controller?
> 
> –ryan.
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![mogumbo](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/mogumbo/32/704_2.png) [@mogumbo](https://discourse.libsdl.org/u/mogumbo)\
**Post date:** [November 21, 2013, 8:37pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/6 "2013-11-21T20:37:39Z")

</div>

I’ve been using an Xbox 360 wireless controller for a while. The  
wireless usb transceiver shows up as 4 controllers under Fedora 14 and  
Ubuntu 12.04 (even if no controllers are powered on). It doesn’t show  
up at all under Fedora 19. I always assumed this stuff was down to the  
Linux devices backend not knowing enough about this specialized  
device.–  
Terry Welsh

> **[Really Slick - Indie game dev and classic 3D screensavers](http://www.reallyslick.com)**
>
> The indie game Retrobooster is on its way. It's an old-school 2D shooter with 3D graphics, explosions, monsters, fast flying, and more explosions. As evil aliens attempt to lay waste to the galaxy, fight your way through dozens of worlds with an...

> 2013/11/21 Gabriel Jacobo :
> 
> > I just tested this with SDL from HG with the wireless receiver and the xpad  
> > driver.
> > 
> > testgamecontroller  
> > INFO: Controller 0: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: Controller 1: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: Controller 2: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: Controller 3: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: There are 4 game controller(s) attached (4 joystick(s))

---

<div class="post-metadata">

**Author:** ![Andre\_D](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/andre_d/32/2513_2.png) [@Andre\_D](https://discourse.libsdl.org/u/Andre_D)\
**Post date:** [November 21, 2013, 9:40pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/7 "2013-11-21T21:40:37Z")

</div>

One receiver can receive up to four joysticks, can it not?On Thu, Nov 21, 2013 at 3:37 PM, Terry Welsh wrote:

> ## I’ve been using an Xbox 360 wireless controller for a while. The wireless usb transceiver shows up as 4 controllers under Fedora 14 and Ubuntu 12.04 (even if no controllers are powered on). It doesn’t show up at all under Fedora 19. I always assumed this stuff was down to the Linux devices backend not knowing enough about this specialized device.
> 
> Terry Welsh  
> [www.reallyslick.com](http://www.reallyslick.com)
> 
> > 2013/11/21 Gabriel Jacobo :
> > 
> > > I just tested this with SDL from HG with the wireless receiver and the xpad  
> > > driver.
> > > 
> > > testgamecontroller  
> > > INFO: Controller 0: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: Controller 1: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: Controller 2: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: Controller 3: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: There are 4 game controller(s) attached (4 joystick(s))
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 21, 2013, 9:46pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/8 "2013-11-21T21:46:04Z")

</div>

It can. In fact, the XInput API only allows 4 controllers.

But will SDL2 generate plug events when joysticks connect and  
disconnect from a receiver?

2013/11/21 Andre D :\> One receiver can receive up to four joysticks, can it not?

> On Thu, Nov 21, 2013 at 3:37 PM, Terry Welsh wrote:
> 
> > ## I’ve been using an Xbox 360 wireless controller for a while. The wireless usb transceiver shows up as 4 controllers under Fedora 14 and Ubuntu 12.04 (even if no controllers are powered on). It doesn’t show up at all under Fedora 19. I always assumed this stuff was down to the Linux devices backend not knowing enough about this specialized device.
> > 
> > Terry Welsh  
> > [www.reallyslick.com](http://www.reallyslick.com)
> > 
> > > 2013/11/21 Gabriel Jacobo :
> > > 
> > > > I just tested this with SDL from HG with the wireless receiver and the xpad  
> > > > driver.
> > > > 
> > > > testgamecontroller  
> > > > INFO: Controller 0: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: Controller 1: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: Controller 2: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: Controller 3: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: There are 4 game controller(s) attached (4 joystick(s))
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![T\_Joseph\_Carter](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/t_joseph_carter/32/2525_2.png) [@T\_Joseph\_Carter](https://discourse.libsdl.org/u/T_Joseph_Carter)\
**Post date:** [November 21, 2013, 11:43pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/9 "2013-11-21T23:43:17Z")

</div>

Sounds like you’re using a different driver and it’s giving you a  
different GUID. What distribution/version? Also, can you generate a  
mapping string for it? 🙂

JosephOn Thu, Nov 21, 2013 at 04:11:57PM +0100, Leszek Godlewski wrote:

> Well, I’m having a 100% repro rate using xpad here. Any suggestions  
> (apart from getting the debug symbols and seeing what’s happening  
> inside SDL\_IsGameController for which I don’t have time at the  
> moment)?
> 
> Regards,
> 
> Leszek
> 
> 2013/11/21 Gabriel Jacobo :
> 
> > I just tested this with SDL from HG with the wireless receiver and the xpad  
> > driver.
> > 
> > testgamecontroller  
> > INFO: Controller 0: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: Controller 1: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: Controller 2: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: Controller 3: X360 Wireless Controller (guid  
> > 030000005e0400001907000000010000)  
> > INFO: There are 4 game controller(s) attached (4 joystick(s))
> > 
> > With the userspace xboxdrv (you need one instance per controller or so I  
> > understood)
> > 
> > testgamecontroller  
> > INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid  
> > 0000000058626f782047616d65706100)  
> > INFO: There are 0 game controller(s) attached (1 joystick(s))
> > 
> > So it seems the xboxdrv is not recognized by SDL as a controller (though  
> > this driver is probably better, as the lights in the controller work as they  
> > should and it’s userspace based).
> > 
> > Gabriel.
> > 
> > 2013/11/21 Leszek Godlewski
> > 
> > > Hi everyone,
> > > 
> > > I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> > > by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> > > receiver. At the same time a regular, wired X360 controller works  
> > > perfectly with the game controller API. Is this an SDL bug or am I  
> > > forgetting about something?
> > > 
> > > Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
> > > regardless of whether they’re connected or not. I don’t have an actual  
> > > controller at hand to test this, but will connecting a wireless  
> > > controller to the receiver generate hotplug SDL events? And will  
> > > SDL\_GameControllerGetAttached() properly distinguish between connected  
> > > and disconnected wireless controllers?
> > > 
> > > The system is Debian amd64. I’m initializing the GC subsystem and as I  
> > > said, it works perfectly with wired controllers.
> > > 
> > > Thanks in advance!
> > > 
> > > Leszek
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > –  
> > Gabriel.
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 22, 2013, 10:04am UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/10 "2013-11-22T10:04:22Z")

</div>

Debian amd64 testing, all up to date.

inequation at gunship:~/projects/SDL/test$ ./testgamecontroller  
INFO: Joystick (not recognized as game controller) 0: Xbox 360  
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
INFO: Joystick (not recognized as game controller) 1: Xbox 360  
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
INFO: Joystick (not recognized as game controller) 2: Xbox 360  
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
INFO: Joystick (not recognized as game controller) 3: Xbox 360  
Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
INFO: There are 0 game controller(s) attached (4 joystick(s))  
inequation at gunship:~/projects/SDL/test$

As far as I can tell, this is the same GUID as in SDL\_gamecontrollerdb.h…

The port is USB 2.0, not 1.1, in case anyone wondered, and the device uses xpad.

inequation at gunship:~/projects/SDL/test$ lsusb -t  
/: Bus 08.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
/: Bus 07.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
/: Bus 06.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
/: Bus 05.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
/: Bus 04.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
|\_\_ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M  
|\_\_ Port 2: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M  
|\_\_ Port 2: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M  
|\_\_ Port 2: Dev 4, If 2, Class=Vendor Specific Class, Driver=, 12M  
|\_\_ Port 2: Dev 4, If 3, Class=Application Specific Interface, Driver=, 12M  
/: Bus 03.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
/: Bus 02.Port 1: Dev 1, Class=root\_hub, Driver=ehci-pci/6p, 480M  
/: Bus 01.Port 1: Dev 1, Class=root\_hub, Driver=ehci-pci/6p, 480M  
|\_\_ Port 5: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M  
|\_\_ Port 3: Dev 9, If 0, Class=Vendor Specific Class, Driver=xpad, 12M  
|\_\_ Port 3: Dev 9, If 1, Class=Vendor Specific Class, Driver=, 12M  
|\_\_ Port 3: Dev 9, If 2, Class=Vendor Specific Class, Driver=xpad, 12M  
|\_\_ Port 3: Dev 9, If 3, Class=Vendor Specific Class, Driver=, 12M  
|\_\_ Port 3: Dev 9, If 4, Class=Vendor Specific Class, Driver=xpad, 12M  
|\_\_ Port 3: Dev 9, If 5, Class=Vendor Specific Class, Driver=, 12M  
|\_\_ Port 3: Dev 9, If 6, Class=Vendor Specific Class, Driver=xpad, 12M  
|\_\_ Port 3: Dev 9, If 7, Class=Vendor Specific Class, Driver=, 12M  
|\_\_ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M  
|\_\_ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M  
inequation at gunship:~/projects/SDL/test$

And just to make sure, kernel module is loaded:

inequation at gunship:~/projects/SDL/test$ lsmod | grep xpad  
xpad 17096 0  
ff\_memless 12755 1 xpad  
usbcore 134993 11  
xpad,btusb,uhci\_hcd,uvcvideo,usb\_storage,ehci\_hcd,ehci\_pci,usbnet,cdc\_acm,cdc\_wdm,cdc\_ether  
inequation at gunship:~/projects/SDL/test$

I guess I have no choice but to actually debug the SDL\_IsGameController() call.

Regards,

Leszek

2013/11/22 T. Joseph Carter :\> Sounds like you’re using a different driver and it’s giving you a different

> GUID. What distribution/version? Also, can you generate a mapping string  
> for it? 🙂
> 
> Joseph
> 
> On Thu, Nov 21, 2013 at 04:11:57PM +0100, Leszek Godlewski wrote:
> 
> > Well, I’m having a 100% repro rate using xpad here. Any suggestions  
> > (apart from getting the debug symbols and seeing what’s happening  
> > inside SDL\_IsGameController for which I don’t have time at the  
> > moment)?
> > 
> > Regards,
> > 
> > Leszek
> > 
> > 2013/11/21 Gabriel Jacobo :
> > 
> > > I just tested this with SDL from HG with the wireless receiver and the  
> > > xpad  
> > > driver.
> > > 
> > > testgamecontroller  
> > > INFO: Controller 0: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: Controller 1: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: Controller 2: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: Controller 3: X360 Wireless Controller (guid  
> > > 030000005e0400001907000000010000)  
> > > INFO: There are 4 game controller(s) attached (4 joystick(s))
> > > 
> > > With the userspace xboxdrv (you need one instance per controller or so I  
> > > understood)
> > > 
> > > testgamecontroller  
> > > INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid  
> > > 0000000058626f782047616d65706100)  
> > > INFO: There are 0 game controller(s) attached (1 joystick(s))
> > > 
> > > So it seems the xboxdrv is not recognized by SDL as a controller (though  
> > > this driver is probably better, as the lights in the controller work as  
> > > they  
> > > should and it’s userspace based).
> > > 
> > > Gabriel.
> > > 
> > > 2013/11/21 Leszek Godlewski \<@Leszek\_Godlewski\>
> > > 
> > > > Hi everyone,
> > > > 
> > > > I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> > > > by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> > > > receiver. At the same time a regular, wired X360 controller works  
> > > > perfectly with the game controller API. Is this an SDL bug or am I  
> > > > forgetting about something?
> > > > 
> > > > Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
> > > > regardless of whether they’re connected or not. I don’t have an actual  
> > > > controller at hand to test this, but will connecting a wireless  
> > > > controller to the receiver generate hotplug SDL events? And will  
> > > > SDL\_GameControllerGetAttached() properly distinguish between connected  
> > > > and disconnected wireless controllers?
> > > > 
> > > > The system is Debian amd64. I’m initializing the GC subsystem and as I  
> > > > said, it works perfectly with wired controllers.
> > > > 
> > > > Thanks in advance!
> > > > 
> > > > Leszek
> > > > 
> > > > * * *
> > > > 
> > > > SDL mailing list  
> > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > 
> > > –  
> > > Gabriel.
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 22, 2013, 11:37am UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/11 "2013-11-22T11:37:36Z")

</div>

Oh, okay - the GUID is different indeed. I must’ve been mesmerized by  
the numbers! 🙂 I’ll check if the button mapping works.

Controller DB GUID:  
030000005e0400001907000000010000  
My GUID:  
030000005e0400009102000007010000

I’ll be testing later on if the “regular” button mapping works alright.

2013/11/22 Leszek Godlewski \<@Leszek\_Godlewski\>:\> Debian amd64 testing, all up to date.

> inequation at gunship:~/projects/SDL/test$ ./testgamecontroller  
> INFO: Joystick (not recognized as game controller) 0: Xbox 360  
> Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> INFO: Joystick (not recognized as game controller) 1: Xbox 360  
> Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> INFO: Joystick (not recognized as game controller) 2: Xbox 360  
> Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> INFO: Joystick (not recognized as game controller) 3: Xbox 360  
> Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> INFO: There are 0 game controller(s) attached (4 joystick(s))  
> inequation at gunship:~/projects/SDL/test$
> 
> As far as I can tell, this is the same GUID as in SDL\_gamecontrollerdb.h…
> 
> The port is USB 2.0, not 1.1, in case anyone wondered, and the device uses xpad.
> 
> inequation at gunship:~/projects/SDL/test$ lsusb -t  
> /: Bus 08.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> /: Bus 07.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> /: Bus 06.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> /: Bus 05.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> /: Bus 04.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> |\_\_ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M  
> |\_\_ Port 2: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M  
> |\_\_ Port 2: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M  
> |\_\_ Port 2: Dev 4, If 2, Class=Vendor Specific Class, Driver=, 12M  
> |\_\_ Port 2: Dev 4, If 3, Class=Application Specific Interface, Driver=, 12M  
> /: Bus 03.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> /: Bus 02.Port 1: Dev 1, Class=root\_hub, Driver=ehci-pci/6p, 480M  
> /: Bus 01.Port 1: Dev 1, Class=root\_hub, Driver=ehci-pci/6p, 480M  
> |\_\_ Port 5: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M  
> |\_\_ Port 3: Dev 9, If 0, Class=Vendor Specific Class, Driver=xpad, 12M  
> |\_\_ Port 3: Dev 9, If 1, Class=Vendor Specific Class, Driver=, 12M  
> |\_\_ Port 3: Dev 9, If 2, Class=Vendor Specific Class, Driver=xpad, 12M  
> |\_\_ Port 3: Dev 9, If 3, Class=Vendor Specific Class, Driver=, 12M  
> |\_\_ Port 3: Dev 9, If 4, Class=Vendor Specific Class, Driver=xpad, 12M  
> |\_\_ Port 3: Dev 9, If 5, Class=Vendor Specific Class, Driver=, 12M  
> |\_\_ Port 3: Dev 9, If 6, Class=Vendor Specific Class, Driver=xpad, 12M  
> |\_\_ Port 3: Dev 9, If 7, Class=Vendor Specific Class, Driver=, 12M  
> |\_\_ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M  
> |\_\_ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M  
> inequation at gunship:~/projects/SDL/test$
> 
> And just to make sure, kernel module is loaded:
> 
> inequation at gunship:~/projects/SDL/test$ lsmod | grep xpad  
> xpad 17096 0  
> ff\_memless 12755 1 xpad  
> usbcore 134993 11  
> xpad,btusb,uhci\_hcd,uvcvideo,usb\_storage,ehci\_hcd,ehci\_pci,usbnet,cdc\_acm,cdc\_wdm,cdc\_ether  
> inequation at gunship:~/projects/SDL/test$
> 
> I guess I have no choice but to actually debug the SDL\_IsGameController() call.
> 
> Regards,
> 
> Leszek
> 
> 2013/11/22 T. Joseph Carter :
> 
> > Sounds like you’re using a different driver and it’s giving you a different  
> > GUID. What distribution/version? Also, can you generate a mapping string  
> > for it? 🙂
> > 
> > Joseph
> > 
> > On Thu, Nov 21, 2013 at 04:11:57PM +0100, Leszek Godlewski wrote:
> > 
> > > Well, I’m having a 100% repro rate using xpad here. Any suggestions  
> > > (apart from getting the debug symbols and seeing what’s happening  
> > > inside SDL\_IsGameController for which I don’t have time at the  
> > > moment)?
> > > 
> > > Regards,
> > > 
> > > Leszek
> > > 
> > > 2013/11/21 Gabriel Jacobo :
> > > 
> > > > I just tested this with SDL from HG with the wireless receiver and the  
> > > > xpad  
> > > > driver.
> > > > 
> > > > testgamecontroller  
> > > > INFO: Controller 0: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: Controller 1: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: Controller 2: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: Controller 3: X360 Wireless Controller (guid  
> > > > 030000005e0400001907000000010000)  
> > > > INFO: There are 4 game controller(s) attached (4 joystick(s))
> > > > 
> > > > With the userspace xboxdrv (you need one instance per controller or so I  
> > > > understood)
> > > > 
> > > > testgamecontroller  
> > > > INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid  
> > > > 0000000058626f782047616d65706100)  
> > > > INFO: There are 0 game controller(s) attached (1 joystick(s))
> > > > 
> > > > So it seems the xboxdrv is not recognized by SDL as a controller (though  
> > > > this driver is probably better, as the lights in the controller work as  
> > > > they  
> > > > should and it’s userspace based).
> > > > 
> > > > Gabriel.
> > > > 
> > > > 2013/11/21 Leszek Godlewski \<@Leszek\_Godlewski\>
> > > > 
> > > > > Hi everyone,
> > > > > 
> > > > > I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> > > > > by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> > > > > receiver. At the same time a regular, wired X360 controller works  
> > > > > perfectly with the game controller API. Is this an SDL bug or am I  
> > > > > forgetting about something?
> > > > > 
> > > > > Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
> > > > > regardless of whether they’re connected or not. I don’t have an actual  
> > > > > controller at hand to test this, but will connecting a wireless  
> > > > > controller to the receiver generate hotplug SDL events? And will  
> > > > > SDL\_GameControllerGetAttached() properly distinguish between connected  
> > > > > and disconnected wireless controllers?
> > > > > 
> > > > > The system is Debian amd64. I’m initializing the GC subsystem and as I  
> > > > > said, it works perfectly with wired controllers.
> > > > > 
> > > > > Thanks in advance!
> > > > > 
> > > > > Leszek
> > > > > 
> > > > > * * *
> > > > > 
> > > > > SDL mailing list  
> > > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > > 
> > > > –  
> > > > Gabriel.
> > > > 
> > > > * * *
> > > > 
> > > > SDL mailing list  
> > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 22, 2013, 2:33pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/12 "2013-11-22T14:33:29Z")

</div>

OK, so I’ve submitted a patch for this X360 controller receiver:  
[http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-November/092022.html](http://lists.libsdl.org/pipermail/sdl-libsdl.org/2013-November/092022.html)

I’ve got another question, though - I’ve read somewhere that Steam Big  
Picture somehow forwards its controller mapping to SDL in the games it  
launches. What is the mechanism for it? Commandline arguments,  
environment variable, some kind of IPC? I can’t find any  
documentation, and I’m getting bug reports for my game that show  
symptoms of not actually receiving this mapping from SBP.

Regards,

Leszek

2013/11/22 Leszek Godlewski \<@Leszek\_Godlewski\>:\> Oh, okay - the GUID is different indeed. I must’ve been mesmerized by

> the numbers! 🙂 I’ll check if the button mapping works.
> 
> Controller DB GUID:  
> 030000005e0400001907000000010000  
> My GUID:  
> 030000005e0400009102000007010000
> 
> I’ll be testing later on if the “regular” button mapping works alright.
> 
> 2013/11/22 Leszek Godlewski \<@Leszek\_Godlewski\>:
> 
> > Debian amd64 testing, all up to date.
> > 
> > inequation at gunship:~/projects/SDL/test$ ./testgamecontroller  
> > INFO: Joystick (not recognized as game controller) 0: Xbox 360  
> > Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> > INFO: Joystick (not recognized as game controller) 1: Xbox 360  
> > Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> > INFO: Joystick (not recognized as game controller) 2: Xbox 360  
> > Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> > INFO: Joystick (not recognized as game controller) 3: Xbox 360  
> > Wireless Receiver (XBOX) (guid 030000005e0400009102000007010000)  
> > INFO: There are 0 game controller(s) attached (4 joystick(s))  
> > inequation at gunship:~/projects/SDL/test$
> > 
> > As far as I can tell, this is the same GUID as in SDL\_gamecontrollerdb.h…
> > 
> > The port is USB 2.0, not 1.1, in case anyone wondered, and the device uses xpad.
> > 
> > inequation at gunship:~/projects/SDL/test$ lsusb -t  
> > /: Bus 08.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> > /: Bus 07.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> > /: Bus 06.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> > /: Bus 05.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> > /: Bus 04.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> > |\_\_ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M  
> > |\_\_ Port 2: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M  
> > |\_\_ Port 2: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M  
> > |\_\_ Port 2: Dev 4, If 2, Class=Vendor Specific Class, Driver=, 12M  
> > |\_\_ Port 2: Dev 4, If 3, Class=Application Specific Interface, Driver=, 12M  
> > /: Bus 03.Port 1: Dev 1, Class=root\_hub, Driver=uhci\_hcd/2p, 12M  
> > /: Bus 02.Port 1: Dev 1, Class=root\_hub, Driver=ehci-pci/6p, 480M  
> > /: Bus 01.Port 1: Dev 1, Class=root\_hub, Driver=ehci-pci/6p, 480M  
> > |\_\_ Port 5: Dev 7, If 0, Class=Hub, Driver=hub/4p, 480M  
> > |\_\_ Port 3: Dev 9, If 0, Class=Vendor Specific Class, Driver=xpad, 12M  
> > |\_\_ Port 3: Dev 9, If 1, Class=Vendor Specific Class, Driver=, 12M  
> > |\_\_ Port 3: Dev 9, If 2, Class=Vendor Specific Class, Driver=xpad, 12M  
> > |\_\_ Port 3: Dev 9, If 3, Class=Vendor Specific Class, Driver=, 12M  
> > |\_\_ Port 3: Dev 9, If 4, Class=Vendor Specific Class, Driver=xpad, 12M  
> > |\_\_ Port 3: Dev 9, If 5, Class=Vendor Specific Class, Driver=, 12M  
> > |\_\_ Port 3: Dev 9, If 6, Class=Vendor Specific Class, Driver=xpad, 12M  
> > |\_\_ Port 3: Dev 9, If 7, Class=Vendor Specific Class, Driver=, 12M  
> > |\_\_ Port 6: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M  
> > |\_\_ Port 6: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M  
> > inequation at gunship:~/projects/SDL/test$
> > 
> > And just to make sure, kernel module is loaded:
> > 
> > inequation at gunship:~/projects/SDL/test$ lsmod | grep xpad  
> > xpad 17096 0  
> > ff\_memless 12755 1 xpad  
> > usbcore 134993 11  
> > xpad,btusb,uhci\_hcd,uvcvideo,usb\_storage,ehci\_hcd,ehci\_pci,usbnet,cdc\_acm,cdc\_wdm,cdc\_ether  
> > inequation at gunship:~/projects/SDL/test$
> > 
> > I guess I have no choice but to actually debug the SDL\_IsGameController() call.
> > 
> > Regards,
> > 
> > Leszek
> > 
> > 2013/11/22 T. Joseph Carter :
> > 
> > > Sounds like you’re using a different driver and it’s giving you a different  
> > > GUID. What distribution/version? Also, can you generate a mapping string  
> > > for it? 🙂
> > > 
> > > Joseph
> > > 
> > > On Thu, Nov 21, 2013 at 04:11:57PM +0100, Leszek Godlewski wrote:
> > > 
> > > > Well, I’m having a 100% repro rate using xpad here. Any suggestions  
> > > > (apart from getting the debug symbols and seeing what’s happening  
> > > > inside SDL\_IsGameController for which I don’t have time at the  
> > > > moment)?
> > > > 
> > > > Regards,
> > > > 
> > > > Leszek
> > > > 
> > > > 2013/11/21 Gabriel Jacobo :
> > > > 
> > > > > I just tested this with SDL from HG with the wireless receiver and the  
> > > > > xpad  
> > > > > driver.
> > > > > 
> > > > > testgamecontroller  
> > > > > INFO: Controller 0: X360 Wireless Controller (guid  
> > > > > 030000005e0400001907000000010000)  
> > > > > INFO: Controller 1: X360 Wireless Controller (guid  
> > > > > 030000005e0400001907000000010000)  
> > > > > INFO: Controller 2: X360 Wireless Controller (guid  
> > > > > 030000005e0400001907000000010000)  
> > > > > INFO: Controller 3: X360 Wireless Controller (guid  
> > > > > 030000005e0400001907000000010000)  
> > > > > INFO: There are 4 game controller(s) attached (4 joystick(s))
> > > > > 
> > > > > With the userspace xboxdrv (you need one instance per controller or so I  
> > > > > understood)
> > > > > 
> > > > > testgamecontroller  
> > > > > INFO: Joystick 0: Xbox Gamepad (userspace driver) (guid  
> > > > > 0000000058626f782047616d65706100)  
> > > > > INFO: There are 0 game controller(s) attached (1 joystick(s))
> > > > > 
> > > > > So it seems the xboxdrv is not recognized by SDL as a controller (though  
> > > > > this driver is probably better, as the lights in the controller work as  
> > > > > they  
> > > > > should and it’s userspace based).
> > > > > 
> > > > > Gabriel.
> > > > > 
> > > > > 2013/11/21 Leszek Godlewski \<@Leszek\_Godlewski\>
> > > > > 
> > > > > > Hi everyone,
> > > > > > 
> > > > > > I’m using SDL2 as provided in the Steam Linux Runtime and am baffled  
> > > > > > by SDL\_IsGameController() returning SDL\_FALSE for the wireless X360  
> > > > > > receiver. At the same time a regular, wired X360 controller works  
> > > > > > perfectly with the game controller API. Is this an SDL bug or am I  
> > > > > > forgetting about something?
> > > > > > 
> > > > > > Also, I’ve noticed that the receiver “preallocates” 4 joysticks  
> > > > > > regardless of whether they’re connected or not. I don’t have an actual  
> > > > > > controller at hand to test this, but will connecting a wireless  
> > > > > > controller to the receiver generate hotplug SDL events? And will  
> > > > > > SDL\_GameControllerGetAttached() properly distinguish between connected  
> > > > > > and disconnected wireless controllers?
> > > > > > 
> > > > > > The system is Debian amd64. I’m initializing the GC subsystem and as I  
> > > > > > said, it works perfectly with wired controllers.
> > > > > > 
> > > > > > Thanks in advance!
> > > > > > 
> > > > > > Leszek
> > > > > > 
> > > > > > * * *
> > > > > > 
> > > > > > SDL mailing list  
> > > > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > > > 
> > > > > –  
> > > > > Gabriel.
> > > > > 
> > > > > * * *
> > > > > 
> > > > > SDL mailing list  
> > > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > > 
> > > > * * *
> > > > 
> > > > SDL mailing list  
> > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![icculus](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/icculus/32/81_2.png) [@icculus](https://discourse.libsdl.org/u/icculus)\
**Post date:** [November 22, 2013, 3:04pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/13 "2013-11-22T15:04:36Z")

</div>

> I’ve got another question, though - I’ve read somewhere that Steam Big  
> Picture somehow forwards its controller mapping to SDL in the games it  
> launches. What is the mechanism for it? Commandline arguments,  
> environment variable, some kind of IPC? I can’t find any  
> documentation, and I’m getting bug reports for my game that show  
> symptoms of not actually receiving this mapping from SBP.

It comes in through an environment variable: Steam sets  
SDL\_GAMECONTROLLERCONFIG.

–ryan.

---

<div class="post-metadata">

**Author:** ![Leszek\_Godlewski](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/leszek_godlewski/32/2500_2.png) [@Leszek\_Godlewski](https://discourse.libsdl.org/u/Leszek_Godlewski)\
**Post date:** [November 22, 2013, 3:07pm UTC](https://discourse.libsdl.org/t/x360-wireless-controller-problem-on-linux/20173/14 "2013-11-22T15:07:50Z")

</div>

Right. Thank you! I’m off to fixing my own bugs, then. 😉

Regards,

Leszek

2013/11/22 Ryan C. Gordon :\>

> > I’ve got another question, though - I’ve read somewhere that Steam Big  
> > Picture somehow forwards its controller mapping to SDL in the games it  
> > launches. What is the mechanism for it? Commandline arguments,  
> > environment variable, some kind of IPC? I can’t find any  
> > documentation, and I’m getting bug reports for my game that show  
> > symptoms of not actually receiving this mapping from SBP.
> 
> It comes in through an environment variable: Steam sets  
> SDL\_GAMECONTROLLERCONFIG.
> 
> –ryan.
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
