Linux what is plymouth

Plymouth

Plymouth is a project from Fedora and now listed among the freedesktop.org’s official resources providing a flicker-free graphical boot process. It relies on kernel mode setting (KMS) to set the native resolution of the display as early as possible, then provides an eye-candy splash screen leading all the way up to the login manager.

Contents

Preparation

Plymouth primarily uses KMS (Kernel Mode Setting) to display graphics. In EFI/UEFI systems, plymouth can utilize the EFI framebuffer. If you cannot use KMS, e.g. because you are using a proprietary driver, or if you do not want to use the EFI framebuffer, consider using Uvesafb as it works with widescreen resolutions.

If you have neither KMS nor a framebuffer, Plymouth will fall back to text-mode.

Installation

Plymouth is available from the AUR: the stable package is plymouth AUR and the development version is plymouth-git AUR . Due to the fact that upstream plymouth release only happen on a spotty and highly unregular schedule, it is generally recommended to use plymouth-git AUR , because it is actually less likely to cause problems for most users than the stable package.

The plymouth hook

Add plymouth to the HOOKS array in mkinitcpio.conf. It must be added after base and udev for it to work:

After adding the plymouth-encrypt hook, if input goes to the background in plaintext instead of into the password prompt you need to add your (kernel) graphics driver to your initramfs. For example, if using intel:

This might also be a step needed for some themes to work.

Alternative plymouth hook (systemd)

If your mkinitcpio.conf includes the systemd hook, then replace plymouth with sd-plymouth . Additionally, if using hard drive encryption, use sd-encrypt instead of encrypt or plymouth-encrypt :

The kernel command line

Append quiet vt.global_cursor_default=0 to the kernel parameters. See Silent boot for other parameters to limit the output to the console.

Configuration

Smooth transition

If using GDM, install gdm-plymouth AUR which supports smooth transition out of the box (no other steps are required as it cleanly replaces gdm ).

Optimus-manager users on GDM can install gdm-plymouth-prime AUR , which is a fork of gdm-plymouth AUR with the required patches to support Prime switching.

Users of other display managers (SDDM, LightDM or LXDM) will have to:

  1. Disable your display manager unit, e.g. lxdm.service .
  2. Enable the respective DM-plymouth unit provided, e.g. lxdm-plymouth.service .

Show delay

Plymouth has a configuration option to delay the splash screen:

On systems that boot quickly, you may only see a flicker of your splash theme before your DM or login prompt is ready. You can set ShowDelay to an interval (in seconds) longer than your boot time to prevent this flicker and only show a blank screen. The default is 5 seconds, but you may wish to change this to a lower value to see your splash earlier during boot.

Change background image

Certain themes (such as spinner) can have their background image changed. On spinner, by default it is a grey noise pattern. To change it, replace /usr/share/plymouth/themes/theme/background-tile.png with your desired image. You may want to copy and create a new theme when doing this, to prevent it from being overridden by updates to Plymouth. Do not forget to regenerate the theme once changed, see the next section for how.

Changing the theme

Plymouth comes with a selection of themes:

  1. Fade-in: «Simple theme that fades in and out with shimmering stars»
  2. Glow: «Corporate theme with pie chart boot progress followed by a glowing emerging logo»
  3. Script: «Script example plugin» (Despite the description seems to be a quite nice Arch logo theme)
  4. Solar: «Space theme with violent flaring blue star»
  5. Spinner: «Simple theme with a loading spinner»
  6. Spinfinity: «Simple theme that shows a rotating infinity sign in the center of the screen»
  7. BGRT: A variation of Spinner that keeps the OEM logo if available (BGRT stands for Boot Graphics Resource Table)
  8. (Text: «Text mode theme with tricolor progress bar»)
  9. (Details: «Verbose fallback theme»)
Читайте также:  Операционная система microsoft windows характеристик

In addition you can install other themes from AUR, just have a look at the «Required by»-Array on plymouth AUR .

All currently installed themes can be listed by using this command:

By default, the spinner theme is selected. The theme can be changed by editing /etc/plymouth/plymouthd.conf , for example:

Themes can be previewed without rebuilding, press Ctrl+Alt+F6 to switch to a text terminal, log in as root and type:

To quit the preview, press Ctrl+Alt+F6 again and type:

