restart to blank screen

Hi, It was all going so well...
We installed everything up to the ps3 controller which was working well, then restarted the pi3 and after initial normal boot sequence we got a black screen with a blinking curser top left.
Tried turning off /on and the same, I don't really know where it went wrong, everything we installed seemed to be good, just up to the crontab -e line
Any suggestions?
thanks H

piborg's picture

That is very strange, editing crontab should not cause that kind of problem.

Does the Raspberry Pi show anything booting up at all, or does it immediately show the blank screen?

Hi, boot up looks fine raspberry image in middle of screen . various notifications on bottom left, I think last one is starting rsylog (or something similar). Has definitely loaded raspbian

piborg's picture

In that case my best guess is that the script you added to crontab is the culprit.

Do you get a login prompt if you press CTRL + ALT + F2?

Lush. Yes!

piborg's picture

That is good, it means everything is working fine.

The problem will be the script you added with crontab stealling the screen.
If you are using one of our diddyJoy.py or similar scripts I think i might know what the trouble is.

There is a bit of a bug with pygame unfortunately with how it handles not having a graphical display.
In this case I think it might be creating a blank GUI screen, this also affects use over SSH logins.

What you can try is editing the .py script you are trying to run.
Look for the line:

#pygame.display.set_mode((1,1))

and delete the # so it looks like:

pygame.display.set_mode((1,1))

It is a bit confusing, on some installs making this change stops things working correctly.
This is a bug relating to pygame itself sadly.

If that does not work on its own you should be able to run the script in a VNC session.
This will allow access to the graphical system and make pygame happy.

Do you have any suggestions what I should do to fix it ?

Hi, could you lead me through how to get to that bit of code to change, it thought I could do so through startx but that doesn't work. Please and Thanks !

piborg's picture

The easiest thing to try would be forcing the script to stop, then try switching back to the graphical display:

  1. Use CTRL + ALT + F2 to get to a terminal
  2. Login if you need to
  3. Terminate all Python scripts using this command:
    sudo killall python
  4. Use CTRL + ALT + F7 to switch back to the graphical output

If that does not work then I would suggest editing the script in the terminal using nano like this:

  1. Change to the directory the scripts are stored, for DiddyBorg:
    cd ~/diddyborg
  2. Open the script to edit in nano, for example:
    nano diddyJoy.py
  3. Use the arrow keys to move up and down looking for the line to change
  4. Make any changes by typing normally
  5. To save the changes press CTRL + O
  6. To exit nano press CTRL + X
Subscribe to Comments for "restart to blank screen"