Warn before enabling Plymouth in the bootloader menu (#4604)
Plymouth is purely cosmetic and a frequent source of boot breakage, most notably a black screen with the NVIDIA driver and a hidden LUKS password prompt. Show a yellow confirmation warning listing these risks when enabling it; when Plymouth is already enabled the user is only changing the theme, so the warning is skipped. Regenerate base.pot for the new strings.
This commit is contained in:
parent
4b14b795f5
commit
12f204571e
|
|
@ -130,6 +130,34 @@ class BootloaderMenu(AbstractSubMenu[BootloaderConfiguration]):
|
||||||
return bootloader
|
return bootloader
|
||||||
|
|
||||||
async def _select_plymouth(self, preset: PlymouthTheme | None) -> PlymouthTheme | None:
|
async def _select_plymouth(self, preset: PlymouthTheme | None) -> PlymouthTheme | None:
|
||||||
|
# Plymouth is purely cosmetic and a frequent source of boot breakage
|
||||||
|
# (notably with the NVIDIA driver and disk encryption), so confirm before
|
||||||
|
# enabling it. When it is already enabled the user is only changing the
|
||||||
|
# theme, so the warning is skipped.
|
||||||
|
if preset is None:
|
||||||
|
prompt = (
|
||||||
|
'[ansi_bright_yellow]'
|
||||||
|
+ tr('Plymouth adds a cosmetic boot splash but can cause boot problems on some setups:')
|
||||||
|
+ '\n\n • '
|
||||||
|
+ tr('black screen with the NVIDIA driver')
|
||||||
|
+ '\n • '
|
||||||
|
+ tr('hidden password prompt with disk encryption (LUKS)')
|
||||||
|
+ '\n\n'
|
||||||
|
+ tr('Would you like to enable it?')
|
||||||
|
+ '[/]\n'
|
||||||
|
)
|
||||||
|
|
||||||
|
result = await Confirmation(header=prompt, allow_skip=True, preset=False).show()
|
||||||
|
|
||||||
|
match result.type_:
|
||||||
|
case ResultType.Skip:
|
||||||
|
return preset
|
||||||
|
case ResultType.Selection:
|
||||||
|
if not result.get_value():
|
||||||
|
return preset
|
||||||
|
case ResultType.Reset:
|
||||||
|
raise ValueError('Unhandled result type')
|
||||||
|
|
||||||
return await select_plymouth_theme(preset)
|
return await select_plymouth_theme(preset)
|
||||||
|
|
||||||
async def _select_uki(self, preset: bool) -> bool:
|
async def _select_uki(self, preset: bool) -> bool:
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,20 @@ msgstr ""
|
||||||
msgid "Will install to custom location with NVRAM entry"
|
msgid "Will install to custom location with NVRAM entry"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Plymouth adds a cosmetic boot splash but can cause boot problems on some "
|
||||||
|
"setups:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "black screen with the NVIDIA driver"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "hidden password prompt with disk encryption (LUKS)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Would you like to enable it?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Would you like to use unified kernel images?"
|
msgid "Would you like to use unified kernel images?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue