Wayland: tiny mouse cursor with 125% fractional scaling #105895

Open
opened 2023-03-19 04:31:06 +01:00 by Archer Allstars · 15 comments

System Information
Operating system: Linux-6.2.6-1-default-x86_64-with-glibc2.37 64 Bits
Graphics card: Mesa Intel(R) UHD Graphics 620 (KBL GT2) Intel 4.6 (Core Profile) Mesa 23.0.0

Blender Version
Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-03-17 21:08, hash: 3eff28a158ca
Worked: -

Short description of error
Tiny mouse cursor inside blender while running in Wayland session (Windowing Environment: WAYLAND), as shown in the screen recording.

The only way to have a normal size mouse cursor at the moment is to enable zoom mode on my desktop, as shown in the screen recording.

*I use fractional scalling at 125% on my desktop (Wayland session).
*

Exact steps for others to reproduce the error

  1. Open Blender.
  2. Mouse cursor will be tiny regardless of any Interface > Display > Resolution Scale setting in Blender.
**System Information** Operating system: Linux-6.2.6-1-default-x86_64-with-glibc2.37 64 Bits Graphics card: Mesa Intel(R) UHD Graphics 620 (KBL GT2) Intel 4.6 (Core Profile) Mesa 23.0.0 **Blender Version** Broken: version: 3.6.0 Alpha, branch: main, commit date: 2023-03-17 21:08, hash: `3eff28a158ca` Worked: - **Short description of error** Tiny mouse cursor inside blender while running in Wayland session (Windowing Environment: WAYLAND), as shown in the screen recording. The only way to have a normal size mouse cursor at the moment is to enable zoom mode on my desktop, as shown in the screen recording. *I use fractional scalling at 125% on my desktop (Wayland session). * **Exact steps for others to reproduce the error** 1. Open Blender. 2. Mouse cursor will be tiny regardless of any Interface > Display > Resolution Scale setting in Blender.
Archer Allstars added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-19 04:31:07 +01:00
Pratik Borhade added the
Platform
Linux
label 2023-03-19 11:33:15 +01:00
Member

@ideasman42 , can you check?

@ideasman42 , can you check?
Campbell Barton changed title from Tiny mouse cursor in Wayland session to Wayland: tiny mouse cursor with 125% fractional scaling 2023-03-19 23:37:00 +01:00
Campbell Barton added the
Interest
Wayland
label 2023-03-21 10:20:12 +01:00

It doesn't seem practical to resolve this on Blender's side, some notes:

  • Blender already supports fractional scaling on KDE/WLROOT's based compositors (RIVER works for e.g.).
  • Gnomes fractional scaling is marked as experimental. Ubuntu chose to enable this. By default, enabling gnome's fractional scaling requires setting the mutter option: experimental-features=['scale-monitor-framebuffer'].
  • Fractional scaling under Gnome makes the assumption the application does not support fractional scaling and renders a non-fractional scaled frame-buffer, then scales it down fractionally.
  • Wayland now supports wp-fractional-scale-v1 as a way to better access fractional scaling information, although compositors will need to support this so it can be tested to work properly in Blender.

As this is a limitation in an experimental feature, which will be resolved once newer API's are supported by Gnome, I've added this to our user manual as a "Known Limitation" - see: https://docs.blender.org/manual/en/3.6/getting_started/installing/linux_windowing_environment.html#known-limitations

Closing.

It doesn't seem practical to resolve this on Blender's side, some notes: - Blender already supports fractional scaling on KDE/WLROOT's based compositors (RIVER works for e.g.). - Gnomes fractional scaling is marked as *experimental*. Ubuntu chose to enable this. By default, enabling gnome's fractional scaling requires setting the mutter option: `experimental-features=['scale-monitor-framebuffer']`. - Fractional scaling under Gnome makes the assumption the application does not support fractional scaling and renders a non-fractional scaled frame-buffer, then scales it down fractionally. - Wayland now supports ``wp-fractional-scale-v1`` as a way to better access fractional scaling information, although compositors will need to support this so it can be tested to work properly in Blender. As this is a limitation in an experimental feature, which will be resolved once newer API's are supported by Gnome, I've added this to our user manual as a "Known Limitation" - see: https://docs.blender.org/manual/en/3.6/getting_started/installing/linux_windowing_environment.html#known-limitations Closing.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2023-03-22 02:54:18 +01:00

