You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't run sway in Virtualbox. I believe the problem is not sway per se, but rather related to 3d acceleration not working. I have been able to run the below configuration.nix successfully (=shows glxgears after boot) with qemu but not with Virtualbox. For Virtualbox, the graphical output is:
VMware: No 3D enabled (0, Success).libEGL warning: egl: failed to create dri2 screen00:00:00.040 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"VMware: No 3D enabled (0, Success).libEGL warning: egl: failed to create dri2 screen00:00:00.046 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"VMware: No 3D enabled (0, Success).libEGL warning: egl: failed to create dri2 screen00:00:00.053 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "DRI2: failed to create screen"00:00:00.053 [ERROR] [wlr] [EGL] command: eglInitialize, error: EGL_NOT_INITIALIZED (0x3001), message: "eglInitialize"00:00:00.053 [ERROR] [wlr] [render/egl.c:268] Failed to initialize EGL00:00:00.053 [ERROR] [wlr] [render/egl.c:571] Failed to initialize EGL context00:00:00.053 [ERROR] [wlr] [render/gles2/renderer.c:499] Could not initialize EGL00:00:00.053 [ERROR] [wlr] [render/wlr_renderer.c:272] Could not initialize renderer00:00:00.053 [ERROR] [sway/server.c:236] Failed to create renderer
Looking into the logs from Virtualbox reveals:
00:00:01.899286 VMSVGA3d: failed to load libGL.so.1: VERR_FILE_NOT_FOUND
00:00:01.899292 AssertLogRel /build/VirtualBox-7.1.4/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp(328) int glLdrInit(PPDMDEVINS): pfnRet
00:00:01.899296 glXGetFBConfigAttrib missing
00:00:01.899300 VMSetError: /build/VirtualBox-7.1.4/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp(328) int glLdrInit(PPDMDEVINS); rc=VERR_VGA_GL_SYMBOL_NOT_FOUND
00:00:01.899302 VMSetError: Missing OpenGL symbol 'glXGetFBConfigAttrib'
00:00:01.899303
00:00:01.899310 VMSVGA3d: Error loading OpenGL library and resolving necessary functions: VERR_VGA_GL_SYMBOL_NOT_FOUND
00:00:01.899314 VMSVGA3d: 3D support disabled! (vmsvga3dInit -> VERR_VGA_GL_SYMBOL_NOT_FOUND)
I believe this to be the same problem with any combination of virtualisation.virtualbox.host.package = pkgs.virtualbox[Hardened] and/or virtualisation.virtualbox.host.enableHardening = [true|false];
I confirmed that my setup is able to run KDE/Plasma (see configuration.nix below). The libGL error is obviously the same but Plasma is able to launch a graphical user environment. This could of course mean that the problem is not libGL/Virtualbox but sway. I also tested cage with no luck neither (similar error message).
Steps to reproduce
I used this configuration.nix and nix shell nixpkgs/nixos-24.11#nixos-generators --command nixos-generate -f virtualbox -c ./configuration.nix:
{config,pkgs,self, ... }: {# Either ...programs.sway={enable=true;};environment.variables={WLR_NO_HARDWARE_CURSORS=1;};# https://www.reddit.com/r/swaywm/comments/127fsxr/services.getty.autologinUser="root";programs.bash.loginShellInit='' if [ "$(tty)" = "/dev/tty1" ]; then sway --config ${pkgs.writeText"glxgears"'' exec ${pkgs.mesa-demos}/bin/glxgears -fullscreen ''} fi '';# ... or# services.displayManager.sddm.enable = true;# services.displayManager.sddm.wayland.enable = true;# services.desktopManager.plasma6.enable = true;virtualisation.virtualbox.guest.enable=true;}
(~1.6Gb .ova file, 2.8Gb for KDE ...)
Then, import the appliance using File -> Import Appliance. Before launching, open the Settings -> Display -> Enable 3d Acceleartion. Launch the VM, open the Log (Machine -> Show Log...)
Expected behaviour
No error message about a missing libGL.so.1 in the logs from Virtualbox. sway starts up and can show glxgears
Screenshots
see above
Relevant log output
see above
Additional context
No response
Some resources that are relevant IMHO:
Nixpkgs version
Describe the bug
I can't run
sway
in Virtualbox. I believe the problem is notsway
per se, but rather related to 3d acceleration not working. I have been able to run the belowconfiguration.nix
successfully (=showsglxgears
after boot) withqemu
but not with Virtualbox. For Virtualbox, the graphical output is:Looking into the logs from Virtualbox reveals:
I believe this to be the same problem with any combination of
virtualisation.virtualbox.host.package = pkgs.virtualbox[Hardened]
and/orvirtualisation.virtualbox.host.enableHardening = [true|false];
I confirmed that my setup is able to run KDE/Plasma (see
configuration.nix
below). The libGL error is obviously the same but Plasma is able to launch a graphical user environment. This could of course mean that the problem is not libGL/Virtualbox but sway. I also testedcage
with no luck neither (similar error message).Steps to reproduce
I used this
configuration.nix
andnix shell nixpkgs/nixos-24.11#nixos-generators --command nixos-generate -f virtualbox -c ./configuration.nix
:(~1.6Gb .ova file, 2.8Gb for KDE ...)
Then, import the appliance using File -> Import Appliance. Before launching, open the Settings -> Display -> Enable 3d Acceleartion. Launch the VM, open the Log (Machine -> Show Log...)
Expected behaviour
No error message about a missing libGL.so.1 in the logs from Virtualbox.
sway
starts up and can showglxgears
Screenshots
see above
Relevant log output
see above
Additional context
No response
Some resources that are relevant IMHO:
addOpenGLRunpath
to addDriverRunPath` in the meantime)System metadata
Notify maintainers
Note for maintainers: Please tag this issue in your pull request description. (i.e.
Resolves #ISSUE
.)I assert that this issue is relevant for Nixpkgs
Is this issue important to you?
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: