From 9c300b6e2c8a40eea623a66b55d870806a5208ec Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 1 May 2020 00:03:05 +0200 Subject: [PATCH 1/4] virtualbox-guest-additions: fix dlopen of libXrandr The library could not be loaded which prevented autoresizing when using the VMSVGA adapter. --- .../virtualization/virtualbox/guest-additions/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix index 4275bc0542e8..3a9f8eeed437 100644 --- a/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix +++ b/pkgs/applications/virtualization/virtualbox/guest-additions/default.nix @@ -19,6 +19,7 @@ let dlopenLibs = [ { name = "libdbus-1.so"; pkg = dbus; } { name = "libXfixes.so"; pkg = xorg.libXfixes; } + { name = "libXrandr.so"; pkg = xorg.libXrandr; } ]; in stdenv.mkDerivation rec { From ec9792a3f55dca1985b8ce61e73dd746b320effd Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 1 May 2020 00:05:55 +0200 Subject: [PATCH 2/4] nixos/virtualbox-guest: add vmware driver VMSGVA is recommended by virtualbox for Linux clients. Compared to VBoxVGA and VBoxSVGA it also supports 3D acceleration. Adding the driver makes nixos work with all three supported graphics card types. --- nixos/modules/virtualisation/virtualbox-guest.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index 834b994e92d2..486951983d30 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -68,7 +68,7 @@ in SUBSYSTEM=="misc", KERNEL=="vboxguest", TAG+="systemd" ''; } (mkIf cfg.x11 { - services.xserver.videoDrivers = mkOverride 50 [ "virtualbox" "modesetting" ]; + services.xserver.videoDrivers = mkOverride 50 [ "vmware" "virtualbox" "modesetting" ]; services.xserver.config = '' From 6c2d12f1fa221468558e8e68141d2a3b25f853bd Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 1 May 2020 15:50:58 +0200 Subject: [PATCH 3/4] nixos/manual: recommend VMSVGA as graphics adapter Virtualbox recommends VMSVGA for Linux guests. It is also currently the only one supporting 3D acceleration and it works out of the box with NixOS and auto screen resizing. --- nixos/doc/manual/installation/installing-virtualbox-guest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/doc/manual/installation/installing-virtualbox-guest.xml b/nixos/doc/manual/installation/installing-virtualbox-guest.xml index 0ba909fa953f..1cffeed48079 100644 --- a/nixos/doc/manual/installation/installing-virtualbox-guest.xml +++ b/nixos/doc/manual/installation/installing-virtualbox-guest.xml @@ -49,7 +49,7 @@ - Click on Settings / Display / Screen and select VBoxVGA as Graphics Controller + Click on Settings / Display / Screen and select VMSVGA as Graphics Controller From f29063ff0bc0348ab7b64ad8f1038e9ecb065727 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Wed, 17 Jun 2020 18:42:36 +0200 Subject: [PATCH 4/4] nixos/virtualbox-image: change graphics adapter to vmswga --- nixos/modules/virtualisation/virtualbox-image.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/virtualisation/virtualbox-image.nix b/nixos/modules/virtualisation/virtualbox-image.nix index 788b4d9d9761..136bbad60a43 100644 --- a/nixos/modules/virtualisation/virtualbox-image.nix +++ b/nixos/modules/virtualisation/virtualbox-image.nix @@ -72,6 +72,7 @@ in { audiocontroller = "ac97"; audio = "alsa"; audioout = "on"; + graphicscontroller = "vmsvga"; rtcuseutc = "on"; usb = "on"; usbehci = "on";