mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

blank the screen

Wed Feb 27, 2013 3:26 pm

Hi,

I'm running with a composite tv on the pi. After boot, I want to wipe the screen of all the messages and the login prompt.

When I play a video, it plays fine, but after it finishes, all the messages and boot prompt are still there.

Any help appreciated!

Matt

-rst-
Posts: 1316
Joined: Thu Nov 01, 2012 12:12 pm
Location: Dublin, Ireland

Re: blank the screen

Wed Feb 27, 2013 3:32 pm

The command 'clear' (http://linux.die.net/man/1/clear) should get rid of most of the stuff...
http://raspberrycompote.blogspot.com/ - Low-level graphics and 'Coding Gold Dust'

mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

Re: blank the screen

Wed Feb 27, 2013 3:53 pm

thanks, but that only works for the screen I type it in.
I need to blank the composite output. I think this is displaying tty1
from /etc/initab:

1:2345:respawn:/sbin/getty --noclear 38400 tty1

I haven't tried removing the getty lines from inittab yet, but it probably wouldn't help with blanking the boot messages.

Cheers,
Matt

mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

Re: blank the screen

Wed Feb 27, 2013 4:44 pm

after messing about with inittab, getty, fim, fbi I found the easy way to blank the screen: write zeros to the frame buffer directly.

dd if=/dev/zero of=/dev/fb0

mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

Re: blank the screen

Wed Feb 27, 2013 4:52 pm

though after the video finishes playing, the old text is still there!

User avatar
RaTTuS
Posts: 10249
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: blank the screen

Wed Feb 27, 2013 4:58 pm

what are you wanting to do ?
boot up
do
clear
play a video
for ever?

or similar ....
fbset may or may not help
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

Re: blank the screen

Wed Feb 27, 2013 5:16 pm

I'm wanting to have a blank screen, and when something happens, a video plays. When the video ends, back to blank screen.

I nearly have that, but with short flashes of boot messages in the back ground.

pseudo code:

while forever:
if something happens:
blank screen
play movie
blank screen

The flashes of the boot messages happen between the play movie and blank screen commands I suppose.

I'd rather leave the boot messages there because they're useful for debugging, but I suppose I can configure the pi to keep them quiet.

I'm trying to work out where linux is keeping the contents of the original frame buffer, so I can flush that too. Any ideas?

mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

Re: blank the screen

Wed Feb 27, 2013 5:33 pm

I set the console to be tty2 in /boot/cmdline.txt and that's one way to solve it.
Last thing would be nice to get rid of the flashing cursor!

mattvenn
Posts: 24
Joined: Wed Jul 25, 2012 9:59 am

Re: blank the screen

Wed Feb 27, 2013 5:40 pm

cracked it!

1/- set kernel to log to console 2 (console=tty2 in /boot/cmdline.txt)

2/- wipe screen with dd if=/dev/zero of=/dev/fb0

3/- turn off cursor with setterm -cursor off > /dev/tty1

Then I can play my movie whenever I get the trigger, and have a nice blank screen before and after, no flickers.

Matt

Ruffio
Posts: 16
Joined: Fri Jun 17, 2016 2:35 pm

Re: blank the screen

Mon Aug 01, 2016 1:47 pm

So the above instructions blanks the screen with black, but how to do it with other colours? White/blue...

Return to “Beginners”