Closed Marietto2008 closed 1 year ago
nvidia_drm
error is innocuous. That just means that the nVidia driver is currently in use, so vglserver_config
cannot reload it. Rebooting the system, as you did, will definitely reload the driver. Note that VirtualGL 3.0.2 fixed an issue that may have caused that error, so if you are running a prior version of VirtualGL, upgrade to 3.0.2.ps ax | grep virtualgl
will never return anything.vglgenkey
directly. That command is meant to be invoked only by the display manager. vglgenkey
is not the "VirtualGL server", because there is no "VirtualGL server" process. (The term "VirtualGL server" refers to the whole machine on which VirtualGL is being used, not to a process. The User's Guide explicitly states that.) The server side of VirtualGL is encapsulated in an interposer library that is preloaded into an OpenGL application and executes within the body of certain GLX, OpenGL, EGL, OpenCL, X11, and XCB functions called by the application. (The User's Guide states that as well.)At first glance, the issue with GDM seems to be related to the fact that Wayland needs to be disabled in GDM. Otherwise, GDM will never run an X server, so there will be no display manager X server for VGL to use as a 3D X server. Normally vglserver_config
will detect whether you are using a recent version of GDM that needs to have WaylandEnable=false
set in custom.conf. It detects that by looking for ExecStart=/usr/*/gdm
or ExecStart=/usr/*/gdm3
in /etc/systemd/system/display-manager.service. Apparently that detection failed on your system for some reason, because vglserver_config
never asked you whether you wanted to disable Wayland. That shouldn't have affected LightDM, however, so I'm not sure why you couldn't get LightDM to work.
How this is supposed to work:
vglserver_config
modifies the display manager configuration in order to
vglgenkey
(if you elected to restrict 3D X server access to members of the vglusers
group) or xhost +LOCAL:
(if you elected not to restrict 3D X server access.)vglusers
group, then when the display manager starts, vglgenkey
will obtain the xauth key from the display manager's X server and copy it to /etc/opt/VirtualGL/vgl_xauth_key, which is readable by members of the vglusers
group. (Make sure that your user account has been added to that group.)vglrun
is used to preload VirtualGL into a 3D application, vglrun
adds the contents of /etc/opt/VirtualGL/vgl_xauth_key to your ~/.Xauthority file, thus giving your user account access to the 3D X server.I haven't noticed any problems with VirtualGL or TurboVNC under Ubuntu 22.04, so it seems that something may be different about your system.
I'm using VirtualGL 3.0.90. I've disabled GDM and I have enabled lightdm. Anyway I see this :
/etc/gdm3/custom.conf
#WaylandEnable=false
but when I give a ps ax | grep Xorg
it says that Xorg is running. At this point I can try to set WaylandEnable=false
anyway on /etc/gdm3/custom.conf
. Maybe it works.
On the file /etc/group I have :
vglusers:x:1002:
I'm not experienced,but I suspect that it is wrong. It should be :
vglusers:x:1002:marietto
right ?
I'm not experienced,but I suspect that it is wrong. It should be :
vglusers:x:1002:marietto
right ?
Yes. That is the likely source of your problems. Add your user account to vglusers
, then log out and back in. You should now be able to ls /etc/opt/VirtualGL
and see the vgl_xauth_key file there, and
xauth merge /etc/opt/VirtualGL/vgl_xauth_key
xdpyinfo -display :0
should work.
So,ok,I made those two modifications. Now the xfce problems that I've talked about before are gone. I can use xfce locally (sitting down on the chair ahead the monitor where Ubuntu runs) without problems. But on the folder /opt/VirtualGL/bin/ I don't see any vgl_xauth_key file. I've looked for it everywhere on the disk. It is not generated. Does this means that it is not working ? I have two VirtualGL directories.
1) on /etc/opt/VirtualGL : it is empty
2) on /opt/VirtualGL : here there are all the VirtualGL files,except for the vgl_xauth_key file
It would be under /etc/opt/VirtualGL, not under /opt/VirtualGL. If it is not under /etc/opt/VirtualGL, then that means that the display manager is not successfully running vglgenkey
. I would suggest trying GDM with WaylandEnable=false
. I haven't tested LightDM under Ubuntu 22.04 and cannot guarantee that it works, but VirtualGL does officially support GDM under Ubuntu 22.04.
When on my previous post I've talked about "two modifications" I meant that the first one was to try "WaylandEnable=false". Now it is set like this. Do you want that I comment that line ? Anyway,when I have installed the deb package,it has installed the files under /opt/VirtualGL.
No, leave it uncommented.
ok. I kept uncommented WaylandEnable=false and I've reconfigured gdm3 with the following command : dpkg-reconfigure gdm3,choosing gdm3 as default. I don't see any vgl_xauth_key file on the system. And mostly,xfce4 does not start at all. It crashes,giving the error "Oh no! Something has gone wrong. A problem has occurred and the system can't recover".
I'm sorry. I have no idea. Xfce shouldn't need Wayland, so I don't know why it fails to start with WaylandEnable=false
. At this point, my only suggestions are:
Further comments:
WaylandEnable=false
, it is necessary to use GNOME/Xorg or another non-Wayland window manager, such as Xfce, for local logins. (To the best of my knowledge, the same restriction applies to LightDM, because it does not support Wayland window managers.) Note, however, that you do not need to log in locally in order to use VirtualGL, and in fact, logging in locally will interfere with VirtualGL. Once you have disabled Wayland in GDM, GDM will start an X server on Display :0 while it is sitting at the login prompt. VirtualGL uses that X server (the "3D X server") in order to access the GPU. When you log in locally, GDM starts a second X server on Display :1 and temporarily freezes access to Display :0 while you are logged in, so that would have the effect of freezing any applications running with VirtualGL.xfce
in the TurboVNC configuration file. See https://turbovnc.org/Documentation/Compatibility30.Maybe that will provide a clue as to what is going wrong. Otherwise, I don't have enough information to diagnose the problem.
I've rebooted the VM and the previous error gone away. Wait a moment : should I install turboVNC server within the Ubuntu / remote VM ? Tutorial says to do that,but at the moment I didn't. Even because my next question would have been "which VNC client do you suggest to me to use on the local system ? "every VNC client can be used with the TurboVNC server ?" "Can I use another VNC server,that has a compatible client on FreeBSD ? I ask this because My local OS is FreeBSD and I see that from the packages I don't have a TurboVNC client. I can choose only between the following ones :
# pkg search vnc
The provides database is up-to-date.
gtk-vnc-1.3.1 VNC viewer widget for GTK+
neatvnc-0.5.4 Liberally licensed VNC server library
novnc-1.3.0 HTML5 VNC client
p5-Net-VNC-0.40_3 Simple VNC client
spiritvnc-0.4.6 Multi-view FLTK-based VNC client
tigervnc-viewer-1.12.0 TigerVNC Viewer
tightvnc-1.3.10_6 Enhanced version of VNC
Yes, you should install the TurboVNC Server in the VM.
Refer to the User's Guide: https://rawcdn.githack.com/TurboVNC/turbovnc/3.0.2/doc/index.html#hd0010 for compatibility information.
Your best bet among the existing ports is the TigerVNC Viewer, but in order to use the full range of TurboVNC features (including the TurboVNC Session Manager), you need to use the TurboVNC Viewer. It is easy to build the TurboVNC Viewer from source code on FreeBSD. I do it all the time.
I thought that there was already a TurboVNC port for FreeBSD. Someone who was working on a port posted several GitHub issues a while back, so I'm not sure why the port never landed.
I've been able to connect to the turbovnc server using the tigervnc client 4 FreeBSD (for now) and this is what I see :
is this GNOME ? it seems you are right. It is using GNOME. But when I login in Ubuntu using my monitor,is not GNOME which starts,but XFCE. I imagine that I should tell to TurboVNC to start XFCE instead of GNOME if I want to use VirtualGL ? How can I do that ?
I literally just told you how to do that in https://github.com/VirtualGL/virtualgl/issues/223#issuecomment-1377176153.
I don't have the little gear icon after I enter my username. I have detached the HDMI cable that connect my GPU nvidia 2080 ti to the monitor and I've launched the VM. And then,using the SSH connection to the VM,I have launched the vncserver :
root@marietto-BHYVE:/opt/TurboVNC/bin# /opt/TurboVNC/bin/vncserver
Desktop 'TurboVNC: marietto-BHYVE:1 (marietto)' started on display marietto-BHYVE:1
Starting applications specified in /opt/TurboVNC/bin/xstartup.turbovnc
Log file is /root/.vnc/marietto-BHYVE:1.log
root@marietto-BHYVE:/opt/TurboVNC/bin# vncserver -list
TurboVNC sessions:
X DISPLAY # PROCESS ID NOVNC PROCESS ID
:1 5747
Now I can connect using tigervnc client on the address : 192.168.1.3:1,but I still see GNOME as DM,even if I have created the file /root/.vnc/xstartup.turbovnc with the following content inside :
xfce4-session &
as explained here :
https://gist.github.com/cyberang3l/422a77a47bdc15a0824d5cca47e64ba2
where he says :
Make sure that the commands xfce4-panel and xfce4-session exist in your system (if not install them), and append the following line at the end of the file ~/.vnc/xstartup.turbovnc.
xfce4-session &
and I still don't see any vgl_xauth_key file somewhere.
I've created the /root/.vnc/xstartup.turbovnc file from scratch (it didn't exist before). But I see that there is another file called the same on /opt/TurboVNC/bin/xstartup.turbovnc
maybe this is the file that I should modify ? It seems complicated to modify. This is the content :
https://pastebin.ubuntu.com/p/qmnPYfd8FK/
can you explain how can I modify it to start xfce instead of gnome ? very thanks.
I don't have the little gear icon after I enter my username. I have detached the HDMI cable that connect my GPU nvidia 2080 ti to the monitor and I've launched the VM. And then,using the SSH connection to the VM,I have launched the vncserver :
The gear icon is in the lower right corner.
If you aren't seeing it, then I have no idea why.
Please understand that VirtualGL and TurboVNC complement each other but are also independent of each other. TurboVNC is completely isolated from the GPU and the physical display, so nothing you do with the physical display will affect it. VirtualGL marshals OpenGL commands from 3D applications to the GPU (via the 3D X server, which the display manager controls) so that those commands can be rendered with GPU acceleration, even in a remote desktop environment (such as TurboVNC) that doesn't have GPU-accelerated OpenGL.
All of that information is in the VirtualGL/TurboVNC User's Guides, along with helpful diagrams.
root@marietto-BHYVE:/opt/TurboVNC/bin# /opt/TurboVNC/bin/vncserver Desktop 'TurboVNC: marietto-BHYVE:1 (marietto)' started on display marietto-BHYVE:1 Starting applications specified in /opt/TurboVNC/bin/xstartup.turbovnc Log file is /root/.vnc/marietto-BHYVE:1.log root@marietto-BHYVE:/opt/TurboVNC/bin# vncserver -list TurboVNC sessions: X DISPLAY # PROCESS ID NOVNC PROCESS ID :1 5747
Now I can connect using tigervnc client on the address : 192.168.1.3:1,but I still see GNOME as DM,even if I have created the file /root/.vnc/xstartup.turbovnc with the following content inside :
xfce4-session &
as explained here :
https://gist.github.com/cyberang3l/422a77a47bdc15a0824d5cca47e64ba2
and I still don't see any vgl_xauth_key file somewhere.
I've created the /root/.vnc/xstartup.turbovnc file from scratch (it didn't exist before). But I see that there is another file called the same on /opt/TurboVNC/bin/xstartup.turbovnc
maybe this is the file that I should modify ? It seems complicated to modify. This is the content :
https://pastebin.ubuntu.com/p/qmnPYfd8FK/
can you explain how can I modify it to start xfce instead of gnome ? very thanks.
Let me repeat that I cannot support that tutorial. It is, among other things, outdated. TurboVNC no longer uses ~/.vnc/xstartup.turbovnc. It uses a global xstartup.turbovnc file (/opt/TurboVNC/bin/xstartup.turbovnc) and provides several mechanisms for you to specify a window manager. Those mechanisms, and the appropriate values for specific window managers on specific distributions, are all described at the link I provided earlier: https://turbovnc.org/Documentation/Compatibility30.
Let me also repeat that vgl_xauth_key is generated by vglgenkey
, which runs in the context of the display manager. It has nothing to do with TurboVNC. Apparently something is misconfigured on your system, which is preventing GDM from running vglgenkey
. I have no idea what is causing that issue. No one else has reported it, and I cannot reproduce it in my own Ubuntu 22.04 VM.
I am extremely busy maintaining three open source projects for a living, and I do not make very much money doing that. I don't have the cycles to provide free personalized support for VirtualGL/TurboVNC users. Please take the time to read the VirtualGL/TurboVNC User's Guides and follow the procedures in those guides rather than in a third-party tutorial. That's the best I can do for you at the moment.
I can connect to the turboVNC server,but I'm not sure if VirtualGL works correctly. Is there a method to be sure ?
I can connect to the turboVNC server,but I'm not sure if VirtualGL works correctly. Is there a method to be sure ?
VGL_LOGO=1 vglrun /opt/VirtualGL/bin/glxspheres64
If VirtualGL is working, you should see a "VGL" logo in the corner of the window, and the OpenGL renderer string that it outputs to the command line should say something about your nVidia GPU (as opposed to "Mesa", "llvmpipe", "softpipe", etc., which are all unaccelerated OpenGL implementation.)
I suspect that VGL won't work, because the first thing vglrun
will try to do is load /etc/opt/VirtualGL/vgl_xauth_key into your ~/.Xauthority file. That will fail because vgl_xauth_key doesn't exist.
this works :
VGL_LOGO=1 /opt/VirtualGL/bin/glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
GLX FB config ID of window: 0x164 (8/8/8/0)
Visual ID of window: 0x3f7
Context is Direct
OpenGL Renderer: llvmpipe (LLVM 15.0.2, 256 bits)
50.326701 frames/sec - 51.796241 Mpixels/sec
but not this :
VGL_LOGO=1 vglrun /opt/VirtualGL/bin/glxspheres64
Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
Invalid MIT-MAGIC-COOKIE-1 key
[VGL] ERROR: Could not open display :0.
marietto@marietto-BHYVE:~/Scrivania$ echo $DISPLAY
:1.0
marietto@marietto-BHYVE:~/Scrivania$ vglrun glxgears -display :1.0
Invalid MIT-MAGIC-COOKIE-1 key
[VGL] ERROR: Could not open display :0.
marietto@marietto-BHYVE:~/Scrivania$ vglrun glxgears -display :1
Invalid MIT-MAGIC-COOKIE-1 key
[VGL] ERROR: Could not open display :0.
Hello.
Im trying to setup VirtualGL and TurboVNC on Ubuntu 22.10 and I've found this tutorial as a guide :
https://gist.github.com/cyberang3l/422a77a47bdc15a0824d5cca47e64ba2
From the host (FreeBSD),I connect to the Ubuntu 22.10 VM through ssh issuing the following commands proposed by the tutorial :
and I've started issuing the commands explained on the cyberang tutorial :
I'm using lightdm :
This is how I have configurated the config. file needed to make virtualGL works correctly :
I have some doubt.
1) modprobe: FATAL: Module nvidia_drm is in use : is this an error that should be fixed by me in some way ?
2) on ubuntu 22.10 I've installed xfce4,that it works well if I "Unconfigure server for use with VirtualGL (GLX + EGL back ends)",instead,if I press 1 on the vglserver_config,it stops to work well. Infact I have some troubles by moving and closing windows,I see an "X" on the monitor,instead of the normal cursor,I can't create files and folders on the desktop. And I don't see any virtualgl process when I do a "ps ax | grep virtualgl" ; it is not launched. Further errors are the following :
and mostly,the final error when I try to run the virtualGL server :
or :