Waybar stopped working (seg fault)

I am running unstable (kernel 6.6.34). Just recently, waybar stopped working.

Segmentation fault (core dumped)

Anyone else getting this?

What branch/channel of nixpkgs are you using? Which wayland compositor? I am using hyprland from the flake on nixos-unstable with linux 6.9.3 kernel, waybar works fine for me.

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

I’m using this flake for hyprland. There was an issue and I was recommended to use this one:

    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";

Should I change back to:

    # hyprland.url = "github:hyprwm/Hyprland";

Wow. Kernel 6.9.3. Should I give that a go? Do you find it stable enough? What does your kernel flake look like?

I have the same flake inputs, so that’s not the issue.
How long has it been since you updated the flakes? Try running nix flake update in the same directory as your flake.nix and then sudo nixos-rebuild switch --flake . -v and then home-manager switch --flake . -v ( the last command only if you have a standalone install, i.e. have a homeConfigurations output in your flake).

I am 99% sure kernel is not the issue here, but since you asked… It is stable enough for my needs, no crashes so far after 2 months of daily usage (browsing, light gaming, web-dev). To install the latest kernel, you should add this line to your configuration.nix:

  boot.kernelPackages = pkgs.linuxPackages_latest;

There is an issue on github for waybar repo: Segmentation Fault on start · Issue #3371 · Alexays/Waybar · GitHub. As mentioned in the issue, there has been a lot of commits since the last release (the one in nixpkgs): Segmentation Fault on start · Issue #3371 · Alexays/Waybar · GitHub. They really should just cut a new release so nixpkgs can update.

In the meantime, using the flake works! Let me know if you need help using the flake directly.

1 Like

Thanks for the reply, and yes, I’ll take you up on the help using the flake directly. Never opposed to learning something new!

Yes, so I am not sure if you are already using a flake-based config for your system, but it does make managing and adding new sources like this easier.
You should check out Misterio’s starter configs here:

Vimjoyer on YouTube has some great intros for everything nix, too:

Flakes aren’t the only way to run things, but they do make sharing configs easier.

If you already are using flake-based config, all you have to do is add waybar as a new input in addition to nixpkgs, then replace wherever you have pkgs.waybar with inputs.waybar.${pkgs.system}.default.

If you are using home-manager, you just have to tell home-manager to use the waybar package from the flake. You can see how I did it here:

You can also just do this as a quick check to see if using the flake derived waybar will even work on your system: nix run github:Alexays/waybar

^ if you don’t feel like messing with your inputs or don’t already have flakes running, then that last solution is probably the best.

I am here if you have any other questions… nix can be very confusing!

1 Like

Thanks for the detailed response. I really appreciate it.

I tried the flake and it is working fine.

BTW, do you remember why we are using:

hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";

instead of:

hyprland.url = "github:hyprwm/Hyprland";

Yes, so basically the flake I think lives inside its own git repo that is a git submodule. In order for flake inputs to get modules, you have to adjust the url to now fetch them. This was a change in Hyprland stuff.

It was mentioned somewhere that you could do this instead:

inputs = {
  hyprland = {
    url = "github:hyprwm/Hyprland";
    submodules = true; # or submodule? I forget

The disadvantage of this is that it is not clear how to use this with nix commands.

How you you nix flake show github:/hyprwm/Hyprland, but with submodules? That is why I think just using the long url is better: nix flake show git+https://github.com/hyprwm/Hyprland?submodules=1. No mental gymanstics necessary.

1 Like