hyprwm / Hyprland

Hyprland is a highly customizable dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
18.07k stars 754 forks source link

XWayland goes offset after monitor restart #6362

Open vars1ty opened 1 month ago

vars1ty commented 1 month ago

System Info and Version

System/Version info ```sh 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: refined Release: 6.9.1-273-tkg-bore-llvm Version: #1 SMP PREEMPT_DYNAMIC TKG Sat, 18 May 2024 17:53:07 +0000 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: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ```

Bug or Regression?

Bug

Description

Shutting down your main monitor causes XWayland to go offset, mostly noticeable when playing games.

The only way to fix this bug when it happens, is to restart Hyprland.

How to reproduce

  1. Shut off your main monitor. In my case, only an ultrawide monitor.
  2. Start it again.
  3. Start a game that runs with XWayland, for example THE FINALS
  4. Go in-game and notice how the mouse stops mid-screen, or snaps backwards

Crash reports, logs, images, videos

No response

foren-dev commented 1 month ago

Also have this issue

phonetic112 commented 1 month ago

dupe of https://github.com/hyprwm/Hyprland/issues/3727?

what does xrandr say after you restart monitor

ethanh20009 commented 2 weeks ago

Also had this issue, Using the suggestion from

dupe of #3727?

I was able to fix it. Although it would be better to be able to specify explicitly the resolution and rr of the monitors

For me xrandr showed an incorrect offset of 1920 pixels where it should've been at 0x0. I am going full screen on DP-2 with X-Wayland, then turning off DP-1, then turning DP-1 back on then exiting full screen on DP-2.

(xrandr output after bug occurred)

Screen 0: minimum 16 x 16, current 4480 x 1440, maximum 32767 x 32767
DP-2 connected 2560x1440+1920+0 (normal left inverted right x axis y axis) 600mm x 340mm
   2560x1440    164.78*+

hyprland.conf (before fix)

monitor=DP-1,1920x1080@143.85,2560x250,1
monitor=DP-2,2560x1440@164.80,0x0,1,vrr,2