Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 846527 - virtualbox-guest-additions-6.1.34 Auto-Resize Guest Display broken; "VBoxClient: execve for /usr/bin/VBoxDRMClient returns..."
Summary: virtualbox-guest-additions-6.1.34 Auto-Resize Guest Display broken; "VBoxClie...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-20 05:59 UTC by Yuri Sevatz
Modified: 2022-05-28 14:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
"VBoxClient: execve for /usr/bin/VBoxDRMClient returns..." (VirtualBox_Gentoo_20_05_2022_01_28_17.png,567.03 KB, image/png)
2022-05-20 06:03 UTC, Yuri Sevatz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Sevatz 2022-05-20 05:59:28 UTC
The virtualbox-guest-additions package that is natively compiled on Gentoo does not seem to bundle the VBoxDRMClient binary, seemingly required for VMSVGA "Auto-Resize Guest Display" to work, which I think has been broken for years.

Several links online had suggested to me that "Auto-Resize Guest Display" is usually disabled 'because the guest additions are not properly installed.'

However, if I sign in to gnome with the VMSVGA driver enabled, I can see a popup near the top of the screen, giving us a great hint:

"VBoxClient: execve for /usr/bin/VBoxDRMClient returns..."

I believe this is what the `VBoxClient --vmsvga` argument depends upon, which seems to be used for VMSVGA guest resizing, as per this documentation:

https://www.virtualbox.org/manual/ch04.html#guestadd-resizing-linux

But the VBoxDRMClient binary is missing from Gentoo!

When I tried to reproduce what Oracle's precompiled version of their VirtualBox Guest Additions installer places into /opt/VBoxGuestAdditions-*/bin/VBoxDRMClient, but this time using Gentoo's ebuild for virtualbox-guest-additions, and in /bin:  I was able to fix the problem entirely!

It's a really simply tweak in virtualbox-guest-additions-*.ebuild:

```
	# VBoxClient user service and xrandr wrapper
	if use X ; then
		doins VBoxClient
		fperms 0755 /usr/bin/VBoxClient
+		doins VBoxDRMClient
+		fperms 4755 /usr/bin/VBoxDRMClient
```
... and then guest resizing just works!

Reproducible: Always

Steps to Reproduce:
1. emerge gnome (follow wiki)
2. emerge virtualbox-guest-additions (follow wiki)


Actual Results:  
2. "Auto-Resize Guest Display" is greyed out.

Expected Results:  
2. "Auto-Resize Guest Display" is not greyed out.

Remember to set Virtualbox VM Display Settings to: "VMSVGA", with 3D Enabled.
Remember to set VIDEO_CARDS to "vmware", in /etc/portage/make.conf

I used gnome + systemd in  my profile while testing to make setup with gnome easier.  Though I think systemd vs openrc is largely inconsequential, since Virtualbox Guest additions only seems to depend on Xorg when autostarting.

~ # eselect profile show
Current /etc/portage/make.profile symlink:
  default/linux/amd64/17.1/desktop/gnome/systemd
Comment 1 Yuri Sevatz 2022-05-20 06:03:22 UTC
Created attachment 779588 [details]
"VBoxClient: execve for /usr/bin/VBoxDRMClient returns..."

Uploaded attachment showing popup on startup, while using VMSVGA and gentoo's native virtualbox-guest-additions package.
Comment 2 Yuri Sevatz 2022-05-20 06:08:13 UTC
Relates to:

https://bugs.gentoo.org/705832
https://bugs.gentoo.org/743163
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-05-20 06:57:52 UTC
(In reply to Yuri Sevatz from comment #0)
> It's a really simply tweak in virtualbox-guest-additions-*.ebuild:
> 
> ```
> 	# VBoxClient user service and xrandr wrapper
> 	if use X ; then
> 		doins VBoxClient
> 		fperms 0755 /usr/bin/VBoxClient
> +		doins VBoxDRMClient
> +		fperms 4755 /usr/bin/VBoxDRMClient
> ```
> ... and then guest resizing just works!

Is the SUID bit really necessary?
Comment 4 Yuri Sevatz 2022-05-20 08:08:39 UTC
(In reply to Lars Wendler (Polynomial-C) from comment #3)
> Is the SUID bit really necessary?

I think it is necessary, if VBoxClient tries to launch VBoxDRMClient, because it's set in the official installer.

I tried setting it to 0755 to learn more.  After rebooting, "Auto-Resize Guest Display" greys out again, with VBoxDRMClient not even running.  But during that same boot-session, I tried re-applying 4755 on /usr/bin/VBoxDRMClient, and it looked like VBoxClient re-launched it and my display resized, immediately after changing the permissions without me even having to reboot.

(They must have been retrying it, or watching it via inotify to react so quickly)

***

Some of the other distros seem to be less than happy with the SUID bit.  If you look at the "See Also" arch link in this ticket, they were creating their own .service to launch VBoxDRMClient as root manually:

https://github.com/archlinux/svntogit-community/tree/packages/virtualbox/trunk
Comment 5 Larry the Git Cow gentoo-dev 2022-05-28 14:12:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6f2c357279466c638ff47443be27847f0c1aaff

commit e6f2c357279466c638ff47443be27847f0c1aaff
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2022-05-28 14:11:13 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2022-05-28 14:12:53 +0000

    app-emulation/virtualbox-guest-additions: Revbumps to install VBoxDRMClient
    
    Reported-by: Yuri Sevatz <jetdog330@hotmail.com>
    Thanks-to: Yuri Sevatz <jetdog330@hotmail.com>
    Closes: https://bugs.gentoo.org/846527
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 ...itions-6.1.32.ebuild => virtualbox-guest-additions-6.1.32-r1.ebuild} | 2 ++
 ...itions-6.1.34.ebuild => virtualbox-guest-additions-6.1.34-r1.ebuild} | 2 ++
 2 files changed, 4 insertions(+)