NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.4k stars 14.35k forks source link

Jack Audio does not present any valid output devices #74742

Open bcaccia opened 5 years ago

bcaccia commented 5 years ago

Describe the bug Due to the outdated Jack setup page on the Nix wiki and the fact that my similar audio setup in Ubuntu functions, I'm assuming this is an issue with the Jack or QjackCtl Nix packages.

When running jack audio via QJackCtl, the jackdbus server is running but no Jack audio devices are available as outputs in any audio software.

This was reproduced on:

No audio outputs in VCV Rack: screenshot_20191130_180151

No Audio outputs in Reaper: screenshot_20191130_180222

I've ensured that system outputs were created in the QjackCtl patchbay: screenshot_20191130_182959

Here is the contents of the QjackCtl Messages window showing relevant errors when one of the above audio apps is started:

17:48:13.227 Statistics reset.
17:48:13.229 ALSA connection change.
17:48:13.231 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
17:48:13.243 ALSA connection graph change.
17:51:30.715 ALSA connection graph change.
17:56:46.886 D-BUS: JACK server is starting...
17:56:46.894 D-BUS: JACK server was started (org.jackaudio.service aka jackdbus).
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Sat Nov 30 17:56:46 2019: Starting jack server...
Sat Nov 30 17:56:46 2019: JACK server starting in realtime mode with priority 10
Sat Nov 30 17:56:46 2019: self-connect-mode is "Don't restrict self connect requests"
Sat Nov 30 17:56:46 2019: Acquired audio card Audio0
Sat Nov 30 17:56:46 2019: creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit
Sat Nov 30 17:56:46 2019: configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
Sat Nov 30 17:56:46 2019: ALSA: final selected sample format for capture: 32bit integer little-endian
Sat Nov 30 17:56:46 2019: ALSA: use 2 periods for capture
Sat Nov 30 17:56:46 2019: ALSA: final selected sample format for playback: 32bit integer little-endian
Sat Nov 30 17:56:46 2019: ALSA: use 2 periods for playback
Sat Nov 30 17:56:46 2019: graph reorder: new port 'system:capture_1'
Sat Nov 30 17:56:46 2019: New client 'system' with PID 0
Sat Nov 30 17:56:46 2019: graph reorder: new port 'system:capture_2'
Sat Nov 30 17:56:46 2019: graph reorder: new port 'system:playback_1'
Sat Nov 30 17:56:46 2019: graph reorder: new port 'system:playback_2'
17:56:49.024 JACK connection change.
17:56:49.025 Statistics reset.
17:56:49.040 Client activated.
17:56:49.040 Patchbay deactivated.
17:56:49.040 Post-startup script...
17:56:49.041 pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source channels=2; pacmd set-default-sink jack_out
17:56:49.061 JACK connection graph change.
Sat Nov 30 17:56:48 2019: Saving settings to "/home/bcaccia/.config/jack/conf.xml" ...
Sat Nov 30 17:56:48 2019: New client 'qjackctl' with PID 3733
Sat Nov 30 17:56:49 2019: New client 'PulseAudio JACK Sink' with PID 1401
Sat Nov 30 17:56:49 2019: Connecting 'PulseAudio JACK Sink:front-left' to 'system:playback_1'
Sat Nov 30 17:56:49 2019: Connecting 'PulseAudio JACK Sink:front-right' to 'system:playback_2'
Sat Nov 30 17:56:49 2019: New client 'PulseAudio JACK Source' with PID 1401
Sat Nov 30 17:56:49 2019: Connecting 'system:capture_1' to 'PulseAudio JACK Source:front-left'
Sat Nov 30 17:56:49 2019: Connecting 'system:capture_2' to 'PulseAudio JACK Source:front-right'
36
37
17:56:49.590 Post-startup script terminated successfully.
17:56:49.591 JACK connection change.
Sat Nov 30 17:57:17 2019: ERROR: CheckSize error size = 85 Size() = 81
Sat Nov 30 17:57:17 2019: ERROR: CheckRead error
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 1883337810
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 1667320425
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 1970226027
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 29806
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 2048
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 256
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 0
Sat Nov 30 17:57:17 2019: ERROR: Unknown request 256
Sat Nov 30 17:57:17 2019: ERROR: Cannot read socket fd = 23 err = Success
Sat Nov 30 18:01:44 2019: ERROR: CheckSize error size = 85 Size() = 81
Sat Nov 30 18:01:44 2019: ERROR: CheckRead error
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 1883337810
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 1667320425
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 1970226027
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 29806
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 2048
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 256
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 0
Sat Nov 30 18:01:44 2019: ERROR: Unknown request 256
Sat Nov 30 18:01:44 2019: ERROR: Cannot read socket fd = 23 err = Success
18:01:54.176 ALSA connection graph change.
18:10:54.079 XRUN callback (1).

To Reproduce

  1. Ensure that Pulse Audio with jack support is enabled by adding the following to your configuration.nix
    # Enable sound and gfx
    sound.enable = true;
    hardware = {
    opengl = {
      enable = true;
      driSupport32Bit = true;
    };
    pulseaudio = {
      support32Bit = true;
      enable = true;
      package = pkgs.pulseaudioFull;
    };
    };

    Additionally, add the following packages: qjackctl libjack2 jack2 unstable.vcv-rack unstable.reaper And add your user to the audio group.

  2. Follow the QJackCtl setup instructions for Jack audio with Dbus on this wiki page: https://nixos.wiki/wiki/JACK
  3. Launch QJackCtl.
  4. Press Start
  5. Launch VCV Rack. In the Audio Module, select JACK and then attempt to select an output device.

Expected behavior User should be able to select JACK audio output devices in an audio app.

Screenshots screenshot_20191130_175727 screenshot_20191130_175756 screenshot_20191130_175810 screenshot_20191130_175821 screenshot_20191130_175835 screenshot_20191130_181035

Additional context Here is the output of cat /proc/asound/cards

 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0x2ffb018000 irq 136

Output of ps -A | ack "jackd" output: 2324 ? 00:00:04 jackdbus

Disabling pulseaudio completely and just running the non dbus version of jack results in the same error messages seen in the original bug description.

Below is the full content of my configuration.nix file

{ config, pkgs, ... }:

let
  # Get the unstable channel
  unstableTarball =
    fetchTarball
      https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz;
