Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642198 - media-sound/pulseaudio running under gnome-base/gdm - breaking at least zeroconf setup
Summary: media-sound/pulseaudio running under gnome-base/gdm - breaking at least zeroc...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Igor V. Kovalenko
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-25 10:59 UTC by Mart Raudsepp
Modified: 2022-06-10 06:56 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2017-12-25 10:59:29 UTC
We have gdm run a pulseaudio user instance as well. I'm not sure if that's intended or not, long ago I didn't see that on a Fedora LiveUSB. Maybe it shouldn't, maybe it should run. Either way, it seems to break e.g module-zeroconf-publish if set up in /etc/pulse/default.pa, as it seems gdm will claim the ports and then only "Dummy Output on gdm@hostname" (because gdm isn't the active session when logged on) is shown, not the working network outputs.

As soon as I
echo 'autospawn = no' > /var/lib/gdm/.config/pulse/client.conf
and killall pulseaudio as root, things show up properly, as the intended remote user can export its outputs or something.

OTOH, if the other computer is sitting around in login screen, this would have been perhaps intended, so I'm not really sure where the bug is here. Maybe gdm shouldn't run pulseaudio, maybe it should. Maybe module-native-protocol-tcp and/or module-zeroconf-publish should be able to publish the outputs of both users, maybe it can't. Maybe I fail to set this up properly, despite doing it according to all the different instructions telling it to do just the same as I have.
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2017-12-26 07:53:24 UTC
Afaik, pulseaudio running in gdm is perfectly normal as it runs most daemons a normal user would. See the output of loginctl user-status gdm:

gdm (105)
           Since: Tue 2017-12-26 08:23:18 CET; 20min ago
           State: online
        Sessions: c1
          Linger: no
            Unit: user-105.slice
                  ├─session-c1.scope
                  │ ├─ 830 gdm-session-worker [pam/gdm-launch-environment]
                  │ ├─ 891 /usr/libexec/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
                  │ ├─ 895 /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
                  │ ├─ 908 /usr/bin/gnome-shell
                  │ ├─ 923 /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
                  │ ├─ 956 /usr/bin/pulseaudio --start --log-target=syslog
                  │ ├─ 978 ibus-daemon --xim --panel disable
                  │ ├─ 981 /usr/libexec/ibus-dconf
                  │ ├─ 984 /usr/libexec/ibus-x11 --kill-daemon
                  │ ├─1000 /usr/libexec/gsd-sound
                  │ ├─1002 /usr/libexec/gsd-dummy --dummy-name=org.gnome.SettingsDaemon.Wacom
                  │ ├─1003 /usr/libexec/gsd-xsettings
                  │ ├─1008 /usr/libexec/gsd-a11y-keyboard
                  │ ├─1009 /usr/libexec/gsd-a11y-settings
                  │ ├─1010 /usr/libexec/gsd-clipboard
                  │ ├─1013 /usr/libexec/gsd-color
                  │ ├─1014 /usr/libexec/gsd-datetime
                  │ ├─1015 /usr/libexec/gsd-housekeeping
                  │ ├─1016 /usr/libexec/gsd-keyboard
                  │ ├─1020 /usr/libexec/gsd-media-keys
                  │ ├─1021 /usr/libexec/gsd-mouse
                  │ ├─1022 /usr/libexec/gsd-orientation
                  │ ├─1027 /usr/libexec/gsd-power
                  │ ├─1030 /usr/libexec/gsd-print-notifications
                  │ ├─1031 /usr/libexec/gsd-rfkill
                  │ ├─1032 /usr/libexec/gsd-screensaver-proxy
                  │ ├─1036 /usr/libexec/gsd-sharing
                  │ ├─1041 /usr/libexec/gsd-dummy --dummy-name=org.gnome.SettingsDaemon.Smartcard
                  │ ├─1042 /usr/libexec/gsd-xrandr
                  │ └─1055 /usr/libexec/ibus-engine-simple
                  └─user@105.service
                    ├─at-spi-dbus-bus.service
                    │ ├─941 /usr/libexec/at-spi-bus-launcher
                    │ ├─946 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
                    │ └─948 /usr/libexec/at-spi2-registryd --use-gnome-session
                    ├─dbus.service
                    │ ├─ 893 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
                    │ └─1177 /usr/libexec/dconf-service
                    └─init.scope
                      ├─880 /lib/systemd/systemd --user
                      └─881 (sd-pam)

déc. 26 08:23:20 kanae gnome-shell[908]: JS WARNING: [resource:///org/gnome/shell/ui/layout.js 217]: reference to undefined property global.window_group
déc. 26 08:23:20 kanae gnome-shell[908]: JS WARNING: [resource:///org/gnome/shell/ui/osdMonitorLabeler.js 59]: reference to undefined property Meta.MonitorMa>
déc. 26 08:23:20 kanae gnome-shell[908]: JS WARNING: [resource:///org/gnome/shell/ui/slider.js 34]: reference to undefined property St.GenericAccessible
déc. 26 08:23:20 kanae gnome-shell[908]: JS WARNING: [resource:///org/gnome/gjs/modules/tweener/tweener.js 540]: reference to undefined property properties[istr].isSpecialProperty
déc. 26 08:23:20 kanae gnome-shell[908]: JS ERROR: TypeError: can't convert undefined to object
                                         ObjectManager<._onManagerProxyLoaded/<@resource:///org/gnome/shell/misc/objectManager.js:196:31
                                          _proxyInvoker/asyncCallback@resource:///org/gnome/gjs/modules/overrides/Gio.js:86:13
déc. 26 08:23:20 kanae gnome-shell[908]: Error looking up permission: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.impl.portal.PermissionStore was not provided by any .service files
déc. 26 08:23:21 kanae gnome-shell[908]: JS WARNING: [resource:///org/gnome/shell/ui/windowManager.js 1493]: reference to undefined property actor.meta_window
déc. 26 08:23:21 kanae gnome-session-binary[895]: Entering running state
déc. 26 08:23:21 kanae dbus-daemon[893]: [session uid=105 pid=893] Activating service name='ca.desrt.dconf' requested by ':1.47' (uid=105 pid=1013 comm="/usr>
déc. 26 08:23:21 kanae dbus-daemon[893]: [session uid=105 pid=893] Successfully activated service 'ca.desrt.dconf'

I think session should be set inactive when a user logs in however it appears to not be the case.

On my setup, the logged in user can export _pulse-sink._tcp and _pulse-server._tcp but does not appear to export _pulse-source._tcp, is that what you are talking about ?
Comment 2 Mart Raudsepp gentoo-dev 2017-12-26 11:25:14 UTC
I wouldn't see

Built-in Audio Analog Stereo      _pulse-sink._tcp     local
Juniper HDMI Audio [Radeon HD 5700 Series] Digital  _pulse-sink._tcp     local
Built-in Audio Digital Stereo (IEC958) _pulse-source._tcp   local

on the other end in gnome-control-center sound.


Just the gdm Dummy Output (from being inactive I guess), until I made sure gdm isn't exporting anything. Might be a discovery-side issue too? I'll try to remember to roll back to gdm having PA and see if the zeroconf things are seen on the other computer
Comment 3 Pacho Ramos gentoo-dev 2017-12-26 12:39:04 UTC
I am not sure if this is related with the issue you are facing but, on Fedora and openSuSE, they are using a specific default.pa file for gdm (it is being placed at /var/lib/gdm/.pulse/default.pa) with this contents:
https://src.fedoraproject.org/rpms/pulseaudio/blob/master/f/default.pa-for-gdm

That is the way maybe they are loading only the needed modules without creating this conflicts... but I am unsure because I couldn't find the reasons for providing this "pulseaudio-gdm-hooks" packages
Comment 4 Igor V. Kovalenko 2021-06-21 22:58:29 UTC
(In reply to Mart Raudsepp from comment #0)
> ...
> As soon as I
> echo 'autospawn = no' > /var/lib/gdm/.config/pulse/client.conf
> and killall pulseaudio as root, things show up properly, as the intended
> remote user can export its outputs or something.
Another possible cause could be a suspected race in session handover with systemd. What happens there is that user slice starts required processes (i.e. pulseaudio daemon) while granting device permissions is not finished yet. Workaround is to restart pulseaudio in new user session.