Open meteokr opened 1 month ago
I've managed to get this working, and I've done a write up on how here: https://discourse.nixos.org/t/looking-for-help-setting-up-virtualgl-with-turbovnc/51875/3
Basically the needed config is this:
environment.systemPackages = with pkgs; [
turbovnc
virtualgl
pkgsi686Linux.virtualgl
];
environment.sessionVariables = {
LD_LIBRARY_PATH="/run/opengl-driver/lib/:/run/opengl-driver-32/lib:${pkgs.virtualglLib}/lib:${pkgs.pkgsi686Linux.virtualglLib}/lib";
};
boot.extraModprobeConfig = ''
options amdgpu virtual_display=0000:01:00.0,1
'';
services.displayManager.autoLogin = {
enable = true;
user = "testuser";
};
hardware.opengl.enable = true;
hardware.opengl.driSupport32Bit = true;
networking.firewall.allowedTCPPorts = [ 5901 ];
If this could be updated on the official wiki I would appreciate it to help anyone else trying to achieve this.
EDIT: Sorry for accidentally closing this, then reopening it. Hopefully that didn't ruffle anything. I meant to just update this issue with my results.
Problem
I cannot find any examples of how to get VirtualGL to run with TurboVNC. The steps to reproduce my issue is that I have these relevent settings added in my configuration.nix.
This is the command used to start the server.
vncserver -fg -geometry 800x600 -vgl -securitytypes none
Results in output:From another machine I connect to the VNC instance, and within the xterm window I run vglrun glxinfo.
Here https://github.com/NixOS/nixpkgs/pull/195608 it seems to be that others are able to test VirtuaGL no problem, but what commands are they using to test this or how are their test configured? I can't seem to find any literature describing how to use this either from https://search.nixos.org/options?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=virtualgl or https://nixos.wiki/index.php?search=virtualgl&go=Go
Upstream documentation doesn't support NixOS, and I unfortunately can't find anyone else attempting to use this with an actual GPU and not just using software rendering. I'm using a server with an AMD GPU so there's no Nvidia driver issues that should be affecting this.
Proposal
Document an example of how to use VirtualGL with some VNC server service with hardware acceleration.
Checklist
Add a :+1: reaction to issues you find important.