wayvnc icon indicating copy to clipboard operation
wayvnc copied to clipboard

wayvnc randomly hangs

Open brianmay opened this issue 5 months ago • 7 comments

wayvnc randomly hangs. and stops responding to keyboard

Under wlnvcc it eventually comes good and unexpectedly processes all pending user input. Under remmina I have to kill wayvnc and restart it.

I haven't been able to reproduce on demand. More likely to happen when screen has been idle for a while. I stopped swayidle in case that was doing something, but it didn't appear to help.

At one stage wayvnc was repeatedly crashing in a similar fashion when I did I "swaymsg output HEADLESS-1 mode NNxNN` command to change the resolution (any resolution). So would have to kill and restart it in similar way. And after restarting the resolution was correctly changed to the new value. But today that is working fine. Curious.

Most recent crash was under remmina. So I am doubtful it is a client issue.

Useful information:

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

  • Version:

    • Run this command: wayvnc -V wayvnc: 0.9.1 neatvnc: 0.9.4 aml: 0.3.0
  • Provide context, including but not limited to

    • Command line arguments 0.0.0.0
    • Special environment variables, if any WAYLAND_DISPLAY=wayland-1
    • Which wayland compositor are you using? Which version? sway 1.10.1 WLR_BACKENDS=headless and WLS_HEADLESS_OUTPUTS=1
    • What VNC client are you using? remmina 1.4.40 - but had similar problems with other clients too (tigervnc and wlvncc come to memory right now)
    • Did you configure your VNC client in a specific manner? Nothing unusual. Direct connection on port 5900.
    • Linux distro/operating system Nixos 25.05
    • Kernel version Linux miacis 6.12.35 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jun 27 10:11:46 UTC 2025 x86_64 GNU/Linux
    • Graphics drivers Sway using HEADLESS drivers. On VNC client, using AMD graphics card.
  • Try to reproduce the problem while capturing a trace log:

    • wayvnc -Ltrace | tee wayvnc-bug.log Will try this for next next time it hangs.
  • Get the stack trace, in case of a crash:

    • If you have coredumpctl, you can gather the stack trace after a crash using coredumpctl gdb wayvnc and then run bt full to obtain the stack trace.
    • Otherwise, you can either locate the core file and load it into gdb or run wayvnc in gdb like so:
      • gdb --args wayvnc -Ltrace
    • If the lines mentioning wayvnc, neatvnc or aml have ??, please compile wayvnc and those other projects from source with debug symbols and try again. N/A
  • Describe how to reproduce the problem No idea.

  • Try to think about your problem beyond these instructions and include whatever information that you believe will help to resolve the issue Will do

brianmay avatar Jul 09 '25 21:07 brianmay

More testing in remmina:

If I start connection in full screen it works perfectly.

If I change to windowed mode, it freezes and becomes unresponsive. Nothing is logged in wayvnc, not even with tracing enabled.

If I disconnect and reconnect in remmina I get a black screen.

If I restart wayvnc, and reconnect in remmina I get a frozen screen again.

To get it working, I have to set full screen window in remmina (so it becomes the default at start up), kill and restart wayvnc, and then reconnect in remmina using full screen as the initial connection.

To me it seems a bit like a client issue, but it is kind of stange in that case that I have to restart wayvnc to get it working again.

brianmay avatar Jul 09 '25 23:07 brianmay

Is this also triggered by resizing the window?

any1 avatar Jul 10 '25 11:07 any1

No idea, at the moment I can't get it to run in a window, only full screen. Meaning I can't resize it.

brianmay avatar Jul 10 '25 21:07 brianmay

Did you try running wayvnc with the --disable-resizing flag?

any1 avatar Jul 10 '25 22:07 any1

Yes. Most recent time I tried the -R which is the same thing.

This didn't help. I changing a full screen "3840x2160" to a window doesn't involve resizing (?).

Only now I am retrying all these things that caused it to crash before, and it is not crashing. Sob. So not sure what is going on. Will keep paying around with it, see if it crashes again.

brianmay avatar Jul 11 '25 10:07 brianmay

To be clear, are you saying there is a crash or a stall/hang? Those are very different things.

any1 avatar Jul 11 '25 12:07 any1

Sorry, meant to say it was a stall/hang.

brianmay avatar Jul 11 '25 21:07 brianmay