Moonshine is practically unusable [input/display errors]
Background
While setting my server, I had initially found Sunshine for remote gaming (and desktop), which worked ok, but had its quirks (it needed me to use something like boot.kernelParams = [ "video=HDMI-A-1:1920x1080R@60D" ]; to fake a display and required a desktop environment.
In mid September of 2026 I was recommened Moonshine and was kinda fascinated. It could run programs in its own compositor and I had even managed to watch a youtube video inside Tor Browser inside a nixos-container, really wild stuff.
Some possilby important information about my system:
- I use KDE
- I connect to the server through tailscale with some policies that specific roles can access specific ports of the whole network
- I have followed this wiki page to fix fonts/themes/icons for flatpak <wiki.nixos.org't_find_system_fonts/icons/themes>
- Here I have my dotfiles <codeberg.org>
[details="System info"]
- system: "x86_64-linux"
- host os: Linux 6.18.60, NixOS, 26.11 (Zokor), 26.11.20261103.1d06008
- multi-user?: yes
- sandbox: yes
- version: `nix-env (Lix, like Nix) 2.95.4
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/base/.config/nix/nix.conf:/home/base/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/base/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/base/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/base/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/base/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/ly75bn9mz0sbg20wxknj094b7709fq5p-lix-2.95.4/share`
- nixpkgs: /nix/store/wa9kz0gcy4wgakdv28p7i4jc7xkcbbky-source
[/details]
Issue
Apparently since around mid October of 2026, something broke.
Moonshine does create a compositor and I can run the program, but with 1-2 major issues:
1. Only mouse actions work. I cannot use the keyboard as an input anymore, which renders almost every program unusable.
2. In many programs (exception being KDE settings window), like Tor Browser and Flatseal (the latter is installed through nix-flatpak, the former is a nix package), the window seems to be moved a bit to the right and down. This means that about 1/5th of the window area is lost somehow, it cannot be viewed.
What do the docs say
Welp, there is no wiki.nixos.org page for moonshine.
Things I’ve tried
I've tried various combinations:
1. Setting boot.kernelParams = [ "video=HDMI-A-1:1920x1080R@60D" ]; on and off
2. Creating and using a separate user than the main pc user
3. Enabling/Disabling hardware.uinput.enable = true; (this was needed for Sunshine)
4. Adding the user to input (the module already does this, so it's redundant), uinput, video and render
5. Using the container configuration that seemed to work in September of 2026
6. Allowing the both server and the user machine to see all open ports of eachother
The related part of my current configuration is this:
[details="configuration.nix"]
# Set up moonshine for remote gaming
users = {
users."gamer" = {
enable = true;
isNormalUser = true;
uid = 46000;
group = "gamer";
extraGroups = [
"video"
"render"
"uinput" # For Sunshine
];
};
groups."gamer".gid = 46000;
};
hardware.uinput.enable = true; # https://github.com/NixOS/nixpkgs/issues/564148
services.moonshine = {
enable = true;
# environment = { };
firewallInterfaces = [
"lo"
"tailscale0"
];
# https://github.com/NixOS/nixpkgs/blob/efe6f071ede9d21c37462d2d6682d5e670099684/nixos/modules/services/networking/moonshine.nix#L139-L151
# extraPackages = [ ];
user = "gamer";
settings = {
name = "nixos-base";
address = "0.0.0.0";
application = [
# {
# # https://github.com/hgaiser/moonshine
# # https://github.com/hgaiser/moonshine/issues/168
# # https://github.com/ianepreston/nixos/issues/456
# # https://github.com/hgaiser/moonshine/blob/main/TIPS.md#run-a-desktop-environment-for-a-full-remote-desktop
# # title = "KDE";
# command = [
# "${pkgs.kdePackages.krdp}/bin/dbus-run-session"
# "--"
# "DISPLAY=:0"
# "${pkgs.kdePackages.kwin}/bin/kwin_wayland"
# "--replace"
# ];
# }
# {
# I guess this would work if we used the main account instead of "gamer"
# title = "KDE Settings";
# command = [
# "${pkgs.kdePackages.systemsettings}/bin/systemsettings"
# ];
# }
{
title = "Tor Browser";
command = [
"${pkgs.tor-browser}/bin/tor-browser"
];
}
{
title = "Flatseal Flatpak";
command = [
"${pkgs.dbus}/bin/dbus-run-session"
"--"
"flatpak"
"run"
"com.github.tchx84.Flatseal"
];
}
{
title = "Bottles Flatpak";
command = [
"${pkgs.dbus}/bin/dbus-run-session"
"--"
"flatpak"
"run"
"com.usebottles.bottles"
];
}
# Example of bottles game
{
title = "Outer Wilds";
command = [
"${pkgs.dbus}/bin/dbus-run-session"
"--"
"flatpak"
"run"
"--command=bottles-cli"
"'com.usebottles.bottles'"
"run"
"-p"
"OuterWilds"
"-b"
"Outer_Wilds"
"--"
"'%u'"
];
}
];
# application_scanner = [
# {
# type = "desktop";
# directories = [
# "/run/current-system/sw/share/applications"
# ];
# include_terminal = false;
# resolve_icons = true;
# }
# ];
};
};
# Tailscale
services.tailscale = {
enable = true;
};
# Flatpak
# Declarative - convergent mode approach
# https://wiki.nixos.org/wiki/Flatpak
services.flatpak = {
enable = true;
# Set the remotes to official flathub repo - Unecessary
remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}
];
# The packages to install
packages = [
"com.github.tchx84.Flatseal"
"com.usebottles.bottles" # bottles
"org.freedesktop.Platform.VulkanLayer.vkBasalt/x86_64/25.08" # bottles # gets pinned
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/25.08" # bottles # gets pinned
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08" # bottles # gets pinned
"com.obsproject.Studio.Plugin.OBSVkCapture" # bottles # gets pinned
];
};
# XDG portal - useful for including paths
xdg.portal.enable = true; # flatpak already enables this
xdg.portal.extraPortals = [
pkgs.kdePackages.xdg-desktop-portal-kde
pkgs.xdg-desktop-portal-gtk
];
[/details]
Other solutions
I guess I could use Sunshine as a fallback plan, but I would like to avoid it..
I also use krdp (KDE's rdp/vnc server) for remote desktop, but it probably won't work well for games.
Question
Does anyone have a working configuration for moonshine that I could try? I suppose it is working for the others, so I'm probably doing something wrong..
Mentions
Moonshine is practically unusable [input/display errors] Background While setting my server, I had initially found Sunshine for remote gaming (and desktop), which worked ok, but had its quirks (it needed me to use something like boot.kernelParams = [ "video=HDMI-A-1:1920x1080R@60D" ]; to fake a display and required a desktop environment. In mid September of 2026 I was recommened Moonshine and was kinda fascinated. It could run programs in its own compositor and I had even managed to watch a youtube video inside Tor Browser inside a nixos-container, really wild stuff. Some possilby important information about my system: - I use KDE - I connect to the server through tailscale with some policies that specific roles can access specific ports of the whole network - I have followed this wiki page to fix fonts/themes/icons for flatpak <wiki.nixos.org't_find_system_fonts/icons/themes> - Here I have my dotfiles <codeberg.org> [details="System info"] - system: "x86_64-linux" - host os: Linux 6.18.60, NixOS, 26.11 (Zokor), 26.11.20261103.1d06008 - multi-user?: yes - sandbox: yes - version: `nix-env (Lix, like Nix) 2.95.4 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/base/.config/nix/nix.conf:/home/base/.config/kdedefaults/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/base/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/base/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/base/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/base/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/ly75bn9mz0sbg20wxknj094b7709fq5p-lix-2.95.4/share` - nixpkgs: /nix/store/wa9kz0gcy4wgakdv28p7i4jc7xkcbbky-source [/details] Issue Apparently since around mid October of 2026, something broke. Moonshine does create a compositor and I can run the program, but with 1-2 major issues: 1. Only mouse actions work. I cannot use the keyboard as an input anymore, which renders almost every program unusable. 2. In many programs (exception being KDE settings window), like Tor Browser and Flatseal (the latter is installed through nix-flatpak, the former is a nix package), the window seems to be moved a bit to the right and down. This means that about 1/5th of the window area is lost somehow, it cannot be viewed. What do the docs say Welp, there is no wiki.nixos.org page for moonshine. Things I’ve tried I've tried various combinations: 1. Setting boot.kernelParams = [ "video=HDMI-A-1:1920x1080R@60D" ]; on and off 2. Creating and using a separate user than the main pc user 3. Enabling/Disabling hardware.uinput.enable = true; (this was needed for Sunshine) 4. Adding the user to input (the module already does this, so it's redundant), uinput, video and render 5. Using the container configuration that seemed to work in September of 2026 6. Allowing the both server and the user machine to see all open ports of eachother The related part of my current configuration is this: [details="configuration.nix"] # Set up moonshine for remote gaming users = { users."gamer" = { enable = true; isNormalUser = true; uid = 46000; group = "gamer"; extraGroups = [ "video" "render" "uinput" # For Sunshine ]; }; groups."gamer".gid = 46000; }; hardware.uinput.enable = true; # https://github.com/NixOS/nixpkgs/issues/564148 services.moonshine = { enable = true; # environment = { }; firewallInterfaces = [ "lo" "tailscale0" ]; # https://github.com/NixOS/nixpkgs/blob/efe6f071ede9d21c37462d2d6682d5e670099684/nixos/modules/services/networking/moonshine.nix#L139-L151 # extraPackages = [ ]; user = "gamer"; settings = { name = "nixos-base"; address = "0.0.0.0"; application = [ # { # # https://github.com/hgaiser/moonshine # # https://github.com/hgaiser/moonshine/issues/168 # # https://github.com/ianepreston/nixos/issues/456 # # https://github.com/hgaiser/moonshine/blob/main/TIPS.md#run-a-desktop-environment-for-a-full-remote-desktop # # title = "KDE"; # command = [ # "${pkgs.kdePackages.krdp}/bin/dbus-run-session" # "--" # "DISPLAY=:0" # "${pkgs.kdePackages.kwin}/bin/kwin_wayland" # "--replace" # ]; # } # { # I guess this would work if we used the main account instead of "gamer" # title = "KDE Settings"; # command = [ # "${pkgs.kdePackages.systemsettings}/bin/systemsettings" # ]; # } { title = "Tor Browser"; command = [ "${pkgs.tor-browser}/bin/tor-browser" ]; } { title = "Flatseal Flatpak"; command = [ "${pkgs.dbus}/bin/dbus-run-session" "--" "flatpak" "run" "com.github.tchx84.Flatseal" ]; } { title = "Bottles Flatpak"; command = [ "${pkgs.dbus}/bin/dbus-run-session" "--" "flatpak" "run" "com.usebottles.bottles" ]; } # Example of bottles game { title = "Outer Wilds"; command = [ "${pkgs.dbus}/bin/dbus-run-session" "--" "flatpak" "run" "--command=bottles-cli" "'com.usebottles.bottles'" "run" "-p" "OuterWilds" "-b" "Outer_Wilds" "--" "'%u'" ]; } ]; # application_scanner = [ # { # type = "desktop"; # directories = [ # "/run/current-system/sw/share/applications" # ]; # include_terminal = false; # resolve_icons = true; # } # ]; }; }; # Tailscale services.tailscale = { enable = true; }; # Flatpak # Declarative - convergent mode approach # https://wiki.nixos.org/wiki/Flatpak services.flatpak = { enable = true; # Set the remotes to official flathub repo - Unecessary remotes = [ { name = "flathub"; location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; } ]; # The packages to install packages = [ "com.github.tchx84.Flatseal" "com.usebottles.bottles" # bottles "org.freedesktop.Platform.VulkanLayer.vkBasalt/x86_64/25.08" # bottles # gets pinned "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/25.08" # bottles # gets pinned "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/25.08" # bottles # gets pinned "com.obsproject.Studio.Plugin.OBSVkCapture" # bottles # gets pinned ]; }; # XDG portal - useful for including paths xdg.portal.enable = true; # flatpak already enables this xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde pkgs.xdg-desktop-portal-gtk ]; [/details] Other solutions I guess I could use Sunshine as a fallback plan, but I would like to avoid it.. I also use krdp (KDE's rdp/vnc server) for remote desktop, but it probably won't work well for games. Question Does anyone have a working configuration for moonshine that I could try? I suppose it is working for the others, so I'm probably doing something wrong..