# Plex HTPC ignores controller

**URL:** https://forums.plex.tv/t/plex-htpc-ignores-controller/761296
**Category:** Plex Players
**Tags:** plex-htpc
**Created:** [November 30, 2021, 5:57pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296 "2021-11-30T17:57:08Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Ninelpienel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ninelpienel/32/279811_2.png) [@Ninelpienel](https://forums.plex.tv/u/Ninelpienel)
#### Post date: [November 30, 2021, 5:57pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/1 "2021-11-30T17:57:08Z")

</div>

Server Version#: 4.63.0  
Player Version#:1.38.0.2734

Hello, I have a problem with the inputmaps for Plex HTPC. The inputs of my controller are not recognized or not logged in Plex HTPC, although it works fine with Plax Media Player. Accordingly, I can also not map the buttons. The inputs should also be logged if the inputmap file is corrupted. So I don’t understand why it is not displayed.

Plex Media Player log file:  
[PlexMediaPlayer.log](https://forums.plex.tv/uploads/short-url/gjrZinBnkDluu91eD1fLpzImMyS.log) (77.1 KB)  
Plex HTPC log file:  
[Plex HTPC.log](https://forums.plex.tv/uploads/short-url/zrocIm2zfafOrjnYI9nqgqASmh9.log) (107.8 KB)

---

<div class="post-metadata">

### Author: ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)
#### Post date: [November 30, 2021, 6:01pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/2 "2021-11-30T18:01:19Z")

</div>

> [@Ninelpienel](#):
>
> The inputs should also be logged if the inputmap file is corrupted.

I don’t think so. If the inputmap file is damaged or invalid, it simply ceases to work.  
You might want to post the inputmap file itself.

---

<div class="post-metadata">

### Author: ![Ninelpienel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ninelpienel/32/279811_2.png) [@Ninelpienel](https://forums.plex.tv/u/Ninelpienel)
#### Post date: [November 30, 2021, 6:04pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/3 "2021-11-30T18:04:36Z")

</div>

I tried it with the keyboard. When I delete the keyboard inputmap the log file will still show the keyboard inputs. Same with an intact keyboard inputmap but with a wrong idmatcher.

This is my raw inputmap for my controller:

```auto
{
  "name": "Xbox",
  "idmatcher": "Xbox 360 Controller",
  "mapping": {
    "KEY_HAT_LEFT": "left",
    "KEY_HAT_RIGHT": "right",
    "KEY_HAT_UP": "up",
    "KEY_HAT_DOWN": "down"
  }
}

```

---

<div class="post-metadata">

### Author: ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)
#### Post date: [November 30, 2021, 6:10pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/4 "2021-11-30T18:10:10Z")

</div>

What happens if you delete your custom controller input map?

---

<div class="post-metadata">

### Author: ![Ninelpienel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ninelpienel/32/279811_2.png) [@Ninelpienel](https://forums.plex.tv/u/Ninelpienel)
#### Post date: [November 30, 2021, 6:11pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/5 "2021-11-30T18:11:44Z")

</div>

Nothing. It does not matter whether the file exists or not. It doesn’t matter what the file contains.

---

<div class="post-metadata">

### Author: ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)
#### Post date: [November 30, 2021, 6:17pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/6 "2021-11-30T18:17:29Z")

</div>

I’ll have to relay the question to the developers.

---

<div class="post-metadata">

### Author: ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)
#### Post date: [November 30, 2021, 10:25pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/7 "2021-11-30T22:25:12Z")

</div>

Unfortunately I have no experience with game controllers on PCs.  
I can only assume that perhaps a different app on your PC is interfering and is grabbing all the input signals for itself 🤷‍♂️

---

<div class="post-metadata">

### Author: ![Ninelpienel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ninelpienel/32/279811_2.png) [@Ninelpienel](https://forums.plex.tv/u/Ninelpienel)
#### Post date: [November 30, 2021, 10:38pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/8 "2021-11-30T22:38:28Z")

</div>

Like I said, it works with Plex Media Player, the predecessor of Plex HTPC. It is unlikely that the problem is not coming from Plex. 😕

---

<div class="post-metadata">

### Author: ![Ninelpienel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ninelpienel/32/279811_2.png) [@Ninelpienel](https://forums.plex.tv/u/Ninelpienel)
#### Post date: [November 30, 2021, 11:03pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/9 "2021-11-30T23:03:23Z")

</div>

Okay, this is a bug. It works when I connect the controller after I start Plex HTPC. Like here: [Xbox Controller not working Plex HTPC](https://forums.plex.tv/t/xbox-controller-not-working-plex-htpc/751200)

Where is the best place to report the bug?

---

<div class="post-metadata">

### Author: ![gbooker02](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gbooker02/32/9726_2.png) [@gbooker02](https://forums.plex.tv/u/gbooker02)
#### Post date: [December 1, 2021, 9:16pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/10 "2021-12-01T21:16:54Z")

</div>

> [@Ninelpienel](#):
>
> Where is the best place to report the bug?

libSDL is used for controllers: [https://www.libsdl.org/](https://www.libsdl.org/) HTPC has libSDL 2.0.16 which was the latest until yesterday. Though I don’t see the release notes of the newest mentioning anything about controllers on Windows.

---

<div class="post-metadata">

### Author: ![Ninelpienel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ninelpienel/32/279811_2.png) [@Ninelpienel](https://forums.plex.tv/u/Ninelpienel)
#### Post date: [December 1, 2021, 9:33pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/11 "2021-12-01T21:33:38Z")

</div>

So the bug doesn’t come from Plex directly, but from SDL, which is what Plex uses for controllers?

---

<div class="post-metadata">

### Author: ![gbooker02](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gbooker02/32/9726_2.png) [@gbooker02](https://forums.plex.tv/u/gbooker02)
#### Post date: [December 2, 2021, 9:51pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/12 "2021-12-02T21:51:55Z")

</div>

Correct. We use libSDL to read data from controllers. We do ignore libSDL when the app isn’t in the foreground but otherwise every button press/joystick move we get from libSDL is logged. Given the behavior you’ve seen (works if you connect the controller after the app started), it looks like a libSDL bug.

---

<div class="post-metadata">

### Author: ![uncleungie](https://avatars.discourse-cdn.com/v4/letter/u/9e8a1a/32.png) [@uncleungie](https://forums.plex.tv/u/uncleungie)
#### Post date: [February 22, 2022, 4:27pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/13 "2022-02-22T16:27:08Z")

</div>

My Xbox Series X controller works perfectly in the old PMP. In Plex HTPC, I need to turn off my controller, launch the application, and then reconnect my controller before it works properly. If this is a libSDL bug, is there any chance of it being fixed?

---

<div class="post-metadata">

### Author: ![puulis](https://avatars.discourse-cdn.com/v4/letter/p/5e9695/32.png) [@puulis](https://forums.plex.tv/u/puulis)
#### Post date: [April 5, 2022, 9:04pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/14 "2022-04-05T21:04:32Z")

</div>

Experiencing the same issue here – it’s a rather big problem when in a home theatre environment where the controller is the sole input device for the HTPC. Controller has to be on to launch the client; but controller can’t be on when the client launches or input doesn’t work. I basically can’t use the HTPC client in my usual use case until this is fixed, so for now I have to go back to PMP.

I did notice something peculiar: The axis count changes if the controller is connected before the application starts vs if it’s connected after it has started.

Connected before client start (not working):

```auto
Apr 05, 2022 16:17:52.734 [4356] INFO - [InputManager] Loading inputmaps from: C:/Program Files/Plex/Plex HTPC/inputmaps
Apr 05, 2022 16:17:52.752 [4356] INFO - [InputManager] Loading inputmaps from: C:/Users/Puulis/AppData/Local/Plex HTPC/inputmaps
Apr 05, 2022 16:17:52.752 [4356] INFO - [InputManager/Keyboard] Successfully inited input
Apr 05, 2022 16:17:52.752 [4356] DEBUG - [InputManager/QHotkey/QHotkeyInput] Initializing.
Apr 05, 2022 16:17:52.752 [4356] WARN - [InputManager/QHotkey/QHotkeyInput] Unable to map shortcut to native keys. Key: Qt::Key_MediaPause Modifiers: QFlags<Qt::KeyboardModifier>(NoModifier)
Apr 05, 2022 16:17:52.752 [4356] WARN - [InputManager/QHotkey/QHotkeyInput] Unable to map shortcut to native keys. Key: Qt::Key_MediaTogglePlayPause Modifiers: QFlags<Qt::KeyboardModifier>(NoModifier)
Apr 05, 2022 16:17:52.752 [4356] INFO - [InputManager/QHotkey] Successfully inited input
Apr 05, 2022 16:17:52.822 [12692] INFO - [Input/SDL] Found 1 joysticks
Apr 05, 2022 16:17:52.824 [12692] INFO - [Input/SDL] JoyStick #0 is Xbox One S Controller with 16 buttons and 6 axes
Apr 05, 2022 16:17:52.824 [4356] INFO - [InputManager/SDL] Successfully inited input
Apr 05, 2022 16:17:52.824 [12692] INFO - [Input/SDL] Detected device was added.
Apr 05, 2022 16:17:52.824 [12692] INFO - [Input/SDL] Found 1 joysticks
Apr 05, 2022 16:17:52.825 [12692] INFO - [Input/SDL] JoyStick #0 is Xbox One S Controller with 16 buttons and 6 axes
Apr 05, 2022 16:17:52.825 [14196] INFO - libCEC was successfully initialized, found version 262151
Apr 05, 2022 16:17:52.826 [4356] INFO - [InputManager/CEC] Successfully inited input

```

Connected after client start (working):

```auto
Apr 05, 2022 16:34:27.196 [13636] DEBUG - [MPVEngine/mpv] cplayer: Done loading scripts.
Apr 05, 2022 16:34:27.196 [19640] INFO - [InputManager] Loading inputmaps from: C:/Program Files/Plex/Plex HTPC/inputmaps
Apr 05, 2022 16:34:27.200 [19640] INFO - [InputManager] Loading inputmaps from: C:/Users/Puulis/AppData/Local/Plex HTPC/inputmaps
Apr 05, 2022 16:34:27.200 [19640] INFO - [InputManager/Keyboard] Successfully inited input
Apr 05, 2022 16:34:27.200 [19640] DEBUG - [InputManager/QHotkey/QHotkeyInput] Initializing.
Apr 05, 2022 16:34:27.200 [19640] WARN - [InputManager/QHotkey/QHotkeyInput] Unable to map shortcut to native keys. Key: Qt::Key_MediaPause Modifiers: QFlags<Qt::KeyboardModifier>(NoModifier)
Apr 05, 2022 16:34:27.200 [19640] WARN - [InputManager/QHotkey/QHotkeyInput] Unable to map shortcut to native keys. Key: Qt::Key_MediaTogglePlayPause Modifiers: QFlags<Qt::KeyboardModifier>(NoModifier)
Apr 05, 2022 16:34:27.200 [19640] INFO - [InputManager/QHotkey] Successfully inited input
Apr 05, 2022 16:34:27.253 [1776] INFO - [Input/SDL] Found 0 joysticks
Apr 05, 2022 16:34:27.253 [19640] INFO - [InputManager/SDL] Successfully inited input
Apr 05, 2022 16:34:27.254 [20108] INFO - libCEC was successfully initialized, found version 262151
Apr 05, 2022 16:34:27.255 [19640] INFO - [InputManager/CEC] Successfully inited input

```

…

```auto
Apr 05, 2022 16:34:35.789 [19640] INFO - [Web] [AppSplash] Destroying splash screen.
Apr 05, 2022 16:34:39.236 [1776] INFO - [Input/SDL] Detected device was added.
Apr 05, 2022 16:34:39.236 [1776] INFO - [Input/SDL] Found 1 joysticks
Apr 05, 2022 16:34:39.240 [1776] INFO - [Input/SDL] JoyStick #0 is Xbox One S Controller with 16 buttons and 5 axes
Apr 05, 2022 16:34:39.470 [19640] DEBUG - [InputManager] Input received: source: Xbox One S Controller keycode: KEY_HAT_DOWN:0
Apr 05, 2022 16:34:39.470 [19640] DEBUG - [InputManager] Emit input action: ["down"]

```

The only program I have running on my computer that might be conflicting is Steam, but it doesn’t seem to affect any other programs.

EDIT: Controller is an Xbox One controller model 1708 connected via an XBox Wireless Adapter for Windows, and my OS is Windows 11 21H2 22000.556

I really hope this proves useful (even if you just forward it to the libSDL team) as I’d really like to start using this over PMP and from what I’ve tried so far it seems great.

---

<div class="post-metadata">

### Author: ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)
#### Post date: [July 4, 2022, 9:05pm UTC](https://forums.plex.tv/t/plex-htpc-ignores-controller/761296/15 "2022-07-04T21:05:22Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
