koontz2k4
Posts: 10
Joined: Fri Apr 19, 2019 5:42 pm

Screen goes black after boot

Wed May 22, 2019 5:41 pm

Hi All, I was playing around with adding a python script to run at boot, so I modified the files at the two locations below:

sudo nano /etc/profile
sudo nano /etc/rc.local

It was successful, and my script runs when the Pi boots up, the problem is that now my monitor goes black on boot, so I must have messed something up when I added my script to one of those places.

I know my Raspberry Pi is still working properly, because I'm using a camera attached to my Pi to broadcast a video, and I can still see the live streaming video when I access it from my cellphone. Any ideas on how I can get the feed to my monitor back??

Also, I know it's not my HDMI cable or an issue with my monitor, because I can see the boot up sequence scroll on the screen with no issues. It's not until the sequence finishes that the screen goes black.

Thanks in advance!
Ryan

pcmanbob
Posts: 5948
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Screen goes black after boot

Wed May 22, 2019 6:15 pm

When you entered the line that calls your program in which ever file it was you used, probably rc.local you forgot to include the & on the end of the line which would run your program in the background and so allow the pi to finish booting.

As it stands your pi is waiting for your program to finish before continuing with the boot process.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

koontz2k4
Posts: 10
Joined: Fri Apr 19, 2019 5:42 pm

Re: Screen goes black after boot

Wed May 22, 2019 6:17 pm

Gotcha, makes sense. Any idea how I would fix it??

W. H. Heydt
Posts: 10031
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Screen goes black after boot

Wed May 22, 2019 7:04 pm

koontz2k4 wrote:
Wed May 22, 2019 6:17 pm
Gotcha, makes sense. Any idea how I would fix it??
1. Take another SD card and load Raspbian on it (Raspbian Lite is sufficient).
2. Boot from the second card.
3. Put the original card in a USB adapter.
4. Plus the adapter into a USB port.
5. Edit the file on the original card to have the "&" at the end of the line.
6. Do a clean shut down, remove the power, swap SD cards, and reapply power to boot the Pi.

koontz2k4
Posts: 10
Joined: Fri Apr 19, 2019 5:42 pm

Re: Screen goes black after boot

Wed May 22, 2019 7:08 pm

Wow, I did not see that answer coming. That was clever. Kudos! I’ll try that now!

koontz2k4
Posts: 10
Joined: Fri Apr 19, 2019 5:42 pm

Re: Screen goes black after boot

Wed May 22, 2019 9:20 pm

Hmm, that didn't work. It was a great idea though! Any other suggestions?

pcmanbob
Posts: 5948
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Screen goes black after boot

Wed May 22, 2019 9:23 pm

koontz2k4 wrote:
Wed May 22, 2019 9:20 pm
Hmm, that didn't work. It was a great idea though! Any other suggestions?
In what way did it not work ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

koontz2k4
Posts: 10
Joined: Fri Apr 19, 2019 5:42 pm

Re: Screen goes black after boot

Wed May 22, 2019 9:47 pm

When I put it into an adapter and put it into my laptop to edit the file, I couldn’t find the rc.local or the etc/profile path, at all. They just didn’t show up anywhere. I looked in ever folder, and subfolder.

W. H. Heydt
Posts: 10031
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Screen goes black after boot

Wed May 22, 2019 9:57 pm

koontz2k4 wrote:
Wed May 22, 2019 9:47 pm
When I put it into an adapter and put it into my laptop to edit the file, I couldn’t find the rc.local or the etc/profile path, at all. They just didn’t show up anywhere. I looked in ever folder, and subfolder.
Is your laptop running Windows? Windows can't see the main (EXT4) partition. That's why I said to do the editing on a Pi with a different SD card.

koontz2k4
Posts: 10
Joined: Fri Apr 19, 2019 5:42 pm

Re: Screen goes black after boot

Wed May 22, 2019 10:03 pm

Yep, my laptop is running Windows. I’ll give that a shot!

Return to “General discussion”