Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Rendered windows don't extend to their tile's edges for monitor scales below 1.0

Open lukalotl opened this issue 1 year ago • 7 comments

Hyprland Version

System/Version info
Hyprland, built from branch  at commit v0.35.0  ().
Date: 2024-02-05
Tag:

flags: (if any)


System Information:
System name: Linux
Node name: l8
Release: 6.6.18
Version: #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 23 08:25:28 UTC 2024


GPU information:
03:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] [1002:73bf] (rev c1) (prog-if 00 [VGA controller])


os-release: ANSI_COLOR="1;34"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="24.05.20240228.9099616"
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 24.05 (Uakari)"
SUPPORT_URL="https://nixos.org/community.html"
VERSION="24.05 (Uakari)"
VERSION_CODENAME=uakari
VERSION_ID="24.05"


plugins:

Bug or Regression?

Bug

Description

A subset of programs: VSCode, Steam, Slack, Obsidian, but not Discord (or any other programs on my system) display within their window smaller than expected and offset from the mouse position scale (you can hover over buttons at the location that the button should be appearing to select it, even though the graphic element it is smaller and offset) on one of my monitors).

How to reproduce

This issue only occurs for monitor scale settings below 1.0.

Here at scale 0.5: image

And here at scale 0.8: image

Steam behaves slightly differently than the other programs that have this issue, it appears normally in floating mode when not being dragged, but appears shrunken in tiled mode or when being dragged in float mode. The other programs always exhibit the incorrect scaling even when floating.

hyprctl clients displays "xwayland: 0" for all of the effected programs, and I followed all of the troubleshooting steps for known xwayland compatibility issues just in case.

This is my desired monitor config (which is a comfortable and matching scale between my two monitors):

monitor=HDMI-A-1,preferred,0x0,auto
monitor=DP-3,2560x1440,3840x0,0.8

Crash reports, logs, images, videos

Latest log file in case it contains anything relevant hyprland.log

lukalotl avatar Mar 07 '24 07:03 lukalotl

are all of them xwayland and you have force_zero_scaling, perchance?

vaxerski avatar Mar 07 '24 13:03 vaxerski

It doesn't seem so, I did actually have force_zero_scaling enabled-- but I just disabled it and restarted the system and it seems the same. Also, unless I don't understand how to read the output of hyprctl clients, it's outputting xwayland: 0 for all windows which I assumed means not an X program. To confirm I opened all broken programs and ran xlsclients which has no output contents, and tried with xeyes also which doesn't react to the windows.

lukalotl avatar Mar 08 '24 02:03 lukalotl

Actually: disabling xwayland: force_zero_scaling did fix Steam (though now I have the expected blurring / resolution bug for xwayland, and so I guess it must be xwayland since Steam doesn't even have native wayland support. I just don't understand how to check if something is running on xwayland? I tried everything) but the other windows do still have the issue even with force_zero_scaling unchecked. Tested on VSCode, Slack, and Obsidian.

lukalotl avatar Mar 08 '24 02:03 lukalotl

[...] I just don't understand how to check if something is running on xwayland? I tried everything) [...]

hyprctl clients shows a xwayland property for each client. Clients running on xwayland will have a value of 1 there.

M4he avatar Mar 08 '24 18:03 M4he

hyprctl clients shows a xwayland property for each client. Clients running on xwayland will have a value of 1 there.

Thanks okay then, well I can confirm they all show zero. Even the ones that are behaving oddly.

lukalotl avatar Mar 09 '24 10:03 lukalotl

image

hyprctl clients with a bunch of these misrendering programs open

lukalotl avatar Mar 09 '24 10:03 lukalotl

Same issue here. For me, it's XWayland programs with force_zero_scaling enabled, but also all applications using Electron 25 or above with --ozone-platform-hint=auto set.

This seems to align with @lukalot's list of applications.

Discord recently broke for me as well. My assumption is that they upgraded to a newer version of Electron.

image

erzu12 avatar May 16 '24 20:05 erzu12

Got same issue as well. Seems like it's just like what @erzu12 mentioned. I tried launching VSCode with both --ozone-platform-hint=auto flag and no flags, the issue happen with both of them. Forcing VSCode to run on XWayland also have the same issue plus a blurry text as well.

image

AungS8430 avatar May 31 '24 12:05 AungS8430

I have a fractional scaling of 0.75. Something I found interesting is that when --ozone-platform-hint=auto is set, and Discord is running Wayland, I actually can't interact the bottom 25% and the right 25% of my screen. Of course, visually the application does not extend to edges.

As a matter of fact, with follow_mouse = 1, Hyrpland won't even detect that I've crossed my mouse into that application until I cross the bottom/right 25%, into the parts of the application that I can actually interact with.

There is a workaround where you can avoid these issues by scaling everything else up so that there is no scalar below 1. I have two 24" monitors, 1440p and 1080p, so I scaled the former to 1.3333 to mimic the latter. While everything slightly bigger (because we're emulating a lower PPI), it's better than starting at pixelated text on my secondary monitor, among all the other issues.

The problem with this workaround is that it's possible you may scale things way too large, as in you emulate too low of a PPI. Generally what's comfortable is anything between 90-110, with the former scaling things small, but still usable. If I had a very low PPI display, say 720p 24", which is a PPI of 61, it would make things way too large since modern desktop graphical interfaces expect a PPI around that range of 90-110.

edit - added workaround, explaination of PPI

uwidev avatar Jun 12 '24 17:06 uwidev

has there been some workaround for when using a single monitor ? or is there a fix in the works

NicolaiVdS avatar Aug 04 '24 11:08 NicolaiVdS