in
{

  # Import the unstable channel
  nixpkgs.config = {
    packageOverrides = pkgs: {
      unstable = import unstableTarball {
        config = config.nixpkgs.config;
      };
    };
  };

  # Import and enable Musnix
  imports = [
    /home/bcaccia/musnix
  ];

  musnix.enable = true;

  # Enable sound and gfx
  sound.enable = true;
  hardware = {
    opengl = {
      enable = true;
      driSupport32Bit = true;
    };
    pulseaudio = {
      support32Bit = true;
      enable = true;
      package = pkgs.pulseaudioFull;
    };
  };

  # No access time and continuous TRIM for SSD
  fileSystems."/".options = [ "noatime" "discard" ];

  # Enable microcode updates for Intel CPU
  hardware.cpu.intel.updateMicrocode = true;

  # Enable all firmware
  hardware.enableAllFirmware = true;

  # Enable all firmware with a license allowing redistribution
  hardware.enableRedistributableFirmware = true;

  # A DBus service that allows applications to update firmware
  services.fwupd.enable = true;

  # A service that provides power management support to applications
  services.upower.enable = true;

  # Enable printing
  # Note that the CUPS Web UI for configuration can be accessed at: http://localhost:631
  services.printing = {
    enable = true;
    drivers = [ pkgs.hplipWithPlugin ];
  };

  # Enable scanning
  hardware.sane = {
    enable = true;
    extraBackends = [ pkgs.hplipWithPlugin ];
  };

  # Enable Redshift
  services.redshift = {
    enable = true;
    provider = "geoclue2";
  };

  # Enable physlock
  services.physlock = {
    enable = true;
    lockOn = {
      hibernate = true;
      suspend = true;
    };
  };

  # Run periodic garbage collection on the Nix store
  nix.gc = {
    automatic = true;
    dates = "weekly";
    options = "--delete-older-than 30d";
  };

  # Required for our screen-lock-on-suspend functionality
  #services.logind.extraConfig = ''
  #  LidSwitchIgnoreInhibited=False
  #  HandleLidSwitch=suspend
  #  HoldoffTimeoutSec=10
  #'';

  # Setup UEFI
  boot.loader = {
    efi.efiSysMountPoint = "/boot";
    systemd-boot.enable = true;
  };

  # Install packages
  nixpkgs.config.allowUnfree = true;
  environment.systemPackages = with pkgs; [
    # Docker utils
    #unstable.docker unstable.docker_compose
    # System Security & Libs
    openssl openjdk adobe-reader ntfs3g ldmtool gvfs
    # System Utils
    fish wget neovim git dtrx htop pciutils tmux jq terminator numlockx gparted neofetch xclip ack usbutils
    # Network Utils
    bind nmap nload nixops tcptrack ncdu openvpn transmission ipcalc
    # Password Utils
    keepassxc
    # Development
    unstable.vscode virtualbox unstable.postman tig python python3 go nodejs
    # Productivity
    pcmanfm libreoffice pandoc texlive.combined.scheme-full unstable.dropbox
    # Imaging
    inkscape gimp shotwell scrot xclip sxiv
    # Communication
    discord signal-desktop zoom-us unstable.slack
    # Web Browsing
    firefox google-chrome
    # Media
    libsForQt511.vlc ffmpeg-full obs-studio spotify pavucontrol mplayer
    # i3-gaps
    i3-gaps
    # Desktop Utilities
    redshift-plasma-applet breeze-icons arandr xorg.xev dunst libnotify udiskie breeze-gtk
    # Music
    unstable.reaper helm zynaddsubfx unstable.vcv-rack unstable.sunvox qjackctl libjack2 jack2
    # Gaming
    unstable.steam
    # Printing/Scanning
    skanlite
  ];

  # Make terminator the default
  environment.variables.TERMINAL = "terminator";

  # Install and set fonts
  fonts = {
    fonts = with pkgs; [
      font-awesome-ttf
      fira
      fira-code
      montserrat
    ];
    fontconfig = {
      defaultFonts = {
        monospace = [ "Fira Code" ];
        sansSerif = [ "Fira Sans" ];
        serif = [ "Fira Sans" ];
      };
      dpi = 0;
    };
  };

  # Setup aesthetics
  services.xserver = {
    enable = true;
    layout = "us";
    desktopManager = {
      default = "none";
      xterm.enable = false;
    };
    # Setup i3-gaps
    windowManager = {
      i3 = {
        package = pkgs.i3-gaps;
        enable = true;
      };
      default = "i3";
    };
    # Setup login screen
    displayManager.lightdm = {
      greeters = {
        gtk.enable = false;
        mini = {
          enable = true;
          user = "bcaccia";
          extraConfig = ''
            [greeter]
            show-password-label = false
            invalid-password-text = Access Denied
            show-input-cursor = false
            password-alignment = right
            [greeter-hotkeys]
            mod-key = meta
            shutdown-key = s
            restart-key = r
            hibernate-key = h
            suspend-key = u
            [greeter-theme]
            # A color from X11's `rgb.txt` file, a quoted hex string(`"#rrggbb"`) or a
            # RGB color(`rgb(r,g,b)`) are all acceptable formats.
            font = "unicode"
            font-size = 10px
            text-color = "#FFB728"
            error-color = "#650000"
            background-image = ""
            background-color = "#121212"
            window-color = "#FFB728"
            border-color = "#323232"
            border-width = 3px
            # The pixels of empty space around the password input.
            # Do not include a trailing `px`.
            layout-space = 10
            password-color = "#FFB728"
            password-background-color = "#000000"
          '';
        };
      };
    };
  };

  # Enable java
  programs.java.enable = true;

  # Setup cronjobs
  #time.timeZone = "America/New_York";
  #services.cron = {
  #  enable = true;
  #  systemCronJobs = [
  #    "00 04 * * 6    root    docker image prune --force"
  #  ];
  #};

  # Setup Docker
  virtualisation.docker.enable = true;
  virtualisation.docker.liveRestore = false;

  # Write nxt script
  environment.etc.nxt = {
    uid = 1000;
    gid = 100;
    mode = "0755";
    text = ''
      #!/usr/bin/env bash

      case $1 in
          -u) sudo nixos-rebuild switch --upgrade;;
          -s) sudo nixos-rebuild switch;;
          -e) sudo code --user-data-dir /root /etc/nixos/configuration.nix;;
      esac
    '';
  };

  # Setup fish shell
  users.defaultUserShell = pkgs.fish;
  programs.fish.enable = true;
  programs.fish.shellAliases = {
    ll = "ls -lh";
    la = "ls -lah";
    nxt = "/etc/nxt";
  };

  # Setup user
  users.users.bcaccia = {
    isNormalUser = true;
    uid = 1000;
    extraGroups = [ "sys" "wheel" "networkmanager" "docker" "video" "audio" "jackaudio" "scanner" "lp" "realtime" ];
    home = "/home/bcaccia";
  };

  # Docker group
  users.groups = { docker = { }; };
  users.groups.docker.members = [ "bcaccia" ];

  system.stateVersion = "19.03";

}

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.67, NixOS, 19.03.173322.67135fbcc5d (Koi)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.2.2`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
deliciouslytyped commented 4 years ago

I just started stumbling through this stuff because I wanted flexible audio routing. I have a really messed up setup that barely works right now; does this help?: https://github.com/jackaudio/jackaudio.github.com/wiki/WalkThrough_User_PulseOnJack

For starters I just manually ran the script and it created some monitor devices or something.

bcaccia commented 4 years ago

Thanks. I've gone through those setup procedures successfully before in Debian and Ubuntu based distros. Unfortunately I'm unable to get a working Jack2 audio setup in Nix.

@deliciouslytyped Do you happen to have a working config file that you can share for your Nix setup? It's not out of the question that I'm configuring something incorrectly.

deliciouslytyped commented 4 years ago

Right now I have an ad-hoc configuration I got roughly running about half an hour ago and probably like 100 tabs on JACK and related stuff open :P

I had to do some of the stuff here https://askubuntu.com/questions/224151/jack-server-could-not-be-started-when-using-qjackctl/232163 , mainly I tried the pasuspend thing (now I dont seem to need it??? - maybe the same JACK server has been running the whole time, IDK) and the other entry that mentions using fuser, but I really have no idea whats going on. Oh yeah, I had to set it to use the PCM device in qjackctl.

I installed pulseaudiofull and added myself to the jackaudio and audio groups, I don't know if the latter even does anything, and I enabled all the dbus stuff in qjackctl.

Basically I threw things and google at it till it kind of worked...

deliciouslytyped commented 4 years ago

Any luck? Do you use IRC?

bcaccia commented 4 years ago

Unfortunately, no luck.

My user is part of the jackaudio, audio, and realtime groups.

  1. Cadence doesn't work. For some reason it reports that DBUS is not installed. It is as it is pulled in with the jack2 package. I even tried explicitly installing it. Still no luck
  2. I tried the script and setup for QJackCtl from here. Still no Jack device is shown in Reaper or VCV Rack.
  3. Tried simply running the following commands. Same result: pulseaudio --kill
    jack_control start

I don't use IRC normally but am able to connect to an IRC server. I previously asked the question in the #nix_os irc channel but nobody seemed to have an answer. Open to suggestions.

deliciouslytyped commented 4 years ago

The dbus problem with cadence involves https://github.com/NixOS/nixpkgs/issues/55574#issuecomment-570929790 I'm quite sure, but qjackctl works for me. I have the intention to try to work on this stuff a bit, but not really the space to commit to it...

deliciouslytyped commented 4 years ago

You shouldn't need the pajackconnect script just to get jack supporting applications to use jack. once you have jack running I think they should just work. My problem was that I couldn't get pulse to work in that case without additional work. The reason is that one or the other needs actual control of the audio devs.

deliciouslytyped commented 4 years ago

Look into trying to run qjackctl with pasuspender, and setting the hardware device to the PCH or whichever device in qjackctl, those were things I had to do I think.

bcaccia commented 4 years ago

Tried the suggested steps:

In qjackctl:

  1. Navigated to Setup > Misc and disabled "Enable JACK D-Bus interface"
  2. Setup > Settings > Advanced and in the Server Prefix box entered `pasuspender -- jackd"
  3. Setup > Settings > Advanced and set Output/Input device to be the exact PCH device.

Jack is running but programs like VCV and Reaper are not seeing it.

deliciouslytyped commented 4 years ago

So this isn't very helpful but then you need to figure out why they aren't seeing it. Is the jack server running? Can the applications connect to the jack server? Are they compiled with jack support? (VCV worked out of the box for me so presumably you don't need to mess with that.)

bcaccia commented 4 years ago

To answer the above questions:

  1. Is the jack server running? Yes. This is confirmed by both the messages output in the QJackctl Message window as well as by running ps aux | grep jackd. It is also worth noting that when I start jack via QJackctl, Pulse audio does in fact suspend. I can tell because if I open a video in my web browser there is no audio playback.

  2. Can the applications connect to the jack server? No. No applications are able to connect to the jack server. I've tried Reaper, VCV Rack, and the Helm synthesizer. No Jack audio devices appear present.

  3. Are they compiled with jack support? I am installing the following packages directly in my Nix config, all are compiled with Jack support.

    # Music
    unstable.reaper helm zynaddsubfx unstable.vcv-rack unstable.sunvox qjackctl libjack2 jack2

Other troubleshooting steps

This doesn't appear to be an issue with my actual Nix config. Although I haven't seen yours, presumably we have the same packages being installed, users are part of the same audio groups as suggested in the wiki, etc. I've also disabled Musnix just to make sure that wasn't a factor.

I think this strictly has to do with post installation procedures.

@deliciouslytyped Would you be able to provide screenshots of what your QJackctl configuration settings are? Maybe we have something setup different there?

deliciouslytyped commented 4 years ago

So I just restarted my machine for the first time since I got the ad-hoc jack setup working and things are broken again. :) The system level jack setup seems to be different than what I had going though. For example I was deliberately running in non-realtime mode. I'll report back if I have any findings.

