Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 2023366

Summary: RFE/PATCH: Please add this patch to make wev work with GNOME
Product: [Fedora] Fedora Reporter: Hans de Goede <hdegoede>
Component: wevAssignee: Bob Hepple <bob.hepple>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bob.hepple
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: wev-1.0.1-0.20211130git54de46d.fc35 wev-1.0.1-0.20211130git54de46d.fc34 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-30 11:49:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
[PATCH wev] Change wl_seat interface version to 5
none
[PATCH wev] Use wl_seat version 5 under GNOME none

Description Hans de Goede 2021-11-15 14:34:21 UTC
Created attachment 1841839 [details]
[PATCH wev] Change wl_seat interface version to 5

Currently wev does not work with GNOME due to it requiring wl_seat interface version 6.

I've talked to the upstream Wayland devs and version 6 really does not offer anything important over 5; and what it does offer is currently not actually supported by wev.

For debugging various input-stack issues having a tool like wev is quite useful,
so I've written the attach (trivial) patch which makes wev work with GNOME.

Can you please add this patch as a downstream patch so that Fedora's wev packages will work with Fedora Workstation's default desktop?

Note I've also submitted the patch upstream, but upstream is not particularly helpful when it comes to non wl_roots based compositors:
https://lists.sr.ht/~sircmpwn/public-inbox/patches/25786

Comment 1 Bob Hepple 2021-11-16 07:05:13 UTC
Hi Hans,

My first concern is the effect on sway users. What guarantees are
there that this change is harmless to them?

Has it been well tested on sway? Versions? Other wlroots WM's? There
is no testing code in the repo so it has to be manual testing.

To be blunt, although I'd really like to just merge this and provide
wev for GNOME users, I'm fearful of harming wl_seat-6 users - I have
no idea what problems it could cause.

I'm with Drew on this ("it's mutter's problem, not wev's") - is there
a corresponding issue raised on mutter?

It is a retrograde step for wev but GNOME will eventually catch up. In
the meantime, it looks like Drew's been triggered to update wev to
take advantage of wl_seat-6, so any change is likely to be temporary.

GNOME developers can always patch & compile - as you know, it's a very
simple build once you have the patch. It took me no more than 5m start
to finish - and yes, it appears to work on f34/sway-1.6-1 in very limited 
testing. I haven't tried it on GNOME.

Other alternatives:

o you might provide a patch to automatically fallback to version 5 on error
o you might provide an option to wev to use wl_seat-5 instead of -6
o we could provide an alternative build on COPR

Auto-fallback (if possible) _should_ expose sway users to no harm and
will be transparent when mutter moves to wl_seat-6. I think I would
be happy to accept such a patch.

Comment 2 Hans de Goede 2021-11-29 10:11:23 UTC
Created attachment 1843991 [details]
[PATCH wev] Use wl_seat version 5 under GNOME

Unfortunately wl_registry_bind() errors are fatal and abort the program so auto-fallback is not easily implemented.

So instead I've now come up with an approach where wev detects that it is running under GNOME based on the XDG_CURRENT_DESKTOP environment variable and then lower the requested wl_seat version based on that.

Comment 3 Bob Hepple 2021-11-30 02:00:18 UTC
Hans,

Sounds good, but how can I know when to remove the patch? - when will Gnome upgrade to wl_seat-6 ??? 

I guess we can leave KDE out of the question ... :-)

I'll put a note in the spec file to keep an eye on META_WL_SEAT_VERSION in mutter/wayland/meta-wayland-versions.h and I see if I can get this built today if I have time.

Cheers


Bob

Comment 4 Fedora Update System 2021-11-30 02:39:44 UTC
FEDORA-2021-d4ace9042a has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-d4ace9042a

Comment 5 Fedora Update System 2021-11-30 02:53:32 UTC
FEDORA-2021-e3c043a9ee has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-e3c043a9ee

Comment 7 Hans de Goede 2021-11-30 09:35:50 UTC
> Sounds good, but how can I know when to remove the patch? - when will Gnome upgrade to wl_seat-6 ??? 

Before writing the original patch I talked to the mutter devs and atm they have no intention to move to wl_seat-6 since it has only 1 addition ("shaped touch event" IIRC) which according to them don't really bring much (I think they likely requires special hardware). So all I can say is this will not happen soon. Other then that I don't really have a helpful answer I'm afraid.

> Please test in your environment and bump karma as appropriate

Thank you, I will test the F35 version right away.

Comment 8 Hans de Goede 2021-11-30 11:14:16 UTC
The F35 build works well for me, thank you. Unfortunately I cannot leave positive karma in bodhi since bodhi seems to be broken atm.

Comment 9 Hans de Goede 2021-11-30 11:20:04 UTC
bodhi search is broken, but the direct link here in the bug works, so I've left positive karma for the update now.

Comment 10 Bob Hepple 2021-11-30 11:49:20 UTC
Thanks Hans. I think we can close this off now.

Comment 11 Fedora Update System 2021-12-01 01:36:37 UTC
FEDORA-2021-e3c043a9ee has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-e3c043a9ee`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-e3c043a9ee

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2021-12-01 01:56:12 UTC
FEDORA-2021-d4ace9042a has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-d4ace9042a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-d4ace9042a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-12-09 01:11:23 UTC
FEDORA-2021-e3c043a9ee has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 14 Fedora Update System 2021-12-09 01:34:58 UTC
FEDORA-2021-d4ace9042a has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.