https://bugs.kde.org/show_bug.cgi?id=502746

Junak <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #9 from Junak <[email protected]> ---
I believe I found the root cause of this. It is in the KCM helper, not in the
plymouth-themes package. Reproduced on Kubuntu 26.04.1 LTS with
kde-config-plymouth 6.6.4.

Cause

`PlymouthHelper::save()` in `src/helper.cpp` handles Ubuntu-based systems
through update-alternatives:

- If the chosen theme's `.plymouth` file is not yet registered in
`update-alternatives --list default.plymouth`, the helper only runs
  `update-alternatives --install /usr/share/plymouth/themes/default.plymouth
default.plymouth <file> 100`
  and skips `--set` (it is an `if/else`).
- Only if the file is already registered does it run `update-alternatives --set
default.plymouth <file>`.

`--install` does not change the selected alternative when the group is in
manual mode, or in auto mode when another alternative has a higher priority.
Kubuntu's `kubuntu-logo` uses priority 150, for example.

Ubuntu's initramfs hook (`/usr/share/initramfs-tools/hooks/plymouth`, line 22)
takes the theme from the `default.plymouth` alternative, not from
`plymouthd.conf`. So `update-initramfs -u` packs the previous theme, and the
old splash is shown after reboot.

At the same time, the helper writes `Theme=<new>` to
`/etc/plymouth/plymouthd.conf`, so the KCM shows the new theme as the current
one. Applying the same theme again doesn't help, because Apply stays disabled.

A theme that is already registered (for example after a second attempt via
another theme and back) takes the `--set` branch and works. That is why the
problem looks random.

About the plymouth-themes hypothesis: its postinst registers only `spinner`
(default.plymouth, priority 70) and `text` (text.plymouth). Themes like
`tribar` or `details` stay unregistered, so they hit the `--install`-only path.

Steps to reproduce

1. Pick a theme whose `.plymouth` is not listed by `update-alternatives --list
default.plymouth`, e.g. `tribar`, `details`, or a theme installed via "Get
New…".
2. Apply.
3. `update-alternatives --query default.plymouth` still shows the previous
value, and the previous splash appears after reboot.
`/etc/plymouth/plymouthd.conf` contains the new `Theme=`.

Suggested fix

Run `update-alternatives --set default.plymouth <file>` in both branches, i.e.
also after `updateAlternativesInstall()`.

Workaround

    sudo update-alternatives --set default.plymouth
/usr/share/plymouth/themes/<theme>/<theme>.plymouth
    sudo update-initramfs -u

Related: bug 399901. The KCM determines the current theme only from `Theme=` in
`plymouthd.conf` (`kcm.cpp`, `load()`), while on Ubuntu the active theme is the
alternative. After a plymouth package upgrade replaced `plymouthd.conf` (the
old one went to `.dpkg-old`), the KCM highlighted the wrong theme here.

Kubuntu 26.04.1 LTS · kde-config-plymouth 6.6.4 · plymouth
24.004.60+git20250831.4a3c171d-0ubuntu8

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to