It turns out fractional scaling wasn't working on other non-gnome compositors such as RIVER. It was especially noticeable with a fractional scale of 1.01 for e.g. where the interface was scaled down around 50%.

I didn't realize this impacted RIVER as scales 1.5 and 1.75 worked well enough although they were not exactly correct either.

It turns out fractional scaling wasn't working on other non-gnome compositors such as RIVER. It was especially noticeable with a fractional scale of 1.01 for e.g. where the interface was scaled down around 50%. I didn't realize this impacted RIVER as scales 1.5 and 1.75 worked well enough although they were not exactly correct either.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2023-03-29 07:40:10 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Needs Triage
labels 2023-03-29 08:49:29 +02:00

I think we should reopen this issue again. Starting from version 3.6, the UI scale correctly on my system, but the mouse cursor size is still tiny regardless of the resolution scale value.

I tried the latest 4.0 alpha, 37eabb171a7. The issue is still presenting.

I think we should reopen this issue again. Starting from version 3.6, the UI scale correctly on my system, but the mouse cursor size is still tiny regardless of the resolution scale value. I tried the latest 4.0 alpha, [37eabb171a7](https://projects.blender.org/blender/blender/commit/37eabb171a71). The issue is still presenting.
Blender Bot added
Status
Needs Triage
and removed
Status
Resolved
labels 2023-06-28 07:51:20 +02:00

As of Blender 4.1, this issue is still reproducible.

As of Blender 4.1, this issue is still reproducible.

@archerallstars which version of gnome are you using and are you on Ubuntu?

Gnome 45 and 46 both support fractional-scaling which should resolve this issue, it seems likely this issue only impacts older versions of Gnome on Ubuntu.

If this is the case I don't think it's practical to support experimental features on older systems.

@archerallstars which version of gnome are you using and are you on Ubuntu? Gnome 45 and 46 both support fractional-scaling which should resolve this issue, it seems likely this issue only impacts older versions of Gnome on Ubuntu. If this is the case I don't think it's practical to support experimental features on older systems.
Campbell Barton added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-03-27 06:03:09 +01:00

@ideasman42 I am using GNOME 46 in Wayland session with fractional scaling at 125% (1080p display resolution) on openSUSE Tumbleweed.

As far as I can tell, from 4.0 to 4.1, the windowing issue I had with 4.0 (the app window launched with the size that exceeded my display resolution) is fixed in 4.1. But this tiny mouse cursor size issue has never been fixed. When the mouse cursor enters the app window, its size becomes tiny, just like the report in the OP.


Edit: I upload the fractional scaling behaviors of both 4.0 and 4.1 in my screen recordings.

@ideasman42 I am using GNOME 46 in Wayland session with fractional scaling at 125% (1080p display resolution) on openSUSE Tumbleweed. As far as I can tell, from 4.0 to 4.1, the windowing issue I had with 4.0 (the app window launched with the size that exceeded my display resolution) is fixed in 4.1. But this tiny mouse cursor size issue has never been fixed. When the mouse cursor enters the app window, its size becomes tiny, just like the report in the OP. --- Edit: I upload the fractional scaling behaviors of both 4.0 and 4.1 in my screen recordings.

@archerallstars this is strange as the cursor size should default to 24, the display in your example looks much smaller.

  • Could you check if the XCURSOR_SIZE is set?

    Run this in the Python console. import os; os.environ.get("XCURSOR_SIZE")

    ...it should be 24 or above, you setting to 48 should show a large cursor.

  • Could you log the wayland output from Blender?

    Log the output of wayland and attach this here.

    env WAYLAND_DEBUG=1 ./blender 2> ~/output.log

@archerallstars this is strange as the cursor size should default to 24, the display in your example looks much smaller. - Could you check if the `XCURSOR_SIZE` is set? Run this in the Python console. `import os; os.environ.get("XCURSOR_SIZE")` ...it should be 24 or above, you setting to 48 should show a large cursor. - Could you log the wayland output from Blender? Log the output of wayland and attach this here. `env WAYLAND_DEBUG=1 ./blender 2> ~/output.log`

@ideasman42

  • Could you check if the XCURSOR_SIZE is set?

    Run this in the Python console. import os; os.environ.get("XCURSOR_SIZE")

It has no return at all.

It seems XCURSOR_SIZE hasn't been set on my system, as I also get no return from printenv | grep XCURSOR_SIZE.

  • Could you log the wayland output from Blender?

I upload my output.log.


Edit1: I tried setting XCURSOR_SIZE to 99, it has no effect at all. The mouse cursor size is still tiny, as shown in my screen recording.


Edit2: First, I don't have any clue about how Blender renders its cursor inside the app window. Please discard my following input if it's nonsense to Blender.

I have this exact same issue when using GUI apps inside the container. This is because the container image doesn't have the system's cursor theme installed. Simply installing the cursor theme solved the issue. See: https://github.com/89luca89/distrobox/issues/745#issuecomment-2024345160.

@ideasman42 > - Could you check if the `XCURSOR_SIZE` is set? > > Run this in the Python console. `import os; os.environ.get("XCURSOR_SIZE")` It has no return at all. It seems `XCURSOR_SIZE` hasn't been set on my system, as I also get no return from `printenv | grep XCURSOR_SIZE`. > - Could you log the wayland output from Blender? I upload my `output.log`. --- Edit1: I tried setting `XCURSOR_SIZE` to 99, it has no effect at all. The mouse cursor size is still tiny, as shown in my screen recording. --- Edit2: First, I don't have any clue about how Blender renders its cursor inside the app window. Please discard my following input if it's nonsense to Blender. I have this exact same issue when using GUI apps inside the container. This is because the container image doesn't have the system's cursor theme installed. Simply installing the cursor theme solved the issue. See: https://github.com/89luca89/distrobox/issues/745#issuecomment-2024345160.

XCURSOR_SIZE being ignored is quite surprising and hints at something strange, I would also expect other users to have run into this.

Blender is not doing anything especially involved to display cursors, it's picking the default theme with the default size, with environment variables for overrides.


Try combinations of the following settings:

List cursors on your system:

find /usr/share/icons ~/.local/share/icons ~/.icons -type d -name "cursors"

Try different cursors:

env XCURSOR_THEME=Adwaita XCURSOR_SIZE=48 blender

Further, I'm not sure if this can be solved on Blender's side unless this is something a developer can reproduce.

`XCURSOR_SIZE` being ignored is quite surprising and hints at something strange, I would also expect other users to have run into this. Blender is not doing anything especially involved to display cursors, it's picking the default theme with the default size, with environment variables for overrides. --- Try combinations of the following settings: List cursors on your system: ``` find /usr/share/icons ~/.local/share/icons ~/.icons -type d -name "cursors" ``` Try different cursors: ``` env XCURSOR_THEME=Adwaita XCURSOR_SIZE=48 blender ``` Further, I'm not sure if this can be solved on Blender's side unless this is something a developer can reproduce.

@ideasman42

Adding env XCURSOR_THEME=Adwaita fixed the mouse cursor size in Blender, as my system doesn't specify XCURSOR_THEME in the environment variable list. But It will use the default cursor size (24) regardless of my current cursor size (Medium - 32), though.

So, I added env XCURSOR_THEME=Adwaita env XCURSOR_SIZE=32 in my desktop file to launch Blender at the correct mouse theme and size.

Is there a way for Blender to automatically specify the current XCURSOR_THEME and XCURSOR_SIZE? I think this issue is pretty deep for a new user, as I need a year (since the OP) to figure this out.


I reported this issue at SUSE Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1222151

@ideasman42 Adding `env XCURSOR_THEME=Adwaita` fixed the mouse cursor size in Blender, as my system doesn't specify `XCURSOR_THEME` in the environment variable list. But It will use the `default` cursor size (24) regardless of my current cursor size (Medium - 32), though. So, I added `env XCURSOR_THEME=Adwaita env XCURSOR_SIZE=32` in my desktop file to launch Blender at the correct mouse theme and size. Is there a way for Blender to automatically specify the _current_ `XCURSOR_THEME` and `XCURSOR_SIZE`? I think this issue is pretty deep for a new user, as I need a year (since the OP) to figure this out. --- I reported this issue at SUSE Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1222151

@archerallstars while I can't tell exactly, it looks like the default cursor on your theme is smaller than 24, it could be the that the cursor theme which is default picks the closest size which happens to be smaller than 24px.

There aren't any settings within Blender to override the cursor theme/size it's self, ideally there would be a way to access the system theme and size but this information isn't available. This is a point I've raised this issue on the wayland-devel mailing list a while back: https://lists.freedesktop.org/archives/wayland-devel/2023-December/043349.html

@archerallstars while I can't tell exactly, it looks like the `default` cursor on your theme is smaller than 24, it could be the that the cursor theme which is default picks the closest size which happens to be smaller than 24px. There aren't any settings within Blender to override the cursor theme/size it's self, ideally there would be a way to access the system theme and size but this information isn't available. This is a point I've raised this issue on the wayland-devel mailing list a while back: https://lists.freedesktop.org/archives/wayland-devel/2023-December/043349.html

@ideasman42

while I can't tell exactly, it looks like the default cursor on your theme is smaller than 24, it could be the that the cursor theme which is default picks the closest size which happens to be smaller than 24px.

I only have Adwaita installed as my cursor theme. Maybe the issue isn't related to the size of the cursor, but the absence of XCURSOR_THEME specified in the system environment variables, which caused the system to ignore XCURSOR_SIZE, resulting in a broken super tiny cursor when enabled fractional scaling.

openSUSE used to have XCURSOR_THEME specified, but was removed: https://bugzilla.suse.com/show_bug.cgi?id=1157617. This is likely the cause of this issue. Maybe, this issue should be closed, as it's not a Blender issue, but the user system issue.

However, it still cannot explain why only Blender has this issue out of all the apps in my system. Other apps have no issue with the cursor, even without XCURSOR_THEME specified in the system.

This Blender issue is the same when running apps in a Docker container without the cursor theme package installed in the container. I assume that, unless XCURSOR_THEME is specified, Blender doesn't/can't access the system cursor at all regardless of the present of the cursor theme package in the system.


ideally there would be a way to access the system theme and size but this information isn't available.

I don't know about other DE, but in GNOME, both the cursor theme and size can be accessed easily by:

gsettings get org.gnome.desktop.interface cursor-theme
gsettings get org.gnome.desktop.interface cursor-size
@ideasman42 > while I can't tell exactly, it looks like the default cursor on your theme is smaller than 24, it could be the that the cursor theme which is default picks the closest size which happens to be smaller than 24px. I only have Adwaita installed as my cursor theme. Maybe the issue isn't related to the size of the cursor, but the absence of `XCURSOR_THEME` specified in the system environment variables, which caused the system to ignore `XCURSOR_SIZE`, resulting in a broken super tiny cursor when enabled fractional scaling. openSUSE _used to_ have `XCURSOR_THEME` specified, but was removed: https://bugzilla.suse.com/show_bug.cgi?id=1157617. This is likely the cause of this issue. Maybe, this issue should be closed, as it's not a Blender issue, but the user system issue. However, it still cannot explain why only Blender has this issue out of all the apps in my system. Other apps have no issue with the cursor, even without `XCURSOR_THEME` specified in the system. This Blender issue is the same when running apps in a Docker container without the cursor theme package installed in the container. I assume that, unless `XCURSOR_THEME` is specified, Blender doesn't/can't access the system cursor at all regardless of the present of the cursor theme package in the system. --- > ideally there would be a way to access the system theme and size but this information isn't available. I don't know about other DE, but in GNOME, both the cursor theme and size can be accessed easily by: ``` gsettings get org.gnome.desktop.interface cursor-theme gsettings get org.gnome.desktop.interface cursor-size ```

I don't know about other DE, but in GNOME, both the cursor theme and size can be accessed easily by:

gsettings get org.gnome.desktop.interface cursor-theme
gsettings get org.gnome.desktop.interface cursor-size

While we could access this information, it should be possible to use the default cursor without it picking something unusably small.

Otherwise people using systems other than gnome will still run into this issue.

This could be reported upstream since the default theme at 24 size should resolve to something usable.


Committed 97d93c7e33, from what I can see it's unlikely that it resolves the issue, nevertheless it's worth checking.

> I don't know about other DE, but in GNOME, both the cursor theme and size can be accessed easily by: > > ``` > gsettings get org.gnome.desktop.interface cursor-theme > gsettings get org.gnome.desktop.interface cursor-size > ``` While we could access this information, it should be possible to use the default cursor without it picking something unusably small. Otherwise people using systems other than gnome will still run into this issue. This could be reported upstream since the `default` theme at `24` size should resolve to something usable. --- Committed 97d93c7e332ae4506953d3124654e3f8243851cb, from what I can see it's unlikely that it resolves the issue, nevertheless it's worth checking.

Sorry for a user question on the dev site, but
I still have this issue with 4.1 on Tumbleweed. Have you found any solutions?

_Sorry for a user question on the dev site, but_ I still have this issue with 4.1 on Tumbleweed. Have you found any solutions?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105895
No description provided.