wlroots icon indicating copy to clipboard operation
wlroots copied to clipboard

Disappearing cursor

Open dnkl opened this issue 6 years ago • 31 comments

wlroots: https://github.com/swaywm/wlroots/commit/20d404a091fa92f56be4825bbaf89e4027fda154 sway: ec5da0ca5bad6a433f727499d68ac1352397f5aa

Not sure if this is a problem with sway, or not. But, I'm now using sway on multiple systems, with the same software setup.

Everything is working fine on all systems except one, where the mouse cursor keeps disappearing. It seems its position is correctly tracked though, because e.g. hover effects in browsers work, focus-follows-mouse works and so, on. It's just that the cursor itself is invisible.

The cursor is usually invisible right from the start, before any windows have been opened. Then, if I move it between windows, it will sometimes become visible. When that happens, it stays visible until moved to another window.

The sway debug log doesn't contain any obvious error messages, except these:

2019-02-07 21:22:15 - [sway/input/cursor.c:1132] denying request to set cursor from unfocused client

and

glamor: No eglstream capable devices found

The main difference between the non-working system and the working ones are that the non-working one has an nvidia card (with nouveau), while the others are intel based.


wlroots has migrated to gitlab.freedesktop.org. This issue has been moved to:

https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3189

dnkl avatar Feb 07 '19 20:02 dnkl

Related https://github.com/swaywm/wlroots/pull/1526

RedSoxFan avatar Feb 07 '19 20:02 RedSoxFan

I have the same issue: Quadro 3000m + nouveau, Linux 4.20, Manjaro.

Edit: setting WLR_NO_HARDWARE_CURSORS=1 env. variable fixes it

I60R avatar Feb 07 '19 21:02 I60R

This is probably established fact by now, but just wanted to let you know that https://github.com/swaywm/wlroots/pull/1537 (which I found through https://github.com/swaywm/wlroots/pull/1526) works for me too.

dnkl avatar Feb 13 '19 16:02 dnkl

I have an Ivy Bridge CPU/gpu and I also had this problem, with cursor disappearing.

WLR_NO_HARDWARE_CURSORS fixed it but surely this bug ought to have a better fix?

ghost avatar Apr 06 '20 06:04 ghost

Coming back to say that the problem happened again

eualexandrerrr avatar Mar 22 '21 14:03 eualexandrerrr

I'm also having this problem, but on intel graphics and WLR_NO_HARDWARE_CURSORS=1 does not fix it.

For example, the cursor would suddenly become invisible over firefox, but become visible when moved over an edge or to another window. I noticed that changing the scale factor will sometimes bring back to the cursor over one application, but it would still become invisible over some other application. Normally, I use scale 3, and sometimes, the cursor would be tiny (as in scale 1) instead of being invisible.

I also noticed that if I start typing in gnome-terminal, the cursor will disappear (as intended), but if I move it again, it does not reappear. It stays invisible in all instances of gnome-terminal.

Also, if I change the cursor theme, e.g. gsettings set org.gnome.desktop.interface cursor-theme "Adwaita", the application which the cursor was on during the change will crash as soon as the cursor is moved after the theme change. I can reproduce this with firefox and gnome-terminal.

I guess these could all be separate bugs but they might be connected...

cshapeshifter avatar Jul 11 '21 09:07 cshapeshifter

I'm having this issue on my laptop (radeon graphics) but it only occurs after I unlock from swaylock and only if the mouse pointer was on my external monitor when I locked the desktop.

Then it will only appear on the external monitor. Sway is definitely aware of where the cursor is as I can see the focus change on the laptop monitor when I move the mouse around but the cursor is invisible.

nboughton avatar Jul 19 '21 12:07 nboughton

Can someone try wlroots 0.14.1 and post new debug logs?

emersion avatar Jul 19 '21 12:07 emersion

@emersion I have a debug log but it contains some personal information do you have some script to anonymize it a bit, like removing window titiles?

toto-dev avatar Jul 22 '21 14:07 toto-dev

Nope. Can you at least share the [ERROR] lines to confirm this is the bug I think this is?

emersion avatar Jul 22 '21 14:07 emersion

Here you have, just the error lines: sway.error.log

toto-dev avatar Jul 22 '21 20:07 toto-dev

Alright, that's what I've been hitting as well:

41237:02:14:10.874 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot
41238:02:14:10.874 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer

emersion avatar Jul 22 '21 20:07 emersion

Same here, I'm on arch linux. I'm using 2 monitors one using display port the other hdmi. The cursor disappears only in the display port monitor, when i move the cursor to the other one i can see the cursor just fine.

ChazyTheBest avatar Jul 30 '21 23:07 ChazyTheBest

I'm running into this issue as well with a HDMI monitor. And I'm having the opposite problem, the cursors is invisible only in the main display, being visible on the external one. going into a terminal and opening wdisplays seems to fix it until I close everything else and firefox resizes over the cursor in that workspace. After moving stuff around in workspaces sometimes it stays visible

It seems that resizing firefox over the cursor, or closing the last window of the workspace renders the cursor invisible, and having wdisplays open prevents any dissapearing

Extra info: this is happening on Arch linux, with intel graphics

CatalinPuscoci avatar Aug 03 '21 10:08 CatalinPuscoci

Unplugging and replugging in the monitor fixed it for me when I unlocked my desktop system this morning and the right monitor cursor was invisible. It was DP-1

$ lspci | grep VGA
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] (rev ca)
$ swaymsg -t get_outputs
Output HDMI-A-1 'Dell Inc. DELL U2414H FN8GP68S1JML'
  Current mode: 1920x1080 @ 60.000 Hz
  Position: 0,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 5
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    720x400 @ 70.082 Hz
    640x480 @ 59.940 Hz
    640x480 @ 59.940 Hz
    640x480 @ 60.000 Hz
    640x480 @ 75.000 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    720x480 @ 60.000 Hz
    720x480 @ 60.000 Hz
    720x576 @ 50.000 Hz
    800x600 @ 60.317 Hz
    800x600 @ 75.000 Hz
    1024x768 @ 60.004 Hz
    1024x768 @ 75.029 Hz
    1280x720 @ 50.000 Hz
    1280x720 @ 59.940 Hz
    1280x720 @ 60.000 Hz
    1280x720 @ 60.000 Hz
    1152x864 @ 75.000 Hz
    1280x800 @ 60.000 Hz
    1440x900 @ 60.000 Hz
    1280x1024 @ 60.020 Hz
    1280x1024 @ 75.025 Hz
    1600x900 @ 60.000 Hz
    1680x1050 @ 60.000 Hz
    1600x1200 @ 60.000 Hz
    1920x1080 @ 50.000 Hz
    1920x1080 @ 59.940 Hz
    1920x1080 @ 60.000 Hz
    1920x1080 @ 60.000 Hz

Output DP-1 'Dell Inc. DELL U2414H FN8GP68S1HEL' (focused)
  Current mode: 1920x1080 @ 60.000 Hz
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 2
  Max render time: off
  Adaptive sync: disabled
  Available modes:
    720x400 @ 70.082 Hz
    640x480 @ 59.940 Hz
    640x480 @ 59.940 Hz
    640x480 @ 60.000 Hz
    640x480 @ 75.000 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    720x480 @ 59.940 Hz
    720x480 @ 60.000 Hz
    720x480 @ 60.000 Hz
    720x576 @ 50.000 Hz
    800x600 @ 60.317 Hz
    800x600 @ 75.000 Hz
    1024x768 @ 60.004 Hz
    1024x768 @ 75.029 Hz
    1280x720 @ 50.000 Hz
    1280x720 @ 59.940 Hz
    1280x720 @ 60.000 Hz
    1280x720 @ 60.000 Hz
    1152x864 @ 75.000 Hz
    1280x800 @ 60.000 Hz
    1440x900 @ 60.000 Hz
    1280x1024 @ 60.020 Hz
    1280x1024 @ 75.025 Hz
    1600x900 @ 60.000 Hz
    1680x1050 @ 60.000 Hz
    1600x1200 @ 60.000 Hz
    1920x1080 @ 50.000 Hz
    1920x1080 @ 59.940 Hz
    1920x1080 @ 60.000 Hz
    1920x1080 @ 60.000 Hz

charims avatar Aug 05 '21 14:08 charims

Had the same thing happen this morning on a DP monitor (dual-monitor setup, Polaris GPU).

sykhro avatar Aug 16 '21 09:08 sykhro

Have the same issue consistently after swayidle takes both the laptop monitor LVDS-1 and the external monitor HDMI-A-1 off and turns them on again. Mouse cursor is missing on LVDS-1, but is present on HDMI-A-1, afterwards. As observed by others, effects of the mouse are there (mouse overs are highlighted, clicks are possible), but there is just no pointer/cursor.

Messages by sway are lots of:

01:15:54.682 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot 01:15:54.682 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer

Edit: Might be related that, when DPMS is turned off, the display with the mouse pointer still working says

