Wayland: window decorations mismatch with fractional-scaling #109194

Closed
opened 2023-06-21 09:52:55 +02:00 by Blender-King · 11 comments

System Information
Operating system: Arch-based Linux, kernel 6.3.7-arch1-1
Graphics card: Intel Arc A779

Blender Version
Broken: blender-3.6.0-beta+v36.2ef27684c56c-linux.x86_64-release, but has happened with all 3.6 daily builds so far.
Worked: 3.5.1, the latest version.

Short description of error
The content area is 1/4 of the window size when the window is first open. 3/4 of the window is transparent.
Gnome 44.2, Wayland, fractional scaling enabled (100%, 175%), dual monitors (1920x1200, 4K).

image

Exact steps for others to reproduce the error
Run Blender 3.6

**System Information** Operating system: Arch-based Linux, kernel 6.3.7-arch1-1 Graphics card: Intel Arc A779 **Blender Version** Broken: blender-3.6.0-beta+v36.2ef27684c56c-linux.x86_64-release, but has happened with all 3.6 daily builds so far. Worked: 3.5.1, the latest version. **Short description of error** The content area is 1/4 of the window size when the window is first open. 3/4 of the window is transparent. Gnome 44.2, Wayland, fractional scaling enabled (100%, 175%), dual monitors (1920x1200, 4K). ![image](/attachments/48d2787f-389f-497d-a0c1-7e89319d76d5) **Exact steps for others to reproduce the error** Run Blender 3.6
3.2 MiB
Blender-King added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-06-21 09:52:56 +02:00
Blender-King changed title from Blender 3.6's window has 1/4 content area, 3/4 transparent area. to Blender 3.6's window has 1/4 content area, 3/4 transparent area under Linux 2023-06-21 10:16:49 +02:00
Member

Hi! Does the problem still exist if you don't use fractal scaling? Also if you restore and maximize the window again, does the problem persist? Thanks!

On X11 some programs sometimes do this to me as well, like firefox. It feels like it's rendering on the window size that the program creates but it didn't respond to the initial sizing event of the window manager, Wayland might be another story though.

Hi! Does the problem still exist if you don't use fractal scaling? Also if you restore and maximize the window again, does the problem persist? Thanks! On X11 some programs sometimes do this to me as well, like firefox. It feels like it's rendering on the window size that the program creates but it didn't respond to the initial sizing event of the window manager, Wayland might be another story though.
YimingWu added the
Platform
Linux
Interest
Wayland
labels 2023-06-21 12:30:13 +02:00
Author

Hi! Does the problem still exist if you don't use fractal scaling? Also if you restore and maximize the window again, does the problem persist? Thanks!

On X11 some programs sometimes do this to me as well, like firefox. It feels like it's rendering on the window size that the program creates but it didn't respond to the initial sizing event of the window manager, Wayland might be another story though.

It seems that the problem occurs only when the two monitors have different scalings. That is, if I set both monitors to 100%, to 150%, or to 200%, it does not happen. But If I use different scalings like 100% (left) and 200% (right), it happens.

If I minimise and then restores Blender's window, the content area becomes normal.

This problem does not happen with Blender 3.5.1 (the current version), so I think some changes to the UI introduced in 3.6 is causing this.

PS: Also, when Blender 3.6 starts, it does not start on the main monitor (which is on the right). A big empty grey Blender window starts on the left monitor and part of the window is on the right monitor, and then the Blender's window moves to the right monitor and the content area appears. This problem also does not exist in Blender 3.5.1.

PS2: I tested it with a new OS account, thus with default settings for Blender 3.6. The Blender 3.6 in my main account had settings carried over from Blender 3.5.1. Anyway, strangely, the problem did not happen with the main window under the new OS account. However, when I opened the Edit -> Preferences window, the problem also happened under the new OS account.

> Hi! Does the problem still exist if you don't use fractal scaling? Also if you restore and maximize the window again, does the problem persist? Thanks! > > On X11 some programs sometimes do this to me as well, like firefox. It feels like it's rendering on the window size that the program creates but it didn't respond to the initial sizing event of the window manager, Wayland might be another story though. It seems that the problem occurs only when the two monitors have different scalings. That is, if I set both monitors to 100%, to 150%, or to 200%, it does not happen. But If I use different scalings like 100% (left) and 200% (right), it happens. If I minimise and then restores Blender's window, the content area becomes normal. This problem does not happen with Blender 3.5.1 (the current version), so I think some changes to the UI introduced in 3.6 is causing this. PS: Also, when Blender 3.6 starts, it does not start on the main monitor (which is on the right). A big empty grey Blender window starts on the left monitor and part of the window is on the right monitor, and then the Blender's window moves to the right monitor and the content area appears. This problem also does not exist in Blender 3.5.1. PS2: I tested it with a new OS account, thus with default settings for Blender 3.6. The Blender 3.6 in my main account had settings carried over from Blender 3.5.1. Anyway, strangely, the problem did not happen with the main window under the new OS account. However, when I opened the Edit -> Preferences window, the problem also happened under the new OS account.
Member

Could you try if X11 session has the same issue? (You should be able to select that in the bottom right corner when you login, depending on your display manager program, choose XOrg or X11). This way we can better pin down if this is some change to wayland support in blender or if it's something else.

From the screenshot it looks like it's also not exactly a 1/4 size, so this problem could be related to #108746 and #108643 as well.

Could you try if X11 session has the same issue? (You should be able to select that in the bottom right corner when you login, depending on your display manager program, choose XOrg or X11). This way we can better pin down if this is some change to wayland support in blender or if it's something else. From the screenshot it looks like it's also not exactly a 1/4 size, so this problem could be related to #108746 and #108643 as well.
Author

Could you try if X11 session has the same issue? (You should be able to select that in the bottom right corner when you login, depending on your display manager program, choose XOrg or X11). This way we can better pin down if this is some change to wayland support in blender or if it's something else.

From the screenshot it looks like it's also not exactly a 1/4 size, so this problem could be related to #108746 and #108643 as well.

X11 does not support per-monitor scalings. That is, all monitors will have the same scalings, so I thought that the problem would not happen in X11, and when I tested it to be sure, it did not happen in X11 as I had expected.

Also, I think the reason why it was not exactly 1/4 is that the scalings were 100% and 175%. I changed the right monitor's scaling to 200% and captured the screenshot below and in an image editing software, I copied the client area and pasted it to the right. It was exactly half the width, so overall it was 1/4. 200% scaling is 2x of 100% scaling in both horizontal and vertical directions, which makes it 1/4.

So, my guess is that, for some reason, Blender 3.6 fits the content area size to the left monitor, but its window size to the right monitor.

image

> Could you try if X11 session has the same issue? (You should be able to select that in the bottom right corner when you login, depending on your display manager program, choose XOrg or X11). This way we can better pin down if this is some change to wayland support in blender or if it's something else. > > From the screenshot it looks like it's also not exactly a 1/4 size, so this problem could be related to #108746 and #108643 as well. X11 does not support per-monitor scalings. That is, all monitors will have the same scalings, so I thought that the problem would not happen in X11, and when I tested it to be sure, it did not happen in X11 as I had expected. Also, I think the reason why it was not exactly 1/4 is that the scalings were 100% and 175%. I changed the right monitor's scaling to 200% and captured the screenshot below and in an image editing software, I copied the client area and pasted it to the right. It was exactly half the width, so overall it was 1/4. 200% scaling is 2x of 100% scaling in both horizontal and vertical directions, which makes it 1/4. So, my guess is that, for some reason, Blender 3.6 fits the content area size to the left monitor, but its window size to the right monitor. ![image](/attachments/b5ece4c4-927d-4f2d-8584-93059bbfaa88)
1.1 MiB
Member

@Blender-King thanks for the feedback. Now it looks like indeed the scaling-induced problem. When you drag blender window from one monitor to another (on different fractional scale), does interface size change for you?

From what I can find it's probably something around outputs_changed_update_scale and getClientBounds.

Seems to be your territory? @ideasman42

@Blender-King thanks for the feedback. Now it looks like indeed the scaling-induced problem. When you drag blender window from one monitor to another (on different fractional scale), does interface size change for you? From what I can find it's probably something around `outputs_changed_update_scale` and `getClientBounds`. Seems to be your territory? @ideasman42
YimingWu added
Module
Core
Status
Needs Info from Developers
and removed
Status
Needs Triage
labels 2023-06-24 08:17:51 +02:00
Author

@Blender-King thanks for the feedback. Now it looks like indeed the scaling-induced problem. When you drag blender window from one monitor to another (on different fractional scale), does interface size change for you?

From what I can find it's probably something around outputs_changed_update_scale and getClientBounds.

Seems to be your territory? @ideasman42

When I started Blender in the bigger monitor, and the main window is showing 1/4 content area, if I move the main window to the smaller monitor, then the content fills the main window (i.e., becomes normal). However, instead of moving the main window, if I open the Preferences window, which is also showing smaller content area, and move that window to the smaller monitor, the content area stays small. (Refer to the attached screen-recording.)

Anyway, I think a faster way is find a Linux computer that has dual monitors and is using Wayland Gnome, set different scalings on both monitors, and run Blender 3.6 there, and maybe open the Preferences window. If everything is fine on that computer, then maybe this is a particular problem of my system.

> @Blender-King thanks for the feedback. Now it looks like indeed the scaling-induced problem. When you drag blender window from one monitor to another (on different fractional scale), does interface size change for you? > > From what I can find it's probably something around `outputs_changed_update_scale` and `getClientBounds`. > > Seems to be your territory? @ideasman42 When I started Blender in the bigger monitor, and the main window is showing 1/4 content area, if I move the main window to the smaller monitor, then the content fills the main window (i.e., becomes normal). However, instead of moving the main window, if I open the Preferences window, which is also showing smaller content area, and move that window to the smaller monitor, the content area stays small. (Refer to the attached screen-recording.) Anyway, I think a faster way is find a Linux computer that has dual monitors and is using Wayland Gnome, set different scalings on both monitors, and run Blender 3.6 there, and maybe open the Preferences window. If everything is fine on that computer, then maybe this is a particular problem of my system.

Recently I resolved a related issue where the Blender window opens the wrong size whenever fractional scaling is used.
See f95ee3e871.

This issue is more involved, from looking into this I think libdecor would have to support fractional scaling for this to work properly (reported upstream https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/60 ).

Setting as a "Known Issue", as I don't think we can resolve on our side unless we remove libdecor entirely and use our own client side decorations.

Recently I resolved a related issue where the Blender window opens the wrong size whenever fractional scaling is used. See f95ee3e8715bccca4048cb8cfdbb3072f84939cd. This issue is more involved, from looking into this I think libdecor would have to support fractional scaling for this to work properly (reported upstream https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/60 ). Setting as a "Known Issue", as I don't think we can resolve on our side unless we remove libdecor entirely and use our own client side decorations.
Campbell Barton added
Status
Confirmed
Type
Known Issue
and removed
Status
Needs Info from Developers
Type
Report
labels 2023-10-16 01:32:09 +02:00
Author

In Blender 4.0 or 4.1 this has been worked around but there are still problems.

I don't know; I downloaded and tried Blender 4.0 Beta yesterday, and the problem got worse. Now the context of the main window seems to go beyond the screen when Blender is "maximised". That is, the "Blender 4.0" string, which is supposed to be placed at the centre of the title bar is displayed near the end of the title bar and the object tree/property view are not visible. If I "restore" the window, the window become really big and when I tried to resize it to a smaller size, Blender became unresponsive and then Gnome crashed.

> In Blender 4.0 or 4.1 this has been worked around but there are still problems. I don't know; I downloaded and tried Blender 4.0 Beta yesterday, and the problem got worse. Now the context of the main window seems to go beyond the screen when Blender is "maximised". That is, the "Blender 4.0" string, which is supposed to be placed at the centre of the title bar is displayed near the end of the title bar and the object tree/property view are not visible. If I "restore" the window, the window become really big and when I tried to resize it to a smaller size, Blender became unresponsive and then Gnome crashed.
Campbell Barton changed title from Blender 3.6's window has 1/4 content area, 3/4 transparent area under Linux to Wayland: window decorations don't match window contents 2023-10-17 01:21:16 +02:00

@Blender-King the hack has been removed, replaced by logic that corrects LIBDECOR internal coordinates, with GNOME 45 with 2x monitors set to fractional scaling (175% for e.g.) Blender now works reasonably well.

This still doesn't work well for new windows with multiple monitors that use a different scales though.

So while the issue in this report isn't fixed, in general recent commits should improve window decoration handling.

See:

@Blender-King the hack has been removed, replaced by logic that corrects LIBDECOR internal coordinates, with GNOME 45 with 2x monitors set to fractional scaling (175% for e.g.) Blender now works reasonably well. This still doesn't work well for new windows with multiple monitors that use a different scales though. So while the issue in this report isn't fixed, in general recent commits should improve window decoration handling. See: - bafb36f8bcbecb2161a2d8f89ce621a76c33fbcd - 3eda5a114f14d14e1a454d97c9e5496247fe6c21
Author

worse in older versions of GNOME

May I ask which version of Gnome are you using? My version is 45.0.

If the state goes back to that of pre-4.0, I think it can be tolerated. It was just an annoyance that the initial content size was small, which became normal when Blender's window got redrawn by losing focus or getting minimised/restored. But with 4.0, it made Blender almost impossible to use on my set-up (dual monitors with different fractional scaling).

> worse in older versions of GNOME May I ask which version of Gnome are you using? My version is 45.0. If the state goes back to that of pre-4.0, I think it can be tolerated. It was just an annoyance that the initial content size was small, which became normal when Blender's window got redrawn by losing focus or getting minimised/restored. But with 4.0, it made Blender almost impossible to use on my set-up (dual monitors with different fractional scaling).

I'm on GNOME 45, did you check if windowing is working for you since the latest updates?

As mentioned, with 2x monitors of the same fractional scale, windowing should work well, I can still redo problems with monitors of different fractional scales though.

I'm on GNOME 45, did you check if windowing is working for you since the latest updates? As mentioned, with 2x monitors of the same fractional scale, windowing should work well, I can still redo problems with monitors of different fractional scales though.
Campbell Barton changed title from Wayland: window decorations don't match window contents to Wayland: window decorations mismatch with fractional-scaling 2023-12-13 06:32:22 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-12-17 07:25:40 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
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
3 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#109194
No description provided.