Black screen / no more video output after a few days/weeks

I’ve been happily using a Raspberry Pi 3 with OSMC for years, but I have a recurring problem which is really annoying.
My setup is as follows : OSMC installed on the Raspberry Pi, connected via Ethernet to my local network. Pi connected to Yamaha YSP-2500 sound bar via HDMI. Soundbar connected to my Mitsubishi projector via HDMI.
When I do a fresh install, it works perfectly and I can enjoy this great media center.
After a few days, weeks or sometimes months, without doing anything special (no new install of add-on, really nothing), there is no more video output from the Pi and I just see a black screen when switching on the Pi after switching on the sounder and the projector. The projector works fine for the other HDMI inputs, so the problem is not coming from the projector. I checked the HDMI cables, no issue here.
On the Pi the red LED is on and the green one flashing.
If I try to ping the IP address from my Mac connected to the same network using the Terminal window, I get “Host is down” and “Request timeout”.
I cannot connect via SSH to the Pi.
The only way to solve the problem is to burn a new SD card and do a fresh OSMC install from scratch, and then do the full setup again, install the sources, remote, scan the hard drive, …
Really annoying.
Anyone has an idea?
1/ What is happening to explain that it works one day and then for some reason and without doing anything different it no longer works the next day ?
2/ Once I have the problem, what could I do to re-boot the system without having to do a fresh install again ?

Thanks a lot for your help, I really appreciate it.

Put the SD card in a reader on your PC and check to see if the config.txt file is missing from the boot partition. If it is then you can replace that file and everything should be back as it was.

Thanks for your answer. I will give it a try. Replace this file by which one ?

Actually the config.txt file is there on the SD card but it is empty and the file is 0 kb. Should I remove it, but replace it by which file?

Assuming you didn’t make any customizations in the RPi section of the My OSMC add-on you would want to just add the following to that text file…


This will likely fix it for now but the cause is probably power related (uderspeced or failing PSU, brownouts, unusual power off procedure, etc.) so if nothing else changes it do it again at some point.

This is great. I did this and it worked ! I just had to re-install my remote control with GPIO support. I will now do a backup of my config.txt file in case this happens again.
Thanks so much for your help. I was a bit tired doing a fresh install every other week.
Now I am not sure to understand why this happens. I have an official Raspberry PSU. I always power it off after shutting down the system from Kodi. I do not want to have it on all the time, so I have a general power switch for all the devices, and then a specific one for the Pi so that I can power it on a few seconds after everything else.

This seems to be a common thread from the couple people I’m aware of that has seen this. I’ve only personally seen it once and that was when I had a lot of power cutoffs to my RPi. Are you going to the power menu in Kodi and selecting the ‘power off system’ option before cutting power or something else?