Skip to content

WayVNC ignores --output parameter when multiple displays are present #391

@Voss0001

Description

@Voss0001

Useful information:

Please, try to gather as much of useful information as possible and follow
these instructions:

  • Version:
    wayvnc: 0.9-dev
    neatvnc: 0.9-dev
    aml: 0.3.0

  • Provide context, including but not limited to
    cat /usr/sbin/wayvnc-run.sh
    #!/bin/sh

. /etc/default/keyboard

export XDG_RUNTIME_DIR=/tmp/wayvnc
mkdir -p "$XDG_RUNTIME_DIR"

export XKB_DEFAULT_MODEL="$XKBMODEL"
export XKB_DEFAULT_LAYOUT="$XKBLAYOUT"

SELF_PID=$$

{
while ! wayvncctl --socket=/tmp/wayvnc/wayvncctl.sock version >/dev/null 2>&1; do
sleep 0.1
done
systemd-notify --ready --pid=$SELF_PID
} &

if raspi-config nonint is_pifive ; then
wayvnc --render-cursor
--detached
--output=HDMI-A-1
--config /etc/wayvnc/config
--socket /tmp/wayvnc/wayvncctl.sock
else
wayvnc --render-cursor
--detached
--gpu
--output=HDMI-A-1
--config /etc/wayvnc/config
--socket /tmp/wayvnc/wayvncctl.sock
fi

  • Command line arguments

  • Special environment variables, if any

  • Which wayland compositor are you using? Which version?

  • What VNC client are you using?

  • RealVNC, TightVNC

  • Did you configure your VNC client in a specific manner?
    no just as above.

  • Linux distro/operating system
    PiOS current rev

  • Describe how to reproduce the problem
    Description: WayVNC does not respect the --output parameter when multiple Wayland outputs are available. It always defaults to the external monitor (HDMI-A-2) regardless of the specified output parameter.
    Steps to Reproduce:

  1. Connect two displays: touchscreen (HDMI-A-1, 800x480) and external monitor (HDMI-A-2, 1920x1080)
  2. Start WayVNC with --output=HDMI-A-1 parameter
  3. Connect via VNC client
    Expected Behavior: VNC should connect to the specified screen (HDMI-A-1)
    Actual Behavior: VNC connects to external monitor (HDMI-A-2), ignoring the --output=HDMI-A-1 parameter
    Workaround: Disconnecting the external monitor while VNC session is active causes WayVNC to switch to the touchscreen and log "Selected output HDMI-A-2 went away". Subsequent connections then work correctly on the touchscreen.

This is on a Pi5 4GB

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions