WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Using Plymouth boot splash  (Read 6947 times)

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Using Plymouth boot splash
« on: February 27, 2013, 09:40:08 AM »
I'm hopping to start a topic on using Plymouth boot splash without clutering other posts. There's not much out there in terms of documentation. I tried other boot splashes and had problems but this is the one worked for me. I ended up following step by step on wiki that was posted by a member of this forum (well done). This works for me. It boots up goes away and x starts and there is a smooth transition to window manager. My problem is I'm not to sure on how this is all working. The part where it needs to be in a initrd for early boot and where the calls are to start the deamon and show the splash screen are kinda clear although I don't quit understand all the arguments passed but this I can investigate. Where I get lost is where does it get closed? I need to understand this because I will eventually get rid of x and boot up into a console app. My TC computer will be used in an industrial environment as a controller and branding is very important for them. Thanks

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
Re: Using Plymouth boot splash
« Reply #1 on: March 17, 2013, 01:56:30 PM »
It's been a while since I put that wiki together. I intended to add another section about using the intel KMS modules and plymouth DRM, but that project (at work) got put on hold and I've moved on and haven't given it a lot of thought lately. My reasons for doing this were similar to yours: branding for an industrial computer. I even got the manufacturer to put our logo in the BIOS splash. Our applications use X exclusively, so I hadn't concerned myself too much about console mode though there are a few things I can say. If your computer has more than one video out then you will probably need to disable the unused ports in the kernel command line. In one of my cases the connector didn't physically exist, but Linux still found it. I don't have it in front of me, but it's something like video=LVDS1:d. There's a way to figure this out mining the sys file system, but I don't recall the details offhand. If you don't disable it you may have problems with the console mode and display resolutions not matching. In the wiki there's a bit at near the end where you can terminate plymouth. I have this in .xsession, but if you were not going to start X then you you could add it to the beginning of whatever script you are going to use to start your console mode application. Which arguments are you wondering about?

I don't recall getting more than a little interest when I first posted this. There was even less documentation when I started, so I'm glad the wiki worked for someone. As you probably have already learned, documentation for plymouth is almost non-existent. Even the source code has almost no comments. If I had someone interested in it besides me I might put some time into it on the side to finish up the documentation. Here's what I see as needs to be done:

1. KMS splash. I have this working only for Intel, would need help for Radeon.
2. 64-bit. I've only worked with pure 32-bit and since my system has only 1 or 2 gigs of RAM I didn't see a need for 64-bit, but maybe somebody has one.
3. WHY some things work the way they do.
4. HOW to fix certain problems, like the video port problem I mentioned above.
5. Themes. This is two parts; making the theme work in plymouth (pull together plymouth docs from ?), and making the plymouth theme work the TC way which is WAY different than the regular distro way.
6. Other things I'm forgetting at the moment.

I spent ALOT of time getting this working, so I have ALOT of experience (experience is what you get when you don't get what you want). Let me know what your interest level is, and maybe we can go from there.

Andy

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Using Plymouth boot splash
« Reply #2 on: December 07, 2014, 04:55:41 AM »
Hi everyone, greetings from Indonesia!

This is my first post and as such I would like to first thank anyone working and contributing for Tiny Core. I think it's a fascinating distribution/OS (one of the most divergent GNU/Linux systems I've ever come across and therefore a challenging one too..)

I've just started working in a company which uses Tiny Core as thin clients and Debian as servers. Eversince I was assigned to work closely with Tiny Core, I've been reading up on it and growing to like it, specifically how TC fills in a gap/niche and serving an incredibly useful purpose.

My first real obstacle is getting boot splash to work. Following the wiki, I get around 5 seconds of:
Quote
plymouthd: could not start boot splash: No such file or directory
instead of the hoped for Tiny Core theme boot splash and then an immediate boot into X immediately thereafter.

And if I add the keyword for debugging
Code: [Select]
APPEND initrd=/tce/boot/core.gz,/tce/boot/plymouth-initrd.gz quiet [b]plymouth.debug=file:/var/log/plymouthd-debug.log[/b] waitusb=5:UUID="75a90.....4277" tce=UUID="75a90...4277" splash logo.nologo vga=773 into the extlinux.conf file as the wiki suggested, I get a load of boot messages including the following important warning lines:
Quote
...
start_boot_splash: Loading boot splash theme '/usr/share/plymouth/themes/default.plymouth'
ply_key_file_open_file: Failed to open key file /usr/share/plymouth/themes/default.plymouth: No such file or directory
...
start_boot_splash: Loading boot splash theme '/usr/share/plymouth/themes/text/text.plymouth'
ply_key_file_open_file: Failed to open key file /usr/share/plymouth/themes/text/text.plymouth: No such file or directory
...
start_boot_splash: Loading boot splash theme '/usr/share/plymouth/themes/text/text.plymouth'
ply_key_file_open_file: Failed to open key file /usr/share/plymouth/themes/text/text.plymouth: No such file or directory
...
start_boot_splash: Splash couldn't be loaded: No such file or directory
start_boot_splash: Loading built in splash
...
plymouthd: could not start boot splash: No such file or directory
show_messages: not displaying messages, since no boot splash
...