Every time a theme is changed, the initrd must be rebuilt. The -R option ensures that it is rebuilt (otherwise manually run mkinitcpio -P ):

Hidpi

Edit plymouthd.conf as

and rebuild the initrd.

Tips and tricks

Show kernel messages

During boot you can switch to kernel messages by pressing the Home or Esc keys.

Adding Arch Logo to spinner and BGRT themes

To add the Arch Logo to the spinner and BGRT themes copy the Arch logo to the spinner theme directory with the name watermark.png :

To center the logo (if not already centered), add the following lines to the theme’s configuration file (file name ending with .plymouth , e.g. spinner.plymouth ):

Replacing the Arch Logo and creating custom themes

The following themes use the Arch Linux logo supplied by Plymouth in /usr/share/plymouth/arch-logo.png : fade-in, script, solar, spinfinity. If you want to use another logo, you can take one of them or one of the plymouth themes in AUR, edit the file *.plymouth (and maybe *.script , too) and replace this image with one of your choice. You should create a package from your newly created theme, because changes in /usr/share/plymouth may not be persistent across package upgrades.

After installing and selecting your theme, you should rebuild the initrd image to use the new splash.

Troubleshooting

«Unit configured to use KillMode=none» error message in logs

As of plymouth v0.9.5-6 and systemd 247.2-1, the following error message appears with high frequency in the system log:

See the upstream issue for more details.

This issue has now been fixed by upstream. However, because a new versioned release with the fix has yet to be released, the plymouth AUR package also still has this issue. plymouth-git AUR already incorporates the fix (as of late February, 2021).

Источник

Plymouth (Русский)

Plymouth — это проект из Fedora, обеспечивающий загрузку системы без бегущих надписей (логов) на экране. Он базируется на kernel mode setting (KMS, установка разрешения и глубины цвета на уровне ядра) для обеспечения родного разрешения экрана на раннем этапе загрузки, после чего отображает привлекательный загрузочный экран вплоть до этапа выбора пользователя.

Contents

Подготовка

‘Plymouth главным образом использует KMS (Kernel Mode Setting) для отображения графики. На EFI/UEFI системах plymouth может использовать EFI framebuffer. Если вы не можете использовать KMS, например, из-за использования проприетарного драйвера или не хотите использовать EFI framebuffer, обратите внимание на Uvesafb, поскольку он поддерживает широкоформатные разрешения.

Если у вас не настроены ни KMS ни framebuffer, то Plymouth вернется в текстовый режим.

Установка

Plymouth пока недоступен в официальных репозиториях и должен быть установлен из AUR.

Стабильная версия называется plymouth AUR , но можно использовать версию plymouth-git AUR .

Включение Plymouth в Initcpio

Добавьте Plymouth в HOOKS в mkinitcpio.conf. Он обязательно должен быть добавлен после base и udev :

Если после добавления хука plymouth-encrypt вводимый пароль попадает в фон в текстовом виде, необходимо добавить модуль radeon (для видеокарт radeon), i915 (для видеокарт Intel) или nouveau (для видеокарт nvidia) в строку MODULES в /etc/mkinitcpio.conf

Также этот шаг может потребоваться для работоспособности некоторых тем.

Альтернативный хук plymouth (systemd)

Если в mkinitcpio.conf используется хук systemd , необходимо заменить plymouth на sd-plymouth . На зашифрованной системе вместо encrypt или plymouth-encrypt используйте sd-encrypt :

Читайте также:  Windows file server доступ

Переконфигурация образа ядра (см. статью mkinitcpio для более детальной информации)

Командная строка ядра и настройка загрузчика

Необходимо установить quiet splash loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0 в параметрах ядра загрузчика. Для Grub2 наиболее простым и безопасным способом сделать это является редактирование файла /etc/default/grub . Приведите указанные переменные к следующему виду:

Можно заставить KMS принудительно запускаться раньше добавив «radeon.modeset=1» (для видеокарт radeon) или «i915.modeset=1» (для видеокарт Intel) в опции ядра:

Чтобы сгенерировать grub.cfg , выполните:

Для GRUB и LILO шаблон аналогичен.

Конфигурация

Плавный переход к дисплейному менеджеру

Для активации плавного перехода следует заменить существующий сервис дисплейного менеджера на поставлющийся вместе с Plymouth (на примерe LightDM):

  1. Отключите существующий сервис: systemctl disable lightdm.service
  2. Включите аналогичный сервис, совместимый с Plymouth: systemctl enable lightdm-plymouth.service

Если вы предпочитаете GDM, установите пакет gdm-plymouth AUR , содержащий патчи для «бесшовного» перехода от анимации Plymouth к дисплейному менеджеру.

Задержка загрузки

Если система загружается настолько быстро, что загрузочная анимация не успевает нормально воспроизвестись до запуска DM, можно установить задержку загрузки ShowDelay (в секундах), чтобы вместо мерцания темы показать пустой экран. По умолчанию время задержки равно 5 секундам, однако его можно изменить, чтобы увидеть анимацию на более ранних этапах загрузки.

Изменение фонового изображения темы

В некоторых темах (таких как spinner) можно изменить фоновое изображение. Для этого следует заменить файл /usr/share/plymouth/themes/theme/background-tile.png на собственный. Во избежание перезаписи измененной темы при обновлении plymouth, все действия проводите над копией темы.

Выбор темы

Plymouth поставляется со следующими темами:

  1. Fade-in: «Простая тема с затухающими и разгорающимися мерцающими звездами»
  2. Glow: «Производственная тема, показывающая процесс загрузки в виде круговой диаграммы»
  3. Script: «Пример скрипта» (Несмотря на описание выглядит очень симпатичной темой с логотипом Arch)
  4. Solar: «Космическая тема, голубая звезда с протуберанцами»
  5. Spinner: «Простая тема с вращающимся индикатором загрузки»
  6. Spinfinity: «Простая тема, показывающая вращающийся знак бесконечности в центре экрана»
  7. (Text: «Текстовый режим с трехцветной полосой прогресса»)
  8. (Details: «Резервная тема с подробностями загрузки»)

Список установленных тем можно вызвать командой:

Изначально выбрана тема spinner. Чтобы выбрать другую, следует изменить строку Theme= в /etc/plymouth/plymouthd.conf или воспользоваться командой

При каждой смене темы необходимо пересобирать initrd . Это произойдет автоматически при выборе темы темы с помощью plymouth-set-default-theme с опцией -R (в противном случае самостоятельно запустите mkinitcpio -P ).

Для просмотра тем без перезагрузки следует нажать Ctrl+Alt+F6 , войти как root и набрать:

Для выхода из просмотра нажать Ctrl+Alt+F6 снова и набрать:

Советы и рекомендации

Отображение сообщений ядра

Чтобы включить отображение сообщений ядра, во время загрузки нажмите Home или Esc .

Добавление логотипа ArchLinux к темам spinner и BGRT

Чтобы добавить логотип к темам spinner и BGRT, нужно поместить его в папку темы с названием watermark.png :

Замена логотипа Arch и создание кастомных тем

Темы, поставляемые с plymouth (fade-in, script, solar, spinfinity), используют логотип, расположенный в /usr/share/plymouth/arch-logo.png . Чтобы заменить логитип, можно позаимствовать любой по вкусу из тем в AUR, изменить *.plymouth (и, возможно, *.script ), заменив изображение на выбранное. Из созданной темы следует создать пакет, поскольку изменения в /usr/share/plymouth могут быть переписаны при обновлении.

Устранение неполадок

Маленькие черные квадраты

По каким-то причинам после выполнения команды выйти, Plymouth может оставить черные квадраты вверху экрана видимые поверх всех окон. Два подтвержденных случая, это ноутбук с видеокартой ATI при использовании KMS, и десктоп с видеокартой nVidia использующий framebuffer. Источником проблемы является опция —retain-splash , которая требуется для максимально плавного отображения в процессе загрузки. Обходным путем является принудительное закрытие Plymouth после логина, когда опция —retain-splash более не требуется.

/.xinitrc и добавить следующую линию перед линией запускающей менеджер окружения рабочего стола (подобной «exec openbox-session») чтобы выключить Plymouth:

Чтобы получить разрешение на принудительное отключение Plymouth без пароля, нужно отредактировать /etc/sudoers :

Источник

  • plymouth

Plymouth presents a graphic animation (also known as a bootsplash) while the system boots. It provides eye-candy and a more professional presentation for scenarios where the default high-information text output might be undesirable. It also handles boot prompts, such as entering disk encryption passwords.

Preinstallation

Before installing, check that the driver you’re using for your card supports kernel modesetting (KMS) which is required for Plymouth to function:

    ATI/AMD — Supported and automatically enabled by the Radeon and AMDGPU drivers that are used for any recent card. Support unknown for very old ATI cards.

NVIDIA — Supported by the Nouveau driver and the proprietary driver, always enabled by default with Nouveau but some systems may require it to be manually enabled while using the proprietary NVIDIA driver. See more information here

Читайте также:  Приложение для хранения паролей windows

Intel — Supported and enabled in the xserver-xorg-video-intel driver and the (preferred) modesetting driver that is used if that package is not installed.

Mali — Supported and enabled in the Lima and Panfrost drivers available in Debian 11/Bullseye and newer. Support in the proprietary driver is unknown.

Installation

# indicates a command must be run as root. Omit if signed in as root, otherwise replace with sudo.

To install Plymouth and its base set of themes, run:

If using Debian with KDE Plasma in Buster or newer, you may also want to install the KDE Breeze Plymouth theme and an easy integrated configuration module for Plymouth with:

If you run into any issues trying to set the theme, or if it doesn’t appear, you may need to install the proprietary GPU firmware. This is especially likely on AMD cards. Enable the contrib and non-free sections in your SourcesList file and run:

Enabling KMS (NVIDIA Proprietary)

In Debian 10/Buster, modesetting is enabled by default for NVIDIA graphics cards using the proprietary driver if they’re from the GeForce 8 series or newer. These instructions can probably be skipped unless you’re using an older version of Debian, or an older graphics card.

To manually force-enable modesetting on the proprietary NVIDIA driver, you must add an additional kernel parameter. The easiest way to do this is to open /etc/default/grub in your text editor of choice. This file requires administrative permissions to edit, so you can may launch your text editor as root using sudo, run it while logged in as root, or use a text editor that supports PolKit such as Kate/KWrite which can edit the file without special permissions.

Within the quotes on the line that starts with GRUB_CMDLINE_LINUX_DEFAULT, add the option nvidia-drm.modeset=1. The final line may look similar to:

Afterwards, apply the change by running:

After which, rebooting will load the driver with proper modesetting.

WARNING: With some versions of the NVIDIA driver prior to Debian 11/Bullseye, there may be a bug that can cause a blank screen on some DisplayPort-connected monitors whenever logging in to GNOME while modesetting is enabled.

Configuration

Please edit the file /etc/default/grub and change the resolution. To do that, search for the line #GRUB_GFXMODE=640x480 and remove the # at the start to uncomment it. You can then set it to match the resolution of your monitor.

For example, on a standard 1080p screen:

You can also write the color depth:

If your GRUB_CMDLINE_LINUX_DEFAULT does not contain a splash option, add it like so:

Take care to not remove or modify the modesetting line for the NVIDIA proprietary driver if you had previously added it.

Finally, apply the change by running:

Themes

If you’re using KDE Plasma and have installed the kde-config-plymouth package, terminal commands are not necessary to view and set your Plymouth theme. The «Boot Splash Screen» panel in your system settings will allow you to do the same. In this case, the «Breeze» theme is also recommended for aesthetic consistency.

Otherwise, to display all installed themes, run:

The default output will be:

Then, to set your desired theme run:

Where THEME refers to one of the listed values from the executed command.

Troubleshooting

If you still are having issues after installing the proprietary firmware and otherwise verifying that there’s nothing that should be preventing Plymouth from functioning correctly, it’s likely there is an issue with the kernel modesetting.

You can follow the instructions for enabling modesetting in the NVIDIA Proprietary driver but change the option to forcibly enable it in other drivers.

For Nouveau, the option is nouveau.modeset=1.

For AMD, the option is radeon.modeset=1 when using the radeon driver and amdgpu.modeset=1 when using the amdgpu driver.

If issues are experienced on Intel, you are recommended to remove the xserver-xorg-video-intel package entirely and use the internal modesetting driver for display. Otherwise, if you require the package, you might add the i915.modeset=1 option.

Источник

Оцените статью