Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mouse cursor is either wrong or invisible on NixOS #3106

Closed
paveloom opened this issue Feb 13, 2023 · 3 comments
Closed

mouse cursor is either wrong or invisible on NixOS #3106

paveloom opened this issue Feb 13, 2023 · 3 comments
Labels
bug Something isn't working Wayland

Comments

@paveloom
Copy link

paveloom commented Feb 13, 2023

What Operating System(s) are you seeing this problem on?

Linux Wayland

Which Wayland compositor or X11 Window manager(s) are you using?

Mutter 43.2.

WezTerm version

wezterm a5c2b1f

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

Upon entering the window, the cursor either has a wrong style or is invisible.

To Reproduce

Put your cursor in the window.

Configuration

I can reproduce the issue without a config by running wezterm -n.

Expected Behavior

The cursor should be present and have a correct style.

Logs

Debug Overlay
wezterm version: a5c2b1f3adb06054bf522cb3d350697938d6f8e9 x86_64-unknown-linux-gnu
Window Environment: Wayland
OpenGL version: AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.49, 6.1.11) 4.6 (Compatibility Profile) Mesa 22.3.4
Enter lua statements or expressions and hit Enter.
Press ESC or CTRL-D to exit
23:08:52.226 ERROR window::os::wayland::pointer > Unable to set cursor to xterm: cursor not found
23:08:52.384 ERROR window::os::wayland::pointer > Unable to set cursor to xterm: cursor not found

Also getting the following errors when running wezterm -n:

23:08:57.021  ERROR  window::os::wayland::frame   > Unable to set cursor to left_ptr: cursor not found
23:08:57.021  ERROR  window::os::wayland::frame   > Unable to set cursor to right_side: cursor not found
23:08:57.022  ERROR  window::os::wayland::pointer > Unable to set cursor to arrow: cursor not found

Anything else?

Here's a recording:

2023-02-13.19-20-32.mp4

Interesting that the cursor is visible in the last part of the recording, even though I haven't seen it on my screen.

@paveloom paveloom added the bug Something isn't working label Feb 13, 2023
@wez
Copy link
Owner

wez commented Feb 17, 2023

How did you install wezterm? The version information seems a bit unusual.
Is this a duplicate of #2687 ?

@wez wez added waiting-on-op Waiting for more information from the original poster Wayland labels Feb 17, 2023
@paveloom
Copy link
Author

paveloom commented Feb 18, 2023

Using Nix. Here's the package, and here's my overlay for a version from the main branch. The version information is the contents of the .tag file.

I do believe #2687 is the same issue, but the reasons for why paths to cursor files are not found are different. NixOS doesn't follow Filesystem Hierarchy Standard. There are no directories like ~/.icons, /usr/local/share/icons, /usr/share/icons by default. There are also no environment variables like XDG_DATA_HOME, XCURSOR_PATH, XCURSOR_THEME by default.

There is XDG_DATA_DIRS, though, but those are links to the Nix store. Except one: /run/current-system/sw/share. I found it mentioned in NixOS/nixpkgs#140505. It does contain the cursor themes of my desktop environment (GNOME), and all I had to do to make Wezterm see them is to set XCURSOR_THEME to Adwaita:

XCURSOR_THEME=Adwaita WEZTERM_LOG=window::os::x11::cursor=trace,window::os::wayland::pointer=trace,info wezterm start --always-new-process

It stopped complaining about missing cursors, and I think it works now:

image

I'm not sure whether that variable is supposed to be automatically set on other systems or not. Anyway, I put set -gx XCURSOR_THEME Adwaita in my Fish configuration file, so it works now. Thanks!

@github-actions github-actions bot removed the waiting-on-op Waiting for more information from the original poster label Feb 18, 2023
@wez wez changed the title Cursor is either wrong or invisible mouse cursor is either wrong or invisible on NixOS Feb 18, 2023
@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working Wayland
Projects
None yet
Development

No branches or pull requests

2 participants