Cava: starts, but fails to visualize audio

Hello, I initially wanted to create an issue on GitHub, but I am not sure, if it might be a configuration error on my side. If you need more context, please ask away.

Describe the bug

Running cava in the terminal shows flat bars, that do not react to audio, even with or without setting

[input]
method = pipewire
source = 'explicit object.serial'

in the config.
Setting

[output]
method = 'any option'

doesn’t change anything, setting it to raw seems to only print 1 newline character.

Steps to reproduce

Add cava to your nixos config in any way. environment.systemPackages = [ pkgs.cava ];, environment.defaultPackages = [ pkgs.cava ]; or when using home-manager also home.packages = [ pkgs.cava ]; or programs.cava.enable = true;.

Expected behavior

The bars start scaling according to the audio.

Additional context

I’m using a nix flake with multiple nixpkg inputs:

nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";

But I only use the stable branch except for hyprland, zed-editor and quickshell, which use the nixos-unstable branch.
Additionally I am using home-manager as a module, if that is relevant, but I installed cava in every imaginable way with no luck every time.
Also, this is technically somewhat of a duplicate of #237498, but that was in 2023 and was on fedora.
If I remember correctly, cava still worked a few months ago, but I think that was even before the release of nixos-25.11.

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.18.32, NixOS, 25.11 (Xantusia), 25.11.20260522.b77b3de
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.31.5
  • nixpkgs: /nix/store/whpmnfw6wj42iy2r38i53kfiqd84mfw7-source

I tried it and just running cava worked fine for me without any additional configuration. Do you have any unusual audio config or hardware?
I have this audio config, maybe this helps:

  services.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };

Thanks for the reply, this is my audio.nix file:

{ pkgs, ... }:

{
  services.pulseaudio.enable = false;
  security.rtkit.enable = true;
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
    wireplumber.enable = true;
    jack.enable = true;
  };

  environment.systemPackages = with pkgs; [
    playerctl
    pwvucontrol
  ];
  services.playerctld.enable = true;
}

I have a hardware.nix file looking like this: (the config.hostSpec.hardware.gpu is simply a types.enum [ “nvidia” “amd” “intel” “none” ] my PC is using an nvidia gpu)

{ config, lib, pkgs, ... }:

let
  cfg = config.hostSpec.hardware;
in
{
  config = lib.mkMerge [
    # NVIDIA Configuration
    (lib.mkIf (cfg.gpu == "nvidia") {
      # Enable OpenGL
      hardware.graphics = {
        enable = true;
        enable32Bit = true;
      };

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

      hardware.nvidia = {
        # Modesetting is required
        modesetting.enable = true;

        # Nvidia power management. Experimental, and can cause sleep/suspend to fail
        powerManagement.enable = false;
        # Fine-grained power management. Turns off GPU when not in use
        powerManagement.finegrained = false;
        open = false;
        nvidiaSettings = true;

        package = config.boot.kernelPackages.nvidiaPackages.latest;
      };

      # Enable CUDA support
      environment.systemPackages = with pkgs; [
        cudatoolkit
        nvidia-vaapi-driver
      ];

      # Environment variables for NVIDIA
      environment.variables = {
        # Enable hardware acceleration for VA-API
        LIBVA_DRIVER_NAME = "nvidia";
        # Enable hardware acceleration for VDPAU
        VDPAU_DRIVER = "nvidia";
        # Enable Wayland support
        GBM_BACKEND = "nvidia-drm";
        __GLX_VENDOR_LIBRARY_NAME = "nvidia";
        # Enable proper Wayland support
        WLR_NO_HARDWARE_CURSORS = "1";
      };
    })

    # AMD Configuration
    (lib.mkIf (cfg.gpu == "amd") {
      hardware.graphics = {
        enable = true;
        enable32Bit = true;
        extraPackages = with pkgs; [
          rocm-opencl-icd
          rocm-opencl-runtime
          amdvlk
        ];
        extraPackages32 = with pkgs; [
          driversi686Linux.amdvlk
        ];
      };
      services.xserver.videoDrivers = [ "amdgpu" ];
    })

    # Intel Configuration
    (lib.mkIf (cfg.gpu == "intel") {
      hardware.graphics = {
        enable = true;
        enable32Bit = true;
        extraPackages = with pkgs; [
          intel-media-driver
          intel-vaapi-driver
          vaapiVdpau
          libvdpau-va-gl
        ];
      };
      services.xserver.videoDrivers = [ "modesetting" ];
    })
  ];
}

I don’t even know what to feel right now. I struggled so long to find the problem to no avail.
Then I remembered, that I sometimes use qpwgraph and thought maybe that could cause an issue. At first glance, it didn’t. But I was not 100% convinced that it really does not, so I quickly uninstalled it, but it didn’t change anything.
And then it clicked. I also use pwvucontrol (primarily use it, as a matter of fact) as GUI for changing audio outputs, volume, etc.
And there it was. In the never before touched “Recording” section cava popped up and was set at 0% volume by default. Turned it up, the bars moved. I feel dumb.
Still, I appreciate your input @MartV.

1 Like