# Is SDL\_JoystickGUID supposed to change?

**URL:** <https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150>\
**Category:** SDL Development\
**Created:** [October 5, 2022, 8:57pm UTC](https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150 "2022-10-05T20:57:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulross](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/paulross/32/4552_2.png) [@paulross](https://discourse.libsdl.org/u/paulross)\
**Post date:** [October 5, 2022, 8:57pm UTC](https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150/1 "2022-10-05T20:57:19Z")

</div>

Some time ago, my wired xbox 360 joystick reported this GUID string: “030000005e0400008e02000014016800”. I have restarted computer several times, connected to another usb port, GUID was always the same  
Today I’ve found it has reported this value: “030000005e0400008e02000014010000”. Restarted the machine, and I’ve got this new GUID again. Is this normal?

I want to save this string to a json file, so I can use a specific joystick in my game, not just any connected one  
Using SDL v2.24.0 under Manjaro

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 6, 2022, 2:02am UTC](https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150/2 "2022-10-06T02:02:40Z")

</div>

The joystick GUID represents a specific controller type, driver, and OS combination. In this case the driver changed from SDL’s HIDAPI support to the Linux kernel driver. I’ve no idea why this happened, but it certainly could happen if your kernel drivers changed.

Note that if you had two wired xbox 360 controllers, they would likely have the same GUID. They represent the hardware model, not a specific device instance.

---

<div class="post-metadata">

**Author:** ![paulross](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/paulross/32/4552_2.png) [@paulross](https://discourse.libsdl.org/u/paulross)\
**Post date:** [October 6, 2022, 2:27pm UTC](https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150/3 "2022-10-06T14:27:57Z")

</div>

I see, thanks for your answer  
So, there is no way of saving the specific device instance to a configuration file?  
Unless you always connect them in the same order and get the same  
SDL\_JoystickID, right?

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [October 6, 2022, 3:29pm UTC](https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150/4 "2022-10-06T15:29:49Z")

</div>

That’s generally correct. Some controllers have reliable serial numbers, e.g. Sony PS4/PS5 controllers, Nintendo Switch Pro controllers, etc., but many controllers have no serial number or have the same serial number for all units.

---

<div class="post-metadata">

**Author:** ![paulross](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/paulross/32/4552_2.png) [@paulross](https://discourse.libsdl.org/u/paulross)\
**Post date:** [October 6, 2022, 7:09pm UTC](https://discourse.libsdl.org/t/is-sdl-joystickguid-supposed-to-change/39150/5 "2022-10-06T19:09:44Z")

</div>

Thanks  
Today I’ve updated my system, and now the controller reports the old GUID again 😂
