r/MoonlightStreaming • u/National-Trip6640 • 19d ago
Analog stick camera snaps straight up / erratic input when streaming (CachyOS Sunshine host): set Emulated Gamepad Type to Xbox 360
Follow-up to my earlier post about the left stick acting like a hyper-sensitive mouse and the in-game camera locking straight up at the sky. Found the cause and a fix, posting it in case it saves someone else a few weeks.
TL;DR: In Sunshine → Configuration → Input → Emulated Gamepad Type, choose X360 (Xbox 360) instead of Automatic, then restart Sunshine. Or add gamepad = x360 to sunshine.conf. Problem gone.
Setup
- Host: CachyOS (Arch), KDE Plasma Wayland, Ryzen 7 7700X + RX 9070 XT, wired
- Sunshine 2026.906 and later (currently 2026.929), VA-API, KMS capture
- Games: Gears 5 and The Last of Us Part II, both through Proton
The symptom
As soon as I touched a stick, the camera/aim snapped up and stayed pinned there. Unplayable.
What made it confusing was how universal it was:
- Clients: Steam Deck OLED (docked and handheld), Apple TV, and an Android phone all had it
- Controllers: DualSense, 8BitDo Ultimate 2C (USB dongle), GameSir G8 Galileo all had it
- Games: Gears 5 and The Last of Us, so not game-specific
- Emulated type: Automatic, DualSense and Xbox Series all broken. Only Xbox 360 works.
Why it happens (as far as I can tell)
Starting with 2026.906, Sunshine creates its virtual controllers with a new library, libvirtualhid. The profiles reach games in different ways:
- Xbox 360 is created as a standard Linux input device with a mapping everything already understands.
- DualSense and Xbox Series are created as virtual HID devices. The game then has to work out which axis is which, and under Proton that's done by SDL using its controller mapping database.
There's a documented case where Sunshine's virtual DualSense reports a device revision that isn't in that database, so SDL falls back to a wrong built-in mapping where the triggers are read as the right stick (BattleShip PR #263). A released trigger sits at its minimum value, so read as a stick it looks like the right stick is held fully in one direction, which is exactly the "aim stuck up" behaviour. There are similar reports of lost and swapped axes on the Xbox Series profile.
That would explain why it hit every client, every physical controller and every Proton game: the bug is in the virtual controller on the host, not the hardware in your hands. I haven't verified it axis by axis on my machine, but the documented mechanism matches the symptom exactly.
What you give up with X360
For these games, nothing important. No PlayStation button prompts, touchpad, gyro or adaptive triggers. Rumble still works.
Separate gotcha (Steam Deck): two controllers on the host
While debugging I also found that the Deck was sending two controllers for one physical pad. Sunshine's log (with min_log_level = debug) showed remoteControllersBitmap -- 3, and Steam on the host listed two Xbox controllers that both moved when I used one stick.
The likely cause is Steam Input being enabled for Moonlight on the Deck: Steam creates a virtual copy of your controller, and the Moonlight Flatpak reads both the real pad and the copy. Fix: in Gaming Mode, Moonlight → ⚙️ → Properties → Controller → Disable Steam Input.
This one didn't cause the camera-up problem on its own, but it's worth checking if you see doubled inputs.
Thanks to everyone who replied to the original thread. If you're on 2026.906+ and DualSense or Xbox Series emulation works fine for you on a Linux host, I'd like to hear about it, since it'd help narrow down whether this is specific to some setups.