VNC nor RDP working, help with how to setup on VIM4 Ubuntu 22.04.1

Hi @numbqq here you are:

installed vim4-ubuntu-22.04-gnome-linux-5.4-fenix-1.1-220721.img.xz via oowow

sudo apt update
sudo apt full-upgrade
sudo do-fenix-full-upgrade
this last command showed:
E: Unable to locate package fenix-updater-package-jammy-vim4-mainline

sync
sudo reboot

In control panel:
enabled Remote Desktop in Sharing
Remote Desktop is ON
Remote Control is ON
Enable Legacy VNC Protocol is checked ON
under this option, set selection to 'Require a password'

In Authentication section set a user name to :
user
copied the generated Password to remote machine

using 'VNC Viewer 6.21.920 (r45849) x64 (Oct 14 2021 14:43:07)' client on Mac OS Monterey Version 12.6

Shows an authentication dialog box, I enter the password I copied from the VIM4 machines Remote Desktop Authentication section (VNC does not use the username, just password)

On the client, the VNC client program just hangs showing 'Connecting to 192.168.86.10...'
Never goes past this window. On VIM4 desktop, in upper right corner, the yellow 'Sharing' icon has appeared next to the WiFi icon. If you click on the 'Sharing' icon, the drop down says 'Screen is Being Shared'. But nothing on client side.

If you press the 'Stop' button on the client VNC window, the client stops trying to connect, HOWEVER, on the VIM4, the yellow 'Sharing' icon is still there. You can go in and 'Turn Off' sharing under the dropdown described above.

using 'Microsoft Remote Desktop Version 10.7.9 (2011)

Remote Desktop just shows a black window on client machine, on VIM4 while RDP session is open, shows the 'sharing icon' on upper right corner of VIM4 desktop. When you exit the black screen on the client, the sharing icon goes away on the VIM4

If I logout of the VIM4 machine and try to attach, neither work, VNC shows an immediate message of 'The connection was refused by the computer'

Above steps work fine on a:
MeLE Fanless Mini PC Quieter3Q Celeron N5105 8GB 256GB with Gigabit Ethernet WiFi 6 PXE Dual HDMI 4K Unlock BIOS

Tried removing the password on the login keyring, this had no effect:

sudo apt install seahorse
removed pw from login keyring

Hello @deepvim

Current image using wayland by default, I’m not sure whether VNC can work on it or not.

Have you checked the VNC on the Ubuntu 22.04 with wayland can work well?

I’m not sure if its an option for you, but I am using xrdp for remote desktop to my vim4 with no issue. Of note, I can’t have the session logged in locally on the vim, and the remote session simultaneously.

On your ubuntu, there is no way to select the NOT wayland option. I tried all the login options and the edit of sudo vi /etc/gdm3/custom.conf to disable wayland.

If you try to login to VIM4 with wayland off, you canNOT.

On the MeLe Intel SBC with stock x64 Ubuntu 22.04.1 LTS both VNC and RDP work under Wayland AND you can login with Wayland OFF and again both VNC and RDP work.

I realize x64 and ARM images are different animals, but the fact is the stock Ubuntu 22.04 on x64 works and your ARM image does not.

Hi @hojordsh , Thank you for the idea, I might try that route to just give me something. Can you share your install steps?

It is frustrating to have to do a side route, as Ubuntu 22 has Remote Desktop ‘built in’ as part of its Sharing option.

Thanks!

@deepvim sure, I just did:

on vim4
#install xrdp
sudo apt install xrdp -y

#enable xrdp on boot and start now
sudo systemctl enable --now xrdp

#open Firewall just add your network/cidr below
sudo ufw allow from < enter your local network/cidr> to any port 3389 proto tcp

#if you want to change any default settings you can do so in /etc/xrdp/xrdp.ini

on remote system:
on windows I use mremoteNG or just the windows rdp to access. I’m sure mac has an equivalent

That’s all you need to do I’m pretty sure.

1 Like

Yes, current VIM4 image only support Wayland.

Why have such limitations? Because only with Wayland can use the hardware accelerated desktop.

Gotta love technology… I suffered through Ubuntu not being able to use the NVIDA display drivers, the symptoms were exactly this, you tried to use the hardware accelerated drivers and Ubuntu would barf at the login and just return to login prompt.

Now it is the exact opposite, you try to use a non-accelerated driver and you cannot login …

Progress!!! :slight_smile:

Hi @hojordsh Thank you for the steps, I will give it a try. I use the Microsoft provided Remote Desktop app for Mac OS. It is a bit old, shows a 2011 date for it last update (version 10.7.9) , however a 2022 copyright. All that said, it still runs on a Intel MacOS 12.6 Monterey machine fine.

I tried using VNC and RDP and couldn’t get them working either. All I got was a black screen so I tried disabling Wayland and it borked the system until I backed out the change.

I gave up with the built in desktop sharing feature and installed xrdp but can only log in occasionally and never if a local user is already logged in. Strange that @hojordsh seems able to do so.

I also tried installing different versions of VNC following various tutorials but couldn’t get any of them to work reliably.

Just to be clear,
I can’t rdp if the session is open by another user (or myself locally). I can see in the logs that the session is used and cant be forwarded.

Im pretty sure its /var/log/xrdp it you tail -f that file, and try to rdp you should see what is failing

my bad - looks like I need new glasses because that is exactly what you said, I just didn’t read it right!

Interesting that it seems to be the other way round with VNC on Ubuntu. You can only connect remotely when a local log in is active.

I’ve been trying to get this working for some time without success and found this: https://askubuntu.com/questions/1313369/screen-sharing-with-wayland but it didn’t help.

So it seems to me that the problem with built-in Wayland desktop sharing could be linked to the problems some people are experiencing with pipewire as both Wayland and pipewire definitely seem to be involved as this: https://wiki.archlinux.org/title/PipeWire#WebRTC_screen_sharing shows.

I realise that both of these are taking about systems other than the khadas but I would have though that some of what they are discussing might apply here.

Yes it does seem like there is a lot of complexity and interactions.

All that said, I have a MeLE Quieter3 Intel based SBC side by side with the Khadas VIM4. The MeLE Quieter 3 is running the x64 Ubuntu 22.04.1 LTS off the shelf download from the Ubuntu web site. VNC, RDP, Wayland, pipewire all work without any messing around. And to make it worse for Khadas, the performance of the MeLE SBC is far better. Hardware video drivers are working fine. Trying to do a ARM based Linux machine does seem to be still far behind x64 Intel or AMD. And now we have RISC-V coming up.

user@quieter3-01:~$ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 35
Server Protocol Version: 35
Is Local: yes
Client Index: 49
Tile Size: 65472
User Name: user
Host Name: quieter3-01
Server Name: pulseaudio
Server Version: 15.99.1
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1
Default Source: alsa_output.pci-0000_00_1f.3.hdmi-stereo-extra1.monitor
Cookie: 3408:c67e
user@quieter3-01:~$ inxi -Fx
System:
  Host: quieter3-01 Kernel: 5.15.0-48-generic x86_64 bits: 64 compiler: gcc v: 11.2.0
    Console: pty pts/0 Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish)
Machine:
  Type: Mini-pc System: Fanless Mini PC product: Quieter 3 v: N/A serial: <superuser required>
  Mobo: Fanless Mini PC model: Rev JSL1 1.10 serial: <superuser required>
    UEFI: American Megatrends LLC. v: ML_JPL1V1.0 date: 03/15/2022
CPU:
  Info: quad core model: Intel Celeron N5105 bits: 64 type: MCP arch: Tremont rev: 0 cache:
    L1: 256 KiB L2: 1.5 MiB L3: 4 MiB
  Speed (MHz): avg: 778 high: 801 min/max: 800/2900 cores: 1: 801 2: 765 3: 800 4: 747
    bogomips: 15974
  Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel JasperLake [UHD Graphics] driver: i915 v: kernel bus-ID: 00:02.0
  Display: server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.1 driver: gpu: i915
    note:  X driver n/a tty: 152x45 resolution: 1920x1080
  Message: GL data unavailable in console. Try -G --display
