Guest Additions not working properly on Ubuntu 22.04 guest

Discussions related to using VirtualBox on Mac OS X hosts.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by mpack »

With all VMs closed down, and in the Manager, go to File|Preferences|Display and make sure that Maximum Guest Screen Size is set to None.
serendipity
Posts: 44
Joined: 5. Oct 2019, 11:45

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by serendipity »

fth0 wrote: What size does the background image have?

Not sure how to measure it, here are some snapshots :

In "normal" mode :
sk1-min.png
sk1-min.png (93.07 KiB) Viewed 11164 times
In "scaled" mode :
sk2-min.png
sk2-min.png (80.29 KiB) Viewed 11164 times
fth0 wrote: BTW, can you move the terminal window with the appropriate keyboard commands?
I have a confession to make : I am unaware of keyboard commands to move a terminal window, and googling gave me nothing.
serendipity
Posts: 44
Joined: 5. Oct 2019, 11:45

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by serendipity »

mpack wrote:With all VMs closed down, and in the Manager, go to File|Preferences|Display and make sure that Maximum Guest Screen Size is set to None.
Done. The symptoms stayed exactly the same.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by fth0 »

serendipity wrote:I am unaware of keyboard commands to move a terminal window, and googling gave me nothing.
The latter part is strange: When I google "Ubuntu move window with keyboard", I get more results than I could read in a lifetime. ;)

In a nutshell: Press Alt-F7, use the cursor keys to move the window, press Enter to accept or Esc to discard.
serendipity
Posts: 44
Joined: 5. Oct 2019, 11:45

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by serendipity »

fth0 wrote:"I am unaware of keyboard commands to move a terminal window, and googling gave me nothing."
The latter part is strange: When I google "Ubuntu move window with keyboard", I get more results than I could read in a lifetime. ;)
By "nothing", I meant nothing useful for my present situation. I got many results too obviously, but all the keyboard shortcuts I found mentioned in the first search results were not window-moving shortcuts (I first tried googling Ubuntu move terminal keyboard commands and then tried a few variations on that. My mistake was googling phrases containing "move terminal" instead of "move window").
fth0 wrote: In a nutshell: Press Alt-F7, use the cursor keys to move the window, press Enter to accept or Esc to discard.
As far as I can see, the VM is unresponsive to any key press from the first row of keys on my MacBookAir host keyboard, going from esc to On/Off (in particular, I don't have access to esc or F7 in the ). I had noticed that behaviour on older Ubuntu VMs as well, and in particular that the Ubuntu "keyboard viewer" does not mention any key from that first row either.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by fth0 »

serendipity wrote:As far as I can see, the VM is unresponsive to any key press from the first row of keys on my MacBookAir host keyboard, going from esc to On/Off (in particular, I don't have access to esc or F7 in the ). I had noticed that behaviour on older Ubuntu VMs as well, and in particular that the Ubuntu "keyboard viewer" does not mention any key from that first row either.
Up to now, I understood that your issues related to the VirtualBox Guest Additions (GA). But if the keyboard is also involved, and even in older VMs, then we may be looking in the wrong direction.

Which of your problems exist when the GA are not installed?
Which of your problems exist in VMs with other guest OSes?
serendipity
Posts: 44
Joined: 5. Oct 2019, 11:45

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by serendipity »

fth0 wrote: Up to now, I understood that your issues related to the VirtualBox Guest Additions (GA). But if the keyboard is also involved, and even in older VMs, then we may be looking in the wrong direction.
I agree that there is a separate keyboard issue that is probably unrelated to the GAs (and I've asked a question about that on an Ubuntu forum recently, I'll re-post here any developments on that point in case it might be revelant).

On the other hand, I think the current evidence goes the opposite way of what you're suggesting here. In my older Ubuntu guests, I've always had this partially-unrecognized-keyboard issue (and I didn't care ; in fact I still don't care today, unless it affects other things) but this "bad resizing" issue at the heart of this topic is a first for me.

And, in theory at least, pleasant resizing of the VM window is the GA's job, not the keyboard's, right ? The two might be related in my case of course but I see no positive evidence for this so far.
fth0 wrote: Which of your problems exist when the GA are not installed?
I didn't pay close attention to that, but as far as I can remember, the problem existed identically before the GAs were installed.
fth0 wrote: Which of your problems exist in VMs with other guest OSes?

I clarify that I've only ever used Ubuntu Oses with different versions on Mac hosts with different versions. And as stated above, all my Ubuntus have always had this partially-unrecognized-keyboard issue, but only the one I've recently created has this bad-resizing-behaviour issue.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions not working properly on Ubuntu 22.04 host

Post by fth0 »

serendipity wrote:And, in theory at least, pleasant resizing of the VM window is the GA's job, not the keyboard's, right ?
Well, sort of. When you select a display resolution from the VM window's View menu on the host OS, the GA tell the guest OS that the resolution of the virtual monitor has changed. If the menu bar on the top and the launcher bar on the left use the full window's width and height (as in your screenshots), the GA seems to have done their job. With the evidence provided so far, I cannot assess if the problem is related to VirtualBox or the GA at all.
john1726
Posts: 2
Joined: 11. Jun 2022, 06:52

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by john1726 »

Please note that I experienced the same problem. Then I changed the "Graphics Controller" from VMSVGA to VBoxVGA and turned off the "Enable 3D Acceleration" and then finally the screen resized properly so that I can now access the right-hand portion of the screen. HTH.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by fth0 »

john1726 wrote:Then I changed the "Graphics Controller" from VMSVGA to VBoxVGA and turned off the "Enable 3D Acceleration" and then finally the screen resized properly
Which of the two changes was the relevant one? Did you try VMSVGA without 3D Acceleration and VBoxVGA with 3D Acceleration?
john1726
Posts: 2
Joined: 11. Jun 2022, 06:52

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by john1726 »

I didn't test all of the permutations. At my job, our development environment is a Windows 10 host with an Ubuntu 16.04 guest for embedded development, with the settings I mentioned, so I tried that with Ubuntu 22.04 as well and it resolved the issue you mentioned.
Tahir
Posts: 1
Joined: 18. Jun 2022, 15:36

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by Tahir »

It's the problem with Wayland.
Switch to XOrg on Ubuntu login screen and the problem with mouse will disappear.
lpsmith
Posts: 1
Joined: 19. Aug 2020, 20:29

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by lpsmith »

I had exactly the same problem, and switching to XOrg from Wayland solved the problem. Thanks, Tahir!

(Conversely, changing the graphics controller and turning on/off 3D Acceleration did not help.)

I had a little trouble getting to the login screen (to switch to XOrg; there's a gear icon there for settings), since I had set things up to log me in automatically, and my mouse didn't work anywhere but the left bar area. I got it to work by clicking on the 'Show Apps' grid on the bottom left, then typing 'log out' into the search bar, and selecting it from the keyboard with 'tab' and 'enter'.
dcordeiro
Posts: 1
Joined: 16. Aug 2022, 12:54

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by dcordeiro »

Hi
Same problem here. Apparently the problem is with Wayland. I solved my problem by changing Wayland to X11.

To login to Ubuntu 22.04 using the X11 click on the gear button and select "Ubuntu on Xorg" option before you login.
scubaman
Posts: 2
Joined: 1. Nov 2022, 18:15

Re: Guest Additions not working properly on Ubuntu 22.04 guest

Post by scubaman »

I am having the exact same issue, anyone make any progress figuring this out?

VirtualBox Graphical User Interface Version 6.1.38_Ubuntu r153438
Post Reply