2021-08-18 22:53:14 - [swaybg-1.1/main.c:373] Destroying output HDMI-A-1 (Hewlett Packard HP 27es 3CM9340NTF )

while the other display goes off, but the message is

2021-08-18 23:26:04 - [swaybg-1.1/main.c:373] Destroying output (null) ((null))

and appears only at powering DPMS on again.

Moreover, quite some time before that, there is:

00:17:45.884 [ERROR] [wlr] [backend/drm/atomic.c:35] connector LVDS-1: Atomic commit failed (pageflip): Device or resource busy

HeptaSean avatar Aug 18 '21 21:08 HeptaSean

Is this a regression? I don't remember having this problem on 1.5.x, and I already had an HDMI monitor.

emanuelserpa avatar Sep 11 '21 01:09 emanuelserpa

Is this a regression? I don't remember having this problem on 1.5.x, and I already had an HDMI monitor.

It certainly is for me.

Munksgaard avatar Sep 11 '21 10:09 Munksgaard

Also seems to be a regression for me. I lost my external monitor for a couple months, and now that I have it back, I am seeing this issue. The only changes have been software updates: it was working just fine a few months ago, and now when I plug in the external monitor, have the monitors go to sleep and then wake back up, the cursor is invisible on the laptop's builtin display but visible on the external display. Single (internal) display: no problems.

Arch Linux, AMD Renoir integrated GPU, sway 1.6.1.

I don't believe it is a regression from 1.5.x to 1.6.x, since I was running 1.6.0 without problems. I would suspect the wlroots change from v0.13.0 to v0.14.0.

Ulexus avatar Sep 21 '21 21:09 Ulexus

Indeed: in my case, downgrading to the 1.6.0 sway package (which uses wlroots v0.13.0) seems to prevent the problem.

Ulexus avatar Sep 22 '21 03:09 Ulexus

This condition is triggered for me mid-session after launching certain programs (eg, the Arch AUR obsidian-appimage package).

One interesting bit I've noticed is that keeping the wdisplays program running keeps cursors visible, although the failed to render cursor buffer errors keep scrolling by. I wonder why this is.

edrex avatar Sep 25 '21 17:09 edrex

Judging by the timing of when this issue appeared for me, and that some cursor-related items appeared in the changelog, could the issue have appeared in 0.14.1 and not 0.14.0?

RX14 avatar Sep 26 '21 15:09 RX14

I've experiencing something as well. I can keep the mouse visible when wdisplays is open but otherwise it is hidden. Oddly it's only on one display. The primary one DP-1 while DP-2 will display the mouse fine regardless. I've only noticed the behavior after waking from swaylock and maybe twice in the last 7 days.

The workaround I've come up with is to pull out and put back in the monitor cable.

jackinloadup avatar Sep 29 '21 05:09 jackinloadup

The workaround I've come up with is to pull out and put back in the monitor cable.

Interestingly, that does nothing for me.

sykhro avatar Sep 29 '21 11:09 sykhro

Have other people tried opening wdisplays? That seemed to do the trick for me, at least temporarily

CatalinPuscoci avatar Sep 29 '21 11:09 CatalinPuscoci

Does wdisplay disable hardware mouse cursor? It solves the problem for me but mouse movement becomes noticeably more sluggish.

skligys avatar Sep 29 '21 21:09 skligys

I don't know about wdisplay disabling the hardware cursor but i do know if wdisplay is open while some videos are playing on screen it can cause a performance drop. I'm guessing because of the video preview aspect of wdisplay, which is pretty slick. Though you can disable the preview once wdisplays is open there is a hamburger menu which allows you to toggle "Show Screen Contents" and another one "Overlay Screen Names". Disabling both and throwing wdisplays to a hidden workspace or scratchpad might be a viable temporary workaround. Granted I haven't tested to see if disabling "Show Screen Contents" actually improves performance, only an assumption.

jackinloadup avatar Sep 29 '21 21:09 jackinloadup

I've had this issue, switching to a TTY without sway on it and back seems to bring the cursor back, nixos 21.05, sway 1.6.1, sandy bridge with integrated graphics.

tabitha-vi avatar Oct 16 '21 01:10 tabitha-vi

Oddly it's only on one display. The primary one DP-1 while DP-2 will display the mouse fine regardless. I've only noticed the behavior after waking from swaylock and maybe twice in the last 7 days.

Exactly the same behavior here as well. Only on the first monitor and after resume from standby... (only happens sporadically though. In about 70% of the cases for me)

switching to a TTY without sway on it and back seems to bring the cursor back

Thx. Will try that next time.

moson-mo avatar Oct 22 '21 13:10 moson-mo