Waybar fails on both sway and hyprland

Hi guys,

I have seen this issue Waybar not showing - #2 by trya2l, but there is no answer.

I am also stuck trying to start waybar on Sway.

There is no special log but I think there is something missing related to ipc, dbus, portals, …

I am new to nixos, so I don’t even know where to start when I have nearly no logs.

The only ones that seem relevant are these

Failed to create secure directory (/run/user/1000/pulse): Too many open files

[2024-06-16 19:54:12.305] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface "org.freedesktop.portal.Settings" on object at path /org/freedesktop/portal/desktop

Here are the complete logs

[2024-06-16 21:31:44.587] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config
[2024-06-16 21:31:44.587] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/config.jsonc
[2024-06-16 21:31:44.587] [debug] Try expanding: $HOME/.config/waybar/config
[2024-06-16 21:31:44.587] [debug] Try expanding: $HOME/.config/waybar/config.jsonc
[2024-06-16 21:31:44.587] [debug] Try expanding: $HOME/waybar/config
[2024-06-16 21:31:44.587] [debug] Try expanding: $HOME/waybar/config.jsonc
[2024-06-16 21:31:44.587] [debug] Try expanding: /etc/xdg/waybar/config
[2024-06-16 21:31:44.587] [debug] Try expanding: /etc/xdg/waybar/config.jsonc
[2024-06-16 21:31:44.587] [debug] Try expanding: /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/config
[2024-06-16 21:31:44.587] [debug] Try expanding: /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/config.jsonc
[2024-06-16 21:31:44.587] [debug] Found config file: /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/config.jsonc
[2024-06-16 21:31:44.587] [info] Using configuration file /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/config.jsonc
[2024-06-16 21:31:44.589] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
[2024-06-16 21:31:44.589] [debug] Try expanding: $XDG_CONFIG_HOME/waybar/style.css
[2024-06-16 21:31:44.589] [debug] Try expanding: $HOME/.config/waybar/style.css
[2024-06-16 21:31:44.589] [debug] Try expanding: $HOME/waybar/style.css
[2024-06-16 21:31:44.589] [debug] Try expanding: /etc/xdg/waybar/style.css
[2024-06-16 21:31:44.589] [debug] Try expanding: /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/style.css
[2024-06-16 21:31:44.589] [debug] Found config file: /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/style.css
[2024-06-16 21:31:44.589] [info] Using CSS file /nix/store/9cwiblii5ziyk7x9znimb1zzx7cjf08z-waybar-0.10.3/etc/xdg/waybar/style.css

and some extra ones that appear sometimes

[2024-06-16 21:34:13.377] [warning] Mapping is not an object
[2024-06-16 21:34:13.459] [error] media stopped unexpectedly, is it endless?
Failed to create secure directory (/run/user/1000/pulse): Too many open files
socket(): Too many open files
shared memfd open() failed: Too many open files
Failed to create secure directory (/run/user/1000/pulse): Too many open files
socket(): Too many open files
shared memfd open() failed: Too many open files
Failed to create secure directory (/run/user/1000/pulse): Too many open files
socket(): Too many open files

Anyway, are you able to run waybar in vanilla nixos (configuration.nix), especially on sway ?

I’m having the same problem trying to get my desktop setup. What’s odd is that my configuration works on my laptop, but not on the desktop. I am trying to track down if there is some minor difference in the configuration (because I didn’t copy them exactly) or if I did something non-declarative at some point to get it working. If I can track down the issue I will try to update you.

Well, I have restarted my computer today and it works well now… Idk why

Mine is now working. I hadn’t yet configured the audio in my config file:

  hardware = {
    pulseaudio = {
      enable = false;
      extraModules = [ pkgs.pulseaudio-modules-bt ];
    };
    bluetooth = { enable = true; };
  };

  # Enable sound
  sound = {
    enable = false;
    mediaKeys.enable = true;
  };

  # Enable audio through pipewire
  services.pipewire = {
    enable = true;
    alsa.enable = true;
    alsa.support32Bit = true;
    pulse.enable = true;
  };

I didn’t test which one of those blocks got it working, but from some other discussion board (I don’t remember the link), someone mentioned that you need to enable pipewire. I’m too noob to understand what I did or why, but this got it working.

2 Likes

yeah I’ve done smt similar, but I think that some settings apply after either reboot or logout