Now, it confuses me why plymouthd is looking for themes/text/text.plymouth when it should be looking for themes/TinyCore/TinyCore.plymouth as can be seen here:
Code: [Select]
tc@box:~$ cat /etc/plymouth/plymouthd.conf
# Administrator customization go in this file
[Daemon]
Theme=TinyCore
tc@box:~$ ls /usr/share/plymouth/themes/TinyCore | head -4
TinyCore.plymouth
animation-0001.png
animation-0002.png
animation-0003.png
tc@box:~$

Since the error messages won't stop asking for themes/default.plymouth and themes/text/text.plymouth, I tried feeding plymouthd what it wants by renaming (using cp) themes/TinyCore/TinyCore.default to themes/default.plymouth, themes/text/text.plymouth and just plain themes/TinyCore.plymouth as can be seen here:
Code: [Select]
tc@box:~$ ls /usr/share/plymouth/themes/
TinyCore/                     TinyCore.plymouth          default.plymouth               text/
tc@box:~$
but with no luck yet... (by the way, I had made the entire /usr/share/plymouth/themes directory persistent)

At first, I and others at the office thought that maybe the splash wouldn't show because of the outdated wiki (last edited 2 yrs ago), the resolution or graphics card problem, but the error message just indicates that it just can't find the file. Am I missing something here or the wiki is just not applicable anymore to Core v5.4?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Using Plymouth boot splash
« Reply #3 on: December 07, 2014, 05:45:01 AM »
The wiki page says the theme needs to be in the initrd, otherwise it becomes available too late (persistence is one of the last steps in the boot process). It sounds like you have it in backup?
The only barriers that can stop you are the ones you create yourself.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Using Plymouth boot splash
« Reply #4 on: December 07, 2014, 11:20:27 AM »
Wow, you're right Curaga! It did have something to do with persistence being too late (although I don't know where that says in the wiki). Now a different kind of error messages show up. I'm going to try to figure it out myself first, see if I could solve it myself. But thanks for pointing me in the right direction...!!

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11049
Re: Using Plymouth boot splash
« Reply #5 on: December 07, 2014, 01:22:51 PM »
The commands (on the wiki page) that create the theme place it in the new initrd.
The only barriers that can stop you are the ones you create yourself.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Using Plymouth boot splash
« Reply #6 on: December 08, 2014, 04:26:45 AM »
You remember when I quoted the boot messages including some "important" warning lines, it turns out that I was wrong. They're not important at all...

I was wondering why plymouthd was looking for themes/default.plymouth and themes/text/text.plymouth instead of TinyCore.plymouth theme that was already included by andyj in the already-customized plymouth-initrd.gz (which he made available through a link at the first section of the wiki) for people who have TinyCore version 4.7.2 or later. So that's why I just made up those two files plymouthd was looking for, copying (and adjusting) the contents from TinyCore/TinyCore.plymouth and reinserting them in the plymouth-initrd.gz. It turns out that plymouthd had already looked for the TinyCore.plymouth theme and opened it, but it failed halfway through while processing it and then later decided instead to look for built-in, fallback themes, namely themes/default.plymouth and themes/text/text.plymouth. I didn't know that it failed processing themes/TinyCore because I missed it when the messages went by quickly and couldn't scroll back up to see it. Here's the (probably) real important error lines:

