[HowTo] Install a vnc server on the Raspberry pi

Not for sure but it looks like it has something to do with the “new” Kernel in the latest OSMC Version

Looking at this link
snd-bcm2835.enable_compat_alsa=1
inside the config-user.txt should also work

With the first new OSMC with Kodi 19 it works, if not some would watch Movies without Sound from the beginning and won’t tell.

May someone can prove me wrong but I would bet with the [2021.11-2] it will work without problems.

2 Likes

Can try to test it today, I’ll have a look for the image and let you know. :slight_smile:

  • Edit:
    Downloading this image - 2021.11-2 e9a4d490aae72db808a84238487148cb for testing

// OS
osmc@osmc:~$ cat /etc/os-release
PRETTY_NAME=“Open Source Media Center”
NAME=“OSMC”
VERSION=“November 2021”
VERSION_ID=“2021.11-2”
ID=osmc
ID_LIKE=debian

ANSI_COLOR=“1;31”
HOME_URL=“https://www.osmc.tv
SUPPORT_URL=“https://www.osmc.tv
BUG_REPORT_URL=“https://www.osmc.tv

// Hardware
Hardware : BCM2835
Revision : a020d3
Model : Raspberry Pi 3 Model B Plus Rev 1.3

Checking Audio devices with alsa-utils
osmc@osmc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0

Lets install VNC Script

Checking Audio
osmc@osmc:~$ aplay -l
aplay: device_list:272: no soundcards found…

Kernal version
osmc@osmc:~$ uname -r -s -a
Linux osmc 5.10.78-2-osmc #1 SMP PREEMPT Wed Nov 17 03:44:59 UTC 2021 armv7l GNU/Linux

Adding your suggestion
osmc@osmc:~$ cat /boot/config-user.txt
[all]
snd-bcm2835.enable_compat_alsa=1

Rebooted

Added my fix in

1 Like

Okay my wrong same Kernel Version

1 Like

So there is an serious problem:

On Pi3 I confirm it even with the first Version for Kodi 19 Audio is missing with the fKMS driver. the fix from smooney works very well. Thanks for finding the bug, I need to write some routines to cover this stuff up.

Still unclear why nobody noticed it before you.

1 Like

So new version is online with support for dtparam since fKMS does not support audio trough HMDI by default

1 Like

so I follow only

for Raspi 4, nothing else to do?
I ask because I’m a bit confused by the quotes in the OP.

thx for doing all this :slight_smile:

It should be enough, there had be some fixes for the RPi4 but atm. I know nothing what needed to do.

1 Like

Has anyone been able to get dispmanx_vnc working on OSMC on a Pi4? The script seems to do the job installing it and setting the fake-KMS driver, but after restarting my CEC remote stops working. VNC will connect but also no control. I turned the resolution down to 1920x1080p and that seems to have fixed the control over vnc, but my remote still will not work. Only after re-activating the normal KMS driver does my remote work, but then dispmanx_vncserver fails to start.

That’s expected.

But is there a way to have both? Something I can manage with activating some lines inside the config.txt or else

Unfortunately this isn’t trivial.

Sorry to resurrected an old thread, and it´s so long that I’m sure I may missed something.
I installed a couple times in the same RPI4 and worked for one time almost every time I tried. But now, on a brand new installation, I’m getting better at tracking the issue.

The problem were: Using TightVNC on a Windows 10, I put the IP address followed by the port number. 5900. The program closes the window and apparently nothing was happening. But I was wrong, it failed after several minutes with the message “Failed to recv data from socket.”

Now, I discovered that there is an error on the conf file. Just get that out of luck when ran “sudo journactl | grep vnc”

I tried to change to port 5901 but didn’t work either.
Apart from the port number, and obviously the password, the file /etc/dispmanx_vncserver.conf is exactly like the example on the first message.

My question is: Does this error has any relation with the infamous KMS driver error?
If so, I would stop meddling around with this…

Are you using the same router? Not sure about the KMS driver since I am using a pi3 but 2 things you could try is 1) lower the picture quality to low on your client, and 2) try https://www.realvnc.com/en/connect/download/viewer/ instead of tightvnc.

But most of the fixes i am reading about this are router related. I am not sure what they are changing but 2 out of 5 were socket changes on the router.

Yeah, same router. In fact, my RPI is wired and my pc wifi.
I already changed to RealVNC hoping it could make some change, but the error only appears on TVNC. On RVNC it does not, the window just closes and that’s it.
I’ll investigate a little longer,

Thanks a lot for your response and whatever I find out I post here for the eternity…

1 Like

Hi,

and something must be wrong in the conf, can ou post you conf-file so we can take a look.

Sure:

osmc@osmc:~$ cat /etc/dispmanx_vncserver.conf
relative = false;
port = 5901;
screen = 0;
unsafe = false;
fullscreen = false;
multi-threaded = false;
password = "***********";
frame-rate = 15;
downscale = false;
localhost = false;
inetd = false;
vnc-params = "";

I change the port to test, but had the same behavior…

Hmm, your log says something wrong in line 2 it’s a bit odd I didn’t see anything wrong

What does cat -A /etc/dispmanx_vncserver.conf output?

@Markus, yeah, I download the file to open on my computer just in case I was missing something through linux, but apparently there is nothing wrong…

@darwin Pretty much the same… But I see your point. Didn’t know this flag…

osmc@osmc:~$ cat -A /etc/dispmanx_vncserver.conf
relative = false;$
port = 5901;$
screen = 0;$
unsafe = false;$
fullscreen = false;$
multi-threaded = false;$
password = "***********";$
frame-rate = 15;$
downscale = false;$
localhost = false;$
inetd = false;$
vnc-params = "";$

Myself and a friend have invested the last few weeks trying to get a DeskPi Pro device running and supporting VNC.

I’ve been a long-term LibreELEC (LE) user but always also been aware of and interested in OSMC as an alternative.

Alas LE seemingly abandoned any attempts to help people continue using VNC with their Raspberry Pi VNC addon, seemingly based on a fork of a fork of Hanzel Peter’s original dispmanx_vnc, by Anton Voyl (@awiole), when the GBM / V4L2 changes to Kodi kicked in; the new Pi4 GPU apparent deprecation (?) of the under-documented / unofficial DispmanX API. Apologies if this context is already referenced in this thread. I’ve not read all of the thread as it’s longer than travelling by boat across an ocean, LOL.

Only recently did we get into the KMS vs FKMS ‘fun and games’.

A few days ago we concluded that having to mess around with compiling a bespoke build of LE, to find a version that operated well in otg_mode=1 that would then support the DeskPi Pro’s front USB ports, influence the power button behaviour and heatsink fan might be necessary, but would be beyond our health-issues-restricted capacity … and cost us VNC support.

It’s extremely exciting to learn that not only are others interested in VNC support for boot-to-Kodi on RPi distributions, but have seemingly managed to get it working again, beyond the RPi4 / Kodi GBM / V4l2 ‘sea change’.

Cannot wait to get back into setting OSMC up after this news!

Massive round of applause and three cheers of appreciation for everyone who has contributed to this fantastic development!

2 Likes