After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 764601 - Inverse Scrolling with wayland session host
Inverse Scrolling with wayland session host
Status: RESOLVED DUPLICATE of bug 765907
Product: gnome-boxes
Classification: Applications
Component: general
3.20.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-04-04 15:42 UTC by Gabriel Rauter
Modified: 2016-05-04 12:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Wayland: fix up/down mix up in discrete events in gtk+-3.20.3 (428 bytes, patch)
2016-05-04 11:30 UTC, Joachim Frieben
none Details | Review

Description Gabriel Rauter 2016-04-04 15:42:17 UTC
When using gnome-boxes while being in a gnome wayland session vertical scrolling with the mouse wheel gets inverted the same way natural scrolling in the gnome system settings behaves,  even tough natural scrolling is disabled in both host and guest system.

https://bugzilla.redhat.com/show_bug.cgi?id=1306365
Comment 1 Zeeshan Ali 2016-04-04 17:47:32 UTC
Thanks but could you please provide more details. Which part of Boxes isn't scrolling right?
Comment 2 Gabriel Rauter 2016-04-04 18:29:15 UTC
Sorry I thought the attached link would provide enough information.

It is the guest system in boxes where everything scrolls in the wrong direction.  Like described in the link it does not matter if the guest system is running a wayland or x11 session, gnome or kde. The host system, at least in my case is arch linux with gnome 3.20 on a wayland session. The wrong scrolling direction does not happen when the host system is using a x11 session.

The same thing happens when using virt-manager to access the qemu:///session to access the guest system created by boxes. So i am not entirely sure if it is entirely gnome-boxes fault, a problem with spice or virtio.
Comment 3 Zeeshan Ali 2016-04-05 15:41:54 UTC
(In reply to Gabriel Rauter from comment #2)
> Sorry I thought the attached link would provide enough information.
> 
> It is the guest system in boxes where everything scrolls in the wrong
> direction.  Like described in the link it does not matter if the guest
> system is running a wayland or x11 session, gnome or kde. The host system,
> at least in my case is arch linux with gnome 3.20 on a wayland session. The
> wrong scrolling direction does not happen when the host system is using a
> x11 session.
> 
> The same thing happens when using virt-manager to access the qemu:///session
> to access the guest system created by boxes. So i am not entirely sure if it
> is entirely gnome-boxes fault, a problem with spice or virtio.

It sounds like a spice issue to me. I'll ask the spice devs.
Comment 4 Zeeshan Ali 2016-04-09 14:45:59 UTC
Could you please try and see if removing tablet from VM helps? Shutdown the VM from inside and then `virsh edit VM_NAME` (you can find out name through virsh list --all). Remove this line:

    <input type='tablet' bus='usb'/>

Save it and then from Boxes launch the VM and see if it's still the same.
Comment 5 Gabriel Rauter 2016-04-10 15:43:25 UTC
I tried that before and it does not seem to change anything.
There is also still a "spice vdagent tablet" input device present, even after removing that line.
Comment 6 Gabriel Rauter 2016-04-10 15:44:32 UTC
I mean there is still a "spice vdagent tablet" input device registered in the guest system by libinput even tough removing the <input type='tablet' bus='usb'/> line from the box xml file.
Comment 7 Zeeshan Ali 2016-04-11 13:07:04 UTC
(In reply to Gabriel Rauter from comment #6)
> I mean there is still a "spice vdagent tablet" input device registered in
> the guest system by libinput even tough removing the <input type='tablet'
> bus='usb'/> line from the box xml file.

Weird. Are you sure you shutdown the VM before you editted the xml?
Comment 8 Zeeshan Ali 2016-04-11 13:39:38 UTC
(In reply to Zeeshan Ali (Khattak) from comment #7)
> (In reply to Gabriel Rauter from comment #6)
> > I mean there is still a "spice vdagent tablet" input device registered in
> > the guest system by libinput even tough removing the <input type='tablet'
> > bus='usb'/> line from the box xml file.
> 
> Weird. Are you sure you shutdown the VM before you editted the xml?

Hmm.. NM I was able to reproduce that locally too. I removed the device from XML but after booting:

$ sudo libinput-list-devices |tail -n 17
Device:           spice vdagent tablet
Kernel:           /dev/input/event6
Group:            6
Seat:             seat0, default
Capabilities:     pointer 
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      disabled
Nat.scrolling:    disabled
Middle emulation: disabled
Calibration:      identity matrix
Scroll methods:   button
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Comment 9 Olivier Fourdan 2016-05-04 09:05:22 UTC
Possible dupe of bug 765907 ?

Basically GDK_SCROLL_UP/DOWN were inversed in wayland backend - Can you try to reproduce with gtk+ from git (either head on branch gtk-3-20 or master) ?
Comment 10 Joachim Frieben 2016-05-04 09:10:26 UTC
(In reply to Gabriel Rauter from comment #0)
I am not convinced that this is an issue with gnome-boxes. Anyway, to nail down the issue you could first try to list the input devices in a GNOME on Xorg and then again in a GNOME on Wayland session. Possible differences between these two lists could be useful in this investigation.
Comment 11 Joachim Frieben 2016-05-04 11:30:07 UTC
Created attachment 327286 [details] [review]
Wayland: fix up/down mix up in discrete events in gtk+-3.20.3

This patch adopted from https://github.com/GNOME/gtk/commit/a537bdc1fe4d4323b9a0c39b23cb15633eeff64c fixes up/down mix up in discrete events in gtk+-3.20.3.
This observation also confirms that the relevant component is definitely gtk+ and not gnome-boxes. Please change the component accordingly.
Comment 12 Gabriel Rauter 2016-05-04 12:27:21 UTC
(In reply to Olivier Fourdan from comment #9)
> Possible dupe of bug 765907 ?
> 
> Basically GDK_SCROLL_UP/DOWN were inversed in wayland backend - Can you try
> to reproduce with gtk+ from git (either head on branch gtk-3-20 or master) ?

I tested gtk master with opensuse tumbleweed and kubuntu 16.04 as guest and those far it seems to mostly fix this issue. I still have a rather strange behavior in kubuntu where scrolling up also causes some scrolling down. It is rather hard to describe, but like every 2-3 scroll steps up it does not scroll upwards. When scrolling fast you have like a slight backward scroll every now and then. But not sure if this issue is related or not. I have to look further into that.
 
(In reply to Joachim Frieben from comment #11)
> Created attachment 327286 [details] [review] [review]
> Wayland: fix up/down mix up in discrete events in gtk+-3.20.3
> 
> This patch adopted from
> https://github.com/GNOME/gtk/commit/a537bdc1fe4d4323b9a0c39b23cb15633eeff64c
> fixes up/down mix up in discrete events in gtk+-3.20.3.
> This observation also confirms that the relevant component is definitely
> gtk+ and not gnome-boxes. Please change the component accordingly.

Sorry i am rather new to bugzilla. Should i change the product to gtk or do you mean component? Is so i am not sure which boxes component would correspond to its gtk part.
Comment 13 Olivier Fourdan 2016-05-04 12:38:25 UTC
(In reply to Gabriel Rauter from comment #12)
> (In reply to Olivier Fourdan from comment #9)
> > Possible dupe of bug 765907 ?
> > 
> > Basically GDK_SCROLL_UP/DOWN were inversed in wayland backend - Can you try
> > to reproduce with gtk+ from git (either head on branch gtk-3-20 or master) ?
> 
> I tested gtk master with opensuse tumbleweed and kubuntu 16.04 as guest and
> those far it seems to mostly fix this issue. I still have a rather strange
> behavior in kubuntu where scrolling up also causes some scrolling down. It
> is rather hard to describe, but like every 2-3 scroll steps up it does not
> scroll upwards. When scrolling fast you have like a slight backward scroll
> every now and then. But not sure if this issue is related or not. I have to
> look further into that.

I had similar oddities with gtk3 apps when using xfce with natural scrolling set in gnome settings, not necessarily related though.
 
> Sorry i am rather new to bugzilla. Should i change the product to gtk or do
> you mean component? Is so i am not sure which boxes component would
> correspond to its gtk part.

If the patch from bug 765907 fixes this as it seems, it should be closed as a duplicate of that bug, I can do that for you if you want (and agree).
Comment 14 Gabriel Rauter 2016-05-04 12:40:58 UTC

*** This bug has been marked as a duplicate of bug 765907 ***