Bug 440703 - [Wayland] Selected text in Firefox (wayland native mode) cannot be middle-click-pasted into other apps
Summary: [Wayland] Selected text in Firefox (wayland native mode) cannot be middle-cli...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard (show other bugs)
Version: 5.22.4
Platform: openSUSE Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2021-08-07 18:36 UTC by Andreas Hartmann
Modified: 2021-10-08 13:18 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
logoutput for middle-click-paste in FF (25.65 KB, text/plain)
2021-08-09 18:24 UTC, Andreas Hartmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Hartmann 2021-08-07 18:36:57 UTC
It's impossible to copy e.g. text from konsole or Firefox by marking it and adding it to another tool, like kate e.g. This is a serious bug and a show stopper ever using Wayland.


STEPS TO REPRODUCE
1. Mark some text in Firefox or konsole e.g. (w/o CTRL-C)
2. Try to add it in kate by middleclick
3. The marked text can't even be seen in the clipboard

OBSERVED RESULT
Can't copy paste by just marking a text and pasting it with middle mouse click.

EXPECTED RESULT
I'm expecting the default X behavior in Wayland

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Leap 15.2 / Linux 5.10.52
(available in About System)
KDE Plasma Version: 5.22.4
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Comment 1 Nate Graham 2021-08-07 19:13:10 UTC
With current git master everything, I can confirm that text selected in Firefox (Wayland native mode) is not middle-click-pastable into other apps like Kate. However I can select  text in Kate and middle-click-paste into Firefox.

In addition middle-click-selection-and-paste seems to be broken across native Wayland and XWayland apps, but that would seem to be another bug.
Comment 2 Andreas Hartmann 2021-08-08 05:38:01 UTC
For me, it's impossible, too, to middle-click-paste into Firefox from other apps, like kwrite. It only works within FF itself.

One more strange thing I just realized: middle-click-paste actually works in Firefox only, if I used it once before in KDE app (like kwrite).

Clipper doesn't realize middle-click-paste at all.

I tested with one finger double tap to mark a word and two finger tap to insert it.
Comment 3 Andreas Hartmann 2021-08-08 06:52:00 UTC
middle-click-paste in Thunderbird (78.11.0) doesn't work at all (wayland native).
Comment 4 David Redondo 2021-08-09 14:25:56 UTC
Can you provide a WAYLAND_DEBUG=1 log of firefox where you try middle click pasting?
Comment 5 Andreas Hartmann 2021-08-09 18:24:19 UTC
Created attachment 140618 [details]
logoutput for middle-click-paste in FF

It's only possible to middle-click-paste content which has been marked before in FF.

BTW: Firefox and Thunderbird are pretty broken (after resume from S2RAM?). Broken means: both are flickering if a menu is opened and you want to scroll through the menu with the mouse or the arrow keys. There are other problems, too, regarding graphic. It's pretty unusable. GPU is AMD Picasso (rev c1) - Ryzen 7 3750H with Radeon Vega Mobile Gfx.
Comment 6 Vlad Zahorodnii 2021-08-19 14:34:16 UTC
> gtk_primary_selection_device

this is strange kwin doesn't support gtk-primary-selection. Please make sure that you're running plasma with the latest gtk.

Also, for what it's worth, primary selection works either way between firefox and qt apps on my machine.
Comment 7 David Edmundson 2021-08-19 14:56:46 UTC
>this is strange kwin doesn't support gtk-primary-selection.

We investigated this at the time as we were also confused. FF is bodge-binding the same proxy to both globals relying on them having the same binary API. This still confuses the debug function that looks at the interface used.

If you look at the output from the wayland side you'll see things looking correct.
Comment 8 Nate Graham 2021-09-02 16:03:16 UTC
With current git master, I can no longer reproduce this issue with Firefox in Wayland native mode when middle-click-pasting into either native Wayland or XWayland windows.

