Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20.03] virtualbox: 6.0.14 -> 6.1.4 #82693

Merged
merged 2 commits into from Apr 21, 2020

Conversation

winterdeaf
Copy link
Contributor

@winterdeaf winterdeaf commented Mar 15, 2020

Update Virtualbox to its latest version. This allows compilation against
kernel >= 5.4 to succeed without further patches (see #74260, build
would fail for linux-5.5.5 to 5.5.9).

(cherry picked from commit 3132c23)

Motivation for this change

This would allow 20.03 users to use kernels >= 5.4 and still be able to run Virtualbox (maybe very likely, given Linux 5.4 gpu hang issues). Backports #82479 and #82774.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Update Virtualbox to its latest version. This allows compilation against
kernel >= 5.4 to succeed without further patches (see NixOS#74260, build
would fail for linux-5.5.5 to 5.5.9).

(cherry picked from commit 3132c23)
@B4dM4n
Copy link
Contributor

B4dM4n commented Mar 17, 2020

The virtualboxExtpack version is out of sync with virtualbox and therefore not loadable.

#82774 fixes this on master and should probably be included in the backport.

@winterdeaf
Copy link
Contributor Author

The virtualboxExtpack version is out of sync with virtualbox and therefore not loadable.

#82774 fixes this on master and should probably be included in the backport.

Thank you for catching that! I will cherry-pick it as soon as #82774 gets merged.

@ofborg ofborg bot requested a review from cdepillabout March 19, 2020 02:30
@thmzlt
Copy link
Contributor

thmzlt commented Mar 19, 2020

Thanks for working on this. VirtualBox 6.0 had a nasty performance regression on AMD CPUs.

What's the right way to load these changes in my /etc/nixos/configuration.nix so I can give it a try?

@B4dM4n
Copy link
Contributor

B4dM4n commented Mar 19, 2020

What's the right way to load these changes in my /etc/nixos/configuration.nix so I can give it a try?

You can add an overlay like this to your configuration.nix:

nixpkgs.overlays = [
  (
    self: super:
      let
        repo = self.fetchFromGitHub rec {
          owner = "NixOS";
          repo = "nixpkgs";
          name = "nixpkgs-${rev}";
          rev = "b3323db";
          sha256 = "1yir0k2kv3daa6cnzyscwxk89dxazwbc6ja0z5m60qjiv632007r";
        };
      in {
        virtualbox = self.libsForQt5.callPackage "${repo}/pkgs/applications/virtualization/virtualbox" {
          stdenv = self.stdenv_32bit;
          inherit (self.gnome2) libIDL;
        };
        virtualboxExtpack = self.callPackage "${repo}/pkgs/applications/virtualization/virtualbox/extpack.nix" {};
      }
  )
];

This overrides virtualbox, the extension pack and all builds derived from them like virtualboxWithExtpack.

@thmzlt
Copy link
Contributor

thmzlt commented Mar 21, 2020

You can add an overlay like this to your configuration.nix:

Added the overlay, but when I set virtualisation.virtualbox.host.enable it still installed VirtualBox 6.0.14 (the current version on my channel).

@winterdeaf
Copy link
Contributor Author

winterdeaf commented Mar 22, 2020

Progress report: I cannot run nixpkgs-review because I don't have enough disk space right now to download all the derivations (even after a nix-collect-garbage -d). It should succeed, if anyone has time feel free to run it and post the results.
Also, a test is failing (starting a VM times out), but I'm struggling to understand why. I just noticed it was failing on master, too, but I somehow missed it at the time of my first pull request.

@evelant
Copy link
Contributor

evelant commented Apr 7, 2020

VBoxClient doesn't appear to work anymore on nixos-unstable.

Process 1272 (VBoxClient) of user 1000 dumped core.

Not sure how to get more information or diagnose this further, but it isn't possible to do a graphical login anymore on nixos-unstable. Display manager shows up but upon logging in screen is blank and these core dump messages show up.

edit: I can log in with VBoxVGA as adapter, but desktop resizing behaves strangely, it only resizes if I switch to a vt and back.

@winterdeaf
Copy link
Contributor Author

@AndrewMorsillo you are right, it appears to be an upstream bug: https://www.virtualbox.org/ticket/19336. A mitigation is to use the the old guest additions -- they still work fine with the current VBox.

I'll put this on hold until VBox 6.1.5 is released, the problem is solved in the current nightly builds.

@thmzlt
Copy link
Contributor

thmzlt commented Apr 9, 2020

Can we get the VirtualBox derivation updated to the latest 6.0 release in the meantime? That would help with the performance regression on AMD CPUs.

https://www.virtualbox.org/wiki/Download_Old_Builds_6_0

@evelant
Copy link
Contributor

evelant commented Apr 9, 2020

A workaround:

  1. Set graphics adapter to VMSVGA in virtual machine settings
  2. Force driver to VMware in configuration.nix with xserver.videoDrivers = lib.mkOverride 10 [ "vmware" ];
  3. Disable Kscreen2 in background services of KDE settings

With this configuration everything seems to work smoothly on 6.1.4, at least video wise, I'm not sure about other guest additions functions

@flokli
Copy link
Contributor

flokli commented Apr 15, 2020

The broken guest additions should be fixed in 6.1.6, according to https://www.virtualbox.org/ticket/19336#comment:45.

Could someone file a PR against master updating it? This could probably then be cherry-picked into here.

@B4dM4n
Copy link
Contributor

B4dM4n commented Apr 19, 2020

A PR for 6.1.6 on master is opened: #85556

@flokli
Copy link
Contributor

flokli commented Apr 19, 2020

@m-scr the second commit is missing the cherry-picked from information. Did you git cherry-pick -x?

@B4dM4n how will this effect this backport? Should these commits also be cherry-picked?

(cherry picked from commit b3323dbd07ab86a64bf4d32a13323ff564dde8f7)
@winterdeaf
Copy link
Contributor Author

winterdeaf commented Apr 21, 2020

@flokli I indeed forgot the "-x", should be fixed now.

#85556 commits should definitively also be cherry-picked, given the problems with 6.1.4 guest additions.

@flokli flokli merged commit ea83ab5 into NixOS:release-20.03 Apr 21, 2020
@winterdeaf winterdeaf deleted the vbox-6.1.4-20.03 branch April 24, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants