Plymouth

Revision 15 as of 2010-12-01 11:39:35

Clear message

plymouth.png

Plymouth is the application which provides the graphical "bootsplash" for Ubuntu.

Quick Facts

Plymouth:

  • Uses KMS (Kernel Mode Setting) (where possible) and the framebuffer to set the screen resolution.
  • Comprises 3 components:
    • A daemon (server) process called plymouthd

      • The daemon is responsible for the graphical display, animation and logging.
    • A client application called plymouth

      • The client sends commands to the daemon
    • A library libply.so to allow applications to be written to talk to the daemon

      • (The plymouth command is linked to libply.so for this reason).

  • Supports themes.
  • Is scriptable (see package plymouth-theme-script)

  • Runs at system startup and system shutdown.

    • (One the system is "up", the daemon stops (see file /etc/init/plymouth-stop.conf).

Testing

Running Plymouth "post-boot"

You can experiment with Plymouth after your system has booted. To start the Plymouth daemon:

  1. Boot system and login as usual
  2. (i) [RECOMMENDED] Install plymouth-x11 package (allows you to see the boot screen in an X11 window)

    • sudo apt-get install plymouth-x11

  3. Start a terminal (such as gnome-terminal)

  4. Start the Plymouth daemon by running the following:
    • sudo plymouthd --debug --tty=`tty` --no-daemon

Plymouth is now running, so we can have some fun:

  • To check if Plymouth really is running:

    • sudo plymouth --ping && echo plymouth is running || echo plymouth NOT running

  • To show a message on our "boot" screen
    1. Start another gnome-terminal terminal/tab

    2. Run the following to show the Plymouth window:

      • sudo plymouth show-splash

    3. Display a message
      • sudo plymouth message --text="hello world"

  • A slightly more useful example
    1. Show the splash screen
      • sudo plymouth show-splash

    2. Stop the graphical progress indicator
      • sudo plymouth pause-progress

    3. Display a message
      • sudo plymouth message --text="pausing boot - press 'c' or space bar to continue"

    4. Wait for the user to type either 'c', 'C' or space (no return required)
      • sudo plymouth watch-keystroke --keys="cC " --command="tee /tmp/c_key_pressed"

    5. Change the on-screen message
      • sudo plymouth message --text="resuming boot"

    6. Resume the graphical progress indicator
      • sudo plymouth unpause-progress

To stop the Plymouth daemon:

  • sudo plymouth --quit

Debugging

Warning /!\ This section is for advanced users only.

Showing old Text-based Boot

If you want to see the text-based boot messages, press ESCAPE at any point when Plymouth is running. Note that the ESCAPE key acts as a toggle, so you can keep switching between graphical and text mode if required.

Enabling Logging

You can set Plymouth to overlay internal debug messages by passing the following command-line option:

  • plymouth:debug

For example, if you are running Ubuntu Maverick (10.10):

  1. Power on system
  2. Hold down the SHIFT key until the Grub boot menu appears

  3. Type "e" to edit the default kernel command-line

  4. Use the arrow keys to go to the end of the line which starts "linux /boot/vmlinuz ..."

  5. Add a space character, followed by "plymouth:debug"
    Notes:

    • If you're interested in the overall boot, you may wish to remove the "quiet" keyword too)

  6. Type CONTROL+x to boot

  7. Once the system has booted, you can view all the Plymouth debug output in file var/log/plymouth-debug.log.

Notes:

  • If you are using the live CD, the process is slightly different:
    1. Power on system
    2. Hold down the SHIFT key until ISOLINUX "boot:" prompt appears
    3. Type, "live plymouth:debug"

CategoryBoot