[SRU] Users are not initially configured properly for audio in Ubuntu Studio

Bug #2063899 reported by Erich Eickmeyer
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-desktop-provision
New
Undecided
Unassigned
ubuntustudio-default-settings (Ubuntu)
Status tracked in Oracular
Noble
Triaged
High
Erich Eickmeyer
Oracular
Triaged
High
Erich Eickmeyer
ubuntustudio-installer (Ubuntu)
Status tracked in Oracular
Noble
Fix Committed
High
Erich Eickmeyer
Oracular
Fix Released
High
Erich Eickmeyer

Bug Description

[Impact]

Ubiquity and Calamares used to have a facility to make the first configured user part of the `audio` group by default. Unfortunately, with `ubuntu-desktop-bootstrap`, we lost this ability in Ubuntu Studio and making sure that the users had the proper configuration (memory limits for the audio group) was an oversight.

Fortunately, the ubuntustudio-installer application, and its included ubuntustudio-audio-config application, have the facility to do that, although the script needed a little bit of work and the entire package was missing a runtime dependency on `polkitd-pkla` to make the whole system work as expected.

Additionally, `ubuntustudio-default-settings` needs to add additional configuations to /etc/adduser.conf so that new users are automatically part of the audio group and provide the /etc/security/limits.d/audio.conf file. In the meantime, having Audio Configuration fix existing users is a good workaround.

[Test Case]

 * Run Ardour
 * Ardour will complain about limited memory (see screenshot attached)

Expected: No complaints from Ardour

[What could go wrong]

The only thing I expect could go wrong is that the systemd user service fails to launch. The backup for this is to run ubuntustudio-audio-config from the launcher, which would run everything as expected (setting the memory limits, adding the user to the `audio` group, and rebooting the system).

[Other Information]

What really needs to happen here is that `ubuntu-desktop-provision` or `subiquity` needs to add the initial user to the audio group, or at least provide the facility for Ubuntu Studio to configure the initial user to be added as such similar to how Ubiquity did.

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :
Changed in ubuntustudio-installer (Ubuntu):
importance: Undecided → High
summary: - Dummy audio device running on new installs
+ [SRU] Users are not initially configured properly
summary: - [SRU] Users are not initially configured properly
+ [SRU] Users are not initially configured properly for audio in Ubuntu
+ Studio
description: updated
Changed in ubuntustudio-default-settings (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Erich Eickmeyer (eeickmeyer)
description: updated
Changed in ubuntustudio-default-settings (Ubuntu Noble):
status: New → In Progress
Changed in ubuntustudio-installer (Ubuntu Noble):
status: New → In Progress
importance: Undecided → High
Changed in ubuntustudio-default-settings (Ubuntu Noble):
importance: Undecided → High
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in ubuntustudio-installer (Ubuntu Noble):
assignee: nobody → Erich Eickmeyer (eeickmeyer)
Changed in ubuntustudio-default-settings (Ubuntu Oracular):
status: In Progress → Fix Committed
Changed in ubuntustudio-installer (Ubuntu Oracular):
milestone: noble-updates → none
Changed in ubuntustudio-installer (Ubuntu Noble):
milestone: none → noble-updates
Changed in ubuntustudio-default-settings (Ubuntu Noble):
milestone: none → noble-updates
Changed in ubuntustudio-installer (Ubuntu Oracular):
status: In Progress → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

this is marked 'fix committed' but there is no upload in oracular-proposed. blocks SRU.

Changed in ubuntustudio-default-settings (Ubuntu Oracular):
status: Fix Committed → Incomplete
Changed in ubuntustudio-installer (Ubuntu Oracular):
status: Fix Committed → Incomplete
Steve Langasek (vorlon)
Changed in ubuntustudio-installer (Ubuntu Oracular):
status: Incomplete → Fix Committed
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

> this is marked 'fix committed' but there is no upload in oracular-proposed. blocks SRU.

I uploaded it before changing the status and just got a "Rejected" for trying to upload again.

Changed in ubuntustudio-default-settings (Ubuntu Oracular):
status: Incomplete → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Erich, or anyone else affected,

Accepted ubuntustudio-installer into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntustudio-installer/1.18.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntustudio-installer (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Steve Langasek (vorlon) wrote :

+ # Now, let's make sure we have the audio memlimits file in place
+ if ! [ -e /etc/security/limits.d/audio.conf ]; then
+ cp /usr/share/ubuntustudio/audio.conf /etc/security/limits.d/
+ fi

This results in an unowned file on the filesystem, and you don't remove it again on package removal. Is there a reason you aren't shipping this as a conffile?

Changed in ubuntustudio-default-settings (Ubuntu Noble):
status: In Progress → Incomplete
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote (last edit ):

> This results in an unowned file on the filesystem, and you don't remove it again on package removal. Is there a reason you aren't shipping this as a conffile?

Merely forgot to make sure it gets removed, but it has to be conditional in that it doesn't get removed *if* ubuntustudio-installer is also installed since both packages install the file. ubuntustudio-installer doesn't require that ubuntustudio-default-settings be present, so neither can own the file.

Shipping as a conffile would require both ubuntustudio-installer *and* this package shipping it as a conffile, so that's not a good idea.

Changed in ubuntustudio-default-settings (Ubuntu Noble):
status: Incomplete → Triaged
Changed in ubuntustudio-default-settings (Ubuntu Noble):
status: Triaged → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :

So, I overlooked this earlier:

    # There has got to be a better way to do this.
    if [ "$(grep -Fx 'EXTRA_GROUPS="audio' /etc/adduser.conf)" = "" ]; then
        echo -e "\n# Ubuntu Studio Configuration\n# Add other EXTRA_GROUPS before this line" >> /etc/adduser.conf
        echo 'EXTRA_GROUPS="audio"' >> /etc/adduser.conf
    fi
    if [ "$(grep -Fx 'ADD_EXTRA_GROUPS=1' /etc/adduser.conf)" = "" ]; then
            echo 'ADD_EXTRA_GROUPS=1' >> /etc/adduser.conf
    fi

/etc/adduser.conf is a conffile owned by the adduser package. Modifying it from package maintainer scripts is not allowed.

Revision history for this message
Steve Langasek (vorlon) wrote : Proposed package upload rejected

An upload of ubuntustudio-default-settings to noble-proposed has been rejected from the upload queue for the following reason: "packages must not edit conffiles in maintainer scripts".

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntustudio-installer - 1.19

---------------
ubuntustudio-installer (1.19) oracular; urgency=medium

  * Fix missing user audio config (mem limits, group) (LP: #2063899)
  * Fix "Switch Configuration" loop bug (LP: #2064170)

 -- Erich Eickmeyer <email address hidden> Fri, 26 Apr 2024 18:00:44 -0700

Changed in ubuntustudio-installer (Ubuntu Oracular):
status: Fix Committed → Fix Released
Changed in ubuntustudio-default-settings (Ubuntu Oracular):
status: Fix Committed → Triaged
Changed in ubuntustudio-default-settings (Ubuntu Noble):
status: In Progress → Triaged
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote (last edit ):

$ apt-cache policy ubuntustudio-installer
ubuntustudio-installer:
  Installed: 1.18.1
  Candidate: 1.18.1
  Version table:
 *** 1.18.1 100
        100 http://us.archive.ubuntu.com/ubuntu noble-proposed/universe amd64 Packages
        100 http://us.archive.ubuntu.com/ubuntu noble-proposed/universe i386 Packages
        100 /var/lib/dpkg/status
     1.18 500
        500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu noble/universe i386 Packages

* Created new user
* Signed-in as new user
x Ubuntu Studio Audio Configuration did *NOT* launch to configure user in audio group or install audio.conf file if necessary
* Manually launched Ubuntu Studio Audio Configuarion - successfully added user to audio group, made sure audio.conf file was installed, and rebooted system.
* No complaints from Ardour

With that, the test was 1/2 successful - this should have happened on login not on launch of the audio configuration utility. As it turns out, the `graphical.target` in the systemd .session file should be `graphical-session.target`. Will reupload with a fix.

Changed in ubuntustudio-installer (Ubuntu Noble):
status: Fix Committed → In Progress
Changed in ubuntustudio-installer (Ubuntu Oracular):
status: Fix Released → In Progress
tags: added: verification-failed verification-failed-noble
removed: verification-needed verification-needed-noble
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntustudio-installer - 1.20

---------------
ubuntustudio-installer (1.20) oracular; urgency=medium

  * Fix for correct target for audio config check (LP: #2063899)

 -- Erich Eickmeyer <email address hidden> Mon, 06 May 2024 11:57:23 -0700

Changed in ubuntustudio-installer (Ubuntu Oracular):
status: In Progress → Fix Released
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Erich, or anyone else affected,

Accepted ubuntustudio-installer into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntustudio-installer/1.18.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntustudio-installer (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-noble
removed: verification-failed verification-failed-noble
Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

$ apt-cache policy ubuntustudio-installer
ubuntustudio-installer:
  Installed: 1.18.2
  Candidate: 1.18.2
  Version table:
 *** 1.18.2 100
        100 http://us.archive.ubuntu.com/ubuntu noble-proposed/universe amd64 Packages
        100 http://us.archive.ubuntu.com/ubuntu noble-proposed/universe i386 Packages
        100 /var/lib/dpkg/status
     1.18 500
        500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        500 http://us.archive.ubuntu.com/ubuntu noble/universe i386 Packages

* Created new user
* Signed-in as new user
* Ubuntu Studio Audio Configuration launched, prompted for reboot
* Signed-in as new user, launched Ardour
* No complaints from Ardour

This does appear to be fixed and will properly configure for current users.

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.