Giter VIP home page Giter VIP logo

Comments (7)

binzhai avatar binzhai commented on July 23, 2024

If I install TurboVNC Viewer and Server on the same physical machine, is there a way to directly read mouse events from /dev/input instead of sending them from TurboVNC Viewer to Server? This way, mouse event processing would be much faster.

from turbovnc.

dcommander avatar dcommander commented on July 23, 2024

TurboVNC is meant to be a remote display solution, so hacks for reading mouse events directly from the local device wouldn't make sense for the most common use case. TurboVNC's mouse handling is dead simple. When the TurboVNC Viewer gets notified by the client O/S that a mouse button or motion event has occurred, the viewer immediately translates the mouse event into an RFB mouse event and sends it to the VNC server. The TurboVNC Server, however, is single-threaded like all X servers are, so whether or not it can immediately read the mouse event and deliver it to X clients depends on how busy the X server is. If you are running the game using VirtualGL and a decently fast GPU, then TurboVNC should be able to keep up with no problem. If you are running the game using software OpenGL, however, then that will definitely bog down the TurboVNC X server. The rate at which TurboVNC can deliver mouse events from client to TurboVNC Server to X clients is subject to the client O/S's mouse sampling rate, the network latency, and the X server load, but 15 ms is definitely not expected on a LAN. If you are using a Linux or Windows client and VirtualGL is set up on the server, then you can test the mouse delay in isolation by running vglrun /opt/VirtualGL/bin/glxspheres64 -i in the TurboVNC session and then using tcbench (in the VirtualGL packages) on the client to drive mouse events continuously into the TurboVNC Viewer while measuring the frame rate. If you are observing a 15 ms delay at the low level-- that is, if it is not specific to the game-- then it should reflect in the frame rate observed through tcbench when performing the aforementioned tests.

If you are using VirtualGL, then I can think of a couple of other possible causes, so do let me know whether that is the case.

from turbovnc.

binzhai avatar binzhai commented on July 23, 2024

Thank you for your prompt response. Currently, I am using turbo vnc server in Docker and turbo vnc viewer on the host, so turbo vnc server and turbo vnc viewer are on the same machine. Also, I am using virtual GL. What is the reason for the delay issue? Or can the server directly access the mouse device?

from turbovnc.

binzhai avatar binzhai commented on July 23, 2024

If there is no change in the VNC screen, the mouse will not delay. However, when playing games or constantly rendering the screen, the mouse will experience significant delays

from turbovnc.

dcommander avatar dcommander commented on July 23, 2024

I don't know. You could try setting a frame rate limit in VGL (VGL_FPS=60, for instance) and see if that helps. I haven't ever seen this issue, but I also don't use VGL/TurboVNC for gaming. Do you see the same issue with all games or just this one?

from turbovnc.

binzhai avatar binzhai commented on July 23, 2024

Yes, I have tried many games that have this issue

from turbovnc.

dcommander avatar dcommander commented on July 23, 2024

In #368 (comment), I specified the tests that you should run in order to narrow down the cause of the delay. I cannot proceed without knowing the outcome of those tests.

from turbovnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.