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

Inconsistent cursor size #6320

Closed
Xygyl opened this issue Jun 3, 2024 · 13 comments
Closed

Inconsistent cursor size #6320

Xygyl opened this issue Jun 3, 2024 · 13 comments
Labels
bug Something isn't working

Comments

@Xygyl
Copy link

Xygyl commented Jun 3, 2024

System Info and Version

System/Version info
Hyprland, built from branch  at commit cba1ade848feac44b2eda677503900639581c3f4  (props: bump version to 0.40.0).
Date: Sat May 4 15:42:32 2024
Tag: v0.40.0, commits: 4606

flags: (if any)


System Information:
System name: Linux
Node name: syn-2603-8080-3200-1fef-0000-0000-0000-168e.res6.spectrum.com
Release: 6.6.30-gentoo-dist
Version: #1 SMP PREEMPT_DYNAMIC Thu May 23 11:46:34 CDT 2024


GPU information: 
c1:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c1) (prog-if 00 [VGA controller])


os-release: NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.15"


plugins:

Bug or Regression?

Bug

Description

My cursor changes size when it's placed over certain parts of the Steam and Firefox UIs. It also changes size when playing any type of game (either with proton via Steam like with Minecraft).

Firefox doesn't have this issue when nwg-look is used with HYPRCURSOR_THEME and HYPRCURSOR_SIZE, though the issue persists with Steam and games.

How to reproduce

Playing any game and placing cursor over certain Steam UI parts.

Crash reports, logs, images, videos

4
3
2
1
hyprland.txt

I'm sorry for taking pictures instead of screenshots — I'm still trying to figure out grim and slurp. All pictures were taken from the same distance to demonstrate cursor size changes.

@Xygyl Xygyl added the bug Something isn't working label Jun 3, 2024
@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

sad reality of cursors on linux. https://wiki.hyprland.org/Hypr-Ecosystem/hyprcursor/

play with xcursor_size until it's good enough

@vaxerski vaxerski closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@Xygyl
Copy link
Author

Xygyl commented Jun 3, 2024

Changing xcursor_size doesn't change anything. I tried to use a different cursor, but now the cursor is distorted. Is this an issue with converting xcursors to hyprcursors?
2
1

@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

converting xcursors to hyprcursors with the util works 90% of the time without issues. For best result, you should manually replace pngs with svgs. You can also use a pre-made theme, of course.

Try using hyprctl setcursor, or in your config env = XCURSOR_SIZE,24 (24 or any other size)

@Xygyl
Copy link
Author

Xygyl commented Jun 3, 2024

To ensure that I don't take up too much of your time and to give you the full context of the problem, here's the full scope of the issue:

I'm using phinger-cursors-dark from https://github.com/phisch/phinger-cursors. I changed it into hyprcursors via hyprcursor-util -x phinger-cursors-dark and hyprcursor-util -c extracted_phinger-cursors-dark. The hyprcursors were renamed to "phinger-cursors" and the xcursors to "phinger-cursors-X" (not just the directories, but in manifest.hl and index.theme). I placed both in ~/.icons and ~/.local/share/icons so that I can be sure that there are no discrepancies.

These lines are in my hyprland.conf:

env = HYPRCURSOR_THEME,phinger-cursors
env = HYPRCURSOR_SIZE,24
env = XCURSOR_THEME,phinger-cursors-X
env = XCURSOR_SIZE,24

I also have phinger-cursors-X set in nwg-look which sets it correctly for firefox.

env = XCURSOR_SIZE,24 doesn't fix the distortion nor the size issues. hyprctl setcursor phinger-cursors-X 24 sets the cursor to a small adwaita cursor. hyprctl setcursor phinger-cursors 24 has the same distortion issue.

It seems that the distortion is a problem with the xcursor to hyprcursor issue, but none of this addresses the size issue.

It's likely that I did something wrong due to this being my first venture into hyprland, though I'm not sure where that could be.

In the meantime I'm going to go through the discord and see if any of those themes work.

@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

distortion is IIRC a reported issue in hyprcursor, it's a bug in the util I believe. Try some of the SVG themes from the #hyprcursor-themes channel in discord.

@Xygyl
Copy link
Author

Xygyl commented Jun 3, 2024

I'll try that, thank you. Is there anywhere else I can get feedback on this problem? I tried posting about it in the discord but I have yet to get a reply. I feel bad bothering the lead dev with such a mundane problem.

@Xygyl
Copy link
Author

Xygyl commented Jun 3, 2024

This problem just keeps getting more complicated. I set my theme to https://github.com/ndom91/rose-pine-hyprcursor and now hyprpaper doesn't work. My cursor is now different for my desktop, firefox, and steam. The small cursor and big cursor on steam have different themes (in a different permutation than before, but that's unneeded context). I think the actual solution is to not use hyprland since nothing seems to solve this problem. Unless you have any ideas or anyone else I can talk to about this, I think that I'm just going to try a different wm.

@vaxerski
Copy link
Member

vaxerski commented Jun 3, 2024

you can also not use hyprcursor. I feel like this is a misconfiguration of some sort on your end though as it seems to work just fine for me and many others

@Xygyl
Copy link
Author

Xygyl commented Jun 3, 2024

It is. The frustration comes from not knowing what is misconfigured. I'm looking through everything and can't find anything out of place. Like why would changing my cursor make hyprpaper not work?

@Xygyl
Copy link
Author

Xygyl commented Jun 3, 2024

I just tried using just xcursor without making any changes to anything else, but it's distorted, which makes me think that the original distortion isn't because of hyprcursor-util. At this point I'm just confused, and the lack of help (not referring to you) or documentation is making this increasingly frustrating.

@nktnet1
Copy link
Contributor

nktnet1 commented Jul 22, 2024

I had a similar issue as this Reddit post here, whereby the

cursor size smaller on desktop than everywhere else

A related issue might be "Cursor size with HiDPi #2448"


The most consistent way I've managed to get the cursors working is to install a cursor theme that has both Xcursor and Hyprcursor variants, then set their sizes using nwg-look and in hyprland environment variables respectively.

For example, using rose-pine cursor on Arch and assuming you have the AUR helper yay, here are the steps:

  1. Install rose-pine/cursor from the AUR:

    yay -S rose-pine-cursor
  2. Install rose-pine-hyprcursor from the AUR:

    yay -S rose-pine-hyprcursor
  3. Install nwg-look:

    yay -S nwg-look
  4. Open nwg-look and set your preferred Xcursor and size:

    nwg-look-settings

  5. Open your ~/.config/hypr/hyprland.conf and use the same configuration for Hyprcursor:

    exec-once = gsettings set org.gnome.desktop.interface cursor-theme BreezeX-RosePine-Linux
    exec-once = gsettings set org.gnome.desktop.interface cursor-size 28
    
    env = HYPRCURSOR_SIZE,28
    env = HYPRCURSOR_THEME,rose-pine-hyprcursor
    
  6. Restart Hyprland or reboot your device

The cursors should now match when moving from your wallpaper to an application, e.g. firefox.

For more hyprcursor themes, take a look at the #hyprcursor-themes channel on Hyprland's discord:

@HK-Sepuri
Copy link

#6320 (comment)

This worked !!, so i need to find xcursor theme of same hyprcursor theme got it ! Thank you :)

@xdevs23
Copy link

xdevs23 commented Jul 30, 2024

The most consistent way I've managed to get the cursors working is to install a cursor theme that has both Xcursor and Hyprcursor variants, then set their sizes using nwg-look and in hyprland environment variables respectively.

Finally a solution for this that has been haunting me ever since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants