Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/gdm: use Fedora's PulseAudio configuration #61746

Merged
merged 1 commit into from Jun 2, 2019

Conversation

abbradar
Copy link
Member

This is needed to avoid GDM PulseAudio instance acting as a network
source/sink which is most certainly don't wanted.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@abbradar abbradar added 0.kind: bug 6.topic: GNOME GNOME desktop environment and its underlying platform labels May 20, 2019
@ofborg ofborg bot added 6.topic: nixos 8.has: module (update) 10.rebuild-darwin: 0 10.rebuild-linux: 0 and removed 6.topic: GNOME GNOME desktop environment and its underlying platform labels May 20, 2019
@worldofpeace
Copy link
Contributor

I'm not sure if we should have this fix in nixpkgs.

There's lots of reports of issues with GDM and Pulseaudio upstream and it's of my opinion that this is
where they should be resolved.

Note that this actual fix, while documented in distro's wikis, I couldn't find it actually being implemented.

@abbradar
Copy link
Member Author

abbradar commented May 20, 2019 via email

@worldofpeace
Copy link
Contributor

Latest traction to fix this issue upstream appears to be https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/10 from gazing at that debian bug thread. Though that does nothing for the networking issue.

It seems arch users use https://aur.archlinux.org/packages/pulseaudio-bluetooth-a2dp-gdm-fix/ so perhaps if we want to have this we can put it in the wiki adapted so it's trivial to get working in NixOS?

@abbradar
Copy link
Member Author

abbradar commented May 20, 2019 via email

@abbradar
Copy link
Member Author

After more thoughts specifically about networking: it's somewhat of NixOS issue too. The same conflict will happen if there are two users logged in at the same time because we load networking modules in system-wide default.pa. Not sure how to improve this without suggesting users not to use hardware.pulseaudio.tcp at all and loading modules in their own configuration files instead.

Copy link
Contributor

@hedning hedning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it reasonable to ship this in NixOS. As @abbradar says, not fixing it means users will have to do it manually.

@abbradar
Copy link
Member Author

So, no objections for merging this?

@worldofpeace
Copy link
Contributor

It seems that fedora does some specific configuration for gdm and pulseaudio https://src.fedoraproject.org/rpms/gdm/blob/master/f/gdm.spec#_155 https://src.fedoraproject.org/rpms/gdm/blob/master/f/default.pa-for-gdm

@abbradar
Copy link
Member Author

abbradar commented Jun 1, 2019

@worldofpeace Nice find! So they whitelist plugins instead of blacklisting them as I do.

Pros for my solution:

  • It's a patched system configuration; the user gets what they expect (but I'm not sure it's useful in practice, are there any obscure settings that we really want to have in GDM if user set them?);

Cons for my solution:

  • Plugins whack-a-mole.

Pros for their solution:

  • Clean and robust;

Cons:

  • Not a system configuration (but again I don't see much problem with it).

I say let's use Fedora's solution.

@worldofpeace
Copy link
Contributor

Sounds good @abbradar. I don't have any objections to this now, I think what fedora's done with whitelisting makes more sense.

I'll be testing this today 👍

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and I don't seem to experience the issue with GDM catching the A2DP bluetooth sink.
So the A2DP sink works normally.

Tested on a Live system GNOME3 with GDM.

@worldofpeace worldofpeace changed the title gdm service: unload PulseAudio modules which conflict with user daemon nixos/gdm: use Fedora's PulseAudio configuration Jun 2, 2019
This is needed to avoid GDM PulseAudio instance acting as a network
source/sink or grabing the A2DP bluetooth sink making A2DP unusable
for any other user. In the future having this fixed in PulseAudio
would be preferred [0]. Current possible upstream fix could be [1].

[0]: NixOS#61746 (comment)
[1]: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/10
@worldofpeace
Copy link
Contributor

Thanks @abbradar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants