# Gentoo and plymouth

## olger901

Hello all, 

I was wondering what everyone else's experience with plymouth under Gentoo is. As I've spent a few hours trying to get it to work, but it just refuses to work.

Configuration

- Gentoo Linux (17.0 profile) with UEFI systemd (/dev/sda1 = /boot = FAT32, /dev/sda2 = swap, /dev=sda3 = / btrfs)

- Manually compiled kernel

- Tried both the stable and the latest ~amd64 dracut version

- Latest stable plymouth version in portage with the libkms flag set and the pango and gtk flag unset (as I don't have X, I just want a bootup display when the device boots).

   - This is where my first problem occurs as the manual states that you need to compile external dependencies with the static-libs flag.

      - When I compile plymouth with the static-libs flag, there's no themes and running plymouth-set-default-theme just states there's no themes, and when I compile it with the -static-libs flag there are themes (but I don't think this will work in the initramfs?)

- I'm using the latest stable 4.19.27-gentoo-r1 kernel with intel kms support compiled in with no additional firmware (as ith's 4th Gen Intel Core i5)  and working (fast switching terminals work)

- I've tried removing / adding legacy fbdev support in the kernel, but it doesn't make a difference

- Running plymouthd && plymouth show-splash actually shows the (animated solar theme) splash screen, which confirms to me it's (or should be) working

Bootloader

- I've tried using both EFI stub boot (which doesn't work, as the command-line parameters are ignored; seems to be a EFI bug in the system I'm using)

- I've tried using grub and appended the quiet and splash parameters in /etc/default/grub. These parameters get parsed at boot (verified in dmesg), as it quietly shows Loading Linux... and Loading initrid...

- I'm essentially running mount /boot && plymouth-set-default-theme -R solar && grub-mkconfig -o /boot/grub/grub.cfg

- I've also tried running dracut and dracut -H -m "base plymouth" to get the most basic or a generic image, but neither of those work either.

Essentialy after Loading initrd... the screen just goes black for 5 - 10 sec. and then shows the console login prompt (like the images do not get loaded or that there's something wrong with plymouth in the initramfs. Does anybody have any suggestions?

----------

## Hacker

Hi Olger. My experience with plymouth under Gentoo has always been that it doesn't work properly: someone must have had it at least partially working (the wiki claims the gdm USE flag enables a seamless transition from plymouth to gdm, so presumably that end of the process, at least, was working for someone somewhere at some point), but I've just given it a try now and am getting exactly the same results as you.

Years ago I tried it and it displayed the splash themes while booting...but it was so ugly it basically defeated the purpose of a boot splash. You would get a stretch of console text messages, then a second or two of the plymouth splash, then a black screen, then your login manager: nothing at all like the seamless experience on other distros. Now it doesn't seem to be working at all, but I notice that the console messages report that they're starting plymouthd long after they should be (i.e. it should be grabbing the display straight from GRUB), so even if it were displaying something, it looks as though it would still be displaying it much too late. We could look at starting it earlier but there's not much point when it isn't even drawing the splash theme.

The perfectly good (in fact better, as you could also enable console decorations) fbsplash alternative is no longer in portage, and nobody seems to be maintaining the old kernel bootsplash patches either, so it looks as though we're stuck with plymouth. It would be great if someone could confirm that it does actually work on a current (stable) system so we know whether it's worth continuing to look for problems with our configurations. It's nearly a week since you asked this question...I gave it a go myself just now because I got tired of waiting for an answer...so I'm guessing nobody on Gentoo has the seamless (no graphics mode changes) GRUB -> splash -> display manager experience that plymouth is meant to provide.

If plymouth is broken I might see if an old fbsplash ebuild somewhere can still be made to work: I remember the bootsplash patches were easy to update for new kernels long after the developer stopped maintaining them. It's a pity the Gentoo (Spock) framebuffer splash stuff has gone from portage: it was great being able to know which console you were on from the decorations.

----------

## twalter

I have plymouth running on my laptop now.  It works well enough as a splash but not perfectly as it doesn't prompt for my LUKS password (for my /home) graphically but on the console underneath.  Any attempt to actually input the password results in the field acting as though ENTER was pressed on the first character of the password.  Very annoying.  There were reports of this in Fedora for the last 4 years but it was silently fixed somewhere (or wallpapered over by the default choice of FDE instead of partition-specific encryption.).  It seems as though something needs to be added to the dmcrypt init script to check for plymouth then the password could be prompted for via "plymouth ask-for-password " but I haven't figured it out as yet.

----------

## Hacker

 *twalter wrote:*   

> I have plymouth running on my laptop now.  It works well enough as a splash

 

Thanks twalter, that's good to know. That being the case, I'll take a closer look at why this isn't happening on my own system.

----------

## twalter

It was very finicky to set up but I have a laptop with Optimus so KMS issues abound.  I'm on kernel 5.2.0 with nVidia's proprietary blob.  My laptop boots with the GPU enabled and it must remain so until after logging into X or it crashes for reasons unknown (but reported elsewhere.)

My plymouth install isn't seemless, unfortunately, as the crng init warning pops on every boot which is jarring.  I gave up on trying to get the LUKS prompt to show up with the stock Gentoo deployment and instead wrote my own init script.  It asks for a password now, which is good, but the boot process doesn't wait for me to finish, which is bad as the nvme only takes .5 seconds to get to X and my home dir is still encrypted.    :Confused: 

----------

## twalter

 *Hacker wrote:*   

>  *twalter wrote:*   I have plymouth running on my laptop now.  It works well enough as a splash 
> 
> Thanks twalter, that's good to know. That being the case, I'll take a closer look at why this isn't happening on my own system.

 

I forgot to mention that you should enable early printk in the kernel and then check /var/log/boot.log; plymouth errors will appear in here and you can get your timings as well.

----------

## twalter

FWIW, I sat down and figured out what was wrong with my script.  As it turns out, there was a syntax error in my depend() and a typo in my command   :Embarassed:   :Rolling Eyes: 

Where's that bashing my head emojii when I need it?!

```
#!/sbin/openrc-run

# Copyright 1999-2019 Gentoo Authors

# Distributed under the terms of the GNU General Public License v2

description="Script to get plymouthd to ask for /home passphrase"

depend() {

   before localmount 

}

start() {

   ebegin "Prompting for LUKS p/w"

   if [[ ! -e /dev/mapper/crypt-home ]] 

     then 

      /usr/bin/plymouth ask-for-password --number-of-tries=5 --prompt "/home password: " --command "cryptsetup open --type=luks2 /dev/sda4 crypt-home"

   fi

   eend $?

}

```

----------

## roeleveld

 *twalter wrote:*   

> It was very finicky to set up but I have a laptop with Optimus so KMS issues abound.  I'm on kernel 5.2.0 with nVidia's proprietary blob.  My laptop boots with the GPU enabled and it must remain so until after logging into X or it crashes for reasons unknown (but reported elsewhere.)
> 
> My plymouth install isn't seemless, unfortunately, as the crng init warning pops on every boot which is jarring.  I gave up on trying to get the LUKS prompt to show up with the stock Gentoo deployment and instead wrote my own init script.  It asks for a password now, which is good, but the boot process doesn't wait for me to finish, which is bad as the nvme only takes .5 seconds to get to X and my home dir is still encrypted.   

 

Can you share your init-script along with a list of the files you add to the initramfs?

I am trying to get it to work myself.

Many thanks,

Joost

----------

## twalter

 *roeleveld wrote:*   

>  *twalter wrote:*   It was very finicky to set up but I have a laptop with Optimus so KMS issues abound.  I'm on kernel 5.2.0 with nVidia's proprietary blob.  My laptop boots with the GPU enabled and it must remain so until after logging into X or it crashes for reasons unknown (but reported elsewhere.)
> 
> My plymouth install isn't seemless, unfortunately, as the crng init warning pops on every boot which is jarring.  I gave up on trying to get the LUKS prompt to show up with the stock Gentoo deployment and instead wrote my own init script.  It asks for a password now, which is good, but the boot process doesn't wait for me to finish, which is bad as the nvme only takes .5 seconds to get to X and my home dir is still encrypted.    
> 
> Can you share your init-script along with a list of the files you add to the initramfs?
> ...

 

The script is a few posts above this one.  Just adding a plymouth-ask script gets it done.  Mine is specific to my PC but is easily altered.

----------

## lcsavb

 *olger901 wrote:*   

> 
> 
> Essentialy after Loading initrd... the screen just goes black for 5 - 10 sec. and then shows the console login prompt (like the images do not get loaded or that there's something wrong with plymouth in the initramfs. Does anybody have any suggestions?

 

Maybe it's a bit later to answer, but I was facing the same problem.

I've recompiled plymouth without the UDEV use flag and now it's working perfectly.

From gentoo's wiki (https://wiki.gentoo.org/wiki/Plymouth):

 *Quote:*   

> 
> 
> When creating a manual initramfs, for example using Custom_Initramfs, it is possible to bundle Plymouth.
> 
> First, disable udev USE flag for Plymouth (it will not display anything until udev is properly initialized). Otherwise udev will need to be added to the initramfs as well. 
> ...

 

----------

## psycho

Hi there. When you say "it's working perfectly", do you mean it's now possible to do the "seamless" thing that plymouth can do in the rare cases where everything's configured properly (GRUB background -> Plymouth background -> GDM background -> desktop background all without a flicker, so it looks like the desktop panel/icons/whatever are basically being drawn on the GRUB splash)? If so I'll set it all up. I get a kick out of that boot candy stuff when it's seamless...not so much when it's interspersed with video mode changes and/or blank screens (it feels somehow tidier just to let the text console do its thing, in that case).

----------

## hedmo

i am running plymouth on all my boxes and it works about 90% . i am using a custom themes and solar. i have just follow the :

https://wiki.gentoo.org/wiki/Plymouth . and using dracut --force (kernel).

----------

## psycho

That 90% might even be 100% these days, in the sense of its being as good as it's possible to get with desktops as they are now. It's a long time since I've seen the seamless GRUB -> desktop thing, so maybe it relied on some kind of multiseat trickery that's no longer possible. It doesn't really matter, as my kernel loads so quickly plymouth would only be visible for a second or two anyway...plus it's nice having no initrd, so I think I'll stay plymouth-less: it's only when I saw it (maybe on Fedora) doing that cool here-are-your-desktop-icons-on-what-used-to-be-the-GRUB-background thing that I thought "damn, I want that too".   :Wink: 

----------

## nathanlkoch

 *psycho wrote:*   

> That 90% might even be 100% these days, in the sense of its being as good as it's possible to get with desktops as they are now. It's a long time since I've seen the seamless GRUB -> desktop thing, so maybe it relied on some kind of multiseat trickery that's no longer possible. It doesn't really matter, as my kernel loads so quickly plymouth would only be visible for a second or two anyway...plus it's nice having no initrd, so I think I'll stay plymouth-less: it's only when I saw it (maybe on Fedora) doing that cool here-are-your-desktop-icons-on-what-used-to-be-the-GRUB-background thing that I thought "damn, I want that too".  

 

While there are purists in many different forms, I personally like a seamless desktop experience.

Booting, having a nice bios screen, grub screen, plymouth loader, and a pymouth-gdm transition is in fact very nice to have, from an esthetics perspective. It's just a user experience thing.

I personally don't use plymouth anymore, there's something about how to does screen rendering i find sketchy.

----------

