This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1888553 - pulseaudio should not be started when users login via SSH
Summary: pulseaudio should not be started when users login via SSH
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: systemd
Version: 8.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: systemd maint
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-15 07:54 UTC by Christian Horn
Modified: 2024-06-13 23:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-29 19:44:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-11156 0 None Migrated None 2023-09-29 19:44:17 UTC
Red Hat Knowledge Base (Solution) 6972450 0 None None None 2022-08-18 10:02:22 UTC

Description Christian Horn 2020-10-15 07:54:44 UTC
Description of problem:
pulseaudio should not be triggered when a user logs in via SSH.
It seems to make no sense, so "KISS" alone would be a reason to request that.
Additionally, it leads to issues like bz1885553, where this happened:
a) user logins via SSH
b) pulseaudio started
c) bluetooth packages installed, triggered by pulseaudio in a way leading to a systemd crash
Let's just cut off the whole chain in preventing the first thing which seems to serve no purpose at all for SSH logins from remote: prevent pulseaudio from being run.

Version-Release number of selected component (if applicable):
All rhel8 versions affected, it seems

How reproducible:
always

Steps to Reproduce:
- Login as user via SSH (also happens for Xorg/Wayland, but might make sense then)

    user@<uid>.service executes
  this spawns "systemd --user"


Actual results:
1. "systemd --user" sets up pulseaudio.socket (listening on /run/user/<uid>/pulse/native) as part of reaching sockets.target
  this is because pulseaudio.socket is installed (/usr/lib/systemd/user/sockets.target.wants/pulseaudio.socket)

2. "systemd --user" sets up pulseaudio.service as part of reaching default.target
  this is because pulseaudio.service is installed (/etc/systemd/user/default.target.wants/pulseaudio.service)

2.) is then in our other scenarios leading to issues.

Expected results:
Pulseaudio should not be triggered when a user logs in via SSH.

Comment 1 Christian Horn 2021-02-04 06:00:49 UTC
Hi engineering, any updates?
rhel8.4 would be a chance to fix this..

Comment 2 Wim Taymans 2021-02-12 14:22:12 UTC
No update. I have no idea where to begin with this..

I will try to ask someone who knows about systemd and the ssh login process and
how we can disable pulseaudio in the ssh case.

Comment 3 Christian Horn 2021-02-15 05:40:43 UTC
Thanks.

I would plainly request the removal of the 'sockets.target.wants/pulseaudio.socket'
in Fedora or systemd upstream, and then wait for someone to scream.
It might need to be reintroduced for desktop sessions, and the way to do it properly
needs discussion.  Just doing it by default, for example when someone logs in via
ssh, is causing issues.

Comment 4 Christian Horn 2021-02-18 05:57:33 UTC
Brainstormed today with our partner about this.

For normal service units, we can define filter criteria.
For example microcode_ctl is not run in virtual guests,
/usr/lib/systemd/system/microcode.service :
  ConditionVirtualization=false

If pulseaudio.socket could have something like this, for
example evaluating environment variables could then be used
to understand if the user is running x11/wayland and only then
run pulseaudio.

Comment 5 Renaud Métrich 2021-02-18 07:33:41 UTC
This is a possibility, but I'm not sure this is feasible at all, indeed the user may spawn a VNC service and want to benefit from the audio (I believe VNC has audio support as well).

I think this should be handled at 'systemd --user' level, more globally.
For example, it doesn't make sense to start 'systemd --user' when a sftp session is started (for now it starts).
When a ssh session is started, startup of 'systemd --user' should be done only *on demand*, e.g. when the user does a systemctl --user command for example.

Comment 7 yzheng 2022-08-18 10:01:30 UTC
Hi, all 

This issue is disappeared from RHEL 8.3 which uses this version of pulseaudio: 
~~~
pulseaudio-13.99.1-1.el8.x86_64
~~~ 

Thank you.

Comment 8 Jeffrey Watts 2022-08-18 13:00:11 UTC
yzheng, I'm using CentOS 8 Stream using the package pulseaudio-14.0-2.el8.x86_64 and I still have this problem.  Occurs when someone logs in via SSH and also spawns a process when certain cronjobs start.

Comment 9 yzheng 2022-08-18 17:39:10 UTC
Hi, Jeffrey

You're right... I found this only does not happen on the root user. The non-root users' ssh logins still generate the pulseaudio process.

Thank you.

Comment 12 Jeffrey Watts 2022-12-27 16:10:27 UTC
Tested CentOS Stream 14.0-4.el8.x86_64, which appears to be the latest.  Remote root logins do not spawn the pulseaudio processes (as mentioned before), but non-root remote logins still spawn processes.  Is there a way to disable this in the configuration?  Thanks in advance.

Comment 13 Michal Sekletar 2023-01-09 13:51:09 UTC
Either socket or the service should be enabled but not both at the same time. How to start pulseaudio (or pulse socket) just for the sessions associated with seat that actually have access to sound card is something to figure out.

Comment 14 RHEL Program Management 2023-09-29 19:44:00 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 15 RHEL Program Management 2023-09-29 19:44:23 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.