Is anyone else able to test this setup using git master/KDE unstable packages with firefox in Wayland native mode?
Comment 9 Bug Janitor Service 2021-09-17 04:35:56 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 10 Andreas Hartmann 2021-09-18 14:00:41 UTC
I don't have the possibility to install plasma git - therefore please don't wait for test results.
Comment 11 Nate Graham 2021-09-18 15:58:49 UTC
You can test the Plasma 5.23 beta, if that would be easier.
Comment 12 Andreas Hartmann 2021-09-21 06:27:48 UTC
Ok - tested with leap 15.2 and plasma-framework-5.86.0-lp152.337.1.x86_64 - shouldn't this be 5.23 beta? Still doesn't work here. Unchanged behavior (Firefox runs in wayland mode - xlsclient doesn't show firefox).

Another very bad thing: kwin_wayland / compositor is deactivated using nvidia 470.63. Firefox in wayland / nvidia is mostly completely unusable (run youtube video fullscreen and go back - it's awful slow and firefox window and desktop is horribly broken).

AMD GPU
The tests with AMD GPU are slightly better but far from being usable, too. The actual problem mentioned here isn't fixed, too. wayland and sddm is broken completely - you can't end a wayland session at all - sddm isn't working any more. After reboot, you have to switch to gdm - now it's working.

Running FF youtube full screen video: try start another program like xosview using ALT-F2. It's awful slow and temporary hangs the complete screen. Unusable.

Touchpad configuration in wayland is absolutely broken, too - it's impossible to change mouse speed. It's awful slow.

Compositing is disabled (like on nvidia, too), because it crashed. Transparent windows now are disabled per default (even using X - why that? I had to enable it manually again).

There are still so many bugs around wayland that it's massively frustrating - regardless AMD GPU or nvidia GPU.

Thank god, Xorg still works fine. Wayland is very far from being usable. No runas and no network transparency e.g. are still criteria for exclusion.
Comment 13 Andreas Hartmann 2021-09-21 06:32:15 UTC
Maybe the leap packages aren't completely on beta at the moment? But plasma5-desktop-5.22.90-lp152.492.1.x86_64 seems to be 5.23 beta? I can't say ... .
Comment 14 Nate Graham 2021-09-21 17:13:08 UTC
Please keep it to one issue per bug report. :)

Middle-click-paste is working both to and from Firefox for me; can you provide the steps you're using to reproduce the issue?
Comment 15 Andreas Hartmann 2021-09-22 04:14:53 UTC
I'm doing it as described in the initial bug description:
- Start FF
- mark a text in FF by doubleclick or by normal marking with the mouse
- going to kate, konsole or kwrite - as you like
- do middle click
=> doesn't work (nothing is inserted or the old data, which is there from previously copied data to the clipboard).

Btw: FF runs in Wayland mode - how can I force FF to run in X-mode? Problem can't be seen w/ chromium - chromium runs in X mode.

I detected one more massive bug with Wayland - now in konsole: Using mc (midnight commander) is mostly impossible, because konsole or whatever intercepts all CTRL-shortcuts like CTRL-S, ... . This doesn't happen in X-mode.

Wayland is a pure catastrophe - sorry to say.

Yes, you're right, I shouldn't mix up bugs in one ticket. But you may understand, that I'm pretty annoyed because there are countless bugs. Everywhere I'm looking at - basic things are broken / don't work. Not that I'm searching for. I just want to do usual 0815 things and can't do it. This software is very far from alpha state.
Comment 16 Nate Graham 2021-09-22 11:26:54 UTC
Hmm, that all works for me.

Since you're using an openSUSE distro, are you using the "Wayland" or "Wayland (Full)" session? I would recommend always trying the Full version, if there are two. The non-full version tends to cause a very poor UX including many mysterious and un-reproducible bugs. See https://bugzilla.suse.com/show_bug.cgi?id=1185740.
Comment 17 Andreas Hartmann 2021-09-22 18:12:46 UTC
Some time ago, they dropped the "bad" variant. I can see only the full variant.

Today, I got a few updates:
plasma5-workspace-lang-5.22.90-lp152.623.1.noarch Mi 22 Sep 2021 18:46:09 CEST
plasma5-workspace-5.22.90-lp152.623.1.x86_64  Mi 22 Sep 2021 18:46:06 CEST
xembedsniproxy-5.22.90-lp152.623.1.x86_64     Mi 22 Sep 2021 18:46:05 CEST
plasma5-workspace-libs-5.22.90-lp152.623.1.x86_64 Mi 22 Sep 2021 18:46:05 CEST
konversation-lang-21.08.1-lp152.35.1.noarch   Mi 22 Sep 2021 18:46:05 CEST
gmenudbusmenuproxy-5.22.90-lp152.623.1.x86_64 Mi 22 Sep 2021 18:46:05 CEST
libkolabxml1-1.1.6-lp152.54.53.x86_64         Mi 22 Sep 2021 18:46:04 CEST
libva-gl-devel-2.13.0-lp152.150.1.x86_64      Mi 22 Sep 2021 18:46:03 CEST
libva-devel-2.13.0-lp152.150.1.x86_64         Mi 22 Sep 2021 18:46:03 CEST
konversation-21.08.1-lp152.35.1.x86_64        Mi 22 Sep 2021 18:46:03 CEST
libva-x11-2-2.13.0-lp152.150.1.x86_64         Mi 22 Sep 2021 18:46:02 CEST
libva-wayland2-2.13.0-lp152.150.1.x86_64      Mi 22 Sep 2021 18:46:02 CEST
libva-glx2-2.13.0-lp152.150.1.x86_64          Mi 22 Sep 2021 18:46:02 CEST
libva-drm2-2.13.0-lp152.150.1.x86_64          Mi 22 Sep 2021 18:46:02 CEST
libva2-2.13.0-lp152.150.1.x86_64              Mi 22 Sep 2021 18:45:59 CEST

The problem w/ mc in konsole has gone - it's working now as expected. But kwin_wayland though is unstable (AMD GPU).

To the FF middle click-problem:
It's impossible to get data from FF to KDE and vice versa. Further more: middle click paste only works in FF, if you did it once before in kwrite e.g. Data copied in FF can't be seen in clipboard at all.
Comment 18 Andreas Hartmann 2021-09-22 19:34:43 UTC
ok, spoke too soon. Konsole and CTRL-S in conjunction with mc is still broken - sometimes it's working - most of the time not. I can't see any logic behind this behavior - it's just random.

To be clear: CTRL-S is caught by the konsole and data flow control is activated - which is wrong. CTRL-S should be given to mc as shortcut for searching.
Comment 19 Andreas Hartmann 2021-09-23 04:49:17 UTC
The konsole and mc problem happens after the profile is changed. You have to restart konsole to make it work again. This happens too in X-mode.

On nvidia there is a problem when starting system settings. If you go into any settings module, the system settings window is completely broken. You have to resize it, to get it working again. Afterwards, it's working fine - even after changing the different modules.

Middle-click-paste in wayland mode in FF still only works within FF (after doing a middle-click-paste-action in kwrite e.g.).
Don't you have any clue about the reason and how to debug it? 

BTW, this happens with FF esr an actual version. Middle-click-paste between X and Wayland applications seems to be possible - if FF runs in X mode (meanwhile I found a way to force FF to use X under wayland), middle-click-paste between different apps is working fine.
Comment 20 David Redondo 2021-09-23 06:40:50 UTC
> Please keep it to one issue per bug report. :)
Comment 21 Bug Janitor Service 2021-10-08 04:36:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 22 Andreas Hartmann 2021-10-08 09:19:03 UTC
Middle-click-paste problem disappeared after switching from libgtk-3-0-3.24.20 to 3.24.30.

Now other problems appear: smplayer / mpv doesn't work, because of the --wid option provided by smplayer to mpv (mpv itself works on wayland).

Switching to vlc showed one more problem: KDE / Plasma ignores ~/.bashrc and ~/.profile and /etc/profile.d/ ... . Why are you ignoring those basic configuration files? It's a pain to provide standard environment variables like http_proxy e.g.
Comment 23 Nate Graham 2021-10-08 13:18:44 UTC
Please file additional bug reports for additional issues. :)