Re: [PATCH spice-server 1/2] gl: fix client mouse mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Jun 22, 2017 at 06:20:24AM -0400, Frediano Ziglio wrote:
> > 
> > Hi,
> > 
> > On Tue, Jun 13, 2017 at 05:18:41AM -0400, Marc-André Lureau wrote:
> > > > > ----- Original Message -----
> > > > > > Since 2.8, QEMU now longer creates QXL primary surfaces when
> > > > > > using GL.  This change broke client-side mouse mode, because
> > > > > > Spice server relies on primary surface conditions.
> > > > > > 
> > > > > > When GL is enabled, use GL scanout informations.
> > > > > > Mouse mode is always client when GL surfaces are used.
> > > > > > 
> > > > > > This patch and most of the message are based on a patch from
> > > > > > Marc-André Lureau, just moving responsibility from reds to RedQxl.
> > > > > > 
> > > > > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > > > > > ---
> > > > > >  server/red-qxl.c | 7 +++++++
> > > > > >  1 file changed, 7 insertions(+)
> > > > > > 
> > > > > > diff --git a/server/red-qxl.c b/server/red-qxl.c
> > > > > > index 53f3338..896bb76 100644
> > > > > > --- a/server/red-qxl.c
> > > > > > +++ b/server/red-qxl.c
> > > > > > @@ -883,6 +883,13 @@ void spice_qxl_gl_scanout(QXLInstance *qxl,
> > > > > >      /* FIXME: find a way to coallesce all pending SCANOUTs */
> > > > > >      dispatcher_send_message(qxl_state->dispatcher,
> > > > > >                              RED_WORKER_MESSAGE_GL_SCANOUT,
> > > > > >                              &payload);
> > > > > > +
> > > > > > +    qxl_state->x_res = width;
> > > > > > +    qxl_state->y_res = height;
> > > > > > +    qxl_state->use_hardware_cursor = TRUE;
> > > > > > +    qxl_state->primary_active = TRUE;
> > > > >
> > > > > Are those values restored when switching back to QXL-2D?
> > > > >
> > > > >
> > > >
> > > > What do you mean? Suspend/resume, reboot or other cases?
> > >
> > > Yes, with older qemu version <2.8, or depending on how the server is
> > > used, you may switch freely from/to GL/2D etc.
> > >
> > > With qemu, this happens before virgl driver is enabled, so across
> > > reboots.
> > >
> > > I am worried about mixing the state of GL/QXL with 2D/QXL.
> > 
> > Atm, here, on wayland, both patches (1/2 of this series and the previous
> > patch from Marc-André) only fix the client mouse mode when the guest
> > user is signed in. On reboot the mouse will disappear and it'll keep that
> > way when guest user login.
> > 
> > I recall testing this in the past and it was working just fine and also
> > another use give a positive feedback on both solutions.
> > 
> > Note sure if that matters but libvirt/qemu here is from
> > fedora-virt-preview repo.
> > 
> > To be honest, that could simply be a bug in the client/wayland as IIRC
> > teuf was working in something around this... but I find interesting that
> > both patches works 100% when the user is logged in.
> > 
> 
> Did you try with X11 ? Is it only an issue with Wayland?

I tried with X11 before and now, after rebooting. Can't make egl work:

  (virt-viewer:11753): GSpice-CRITICAL **: egl init failed: failed to
  init EGL display

Doesn't not seem to be a issue specific to spice-gtk either as:

  GST_GL_PLATFORM=egl gst-play-1.0 X-Men\ -\ Apocalypse\ -\ Trailer\
  3.mp4 --videosink=glimagesink

Fails with: ERROR Failed to initialize egl: EGL_NOT_INITIALIZED for
file:...

But using glx works on gst-play-1.0

> What happens if you close the client and open again?
1) VM reboots, no client mouse during the boot, login screen and on
   user's session
2) After boot (no client mouse) if you disconnect and connect again,
   client mouse mode works - this is on login screen.
3) After boot and login in on user session (no client mouse) if you
   disconnect and connect again, client mouse mode works.

> Did the server send new cursors or not?

Forgot to check, will do now.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]