Skip to content

Upgrade to 18.03pre120540.b8f7027360 breaks Xorg under VirtualBox #31889

Closed

Description

@juselius

Issue description

Upgrading from 18.03pre120398.aeff3080d0 to 18.03pre120540.b8f7027360 breaks X11 when running under VirtualBox. X11 fails to load the vboxvideo module due to mismatching ABI major versions:

Nov 21 09:25:31 curry display-manager[1010]: (EE) vboxvideo: module ABI major version (20) doesn't match the server's version (23)
Nov 21 09:25:31 curry display-manager[1010]: (II) UnloadModule: "vboxvideo"
Nov 21 09:25:31 curry display-manager[1010]: (II) Unloading vboxvideo
Nov 21 09:25:31 curry display-manager[1010]: (EE) Failed to load module "vboxvideo" (module requirement mismatch, 0)

Steps to reproduce

  1. Run NixOS unstable under (64bit) VirtualBox 5.2 (or 5.1.3) on Windows 1709
  2. $ sudo nixos-rebuild switch --upgrade
  3. reboot
  4. X11 fails to start

Technical details

(This is the current working system, after the rollback from 18.03pre120540.b8f7027360)

  • system: "x86_64-linux"
  • host os: Linux 4.9.61, NixOS, 18.03pre120398.aeff3080d0 (Impala)
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 1.11.15
  • channels(root): "nixos-18.03pre120540.b8f7027360"
  • channels(jonas): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs

Activity

  1. changed the title [-]Upgrade to 18.03pre120540.b8f7027360 breaks X11 under VirtualBox[/-] [+]Upgrade to 18.03pre120540.b8f7027360 breaks Xorg under VirtualBox[/+] on Nov 21, 2017
  2. dezgeg commented on Nov 21, 2017

    @dezgeg
    Contributor

    Maybe all that needs to be done is to drop this line?

    diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
    index 7d544e153e9..e54a7c49bdd 100644
    --- a/nixos/modules/services/x11/xserver.nix
    +++ b/nixos/modules/services/x11/xserver.nix
    @@ -548,8 +548,6 @@ in
               knownVideoDrivers;
           in optional (driver != null) ({ inherit name; modules = []; driverName = name; } // driver));
     
    -    nixpkgs.config.xorg = optionalAttrs (elem "vboxvideo" cfg.videoDrivers) { abiCompat = "1.18"; };
    -
         assertions = [
           { assertion = config.security.polkit.enable;
             message = "X11 requires Polkit to be enabled (‘security.polkit.enable = true’).";
    
  3. juselius commented on Nov 21, 2017

    @juselius
    ContributorAuthor

    Perhaps. It's worth a try, at least. How do I install/override system modules in configuration.nix, using my local nixpkgs repo?

  4. dezgeg commented on Nov 21, 2017

    @dezgeg
    Contributor

    Git clone, make the change, then sudo nixos-rebuild switch -I nixpkgs=/path/to/local/nixpkgs.

  5. vcunat commented on Nov 22, 2017

    @vcunat
    Member

    That's strange. The log claims that server running is 1.19 and you attempt to load vboxvideo for 1.18, i.e. that's exactly the thing that the line is trying to fix by installing 1.18 server instead if you specify "vboxvideo" in videoDrivers (the line you're about to delete).

  6. vcunat commented on Nov 22, 2017

    @vcunat
    Member

    Even after the update I see the newest driver is for server 1.18. Apparently something is interfering with the option attempting to switch your system to 1.18 instead of the default 1.19, though it's suspicious it started just when vbox is updated.

  7. dezgeg commented on Nov 22, 2017

    @dezgeg
    Contributor

    I think apparently the real problem is that we're using the vboxvideo driver at all, upstream claims the modesetting driver should be used nowadays: https://www.virtualbox.org/ticket/16052

  8. juselius commented on Nov 22, 2017

    @juselius
    ContributorAuthor

    @dezgeg I had missed the -I flag in the nixos-rebuild man page! I must say it's pretty well hidden from view... Thanks!

  9. vcunat commented on Dec 3, 2017

    @vcunat
    Member

    Then I wonder why they just now published their driver into X.org repo...

  10. hussein-aitlahcen commented on Feb 3, 2018

    @hussein-aitlahcen

    I'm experiencing the same issue, any simple workaround ?

  11. matthewbauer commented on May 16, 2018

    @matthewbauer
    Member

    Is this still an issue on 18.03? IIRC we included a fix for this.

  12. jhillyerd commented on Nov 11, 2018

    @jhillyerd
    Contributor

    Still seeing on 18.09, although video and mouse seem fine:

    [  6418.659] (II) Module vboxvideo: vendor="Oracle Corporation"
    [  6418.659]    compiled for 1.18.0, module version = 1.0.1
    [  6418.659]    Module class: X.Org Video Driver
    [  6418.659]    ABI class: X.Org Video Driver, version 20.0
    [  6418.659] (EE) vboxvideo: module ABI major version (20) doesn't match the server's version (23)
    [  6418.659] (II) UnloadModule: "vboxvideo"
    [  6418.659] (II) Unloading vboxvideo
    [  6418.659] (EE) Failed to load module "vboxvideo" (module requirement mismatch, 0)
    [  6418.659] (II) LoadModule: "modesetting"
    [  6418.660] (II) Loading /nix/store/bkjfsrkx18ydy27v95y9vnp17vkvcbn5-xorg-server-1.19.6/lib/xorg/modules/drivers/modesetting_drv.so
    [  6418.660] (II) Module modesetting: vendor="X.Org Foundation"
    [  6418.660]    compiled for 1.19.6, module version = 1.19.6
    [  6418.660]    Module class: X.Org Video Driver
    [  6418.660]    ABI class: X.Org Video Driver, version 23.0
    [  6418.660] (II) LoadModule: "vboxmouse"
    [  6418.660] (WW) Warning, couldn't open module vboxmouse
    [  6418.660] (II) UnloadModule: "vboxmouse"
    [  6418.660] (II) Unloading vboxmouse
    [  6418.660] (EE) Failed to load module "vboxmouse" (module does not exist, 0)
    
  13. ggPeti commented on Nov 11, 2018

    @ggPeti
    Member

    Right, same here. Acceleration does not work and I'm seeing the same EE lines as above. OpenIndiana has released an updated vboxvideo compatible with ABI version 23, I'd appreciate any pointers in how to port this to NixOS.

  14. matthewbauer commented on Nov 11, 2018

    @matthewbauer
    Member

    Yeah we use the official Guest Additions ISO. I guess we could build it from source, but I wonder if there is some issue preventing VirtualBox from support 1.19? Closing this for now. You can track VirtualBox's support for 1.19 here:

    https://www.virtualbox.org/ticket/17070

  15. ggPeti commented on Nov 12, 2018

    @ggPeti
    Member

    But it's still an issue "for now", so what's the point in closing this? Pretending it's not there won't make it go away for real. Btw that linked virtualbox issue is clearly a different one based on the log lines, and hasn't been touched in 10 months, so not quite sure what you're suggesting.

  16. juselius commented on Nov 12, 2018

    @juselius
    ContributorAuthor

    I gave up and switched to vmware. A good deal better user experience overall.

  17. vcunat commented on Nov 12, 2018

    @vcunat
    Member

    It's possible that the driver would just work if we compiled it ourselves . Another option might be to default to "modesetting". Still, I know really nothing about virtualbox, so it's hard for me to move it forward.

  18. juselius commented on Nov 12, 2018

    @juselius
    ContributorAuthor

    I spent some time trying to get custom compiled guest additions to work properly, but never managed to get anywhere with it.

  19. vcunat commented on Nov 12, 2018

    @vcunat
    Member

    Can someone test running with #50280? (Applied in the vbox guest.)

  20. ggPeti commented on Nov 13, 2018

    @ggPeti
    Member

    Pardon for the nagging, but how can I test that patch? I don't see an option in nixos-rebuild to use a local directory, neither in nix-channel.

  21. vcunat commented on Nov 13, 2018

    @vcunat
    Member

    @ggPeti nixos-rebuild -I nixpkgs=/path/to/tree

  22. jhillyerd commented on Nov 14, 2018

    @jhillyerd
    Contributor

    the rebuild above is missing the switch command. More verbosely, if you already have nixpkgs checked out in $HOME/nixpkgs:

    cd nixpkgs/
    git remote add vcunat https://github.com/vcunat/nixpkgs.git
    git fetch vcunat
    git checkout -b vboxvideo vcunat/p/vboxvideo
    cd
    sudo nixos-rebuild -I nixpkgs=$HOME/nixpkgs/
    

    I'm building it now...

  23. juselius commented on Nov 14, 2018

    @juselius
    ContributorAuthor

    A small remark, unrelated to this issue. The -I nixpkgs=... is very useful, and also undocumented. I have numerous times tried to solve some problem, failed, only to later find out that the documentation is out of sync with the implementation. I normally expect --help to give me terse, current and up to date information. Redirecting to an outdated man page is less than optimal. Sorry for being off topic.

  24. vcunat commented on Nov 14, 2018

    @vcunat
    Member

    I intentionally omitted the rest of the command. You may put different things in there, e.g. I personally prefer boot to switch for larger changes (and changes requiring X restart feel larger).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions