Steam issues - no audio with Pipewire, some crashing

I’m at the tail end of setting up NixOS to be my daily driver, and the last hangups at this point are just a couple of strange issues with Steam games running under Proton. I’m a pretty casual gamer, and I really only play like 3 games with friends every once in a while. First thing’s first, the games and the issues they’re having:

Phasmophobia - launches just fine, but no sound. Audio interface shows up in options, but selecting it doesn’t do anything, and the game doesn’t show in qpwgraph.

Lethal Company - launches just fine, but no sound and shows no audio interface in options. Nothing in qpwgraph.

Halo: MCC - launches into main menu, same audio issues as Phasmo, but almost immediately a “Fatal Error” dialog box pops up, which closes the game upon click. Strangely, I can actually ignore it for a couple minutes before the game crashes completely. I’ve read this is kind of a common issue with this game, especially with EAC, but it does this for me regardless of whether or not EAC is enabled.

I’m very impressed so far with the performance, and if I can resolve these issues, I’ll be golden. Any help is greatly appreciated!

For reference, my system uses an Nvidia RTX 3060 12GB, I’m tracking nixpkgs unstable (except for wineWowPackages.staging, yabridge, and yabridgectl, which are coming from 24.11), and I’ve tried many different versions of Proton including the latest GE from protonup. The relevant parts of my configuration are as follows (I do have my user added to the “audio” group, but I’ve left that part out):

  # Enable flakes
  nix.settings.experimental-features = [ "nix-command" "flakes" ];

  # Enable the X11 windowing system.
  services.xserver.enable = true;

  # Enable sound with pipewire.
  services.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    wireplumber.enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    # PulseAudio
    pulse.enable = true;
    # PipeWire JACK
    jack.enable = true;
  };

  # Enable musnix for pro audio
  musnix.enable = true;
  # CANNOT USE RT KERNEL DUE TO NVIDIA DRIVERS
  # Enable real-time kernel
  # musnix.kernel.realtime = true;
  # Specify latest real-time kernel
  # musnix.kernel.packages = pkgs.linuxPackages_latest_rt;
  # Enable real-time irq script
  # musnix.rtirq.enable = true;

  # Enable OpenGL
  hardware.graphics = {
    enable = true;
    enable32Bit = true;
  };

  # Load nvidia driver for Xorg and Wayland
  services.xserver.videoDrivers = ["nvidia"];

  hardware.nvidia = {

    # Enable modesetting
    modesetting.enable = true;

    # Disable Nvidia power management
    powerManagement.enable = false;

    # Disable fine-grained power management
    powerManagement.finegrained = false;

    # Enable the NVidia open source kernel
    open = true;

    # Enable the Nvidia settings menu,
    nvidiaSettings = true;

    # Optionally, you may need to select the appropriate driver version for your specific GPU.
    package = config.boot.kernelPackages.nvidiaPackages.stable;
  };

  # Enable Steam and related utils
  # Add the following to launch options for best experience
  # gamemoderun %command%
  # mangohud %command%
  # gamescope %command%
  programs.steam.enable = true;
  programs.steam.gamescopeSession.enable = true;
  programs.gamemode.enable = true;

  # Allow unfree packages
  nixpkgs.config.allowUnfree = true;

Bumping this for more visibility. I’ve found this Reddit post, which mentions doing the following for the audio issue:

sudo touch /usr/bin/pulseaudio
sudo chmod 0755 /usr/bin/pulseaudio

I tried doing that, but it didn’t do anything for the issues I’m having. And of course, it should be no surprise that it didn’t “stick” through a NixOS rebuild. I wonder if there’s a “proper” NixOS way to create that file, in the case that Proton is checking for it in that location?

I’ve also tried adding sound.enable = true; to my config file since I’ve seen that in some older NixOS setup videos, but that throws an error during rebuild because that’s obviously not needed anymore.

Once again, any help is greatly appreciated! I’m very curious to hear if anyone has had similar issues.

Well after more than a week of trying to figure this thing out, I finally found the issue and solution. I think it’s important to share it here because it’s far stupider than I could have imagined, but it also has absolutely nothing to do with NixOS. After trying seemingly everything (downgrading GPU driver, downgrading nixpkgs to 24.11, installing Steam via Flatpak, etc., etc.), I finally came across this Proton issue on GitHub.

To sum it up, it seems like it’s most likely a very weird and very niche issue with the Nvidia driver, which causes games running under Proton to just not initialize the PulseAudio connection if there’s a USB audio interface connected, though it’s probably not even all USB interfaces.

The workaround is painfully simple:

  1. Power off or disconnect audio interface
  2. Launch Proton game
  3. Power on or reconnect audio interface
  4. Profit

Hopefully Nvidia will fix their buggy drivers, but if not, maybe this will help someone else in the future!

Fwiw, stuff like that is practically useless on NixOS. The way to achieve this would be to wrap your package in an fhs env with the pulse package, which steam (and therefore all your games) already is - you can’t observe the filesystem it sees directly on the host, though, and additions like this would anyway be invisible to it.

In a nutshell, don’t even try silly hacks like that on NixOS without a full grasp of what they do and how the packages involved work around these parts.

1 Like