Skip to content

Fix sed -i option placement in desktop postinst scripts #9002

@coderabbitai

Description

@coderabbitai

Problem

Across 30 postinst files in the desktop configurations, the sed -i command for disabling PulseAudio timer scheduling has incorrect option placement:

sed "s/load-module module-udev-detect$/& tsched=0/g" -i /etc/pulse/default.pa

When -i appears after the script argument, sed treats it as a filename to read (not as an in-place edit flag), causing the operation to fail silently and leaving /etc/pulse/default.pa unchanged.

Expected Fix

Move the -i option before the script:

sed -i 's/load-module module-udev-detect$/& tsched=0/g' /etc/pulse/default.pa

Scope

Affects 30 postinst files:

  • config/desktop/bookworm/environments/{budgie,cinnamon,gnome,kde-plasma,mate,xfce,xmonad}/debian/postinst
  • config/desktop/common/environments/{budgie,cinnamon,deepin,enlightenment,gnome,i3-wm,kde-plasma,mate,xfce,xmonad}/debian/postinst
  • config/desktop/noble/environments/i3-wm/debian/postinst
  • config/desktop/plucky/{appgroups/browsers,environments/cinnamon,environments/i3-wm}/debian/postinst
  • config/desktop/sid/environments/{gnome,xfce}/debian/postinst
  • config/desktop/trixie/{appgroups/browsers,environments/budgie,cinnamon,gnome,kde-plasma,kde-plasma-mobile,mate,xfce,xmonad}/debian/postinst

References

Impact

PulseAudio timer scheduling is not being disabled as intended on systems using sndhdmi or similar drivers, potentially causing audio issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working as it should

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions