Bug 1460804 - qemu:///system spice GL requires opening permissions on /dev/dri/renderD128
Summary: qemu:///system spice GL requires opening permissions on /dev/dri/renderD128
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 26
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-12 19:54 UTC by pzeppegno
Modified: 2017-12-04 15:09 UTC (History)
19 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-04 15:09:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description pzeppegno 2017-06-12 19:54:46 UTC
Description of problem:

I am still unable to configure 3d acceleration for a fedora 26 VM running under Fedora 26.

Version-Release number of selected component (if applicable):
libvirt-daemon-3.2.1-3.fc26.x86_64
virt-viewer-5.0-2.fc26.x86_64

How reproducible:
Always

Steps to Reproduce:
1. modify the VM configuration for using virtio for 3d accel to the best of my knowledge (following all the articles on the web). The the guest and the host are fedora26 alpha updated until today
2. save the VM
3. start the VM

Actual results:
fails to start with error: Failed to initialize EGL render node for SPICE GL 

Expected results:
Runs and possible gets 3d acceleration using virgl3d

Additional info:

Comment 1 Victor Toso 2017-06-13 07:51:50 UTC
Thanks for taking time to report this bug.

This is a know problem with some patches that fixes the issue in discussion [0]. It needs some understanding on the patches and on the problem before they get pushed upstream.

[0] https://lists.freedesktop.org/archives/spice-devel/2017-June/037955.html

As we have a fix in spice-gtk I'm moving this to spice-gtk, not 100% sure that it is our fault.... (it was working before...)

Comment 2 pzeppegno 2017-06-13 22:57:45 UTC
The error message int spice-devel mailing list is about:

"Couldn't find current GLX or EGL context"

are you positive that my error:

"Failed to initialize EGL render node for SPICE GL"

is caused by the same problem? I thought it was related with this issue:

https://bugzilla.redhat.com/show_bug.cgi?id=1337290

that however, according to the last comment seems to be supposedly solved for f26:

I'm not going to backport the libvirt rendernode patches to f25, but they are in f26. If people want to try them on f25, grab latest libvirt and qemu from the fedora-virt-preview repo.

Closing this against F26. If anyone is still hitting issues please file a new bug

Since I still see, this is my attempt to file a new bug for it.

Comment 3 Victor Toso 2017-06-14 08:31:04 UTC
Hey,

