[raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Things that we don't consider worth fixing at this moment.
brothersw
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Apr 27, 2024 12:42 am
Contact:

[raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by brothersw »

I just transitioned to NixOS and have been setting everything up. In Wayland mode (which is much appreciated due to 1.5x scaling for most apps), my cursor appears tiny when in the game. This is on a 28" 4K monitor and so I think that this may be causing the issue when in Wayland mode.

xrandr output for the screen Factorio is on:
DP-2 connected primary 2560x1440+0+0 (normal left inverted right x axis y axis) 610mm x 350mm

Image of behavior:
factorioCursor.jpg
factorioCursor.jpg (792.51 KiB) Viewed 1173 times
Expected behavior demonstrated when another application is active over it:
expectedCursor.jpg
expectedCursor.jpg (687.97 KiB) Viewed 1173 times
Thank you for all that you do!
Attachments
factorio-current.log
(4.58 KiB) Downloaded 35 times
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 579
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by raiguard »

SDL2 has some issues with cursor themes that are beyond my power to fix. SDL3 will fix these issues.
Don't forget, you're here forever.
GlassBricks
Inserter
Inserter
Posts: 38
Joined: Fri Jun 11, 2021 5:20 pm
Contact:

Re: [raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by GlassBricks »

According to https://github.com/libsdl-org/SDL/issues/9250, SDL2 seems to have been fixed this on their end, but Factorio needs to update.

So... can we has not tiny cursor on wayland please?
Okabintaro
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Nov 01, 2024 5:51 pm
Contact:

Re: [raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by Okabintaro »

Heya, the issue is still present on the latest version (2.0.13, with Space Age Expansion at the time of writing).

But it's pretty easy to workaround by setting the XCURSOR_THEME and XCURSOR_SIZE environment variables.
For example on Plasma 6 on Arch I use these launch options on steam to get my cursor size to align with the system:

Code: Select all

XCURSOR_THEME=Breeze_Light XCURSOR_SIZE=48 %command%
More details about cursor themes can be found on the arch wiki here: https://wiki.archlinux.org/title/Cursor ... t_variable
I found my cursor themes at /usr/share/icons/Breeze_Light/cursors/.
Numerfolt
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Nov 07, 2024 2:44 pm
Contact:

Re: [raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by Numerfolt »

This worked for me too:
Okabintaro wrote: Fri Nov 01, 2024 5:56 pm

Code: Select all

XCURSOR_THEME=Breeze_Light XCURSOR_SIZE=48 %command%
Two additions:
Using Plasma 6, you can find the theme name and cursor-size in the systemsettings too:
System Settings -> Color & Design -> Cursor

When I set my cursor size to default size * monitor scale (24 * 150% = 36), the cursor was too large.
For me it worked to just use the same cursor size as specified in the system settings.
Last edited by Numerfolt on Thu Nov 07, 2024 3:02 pm, edited 1 time in total.
Donion
Factorio Staff
Factorio Staff
Posts: 304
Joined: Sun Aug 22, 2021 9:18 am
Contact:

Re: [raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by Donion »

I got curious and tried building with DBUS support (also the SDL has been updated to 2.30.9 in 2.0.16) as mentioned in the linked github issue and the cursor was still tiny on Wayland with 150% scaling. So either I've built it wrong or something else is missing.
tgurr
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Nov 18, 2024 10:28 am
Contact:

Re: [raiguard][1.1.107][Linux] Tiny Cursor through Wayland

Post by tgurr »

Donion wrote: Tue Nov 12, 2024 9:49 pm I got curious and tried building with DBUS support (also the SDL has been updated to 2.30.9 in 2.0.16) as mentioned in the linked github issue and the cursor was still tiny on Wayland with 150% scaling. So either I've built it wrong or something else is missing.
Just curious as I started playing Factorio again yesterday and in the meantime also moved on to wayland and got bitten by this issue. When testing two questions arose for me after reading the GitHub SDL issue (https://github.com/libsdl-org/SDL/issues/9250).

* Have you been on KDE Plasma 6? Or GNOME?
* Did you have xdg-desktop-portal-gtk installed?

I'm not entirely sure if I get things right myself in regards to the prerequisits but judging from the initial PR https://github.com/libsdl-org/SDL/pull/9258 it states
GitHub wrote:Add support for the cursor shape protocol so that KDE will display the correct cursors, even if the settings portal is absent or SDL is built without dbus support.
and the relevant commit has been backported to SDL2 with https://github.com/libsdl-org/SDL/commi ... db8020b87c

which contradicts in parts to the initial statement from the GitHub issue which mentions the DBUS support as a requirement but to me this now reads as only still required when running GNOME, or at least not KDE Plasma:
GitHub wrote:The cursor shape protocol support has been backported to SDL2, so we've done everything we can do here. Note that this will fix it on KDE 6, but GNOME doesn't support this protocol yet, and if the Factorio devs continue to build their static library without dbus support, the GNOME settings where the theme and cursor size are stored can't be read, so the cursor will be the wrong size there.
so if I conclude things right at least on KDE Plasma 6 with a version released >1 year (as the MR for implementing the cursor-shape-v1 appears to be https://invent.kde.org/plasma/kwin/-/me ... uests/4060) things should work out of the box due to the cursor-shape-v1 protocol without any need for a working/installed portal AND without the DBUS requirement.

But for me it doesn't on latest KDE Plasma 6 (at the moment for writing this version 6.2.3) which renders me quite clueless after reading all that stuff what the issue could be and where to report it to hopefully get it addressed in the future, here, SDL, kwin?
Post Reply

Return to “Won't fix.”