Quote
show_default_splash:Could not start text splash screen,showing built-in fallback
start_boot_splash:Loading boot splash theme '/usr/share/plymouth/themes/text/text.plymouth
ply_key_file_load_group:trying to load group Plymouth Theme
ply_key_file_load_group:trying to load group two-step
ply_key_file_load_groups:key file has no more groups
create_plugin:Using '/usr/share/plymouth/themes/text' as working directory
ply_key_file_get_value:key file does not have entry for key 'ProgressFunction'
start_boot_splash:attaching plugin to event loop
start_boot_splash:attaching progress to plugin
add_displays_and_keyboard_to_boot_splash:setting keyboard on boot splash
add_displays_and_keyboard_to_boot_splash:adding text display on boot splash
start_boot_splash:showing plugin
ply_boot_splash_show:showing splash screen
show_splash_screen:loading lock image
show_splash_screen:loading box image
show_splash_screen:loading corner image
show_splash_screen:loading header image
show_splash_screen:couldn't load views
ply_boot_splash_show:can't show splash: No such file or directory
ply_boot_splash_free:freeing splash
ply_event_loop_stop_watching_for_timeout:no matching timeout found for removal
remove_displays:removing pixel displays
remove_displays:removing text displays
remove_displays:Removing 120x40 text display
remove_displays:Removing node
destroy_plugin:destroying plugin
free_views:freeing views

This happens when trying to process themes/default.plymouth and themes/text/text.plymouth (and most-likely themes/TinyCore/TinyCore.plymouth too, but I can't be 100% sure because I can't scroll up and see the beginning, I only see the last 5 lines, up to "remove_diplays:Removing...." of what could be a failure message for TinyCore themes).

I also found examples in other sites where the command 'plymouth --show-splash' gives a preview of the splash. I've done this and it's doing nothing in my system.. And googling for "show_splash_screen:couldn't load views" and "ply_boot_splash_show:can't show splash: No such file or directory" returns a list of 15 unfruitful search results. So is there any other possible clue? (This is my graphics card btw:)
Quote
00:00.0 Host bridge: Intel Corporation Mobile 945GME Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03)

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Using Plymouth boot splash
« Reply #7 on: December 08, 2014, 05:11:59 AM »
Okay, I finally got it working. I'll try to figure out what made it work and post something tomorrow, but I think it was vga=0x318 for me.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Using Plymouth boot splash
« Reply #8 on: December 09, 2014, 12:23:58 AM »
Okay, it turns out that it had nothing at all to do with the customized plymouth-initrd.gz that is provided in the wiki.

Almost all documents I read on plymouth in the internet explains that plymouth relies on KMS (kernel mode setting) drivers to do its job. But I realized my system doesn't have KMS drivers loaded, it still uses fb (framebuffer). This is from my /var/log/Xorg.0.log:

Quote
[    21.438] (II) LoadModule: "modesetting"
[    21.439] (WW) Warning, couldn't open module modesetting
[    21.439] (II) UnloadModule: "modesetting"
[    21.439] (II) Unloading modesetting
[    21.439] (EE) Failed to load module "modesetting" (module does not exist, 0)
[    21.439] (II) LoadModule: "fbdev"
[    21.439] (II) Loading /usr/local/lib/xorg/modules/drivers/fbdev_drv.so
[    21.440] (II) Module fbdev: vendor="X.Org Foundation"
[    21.440]    compiled for 1.14.2, module version = 0.4.3
[    21.440]    Module class: X.Org Video Driver
[    21.440]    ABI class: X.Org Video Driver, version 14.1
[    21.440] (II) VESA: driver for VESA chipsets: vesa
[    21.440] (II) FBDEV: driver for framebuffer: fbdev
[    21.440] (--) using VT number 2

[    21.670] (WW) Falling back to old probe method for fbdev
[    21.670] (II) Loading sub module "fbdevhw"
[    21.670] (II) LoadModule: "fbdevhw"
[    21.671] (II) Loading /usr/local/lib/xorg/modules/libfbdevhw.so
[    21.671] (II) Module fbdevhw: vendor="X.Org Foundation"
[    21.672]    compiled for 1.14.2, module version = 0.0.2
[    21.672]    ABI class: X.Org Video Driver, version 14.1

It seems that systems that can't use KMS (legacy framebuffer instead), plymouth could still be used by pushing the terminal into a VESA graphical mode by entering vga=0x318 in the boot configuration, which translates to 1024x768x32bit. On my system (and other systems too probably), I could see and choose other VESA modes available by typing vga=askme instead. And 318 and 31b (or 1280x1024x32) looks best on my system. Hopefully, this could help others who are struggling with the same problem (maybe the wiki should be added). Thanks Curaga for the quick replies and hints about TinyCore's booting process.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11704
Re: Using Plymouth boot splash
« Reply #9 on: December 09, 2014, 12:47:35 AM »
Hi kalu
The Wiki is maintained by forum members and you are welcome to make updates. Just sign in using your forum name and password.

Offline kalu

  • Newbie
  • *
  • Posts: 41
Re: Using Plymouth boot splash
« Reply #10 on: December 09, 2014, 01:46:09 AM »
Cool, I'll do that..! Thanks for the info..