Bug 145816 - Cursor duplicates when new place is clicked, does not disappear from old location when scaling is 200% or more
Summary: Cursor duplicates when new place is clicked, does not disappear from old loca...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.0 all versions
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: possibleRegression
Depends on:
Blocks: HiDPI KDE, KF5
  Show dependency treegraph
 
Reported: 2021-11-21 19:54 UTC by Jackson Sul
Modified: 2022-09-23 06:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Double cursor (14.48 KB, image/png)
2021-11-21 19:56 UTC, Jackson Sul
Details
Just a test file, but the issue happens on any file I've used. (11.23 KB, application/vnd.oasis.opendocument.text)
2022-07-09 16:47 UTC, Jackson Sul
Details
Screen recording of duplicate cursor. (2.92 MB, video/x-matroska)
2022-07-09 16:48 UTC, Jackson Sul
Details
Example of issue on non-HiDPI monitor (36.38 KB, image/png)
2022-08-27 16:59 UTC, Jackson Sul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jackson Sul 2021-11-21 19:54:34 UTC
Description:
If an area in a document is clicked, the cursor moves to where the user clicked. A cursor bar, however, remains at the old location and does not disappear. 

Steps to Reproduce:
1. Open a long document (more easily reproducible in long documents).
2. Click somewhere on the displayed page.
3. Click somewhere else on the displayed page.

Actual Results:
The cursor bar moves to where the user clicked, but at the old location a bar remains.

Expected Results:
The cursor bar moves to the new location and no longer displays in the old; only one cursor bar should ever be displayed at once.


Reproducible: Sometimes


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
I suspect this is an issue with hidpi screens, since I cannot reproduce it on an older laptop with a low-res (1600x900) screen.

On a hidpi screen (4K), the bug is generally not apparent in short documents. It is almost always reproducible, however, on longer (e.g., 1000+ page) documents. Sometimes a third cursor bar will appear, and sometimes they were disappear eventually when typing. Very frustrating and distracting!

This occurs whether or not hardware acceleration is on.

Tested on:
LibreOffice Writer 7.2.2.2
Kubuntu 21.10
4K laptop screen

glxinfo | grep OpenGL
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.2.2
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.2.2
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
Comment 1 Jackson Sul 2021-11-21 19:56:16 UTC
Created attachment 176409 [details]
Double cursor

Cursor was in one place, then a spot two lines away was clicked. Cursor bar now appears in both the new and old places, instead of just the current real location of the actual cursor.
Comment 2 Michael Weghorn 2022-04-08 04:05:57 UTC
Could you test whether this still happens with a daily build, and of so, copy the information from "Help" -> "About LibreOffice" here?
see https://wiki.documentfoundation.org/QA/Testing_Daily_Builds

Also, can you please attach a sample document with which this happens for you and ideally a screencast that shows the problem (or otherwise, as many other details that might be helpful to reproduce, e.g. what page you were editing,...)?
Comment 3 Michael Weghorn 2022-04-08 04:06:56 UTC
Also, is this with a single Hi-DPI screen or in a multi-screen setup?
Comment 4 Jackson Sul 2022-07-09 16:47:41 UTC
Created attachment 181195 [details]
Just a test file, but the issue happens on any file I've used.
Comment 5 Jackson Sul 2022-07-09 16:48:25 UTC
Created attachment 181196 [details]
Screen recording of duplicate cursor.

Apologies for the late response. The laptop affected is not mine, and I did not have access to it for a while. I've attached a screen recording of the issues, as well as a sample file.

The laptop is now using Kubuntu 22.04. It uses a single 4K screen (it's a Lenovo X1 Carbon 7th gen). The problem happens all the time across all documents, not on a particular one or page.

Libreoffice's info is:
Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3-0ubuntu0.22.04.1
Calc: threaded

I did try to test a daily build, but I just got some dependency errors when trying to install the .debs and couldn't figure that out, sorry.
Comment 6 QA Administrators 2022-07-10 03:29:30 UTC Comment hidden (obsolete)
Comment 7 Jackson Sul 2022-08-27 16:49:45 UTC
A bit more information: my original description of the bug appearing only on HiDPI screen was incorrect: all that matters is that the system's scaling is set to 200% or more.

If KDE's global scaling is turned to 175% or less, the issue does not occur. At 200% or more it is always a problem. (Unfortunately, on a 14" 4K laptop screen 175% UI elements and text are really too small to be usable!)

The problem is reproducible on non-HiDPI screens. On my old T420s laptop with a 1600x900 screen, if the scaling is set to 200% or more the cursor bug appears. I also tested all this in X11 and Wayland sessions: the issue is consistent in both.

Finally, the issue is not just confined to Writer, as it occurs in Draw, Impress, and Calc as well. I have no found the issue in any non-LibreOffice programs (e.g., office suites, text editors, web browsers).

Hopefully someone else can test and confirm this issue. I do want to test it on a Gnome system too and external monitors, but I don't have a usb drive at the moment (so I don't know if this is a LibreOffice issue in KDE only).
Comment 8 Jackson Sul 2022-08-27 16:59:28 UTC
Created attachment 182047 [details]
Example of issue on non-HiDPI monitor

Scaling set to 225% on a 1600x900 ThinkPad T420s.
Comment 9 Jackson Sul 2022-09-04 17:03:26 UTC
The bug seems to have been introduced in the 7 series of LibreOffice. It does not occur in the 6.4 series of LibreOffice (6.4.7 tested). In the first stable version of the 7 series (7.0.0.1) it is present.

I have also tested this in the newest daily build (dev 7.5.0.0.alpha0_2022-09-04); the bug is still present.

I could not, however, reproduce the issue in Gnome (tested in Ubuntu 22.04.1), only in KDE (tested in Kubuntu 22.04.1, the newest dev build of KDE Neon, as well as current stable Manjaro). Is it possible that it is an issue with KDE? I'm not a programmer, so I'm not sure, but since the LibreOffice 6 series does not have the bug in even the newest versions of the Plasma Desktop (5.25, recently released), while the LibreOffice 7 series always does, some change to LibreOffice seems to have triggered it.
Comment 10 Michael Weghorn 2022-09-16 07:59:05 UTC
(In reply to Sulphur from comment #7)
> A bit more information: my original description of the bug appearing only on
> HiDPI screen was incorrect: all that matters is that the system's scaling is
> set to 200% or more.

Thanks for the additional testing and information!
Indeed, I could reproduce this now with QT_SCALE_FACTOR=2.0 set and the attached sample doc. It happens very rarely for me, though, usually takes me about 30-60 seconds of clicking around to trigger the issue. The "additional" cursor disappears when a repaint is triggered, e.g. by scrolling a bit.

(In reply to Sulphur from comment #9)
> The bug seems to have been introduced in the 7 series of LibreOffice. It
> does not occur in the 6.4 series of LibreOffice (6.4.7 tested). In the first
> stable version of the 7 series (7.0.0.1) it is present.
> 
> I have also tested this in the newest daily build (dev
> 7.5.0.0.alpha0_2022-09-04); the bug is still present.
> 
> I could not, however, reproduce the issue in Gnome (tested in Ubuntu
> 22.04.1), only in KDE (tested in Kubuntu 22.04.1, the newest dev build of
> KDE Neon, as well as current stable Manjaro). Is it possible that it is an
> issue with KDE? I'm not a programmer, so I'm not sure, but since the
> LibreOffice 6 series does not have the bug in even the newest versions of
> the Plasma Desktop (5.25, recently released), while the LibreOffice 7 series
> always does, some change to LibreOffice seems to have triggered it.

This sounds like this might be specific to the so-called "kf5" VCL plugin, which is selected by default when in a Plasma session, but not GNOME. The "kf5" VCL plugin did not exist in older LO versions.

Can you double-check whether the issue is gone when you start LO with the environment variable SAL_USE_VCLPLUGIN=gtk3 set (and double-check that "Help" -> "About LibreOffice" now displays "VCL: gtk3" instead of "VCL: kf5 ..."?



Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: c317f0adb308b1ece3bfa8bdffb4d0bcb1478d30
CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 11 Jackson Sul 2022-09-17 19:58:33 UTC
I can confirm that you are correct! If the VCL plugin is set to gtk3, the cursor issue does not occur. (I did have to make sure the libreoffice-gtk3 package was installed to get that to work.)

The cursor problem (using the kf5 VCL plugin) does sometimes take a bit of clicking around to appear. But sometimes as soon as you open up LibreOffice it's visible: the cursor is blinking but when it "blinks out" a thin cursor remains. It's not consistent whether or not the issues appear immediately or not.

The downside with the gtk3 VCL plugin is that obviously some KDE integration is dropped (e.g., file picker is GTK's), and the toolbar icons are blurrier. But no issue with the cursor that I can see.

(I also realized then that when kf5 VCL plugin is the cause of this scrollbar issue, which also does not occur when using the gtk3 VCL: https://bugs.documentfoundation.org/show_bug.cgi?id=145815.)


(In reply to Michael Weghorn from comment #10)
> (In reply to Sulphur from comment #7)
> > A bit more information: my original description of the bug appearing only on
> > HiDPI screen was incorrect: all that matters is that the system's scaling is
> > set to 200% or more.
> 
> Thanks for the additional testing and information!
> Indeed, I could reproduce this now with QT_SCALE_FACTOR=2.0 set and the
> attached sample doc. It happens very rarely for me, though, usually takes me
> about 30-60 seconds of clicking around to trigger the issue. The
> "additional" cursor disappears when a repaint is triggered, e.g. by
> scrolling a bit.
> 
> (In reply to Sulphur from comment #9)
> > The bug seems to have been introduced in the 7 series of LibreOffice. It
> > does not occur in the 6.4 series of LibreOffice (6.4.7 tested). In the first
> > stable version of the 7 series (7.0.0.1) it is present.
> > 
> > I have also tested this in the newest daily build (dev
> > 7.5.0.0.alpha0_2022-09-04); the bug is still present.
> > 
> > I could not, however, reproduce the issue in Gnome (tested in Ubuntu
> > 22.04.1), only in KDE (tested in Kubuntu 22.04.1, the newest dev build of
> > KDE Neon, as well as current stable Manjaro). Is it possible that it is an
> > issue with KDE? I'm not a programmer, so I'm not sure, but since the
> > LibreOffice 6 series does not have the bug in even the newest versions of
> > the Plasma Desktop (5.25, recently released), while the LibreOffice 7 series
> > always does, some change to LibreOffice seems to have triggered it.
> 
> This sounds like this might be specific to the so-called "kf5" VCL plugin,
> which is selected by default when in a Plasma session, but not GNOME. The
> "kf5" VCL plugin did not exist in older LO versions.
> 
> Can you double-check whether the issue is gone when you start LO with the
> environment variable SAL_USE_VCLPLUGIN=gtk3 set (and double-check that
> "Help" -> "About LibreOffice" now displays "VCL: gtk3" instead of "VCL: kf5
> ..."?
> 
> 
> 
> Version: 7.5.0.0.alpha0+ / LibreOffice Community
> Build ID: c317f0adb308b1ece3bfa8bdffb4d0bcb1478d30
> CPU threads: 12; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: en-GB (en_GB.UTF-8); UI: en-US
> Calc: threaded
Comment 12 Michael Weghorn 2022-09-23 06:29:40 UTC
(In reply to Sulphur from comment #11)
> (I also realized then that when kf5 VCL plugin is the cause of this
> scrollbar issue, which also does not occur when using the gtk3 VCL:
> https://bugs.documentfoundation.org/show_bug.cgi?id=145815.)

I've commented there.