deliciouslytyped commented 4 years ago

So, I disabled (Edit: correction: stopped) the system level jack and jack-session service and the user level pulseaudio service (you have to stop the pulseaudio.socket service to stop it from constantly getting reactivated), I just used qjackctl to start the jack service, and pulseaudio --start to start pulseaudio.

There may be some other things that need to be done, because I also ran the usual pactl commands earlier.

So basically I started everything "manually" in the context of my user and hoped it would work, and it did. So it's still not running in realtime mode if you need that.

At some point I'll maybe set aside time and try to figure out what is actually going on here, until then...

bcaccia commented 4 years ago

I've finally been able to start Jack audio and get a program to see a valid jack output device by executing the following steps:

  1. Upgraded my Nix install from 19.03 to 19.09 (may not be necessary, but it is an action that was taken)

  2. In my nix config set libjack2 jack2 qjackctl to use the unstable versions:

    unstable.libjack2 unstable.jack2 unstable.qjackctl
  3. Rebuild my nix config and reboot

  4. After rebooting, launched qjackctl and entered in the following Options:

Setup -> Settings -> Options -> Execute script after Startup: check

pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source channels=2; pacmd set-default-sink jack_out

Setup -> Settings -> Options -> Execute script on Shutdown: check

pactl unload-module `pactl list|grep -A 3 jack-source|tail -1|awk '{ print $NF }'`;pactl unload-module `pactl list|grep -A 3 jack-sink|tail -1|awk '{ print $NF }'`
  1. Start Jack server via qjackctl

At this point, VCV Rack works with Jack just fine. However Reaper and Helm do not show valid Jack output devices. I'm not sure if it has anything to do with the way those packages were built.

bignaux commented 4 years ago

see https://github.com/NixOS/nixpkgs/issues/55574#issuecomment-592432223

bignaux commented 4 years ago

for reaper, it had no jack support, so #81282

deliciouslytyped commented 4 years ago

I ran into some problems again, I'm not sure if I have some misconfigured services or what.

I was getting errors for module loading like pactl load-module module-jack-sink channels=2 causing this in pulse:

Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >Cannot read socket fd = 55 err = No such file or directory<                                                                                                                         │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >CheckRes error<                                                                                                                                                                     │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >Could not read result type = 22<                                                                                                                                                    │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >Client name = PulseAudio JACK Sink conflits with another running client<                                                                                                            │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >Cannot connect to the server<                                                                                                                                                       │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock<                                                                                                │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-sink.c: JACK error >JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock<                                                                                                  │
│Apr 22 22:41:54 nixos pulseaudio[31229]: E: [pulseaudio] module-jack-sink.c: jack_client_open() failed.                                                                                                                                                                      │
│Apr 22 22:41:54 nixos pulseaudio[31229]: E: [pulseaudio] module.c: Failed to load module "module-jack-sink" (argument: "channels=2"): initialization failed.                                                                                                                 │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >Cannot read socket fd = 55 err = No such file or directory<                                                                                                                       │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >CheckRes error<                                                                                                                                                                   │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >Could not read result type = 22<                                                                                                                                                  │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >Client name = PulseAudio JACK Source conflits with another running client<                                                                                                        │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >Cannot connect to the server<                                                                                                                                                     │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >JackShmReadWritePtr1::~JackShmReadWritePtr1 - Init not done for -1, skipping unlock<                                                                                              │
│Apr 22 22:41:54 nixos pulseaudio[31229]: W: [pulseaudio] module-jack-source.c: JACK error >JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock< 

and this in jackd:

    Unknown request 1936487760
    Unknown request 1685406053
    Unknown request 1243639657
    Unknown request 541803329
    Unknown request 1802398035
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 2048
    Unknown request 0
    Unknown request 0
    Unknown request 0
    Unknown request 256
    Cannot read socket fd = 12 err = Success

Running everything manually, from a nix-shell seems to work;

nix-shell -I nixpkgs=channel:nixos-unstable -p pulseaudioFull libjack2 jack2 -v

Edit: Uhhh....but with this setup somehow the only outputs things see are the JACK output. So I think this ends up routing pulse through JACK (or not?)... And mumble doesn't see pulse (jack support is compiled in), so things still end up broken. I don't know how these things interface with eachother. Edit2: looks like that had something to do with ~/.config/pulse Edit3: I didn't check which version to pin to or what the root cause is, but you need to be on a (at the time of this post) unstable channel for this to work

stale[bot] commented 4 years ago

I marked this as stale due to inactivity. → More info

jsravn commented 3 years ago

Is the services.jackd module broken? It doesn't work for me at all. Seems like the best thing is to just install jack2 and use dbus.

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

sjfloat commented 3 years ago

Umm. Can we unstale this?

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info