AML-VNC Wrong Resolution

#1

I am using a T95Z S912 box as a headless CoreELEC TVHeadend server in my attic and I plan on using the AML-VNC addon for remote maintenance when needed but I am having an unusual resolution problems.

1st: I have created a disp_cap file with a single entry of 1080p60hz in /storage/.kodi/userdata/disp_cap as per: https://wiki.libreelec.tv/custom_edid#tab__amlogic

Problem: When I connect to the VNC server after boot my connection looks like this:

but if I kill the aml-vnc -P 5900 process in htop, when it auto restarts my connection looks correct:

Is it possible that the VNC addon is starting too early before the correct resolutions are being set?
If so is there a way to add a delay to addon start?

I greatly appreciate any help that can be given!

#2

I’d try removing the custom disp_cap and see how that works.
I often run my Le Potato headless and never seen anything like your first screenshot.

#3

I have exactly the same as the first screenshot too on my S912 box.

#4

I have tried it with no disp_cap, I get a similar problem only at a much reduced resolution in both pre and post sending the sigterm to aml-vnc
See post below, no disp_cap actually results with a blackscreen when booting headless.


I have also tried it with the full variety of resolution entries in disp_cap reported by my TV downstairs and the same as above happens.

So far the best (but broken) result is as I have described above (disp_cap with 1080p60hz but having to forse restart aml-vc).

#5

Would you mind trying what I have found above:

  1. use htop via ssh (you may need to install the “System Tools Addon”)
  2. find the aml-vnc process in the list and highlight it
  3. press F9 on your keybord and then Enter (sending the sigterm command)
  4. retry your VNC connection
  5. report back here

Thanks

#6

Updating to the latest version did it for me. Forde update all addons and try again :slight_smile:

#7

I only received and setup this box yesterday for this purpose. Unless there is a new release during the day today that I missed, I am up to date.

Note: I am also up to date, running CoreELEC 8.99.2.

#8

Updating to 9.0.101 seems to have fixed it. Not using disp_cap.

EDIT: Reboot and back to the first screenshot again.

#9

Yep, I get the same as you. Kill the process via htop and I get the second screenshot, reboot and it’s back to the first screenshot. How weird!!

#10

Restart your device with your TV on and see if you still get the same issue.

#11

Rebooted with the TV ON and you get the first screenshot.

#12

Just to confirm some things:

I am defo on the latest aml-vnc addon (I even forced an update to be sure) and situation is the same.

I removed my disp_cap file (still booting headless for now as I am not home to connect to TV) and I now only get a black screen on VNC both before and after restarting the aml-vnc service.

Obviously I will restore my prev disp_cap file as the situation was better!

As is possible to add a wait command to the start of aml-vnc to see if delaying the start gets the correct resolution? If so where do I add it to test?

#13

@TheCoolest @adamg


Any advice on this?

I would love to add a wait state to the launch of aml-vnc to see if it would help but I am unsure where to add it:

/storage/.config/system.d/service.aml-vcn.service:

[Unit]
Description=aml-vnc
After=graphical.target

[Service]
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.aml-vnc/bin/aml-vnc$
TimeoutStopSec=1
Restart=always
RestartSec=2
StartLimitInterval=0

[Install]
WantedBy=kodi.target

or in /storage/.kodi/addons/service.aml-vnc/bin/aml-vnc.start

#!/bin/sh

# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)

. /etc/profile

oe_setup_addon service.aml-vnc

if [ "$AML_VNC_AUTH" == "true" ] ; then
        exec aml-vnc -P "$AML_VNC_PORT" -p "$AML_VNC_PWD"
else
        exec aml-vnc -P "$AML_VNC_PORT"
fi

As always, thank you very much for your help! I have been getting help all over the forums today!

#14

@Capt.Insano - Did you ever find a solution to this problem as it’s driving me nuts?

#15

None yet!

Currently I just kill the aml-vnc process with htop and then log in after the process respawns. This gives correct resolution and colours.

Any ideas for a fix would be greatly appreciated from the CoreElec team!

#16

I’m killing the process via autostart.sh:

#!/bin/sh
sleep 5
pkill -f aml-vnc