Audio:
  Device-1: Intel vendor: Realtek driver: snd_hda_intel v: kernel bus-ID: 00:1f.3
  Sound Server-1: ALSA v: k5.15.0-48-generic running: yes
  Sound Server-2: PulseAudio v: 15.99.1 running: yes
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX201 160MHz driver: iwlwifi v: kernel bus-ID: 00:14.3
  IF: wlp0s20f3 state: up mac: 80:38:fb:64:82:e6
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 v: kernel
    port: 3000 bus-ID: 01:00.0
  IF: enp1s0 state: down mac: 00:ce:39:d1:0f:ea
Bluetooth:
  Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 1-8:3
  Report: hciconfig ID: hci0 rfk-id: 0 state: up address: 80:38:FB:64:82:EA bt-v: 3.0
    lmp-v: 5.2
Drives:
  Local Storage: total: 230.62 GiB used: 12.12 GiB (5.3%)
  ID-1: /dev/mmcblk1 model: SCA256 size: 230.62 GiB
Partition:
  ID-1: / size: 225.45 GiB used: 12.12 GiB (5.4%) fs: ext4 dev: /dev/mmcblk1p2
  ID-2: /boot/efi size: 511 MiB used: 5.2 MiB (1.0%) fs: vfat dev: /dev/mmcblk1p1
Swap:
  ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
  System Temperatures: cpu: 27.8 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 234 Uptime: 3d 18h 42m Memory: 7.52 GiB used: 1.5 GiB (20.0%) Init: systemd
  runlevel: 5 Compilers: gcc: 11.2.0 Packages: 1883 Shell: Bash v: 5.1.16 inxi: 3.3.13

The same over here. I cannot get VNC or RDP working either. I have another Ubuntu 22.04.1 LTS on an Intel Nuc where everything works flawless.

Hello @numbqq ,
Still, neither VNC or RDP work on

khadas@Khadas:~$ cat /etc/fenix-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM4
VENDOR=Amlogic
VERSION=1.2
ARCH=arm64
INITRD_ARCH=arm64
IMAGE_VERSION=1.2-221018
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-u-boot-2019.01-v1.2-release
LINUX_GIT_VERSION=khadas-vims-linux-5.4-v1.2-release
FENIX_GIT_VERSION=v1.2
#############################################

Tried with desktop logged on and with desktop logged out. Used standard desktop sharing setup that is shown in ‘Remote Desktop’ section of ‘Sharing’ in ‘Setting’.

Again, not having this working as easily as it does on stock Ubuntu on x86 SBC makes it so difficult for end users to select your product as a useful tool. That’s not good for you, that not good for Linux, that’s not good for ARM.

1 Like

Hello @deepvim

About VNC it works on Ubuntu 20.04, but we do the same steps on Ubuntu 22.04 it doesn’t work, we need to check waht’s the different between Ubuntu 20.04 & Ubuntu 22.04.

Does xrdp works for you?

I did the steps @hojordsh recommended prior to the clean install of the Oct release of the desktop image, it worked then, however I have not tried it since my full wowoo install of the Oct release. Even if that works, it really not the solution that is optimal, IMHO. The control panel vnc and rdp should work out of the box as it does on a stock x64 ubuntu install.

Hello @deepvim I would like to ask you for some details about the use of vnc.

  • The desktop environment you are using is on x86 ubuntu22.04

    • Is it gnome or xfce or something else

    • Is the display frame either X11 or Wayland

  • Can you provide some configuration details

It might make khadas perfect
Thanks!

Hello @ivan.li

I am running the Intel based SBC shown below side by side with the VIM4 ARM. As is shown in the screen capture, it is running the standard download Ubuntu 22.04.1 LTS with GNOME 42.4 using Wayland windowing system. This is all standard ‘out of the box’ nothing added or changed other than via standard ‘apt-get update’ ‘apt-get ful-upgrade’. VNC and RDP work and are able to interact with the GUI session logged into the physical machine. IMHO, this is the way it should work, not a separate session on VNC/RDP from the physical session.

MeLE Fanless Mini PC Quieter3Q Celeron N5105 8GB 256GB Windows 11 Pro Micro Computer Small Desktop Servers with Gigabit Ethernet WiFi 6 PXE Dual HDMI 4K Unlock BIOS