Hyprland
Hyprland copied to clipboard
workspace mapped to incorrect monitor
Hyprland Version
84c4a14dadf8d28f57068d39cfec2612c15becd1
Bug or Regression?
Bug
Description
Usually (but not necessarily) after waking from suspend and moving a monitor on monitor 1 to monitor 2, the first workspace is mapped to the incorrect monitor.
According to my configuration, workspaces 1-5 are on DP-1 and workspaces 6-10 are on HDMI-A-1 - however if you see the output of hyprctl workspaces
$ hyprctl workspaces
workspace ID 4 (4) on monitor DP-1:
windows: 1
hasfullscreen: 0
lastwindow: 0x19a7770
lastwindowtitle: [2] WebCord - #hyprland-general (Church of Hyprland)
workspace ID 9 (9) on monitor HDMI-A-1:
windows: 1
hasfullscreen: 0
lastwindow: 0x1a6a630
lastwindowtitle: Steam
workspace ID 2 (2) on monitor DP-1:
windows: 1
hasfullscreen: 1
lastwindow: 0x1995f30
lastwindowtitle: Firefox
workspace ID 1 (1) on monitor HDMI-A-1:
windows: 2
hasfullscreen: 0
lastwindow: 0x19d0d00
lastwindowtitle: foot
you will see that workspace 1 is on the second monitor, which is HDMI-A-1
How to reproduce
- Wake up from suspend
- Move the active window from workspace 1 to the second monitor
- switch to a different workspace on the second monitor
- switch back to workspace 1, it'll be on the second monitor
Crash reports, logs, images, videos
No response
I have a feeling that this has to do with the order monitors are enabled. My motherboard recognizes HDMI before DP, so HDMI-A-1 is treated somewhat like a "main" monitor.
From the above information we cannot know more relevant content.
I assume by "we" you mean people who know what they are talking about, which you clearly does not include you.
I have the same issue here. I have setup my monitors as follows:
monitor=DP-1,preferred,0x0,1.6
monitor=DP-2,preferred,auto,1
workspace=1,monitor:DP-1,persistent:true
workspace=2,monitor:DP-1,persistent:true
workspace=3,monitor:DP-1,persistent:true
workspace=4,monitor:DP-1,persistent:true
workspace=5,monitor:DP-1,persistent:true
workspace=6,monitor:DP-2,persistent:true
workspace=7,monitor:DP-2,persistent:true
workspace=8,monitor:DP-2,persistent:true
workspace=9,monitor:DP-2,persistent:true
workspace=10,monitor:DP-2,persistent:true
The workspaces are placed correctly at boot but after I either:
- Suspend and turn the machine back on
- Turn a monitor on or off
The monitors at get scrambled and the pattern is seemingly random.
For example, this is the output of hyprctl workspaces
after turning DP-2 off and on:
workspace ID 1 (1) on monitor DP-1:
monitorID: 0
windows: 3
hasfullscreen: 0
lastwindow: 0x358c990
workspace ID 6 (6) on monitor DP-2:
monitorID: 1
windows: 3
hasfullscreen: 0
lastwindow: 0x30c83a0
workspace ID 10 (10) on monitor DP-2:
monitorID: 1
windows: 2
hasfullscreen: 0
lastwindow: 0x317d340
workspace ID 7 (7) on monitor DP-2:
monitorID: 1
windows: 2
hasfullscreen: 0
lastwindow: 0x3124160
workspace ID 5 (5) on monitor DP-1:
monitorID: 0
windows: 2
hasfullscreen: 0
lastwindow: 0x35a8e00
workspace ID 2 (2) on monitor DP-2:
monitorID: 1
windows: 0
hasfullscreen: 0
lastwindow: 0x0
workspace ID 8 (8) on monitor DP-2:
monitorID: 1
windows: 4
hasfullscreen: 0
lastwindow: 0x32597f0
workspace ID 3 (3) on monitor DP-1:
monitorID: 0
windows: 2
hasfullscreen: 0
lastwindow: 0x3577cd0
workspace ID 4 (4) on monitor DP-1:
monitorID: 0
windows: 2
hasfullscreen: 0
lastwindow: 0x2a80480
workspace ID 9 (9) on monitor DP-2:
monitorID: 1
windows: 0
hasfullscreen: 0
lastwindow: 0x0
workspace ID 11 (11) on monitor DP-2:
monitorID: 1
windows: 1
hasfullscreen: 0
lastwindow: 0x3677c40
My current setup:
Hyprland, built from branch at commit v0.39.1 ().
Date: 2024-04-16
Tag: , commits: @COMMITS@
flags: (if any)
And linux version:
Linux 6.1.87 #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 17 09:18:29 UTC 2024 x86_64 GNU/Linux
Same issue here on a laptop with two external monitors. iGPU is disabled, so everything is running on the NVidia dGPU, hyprland 0.41.2-1 nvidia-dkms 550.90.07-3 6.9.6-arch1-1