nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.18k stars 1.85k forks source link

bug: Rebuilding doesn't seem to relink pipewire-pulse service/socket files #4967

Open PassiveLemon opened 10 months ago

PassiveLemon commented 10 months ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

When rebuilding, nix doesn't appear to relink the updated service/socket for pipewire-pulse in /home/USER/.config/systemd/user/

Additional context

I feel that this is valuable so I'll put it here: I do have pipewire-pulse enabled in my system config:

pipewire = {
  enable = true;
  pulse.enable = true;
  jack.enable = true;
  alsa = {
    enable = true;
    support32Bit = true;
  };
};

I left my system running for about 30 days before I had to restart it. When starting back up, I had no audio. Pipewire appeared to be running because the pw-whatever commands worked but Pavucontrol would get stuck on connecting and the pipewire-pulse service did not exist when it should have.

Did some digging in journalctl --user -u pipewire-pulse which had a bunch of Jan 28 13:16:18 silver systemd[7056]: pipewire-pulse.service: Failed to open /home/lemon/.config/systemd/user/pipewire-pulse.service: No such file or directory entries. Went to that location and ls'd.

The symlink showed it was linked to `/nix/store/xxxxxxx-pipewire-0.3.38/share/systemd/user/ or a close version (I don't remember exactly). This entry did not exist in my store (but it used to) which is what brings me to believe that store entry was garbage collected or something.

Found a solution though it isn't ideal: I found /nix/store/xxxxxxxxx-pipewire-1.0.0/, Went inside to ...pipewire-1.0.0/share/systemd/user/, Symlinked the pipewire-pulse.service to /home/lemon/.config/systemd/user/pipewire-pulse.service Symlinked the pipewire-pulse.socket to /home/lemon/.config/systemd/user/pipewire-pulse.socket and /home/lemon/.config/systemd/user/sockets.target.wants/pipewire-pulse.socket

I then notified nixos/nixpkgs about this issue. They told me to completely delete the ~/.config/systemd/ directory. I then rebuild home-manager and it populated it with the updated symlinks.

Maintainer CC

I'm not sure who to notify

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.1-zen1, NixOS, 23.11 (Tapir), 23.11.20240124.a77ab16`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Martin-Lndbl commented 10 months ago

I had the same issue, just deleting the invalid symlinks in /home/lemonconfig/systemd/user/ fixed it for me. Seems like there is another config directory where the right symlinks are stored that gets overwritten by /home/lemon/.config/systemd/user/ which didn't get cleaned up properly.

Edit: The related nixpkgs issue is closed already

stale[bot] commented 7 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.