[HowTo] Install a vnc server on the Raspberry pi

The changes to the Raspberry Pi stack after the launch of the Pi 4 were significant. They make sense, and moving away from those proprietary Broadcom OMX layers made sense moving forward. They did however cause a lot of breakage.

Sure has and still is.

Tried this and it fails:

osmc@OSMC2023-12-1:~$ sudo nano /boot/config-user.txt
otg_mode=1
sdtv_aspect=1
sdtv_mode=2
start_x=1

dtoverlay=vc4-fkms-v3d

Whereas, for example, I’m reasonably certain (without having an instance to flip into just ATM for verification) that LibreELEC 9.2.6 /flash/config.txt includes dtoverlay=vc4-fkmx-v3d out of the box.

modinfo vc4 on OSMC December 2023 returns details.

modinfo v3d on OSMC December 2023 returns details.

modinfo vc4-fkms-v3d on OSMC December 2023 does not return anything.

Is the vc4-fkms-v3d driver|module available in the December 2023 version of OSMC? If so, what funkyness is required to enable it :slight_smile:

Some settings don’t work in an includes file and would need to be added to config.txt itself. I believe enabling fkms is one such setting.

Sensational help @darwindesign … will give it a go, despite the warning :slight_smile:

# Warning: do not edit this file, or it could prevent your OSMC system from starting.
# If you wish to make changes, you should do so via My OSMC or edit the config-user.txt file in this directory

# Any changes that you make here will be overwritten as this file is managed by the OSMC via the update system

Well, errm, actually, how do I avoid those warnings ā€˜bearing fruit’, as it were, if I was to edit that file.

Actually edit via the My OSMC Kodi plugin, is that the best option?

I don’t think editing via the My OSMC add-on makes any difference at all. Basically the deal is that certain files are considered part of the system and others are treated as userdata. Userdata is treated as sacred and changes to it are avoided when changes/updates are formulated whenever possible. The config.txt file is problematic treating it as userdata as their has been times where it needed to be changed with updates and there is no reason to believe that it won’t become necessary again for some reason in the future. Thus the warning is basically giving a warning that an update may overwrite that file so you should add modifications to config-user.txt since that file should never get touched with an update. My recommend would be to just make the changes you want to make and then write yourself a note or keep a copy of the file so if the day comes that config.txt gets overwritten with an update it is less effort to put your changes back again.

Thanks @darwindesign

Very sensible and logical. Helps that it also matched what I was thinking myself. That is, the warning is there to discourage using config.txt because config.txt is such a powerful file in the RPi ecosystem. Tweaks to config.txt can, do and will render a system broken. So, I guess the warnings are basically the equivalent of ā€œenter at own riskā€.

The warning also telling you that the file might be overwritten by an upgrade

Could you elaborate a little, if not too much trouble and too time consuming for you, which would be fair enough? Perhaps point me to links if so?

I understand that the RPi hardware and firmware, along with Kodi, have gone through quite the ā€˜sea change’ but it’s a bit tricky for me trying to reconcile that with what appears to be an almost identical scenario to LibreELEC 9* in that the VNC addon files, settings and so forth are all but the same whilst LE9 was able to allow CEC and VNC via the ā€˜fakey’ FKMS driver.

Please don’t get me wrong, I’m not pushing for any extra unreasonable efforts here. If ultimately CEC is not available whilst VNC is running then I’ll possibly just have to work around that. But I am quite curious what ā€œisn’t trivialā€ represents :slight_smile:

I know it’s quite some time that this script is working flawlessly, or almost, but I just realize something and may impact others so I’ll leave my piece of experience here.
Some time ago my Rpi4 with the latest OSMC version at the time, can’t remember the exact date neither the version, my TV remote suddenly stop working. Every time that I rebuild my system, it works so I decided it was time to re do everything from scratch and clean up my library also.
So it was working since them, I believe around 6 months, and yesterday I decided to install VNC and them the remote stop working.
Today I remove VNC, using the script from this page, (BTW Thanks Sandbird), and the remote started to work again.
I do not know way or how one thing related to the other, but if you are experiencing problems with your remote AND have installed VNC, try to remove it. For me worked.

What kind of sorcery is this? I’ve never had this problem before, and I’ve installed vnc on so many PIs. Hmmm, i wouldn’t even know how to debug this. Honestly I am stumped

I can imagine. Luckily I use VNC very little. So, I decided that when, and if I needed again, I would install and uninstall afterwards.
I just thought that would be nice to let anyone that may experiencing similar problems to know.
Again, thanks a lot for your efforts. The script is amazing and enable me to do that idea…

1 Like

Yeah thanks for the info though, good to know. Does this happen even if the vnc server isn’t running? Just by existing it blocks the remote?

Yes, just for be installed.
I did what I needed with VNC and go to the TV to relax and saw that remote isn’t working. Before go to sleep I thought about and next day uninstalled. And magically remote get back to work. It was really a lucky thought…