Skip to content

pipewire: add dmaheap sysusers.d entry for OTA safety - #414

Merged
Ricardo Salveti (ricardosalveti) merged 1 commit into
qualcomm-linux:mainfrom
tkanfade:fix/pipewire-dmaheap-sysusers-ota-safety
Aug 10, 2026
Merged

pipewire: add dmaheap sysusers.d entry for OTA safety#414
Ricardo Salveti (ricardosalveti) merged 1 commit into
qualcomm-linux:mainfrom
tkanfade:fix/pipewire-dmaheap-sysusers-ota-safety

Conversation

@tkanfade

@tkanfade tkanfade commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

The dmaheap group is required by pipewire.service.d/dmaheap.conf (SupplementaryGroups=dmaheap). Previously it was only created via GROUPADD_PARAM at image build time which does not survive OSTree OTA updates. Add a sysusers.d entry alongside the existing dmaheap drop-in so systemd-sysusers creates the group declaratively on every boot from /usr, making it OTA-safe.

Fixes: wpctl status returning Could not connect to PipeWire post OTA (1.9 to 2.0) on QCS9075 RB3 Config-2.

CR-Id: 4591795

@@ -0,0 +1,8 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

MIT or BSD-3-Clause (not Clear)

# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear

# Create the dmaheap group so PipeWire can access /dev/dma_heap/system.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not PipeWire-centric, there can be other users. Please move to systemd or any other generic recipe.

@ricardosalveti

Copy link
Copy Markdown
Contributor

This is a workaround for the fact that the user and group id list in meta-qcom-distro is not static, and because of that the relevant files under /etc are not managed by OStree, and an update ends up not really reflecting the new users and groups associated with the new build.

For our ostree flavor we should really use useradd-staticids with nss-alt support, similar to what we did in lmp via meta-lmp, as with that we get a static and ostree-managed user and group list.

As a workaround, we could have this under a more generic recipe, which would take care of adding any other user that might be reflected in 2.0.

@tkanfade
tkanfade force-pushed the fix/pipewire-dmaheap-sysusers-ota-safety branch from 245dd0b to adc444f Compare August 7, 2026 05:25
@tkanfade

tkanfade commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Updated the PR based on review feedback.

@lumag

Copy link
Copy Markdown
Contributor

Missing DCO tag

@lumag Dmitry Baryshkov (lumag) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing DCO. Also, does this work together with the existing groups created via GROUPADD?

Comment thread recipes-core/systemd/systemd/dmaheap-sysusers.conf
@tkanfade
tkanfade force-pushed the fix/pipewire-dmaheap-sysusers-ota-safety branch from adc444f to 0cd0461 Compare August 7, 2026 07:17
@tkanfade

tkanfade commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Missing DCO. Also, does this work together with the existing groups created via GROUPADD?

Regarding GROUPADD_PARAM compatibility: Both works together without conflict. GROUPADD_PARAM runs only once at image build time and does not run during OTA updates. systemd-sysusers is safe to run multiple times, it checks if dmaheap group already exists before creating it, so no duplicates or conflicts. On fresh flash it skips (group already exists), post-OTA it creates the group on first boot.

Comment thread recipes-core/systemd/systemd_%.bbappend Outdated
@@ -0,0 +1,12 @@
# SPDX-License-Identifier: BSD-3-Clause

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove this SPDX line, no need, this is a bbappend.

@@ -0,0 +1,7 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would also say that we don't really need copyright / license for this single file (one liner), but ok to keep.

The dmaheap group is required by pipewire.service.d/dmaheap.conf
(SupplementaryGroups=dmaheap). Previously it was only created via
GROUPADD_PARAM at image build time which does not survive OSTree
OTA updates. Add a sysusers.d entry so systemd-sysusers creates
the group declaratively on every boot, making it OTA-safe.
The dmaheap group is not PipeWire-specific (other components
like weston also use it), so it belongs in a generic recipe
rather than a component-specific one.

CR-Id: 4591795
Signed-off-by: Tejas Vijay Kanfade <tkanfade@qti.qualcomm.com>
@ricardosalveti
Ricardo Salveti (ricardosalveti) merged commit ae115f9 into qualcomm-linux:main Aug 10, 2026
141 of 142 checks passed
@quic-yocto-ci

Copy link
Copy Markdown

Successfully created backport PR for wrynose:

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.

4 participants