Cursor is Lagging

Discussions about using Windows guests in VirtualBox.

Cursor is Lagging

Postby spflanze » 23. Sep 2021, 16:33

I am using remmina to access my laptop from my tower. Both my tower, and my laptop, has Pop!_OS 21.04 OS. On my laptop I have a Windows 10 OS running as a guest in Virtualbox. I am accessing this Windows 10 remotely with remmina because I do not want to transfer my Windows 10 license to my tower, and I want to use my tower's much larger screen.

On my tower there is no noticeable cursor lag while it is in my laptop's Pop!_OS (accessed by remmina), nor is there any in my Laptop's VirtualBox window. But once Windows 10 is started the cursor while inside Windows 10 is very slow to respond to mouse movement.

If I move the mouse in Windows 10 directly from the laptop, instead of by means of my tower through remmina, there is no cursor lag.

What can be done about his cursor lag I experience while using my remmina on my tower to access Windows 10 running in my laptop's VirtualBox?
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby mpack » 23. Sep 2021, 16:50

I'm not familiar with Remmina, but it sounds like it's doing standard screen scraping, which is inherently inefficient. I suggest that you try to find a proper Linux implementation of RDP, which is protocol based, not a dumb screen scraper. Microsoft themselves make available free RDP clients for Windows and Android, perhaps they have a Linux implementation too.

I assume btw that "Windows 10" in the guest means Pro or Enterprise, since Home doesn't include the RDP server feature.

[Edit] Hmm. While checking if an RDP client exists for Linux, I came across a description of Remmina. Apparantly it supports a number of remote protocols, including RDP. So perhaps all you need to do is make sure to choose the correct protocol.
mpack
Site Moderator
 
Posts: 34662
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Cursor is Lagging

Postby spflanze » 23. Sep 2021, 21:38

It is Windows 10 Pro, and the connection protocol is VNC.

I attempted to make an RDP connection to my laptop's Pop!_OS using the instructions at:
https://www.nakivo.com/blog/how-to-use- ... lkthrough/
I used the same IP address that worked for the VNC connection.

To enable RDP I followed the instructions on page:
https://help.ubuntu.com/community/xrdp
I followed them for both my tower, and my laptop.

Both my tower, and my laptop, are connected to a router I have in my room. This router is, in turn, connected to a router elsewhere in the house which is has the gateway to the ISP's service. I do not have control over the router for the entire house. The router in my room is a D-Link DIR-655. In its Port Forwarding page I opened port 3389 for both UDP, and TCP, for the IP address of both my laptop, and my tower.

I could not make this RDP connection work. When I attempt use remmina to make the RDP connection to my laptop from my tower in remmina I see a blank black screen, and no error message. The laptop's screen is not blank.

I also tried to make an RDP connection directly to the Windows 10 OS running in Virtual Box on my laptop. This too did not work. RDP is enabled in that Windows 10.
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby scottgus1 » 24. Sep 2021, 01:33

If your 10 is Pro or higher, and you can enable Remote Desktop in 10, web-search for how, then the way to RDP into the 10 OS directly depends on how the VM is networked. RDP performance directly into 10 will be a lot better than RDP into the host screen then through Virtualbox into the VM screen. I think RDP will be faster than VNC.

10 uses port 3389 by default for RDP. Your host may use that part too for its RDP.

If your VM is connected through Bridged, then it sits as a separate PC on the host's LAN. It should have an IP address in the same range as the host's Wi-Fi or Ethernet is using. If so, RDP directly into 10 via the VM.ip.add.ress (port 3389 is understood)

If your VM is connect though NAT or NAT Network, you have to go through your host's IP address and firewall, then through NAT/NAT Network port forwarding. If your host also uses 3389 for remote access you'll have to pick another port number, like 3390 or 4000, etc. NAT/NAT Network port forwarding can translate your chosen port number to 3389 so you don't have to change 10's default RDP port.

Pick an unused part number. (you shouldn't use the same port number the host is using)
Make a port forward rule:
  • NAT: fill in Protocol TCP; host port number with your chosen port number; guest port number 3389; everything else blank
  • NAT Network: you'll need to know the VM's NAT-Network-provided IP address for this. Fill in Protocol TCP; host port number with your chosen port number; guest IP address; guest port number 3389; everything else blank
Make a firewall rule in your host OS allowing traffic on the port number you picked.
RDP to your host.ip.add.ress:portnumber
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cursor is Lagging

Postby spflanze » 24. Sep 2021, 21:38

RDP in my laptop's Windows 10 Pro running as a guest in VirtualBox was, and is, enabled. This I knew about.

I checked again in the Windows 10 settings to make sure I got the server name correct, and verified it was correctly entered in remmina.

The VM connection is by NAT.

In that Windows 10 Pro Defender Firewall I opened port 3389 for both TCP, and UDP. remmina on my tower gave me the error message that it could not find the server. So I turned off Windows Defender, and got the same result.

I changed the VM connected to Bridged. Once I did this I could see that in my personal router's admin functions a new IP address is given to a computer whose name is the same as the server name I got when I turned on RDP in Windows 10. I still could not make an RDP connection. The error was that it could not find the server. I used the Bridged IP address to try and make a VNC connection directly to Windows, and this too did not work.

I remmina I looked for a way to use Windows 10 server IP address. In its Advanced tab I found at "Remote Desktop Gateway server" field. I entered the IP address my personal router showed this Windows 10 to have, and in other fields I entered the Windows 10 account username, and password, credentials. This time I got the error "Could not connect RDP server "...." via TLS.
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby scottgus1 » 24. Sep 2021, 23:41

spflanze wrote:The VM connection is by NAT.

In that Windows 10 Pro Defender Firewall I opened port 3389 for both TCP, and UDP. remmina on my tower gave me the error message that it could not find the server. So I turned off Windows Defender, and got the same result.

I don't see mention of opening the ports in NAT/NAT Network Port Forwarding as required and posted above?

spflanze wrote:I changed the VM connected to Bridged. Once I did this I could see that in my personal router's admin functions a new IP address is given to a computer whose name is the same as the server name I got when I turned on RDP in Windows 10. I still could not make an RDP connection. The error was that it could not find the server.

Translating server names to IP addresses may require some sort of DNS reset. Why did you not try the IP address instead of the server name?

spflanze wrote:I used the Bridged IP address to try and make a VNC connection directly to Windows, and this too did not work.

Windows 10 does not have a VNC server built-in.

I refer you back to my post above and please try gain.
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cursor is Lagging

Postby spflanze » 25. Sep 2021, 01:14

Using the IP address as I see it in the routers admin function, instead of the hostname, worked to get an RDP access to the laptop. Thanks :). I know have RDP access to Windows 10 as it runs as a guest in VirtualBox on my laptop.

The cursor is faster, but still a lot slower than the responsivety I get with it when I remotely access my laptops' Pop!_OS. It is fast enough to be workable. But I would appreciate any suggestions on making this faster.
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby scottgus1 » 25. Sep 2021, 03:38

Great that you got RDP into the VM's OS working!

Let's look at the VM's specs. Start the VM from full normal shutdown, not save-state. Get the VM booted so you can remote in and observe the slow mouse, then shut down the VM from within the VM's OS.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log and the hardening log next to it, zip them, and post the zip file, using the forum's Upload Attachment tab.
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cursor is Lagging

Postby spflanze » 25. Sep 2021, 07:45

I wrote too soon. I did have an RDP connection when I wrote, but I am not able to repeat it. I do not know what happened to make that connection.

With the use of the IP address remmina does appear to find the laptop on my personal router, because it asks for RDP authentication credentials, which does not do if it cannot. But it does not accept the RDP log in credentials I am using. I use the username for the only Windows 10 account on the laptop, and that is an admin account. I use the same password I use to log in to Windows 10 when it is started in VirtualBox. Windows 10 does not seem to display the account name at log in. What I see is my name, not what the username is, which is my email address. In Windows 10, when I go to where usernames for accounts that are to be accessible by RDP are entered, I see this email address of mine as an already RDP accessible username.

Are the RDP log in credentials the same as an account in WIindows 10 Pro?

The Windows 10 Pro is not currently configured for any group membership, or domain name. The directions I follow are at:
https://www.addictivetips.com/ubuntu-li ... x-remmina/
seem to show that in this case "WORGROUP" should be entered in the Domain Name field, and the Group field should be left blank. Is this correct?
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby spflanze » 25. Sep 2021, 08:43

Attached the logs as you requested, but it was done with a VNC connection to my laptop's OS. I used the VNC connection to move the cursor in Windows 10 running as a guest in Virtual Box. Before doing this a cleaned up all the VirtualBox log files so that only this action would be be recorded in them. The result is attached.
Attachments
VBox.zip
(33.38 KiB) Downloaded 2 times
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby scottgus1 » 25. Sep 2021, 14:52

Some VM settings:
Host CPU status:
00:00:00.943079 CPUM: Logical host processors: 12 present, 12 max, 12 online, online mask: 0000000000000fff
00:00:00.943202 CPUM: Physical host cores: 6
Guest CPU settings:
00:00:00.814060 NumCPUs <integer> = 0x0000000000000001 (1)

RAM settings:
00:00:00.777583 Host RAM: 64025MB (62.5GB) total, 62587MB (61.1GB) available
00:00:00.814062 RamSize <integer> = 0x0000000080000000 (2 147 483 648, 2 048 MB)
00:00:00.814286 VRamSize <integer> = 0x0000000008000000 (134 217 728, 128 MB)

Video settings:
00:00:00.814282 3DEnabled <integer> = 0x0000000000000001 (1)
00:00:00.814286 VMSVGA3dEnabled <integer> = 0x0000000000000001 (1)
00:00:00.814286 VMSVGAEnabled <integer> = 0x0000000000000001 (1)

Windows 10 adores 2 processors and your host has 6. Set VM processors to 2.

The VM RAM is low. 2GB is somewhat minimum for 10. Set to 4GB. Video RAM may be adequate, but Windows VMs with 3D enabled can go up to 256MB, and there must be a reason why only that combination can go to 256MB (other VM OS's are limited to 128). Set video RAM to 256MB. The host has room for all these expansions. This may help the sluggish mouse.

Also, Guest Additions don't appear to be installed. This will block benefits coming from 3D acceleration. In the VM window's Devices menu, choose Insert Guest Additions CD Image, then in the Windows 10 CD drive, run the Windows Guest Additions installer. Also disable Settings > Personalization > Colors > Transparency Effects in Windows 10.


Your Virtualbox remote setup is VRDP:
00:00:00.781758 Installed Extension Packs:
00:00:00.781767 Oracle VM VirtualBox Extension Pack (Version: 6.1.26 r145957; VRDE Module: VBoxVRDP)

So only the host OS can be accessed via VNC. The Virtualbox VM's "monitor" can only be accessed with RDP. And Windows does not come with a VNC server.

Let's get some hard data on the VM's network and IP address:

Inside the VM's Windows 10 command prompt, please run and post the output of this command:

ipconfig /all

Also, please right-click the VM in the main Virtualbox window's VM list, choose Show in Explorer/Finder/File Manager. Zip the VM's .vbox file (not the .vbox-prev file), and post the zip file, using the forum's Upload Attachment tab. (Configure your host OS to show all extensions if the folder that opens does not show a .vbox file.)
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Cursor is Lagging

Postby spflanze » 25. Sep 2021, 23:23

I made the changes you recommended to the VM, and then did the Guest Additions. After the Guest Additions were added the cursor responsiveness was much improved, almost to the point of normalcy. Thank you for this :)

The problem now is the response to the mouse buttons are lagging, by as much as a minute.

I am using this Windows 10 Pro installation to develop in the LabVIEW IDE. I think this might have something to do with the mouse button lag because this IDE needs a lot of RAM. I will try raising the RAM allocation beyond 4 GB.
Attachments
Windows 10 (64-bit).zip
(2.1 KiB) Downloaded 3 times
ipconfig all.txt
(1.38 KiB) Downloaded 2 times
spflanze
 
Posts: 13
Joined: 4. Sep 2016, 05:37

Re: Cursor is Lagging

Postby scottgus1 » 26. Sep 2021, 01:07

Thanks for the data. Your VM is Bridged, which puts the VM out on the physical LAN, and the VM OS's IP address is 192.168.100.103

So on the tower, you can use the RDP client pointed to 192.168.100.103. If RDP is enabled for the logged-in account you should be able to use that account's name and password. Note that sometimes you have to put in the computer name too. Try:

accountname
password

or

Windows10computername\accountname
password

spflanze wrote:mouse buttons are lagging, by as much as a minute. ... the LabVIEW IDE. I think this might have something to do with the mouse button lag because this IDE needs a lot of RAM.

Is the lag present when the IDE is not running?

One other thing: The laptop seems well-provisioned to run the VM. But if the tower is too, you could copy the VM folder to the tower and run the VM natively without violating the activation, as long as you only run one of the two VMs at one time. Then you won't have to remote in.
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux


Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 17 guests