(In reply to pzeppegno from comment #2)
> The error message int spice-devel mailing list is about:
> 
> "Couldn't find current GLX or EGL context"
> 
> are you positive that my error:
> 
> "Failed to initialize EGL render node for SPICE GL"
> 
> is caused by the same problem? I thought it was related with this issue:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1337290

Sorry, did not pay enough attention and yes, I thought this problem was fixed (?)
Moving back to libvirt.

Comment 4 Cole Robinson 2017-06-20 22:12:12 UTC
If you're using qemu:///session it should work fine. For qemu:///system (default virt-manager connection), looks like we still need a 'chmod 777 /dev/dri/renderD128' to make this work

Comment 5 pzeppegno 2017-06-20 22:49:38 UTC
I will search a tutorial on how to set up qemu:///session.

On the other hand, even after a chmod (666 at first and then 777) it does not work for me.

rror starting domain: internal error: process exited while connecting to monitor: 2017-06-20T22:46:05.754353Z qemu-system-x86_64: -chardev pty,id=charserial0: char device redirected to /dev/pts/8 (label charserial0)
2017-06-20T22:46:05.766923Z qemu-system-x86_64: egl: no drm render node available
2017-06-20T22:46:05.766932Z qemu-system-x86_64: Failed to initialize EGL render node for SPICE GL

I may be doing something wrong (but all the yellow signal have gone away from the UI, so I think I'm doing it right). Is there something I can do to help? I really would like to see this finally working.

Comment 6 Cole Robinson 2017-06-20 23:22:04 UTC
Post your VM XML config: sudo virsh dumpxml $vmname

You may need to manually select a rendernode in virt-manager UI, rather than leaving it set to 'auto'

Comment 7 pzeppegno 2017-06-21 08:28:47 UTC
OK. It works. It was the combination of chown 666 /dev/dri/renderD128 and explicitly selecting a rendernode that made it.

I never tried the combination of the two in the past.

And then I also hit the "Couldn't find current GLX or EGL context" error if I try using virt-viewer.

I was actually surprised that virt-manager would work, as I thought that virt-viewer was mandatory.

Last point, it works with Xwayland, but it gives me a black screen with Xorg.

Comment 8 Cole Robinson 2017-06-21 11:24:20 UTC
virt-viewer isn't required as you've seen, virt-manager will handle things as well. But right now f26 is broken with that 'GLX' error:

https://bugzilla.redhat.com/show_bug.cgi?id=1461802

I did f26/rawhide builds yesterday so itll take a bit for them to hit updates-testing

Not sure about the Xwayland thing though...

Comment 9 Cole Robinson 2017-07-17 16:44:17 UTC
Patch posted upstream:

https://www.redhat.com/archives/libvir-list/2017-July/msg00624.html

Comment 10 Cole Robinson 2017-08-27 16:36:56 UTC
v2 patches:

https://www.redhat.com/archives/libvir-list/2017-August/msg00795.html

Comment 11 Fedora Update System 2017-09-16 19:14:50 UTC
libvirt-3.2.1-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ff7b30a42d

Comment 12 Fedora Update System 2017-09-17 10:52:01 UTC
libvirt-3.2.1-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ff7b30a42d

Comment 13 pzeppegno 2017-09-17 20:01:08 UTC
Installed from fedora-testing-updates, tried it and it works.

Thanks a lot for your effort!

Comment 14 kajinofe 2017-10-05 21:18:20 UTC
I applied the patch on Fedora 26 and when launching the VM, shortly after, it crashes:

Host:  Fedora 26
Kernel:  4.13.4-200.fc26
VM Client:  Fedora 26
GPU:  GTX 1080
Driver:  Proprietary 375.66 from RPM Fusion <-- will virgl only work on nouveau?
Rendernode auto:  gives me the usual error "Failed to initialize EGL render node for SPICE GL"
Rendernode nvidia card:  crashes as mentioned above

Errors I'm getting:
gl_version 0 - compat profile
WARNING: running without ARB robustness in place may crash
qemu-system-x86_64: Couldn't find current GLX or EGL context.

Is virgl not ready for nvidia proprietary driver yet?

Comment 15 Christophe Fergeau 2017-10-09 07:43:17 UTC
(In reply to kajinofe from comment #14)
> I applied the patch on Fedora 26 and when launching the VM, shortly after,
> it crashes:
> 
> Host:  Fedora 26
> Kernel:  4.13.4-200.fc26
> VM Client:  Fedora 26
> GPU:  GTX 1080
> Driver:  Proprietary 375.66 from RPM Fusion <-- will virgl only work on
> nouveau?
> Rendernode auto:  gives me the usual error "Failed to initialize EGL render
> node for SPICE GL"
> Rendernode nvidia card:  crashes as mentioned above
> 
> Errors I'm getting:
> gl_version 0 - compat profile
> WARNING: running without ARB robustness in place may crash
> qemu-system-x86_64: Couldn't find current GLX or EGL context.
> 
> Is virgl not ready for nvidia proprietary driver yet?

I don't think it's expected to work with nvidia proprietary driver, as this is unlikely to use mesa/dmabuf/...

Comment 16 kajinofe 2017-10-10 22:17:23 UTC
(In reply to Christophe Fergeau from comment #15)
> (In reply to kajinofe from comment #14)
> > I applied the patch on Fedora 26 and when launching the VM, shortly after,
> > it crashes:
> > 
> > Host:  Fedora 26
> > Kernel:  4.13.4-200.fc26
> > VM Client:  Fedora 26
> > GPU:  GTX 1080
> > Driver:  Proprietary 375.66 from RPM Fusion <-- will virgl only work on
> > nouveau?
> > Rendernode auto:  gives me the usual error "Failed to initialize EGL render
> > node for SPICE GL"
> > Rendernode nvidia card:  crashes as mentioned above
> > 
> > Errors I'm getting:
> > gl_version 0 - compat profile
> > WARNING: running without ARB robustness in place may crash
> > qemu-system-x86_64: Couldn't find current GLX or EGL context.
> > 
> > Is virgl not ready for nvidia proprietary driver yet?
> 
> I don't think it's expected to work with nvidia proprietary driver, as this
> is unlikely to use mesa/dmabuf/...

Oh I thought it supported both nouveau and binary nvidia driver per http://virgil3d.github.io/questions.html.  David states that he actually tested "the binary nvidia driver exposing GL 4.3."

Comment 17 Fedora Update System 2017-10-12 02:52:13 UTC
libvirt-3.2.1-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.