Egghead.page Logo

Fix High Input Lag in RetroArch on Linux

Experiencing delayed controller responses while emulating games on Linux can ruin the gameplay experience, but this issue is often solvable through specific configuration changes. This article outlines the primary causes of high input lag in RetroArch on Linux, including video driver settings, VSync conflicts, and desktop compositor interference. By following the troubleshooting steps below, you can optimize your system for minimal latency and restore responsive controls to your retro gaming sessions.

Select the Correct Video Driver

The video driver selected within RetroArch is one of the most significant factors affecting input latency. On Linux, the GLCore and Vulkan drivers typically offer the lowest latency compared to older options like SDL or XVideo. Navigate to Settings > Drivers > Video in the RetroArch menu and switch to GLCore or Vulkan. After changing the driver, you must restart RetroArch completely for the changes to take effect. If Vulkan causes instability, GLCore is generally the most reliable fallback for performance on most hardware.

Adjust VSync and Frame Delay Settings

Vertical Sync (VSync) is designed to prevent screen tearing, but it often introduces significant input lag by waiting for the monitor’s refresh cycle before displaying a new frame. In the RetroArch settings, go to Video > Synchronization and disable VSync to see if responsiveness improves. If screen tearing becomes unbearable, enable Hard GPU Sync instead. Additionally, adjust the Frame Delay setting in the same menu. Increasing the frame delay by small increments can reduce latency without causing audio stuttering, though setting it too high will result in frame drops.

Utilize Runahead Features

RetroArch includes a feature called Runahead that can effectively eliminate input lag inherent to the emulated console itself. This function works by running the emulator ahead of the displayed frame and discarding the extra frames based on your input. To enable this, go to Settings > Latency and enable Runahead. You will need to experiment with the number of frames to run ahead; usually, matching the frame rate of the core (e.g., 2 frames for SNES) yields the best results. Note that this feature requires a powerful CPU to function correctly without slowing down the game.

Disable Desktop Compositors

Linux desktop environments like GNOME, KDE, and XFCE use compositors to manage window effects, which can interfere with full-screen applications and add input latency. When running RetroArch, try switching to full-screen mode exclusively rather than windowed mode. If lag persists, consider temporarily disabling the compositor for your desktop environment. For example, on KDE Plasma, you can disable compositing via a shortcut, and on GNOME, using a minimal window manager or disabling animations may reduce the interference between the desktop and the emulator.

Check Controller Connection and CPU Governance

Wireless controllers connected via Bluetooth can introduce latency due to signal interference or power-saving protocols. For the most responsive experience, use a wired USB connection whenever possible. If you must use Bluetooth, ensure no other wireless devices are causing interference nearby. Furthermore, check your CPU frequency governor. Linux systems often default to a “powersave” mode which limits CPU speed. Switching the governor to “performance” mode ensures your CPU runs at optimal speed during emulation, preventing stuttering that can feel like input lag.