26

I have a custom python app that I wanted to have started automatically on the RPi with the official touch screen.

This used to work fine without a sleuth of boot messages appearing until the latest update in Jessie with the PIXEL desktop. My 'asplashscreen' script that I used to use now is littered with boot messages again.

I dumped 'asplashscreen' and since Plymouth has finally been patched to work (after PIXEL release) I now have Plymouth showing a pretty boot screen, but the old methods of silencing the boot messages don't seem to work anymore.

How can I remove ALL boot messages (including auto-login and kernel) messages?

  • This is not an answer, but a question to G Trawo regarding the console screen stayed at TTY3 login screen instead of TTY1 command prompt screen. How do I auto switch it back to TTY1? FYI, I am using the raspberry pi 7" LCD without the hdmi. – cash Apr 19 '17 at 18:34
  • @cash I am not sure how you would automatically switch back. You may not even have to switch it to TTY3 to begin with, since some of the options below might get rid of most of the messages anyway.. But my app starts on TTY1, most likely since I start it with 'startx' (the app starts after the x server gets going). – G Trawo Apr 20 '17 at 21:10
  • 2
    add to /boot/cmdline.txt fbcon=map:2 – Mich Oct 18 '18 at 20:18
  • The comment above from @Mich is gold!! Please make it an answer so I can vote it up. The accepted answer did not work anymore on my latest Raspbian – Boy Dec 20 '18 at 8:25
33

Please note that removing the output of message can also hinder your ability to troubleshoot your system after. You may want to wait until you are in the finishing stages before applying these fixes.

As of December 2016, a lot of the old methods seemed to have stopped working. I created this question/answer post because it took me many hours to aggregate all the solutions. What I did to remove ALL the boot up text (even login messages):

1.) Change /boot/cmdline.txt

sudo nano /boot/cmdline.txt

Change the console from tty1 to

console=tty3 

Add this to the end of the line. 'loglevel=0' removes most of the messages from the boot. You can also use 'loglevel=3', but some boot messages may re-appear.

quiet splash loglevel=0 logo.nologo vt.global_cursor_default=0

If you are going to use Plymouth add this:

plymouth.ignore-serial-consoles 

2.) Tell dmesg to be quiet

sudo nano /etc/rc.local

Add this before 'exit 0':

#Suppress Kernel Messages
dmesg --console-off

This should take care of most boot messages this far. #2 also took care of the 'watchdog watchdog0: watchdog did not stop!' message on shutdown for me.

3.) Change the auto login in systemd (Hides the login message when auto-login happens)

sudo nano /etc/systemd/system/autologin\@.service

Change your auto login ExecStart from:

ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM

To:

ExecStart=-/sbin/agetty --skip-login --noclear --noissue --login-options "-f pi" %I $TERM

Make sure to change 'pi' to the username you use!

4.) Change /etc/pam.d/login (removes the Kernel version from showing when you auto-login)

sudo nano /etc/pam.d/login

Change the line

session    optional   pam_exec.so type=open_session stdout /bin/uname -snrvm

To be

session    optional   pam_exec.so type=open_session stdout

5.) Add .hushlogin

touch ~/.hushlogin

or Remove Message of the Day -MOTD (alternative to 5)

sudo update-rc.d motd remove

Now my boot just shows the Plymouth boot screen, and goes into my python GUI.

  • Good work, but it doesn't give me a completely silent boot. I still get the rainbow pattern, the Raspberry Pi Logo and the Pixel welcome screen and some lines of text. This is on Jessie. – Chiwda May 2 '17 at 15:53
  • @Chiwda I personally like the rainbow pattern, since it indicates that the unit is starting up. I would not categorize it as a 'boot message' such as text. That being said, putting disable_splash=1 into /boot/config.txt would remove it. Also, I don't use the Pixel desktop since I have a custom app starting instead. So I can't really help you with anything Pixel related. – G Trawo May 3 '17 at 17:43
  • As of right now, Step 1 seems to make no difference -- something must have changed there (again) :) – mlvljr Sep 6 '17 at 12:32
  • @mlvljr Step 1 never really made much of a difference. It's more Step 2 that really hushed the boot text for the most part. That being said, if you apply ALL the steps above, it should take care of the boot messages. It still does it for me, even after a recent update. – G Trawo Sep 6 '17 at 15:03
  • @GTrawo Interesting, thanks a lot, I will give it another try then :) – mlvljr Sep 6 '17 at 22:17
9

1. Remove the rainbow splash screen enter image description here

sudo nano /boot/config.txt

add below line to the end of file

disable_splash=1

check if this config take effect (optional)

sudo reboot

2. Hide the Raspberry logo enter image description here

sudo nano /boot/cmdline.txt

Add below line to end of file

logo.nologo

check if this config take effect (optional)

sudo reboot

3. Hide the messages

sudo nano /boot/cmdline.txt

Add below line to end of file

quiet

change console

console=tty1 --> console=tty3

check if this config take effect (optional)

sudo reboot

4. Change splash screen

enter image description here

copy your custom splash to home directory and replace raspberry's splash.png

sudo cp ~/splash.png /usr/share/plymouth/themes/pix/splash.png

check if this config take effect (optional)

sudo reboot

5. Hide the cursor

Add below line to the file /boot/cmdline.txt

vt.global_cursor_default=0

check if this config take effect (optional)

sudo reboot

6. Result Check the video on this link

0

I would have commented on someone else's answer but I don't have enough reputation yet. To all this, I'd add that (as of Debian/Raspbian Buster at least), it seems like dmesg errors will break through Plymouth and replace your custom splash screen as a console message. For example, the typical undervoltage notification will do so. It's possible that undervoltage was promoted from STDOUT to STDERR in this major release.

It may be necessary to add the following line to the end of /etc/rc.local before the final exit: dmesg --console-off.

protected by Community Jun 28 '17 at 14:03

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.