Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar is Displayed on wrong monitors (Dual Monitor) #636

Open
SeeWeedX opened this issue Dec 26, 2024 · 13 comments · May be fixed by #713
Open

Bar is Displayed on wrong monitors (Dual Monitor) #636

SeeWeedX opened this issue Dec 26, 2024 · 13 comments · May be fixed by #713

Comments

@SeeWeedX
Copy link

Describe the bug
Using a dual monitor laptop, the bars are being displayed on the wrong screens.

The top (main) screen shows the bar for the bottom screen (workspaces shows the bottom screen's workspaces) and vice versa.

Expected behavior
Bars should be swapped around to be in the correct screens.

Screenshots
image_2024-12-27_083547503

Desktop (please complete the following information):

  • Distribution: Arch Linux
  • Window Manager/Desktop Environment: Hyprland
@Jas-SinghFSU
Copy link
Owner

Unfortunately Gdk monitor IDs can get out of sync with Hyprland monitor IDs. There is some logic that exists currently to handle this but even it has limits. Could you share with me the output of your hyprland monitors please? Perhaps there are some gaps in that logic that can be fixed.

@SeeWeedX
Copy link
Author

SeeWeedX commented Dec 27, 2024

I assume you meant hyprctl monitors

Monitor eDP-1 (ID 0):
	[email protected] at 0x0
	description: BOE 0x0A19
	make: BOE
	model: 0x0A19
	serial: 
	active workspace: 1 (1)
	special workspace: 0 ()
	reserved: 0 52 0 0
	scale: 2.00
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: false
	solitary: 0
	activelyTearing: false
	directScanoutTo: 0
	disabled: false
	currentFormat: XRGB8888
	mirrorOf: none
	availableModes: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 

Monitor DP-1 (ID 1):
	[email protected] at 0x1200
	description: BOE 0x0A68
	make: BOE
	model: 0x0A68
	serial: 
	active workspace: 8 (8)
	special workspace: 0 ()
	reserved: 0 52 0 0
	scale: 2.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: false
	solitary: 0
	activelyTearing: false
	directScanoutTo: 0
	disabled: false
	currentFormat: XRGB8888
	mirrorOf: none
	availableModes: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

Is it possible to manually set my monitor IDs for Hyprpanel?

@Daholli
Copy link

Daholli commented Dec 28, 2024

I have the same issue

❯ hyprctl monitors all
Monitor HDMI-A-1 (ID 0):
	[email protected] at 3440x0
	description: LG Electronics 24GM79G 0x00039D3D
	make: LG Electronics
	model: 24GM79G
	serial: 0x00039D3D
	active workspace: 8 (8)
	special workspace: 0 ()
	reserved: 0 55 0 0
	scale: 1.00
	transform: 1
	focused: no
	dpmsStatus: 1
	vrr: false
	solitary: 0
	activelyTearing: false
	directScanoutTo: 0
	disabled: false
	currentFormat: XRGB8888
	mirrorOf: none
	availableModes: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 

Monitor DP-2 (ID 1):
	[email protected] at 0x0
	description: GIGA-BYTE TECHNOLOGY CO. LTD. M34WQ 0x000001A2
	make: GIGA-BYTE TECHNOLOGY CO., LTD.
	model: M34WQ
	serial: 0x000001A2
	active workspace: 1 (1)
	special workspace: 0 ()
	reserved: 0 55 0 0
	scale: 1.00
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: false
	solitary: 0
	activelyTearing: false
	directScanoutTo: 0
	disabled: false
	currentFormat: XRGB8888
	mirrorOf: none
	availableModes: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 
[nix-shell:~/projects/config]$ xrandr --listmonitors
Monitors: 2
 0: +*DP-2 3440/800x1440/340+1080+0  DP-2
 1: +HDMI-A-1 1080/530x1920/300+0+0  HDMI-A-1

I think you are right no idea why they are inverted now, it was never like that before, they did match up before

@SeeWeedX
Copy link
Author

SeeWeedX commented Jan 2, 2025

output from hyprpanel --inspector

image_2025-01-02_192136396

Apparently my GTK geometry is entirely different from my actual (Hyprland) resolution...

IDK if GTK geometry is supposed to have the same dimensions as my resolution but for me, this causes hyprpanel to use the fallbackMonitor.id

You could maybe include another check to check the width / height ratio with GTK and HyprLand.

@Daholli
Copy link

Daholli commented Jan 2, 2025

image

Interesting my resoltutions are correct, but the positions are incorrect

@SeeWeedX
Copy link
Author

SeeWeedX commented Jan 3, 2025

Seems like changing the monitor scale with hyprland.conf changes the Geometry of GTK.

So if your scale is not 1.0, GTK Geometry will not match with hyprland's monitor resolution.

So the right way would be to calculate GTK resolution with GTK Geometry / Hyprland Resolution

@simonkampe
Copy link

simonkampe commented Jan 8, 2025

I have the same issue, the workspaces are shown on the wrong monitor.

hyprctl monitors:

Monitor eDP-1 (ID 0):
        [email protected] at 0x0
        description: Samsung Display Corp. 0x4165
        make: Samsung Display Corp.
        model: 0x4165
        serial:
        active workspace: 3 (3)
        special workspace: -98 (special:magic)
        reserved: 0 40 0 0
        scale: 2.00
        transform: 0
        focused: yes
        dpmsStatus: 1
        vrr: false
        solitary: 0
        activelyTearing: false
        directScanoutTo: 0
        disabled: false
        currentFormat: XRGB8888
        mirrorOf: none
        availableModes: [email protected]

Monitor DP-2 (ID 1):
        [email protected] at -1600x-1440
        description: Dell Inc. Dell U4919DW DMRWTY2
        make: Dell Inc.
        model: Dell U4919DW
        serial: DMRWTY2
        active workspace: 2 (2)
        special workspace: 0 ()
        reserved: 0 40 0 0
        scale: 1.00
        transform: 0
        focused: no
        dpmsStatus: 1
        vrr: false
        solitary: 0
        activelyTearing: false
        directScanoutTo: 0
        disabled: false
        currentFormat: XRGB8888
        mirrorOf: none
        availableModes: [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] 720x4
[email protected] [email protected] [email protected] [email protected] [email protected] [email protected]

and bar layout:

layout = {
  "bar.layouts" = {
    "*" = {
      left = [ "power" "hypridle" "hyprsunset" "workspaces" ];
      middle = [ "media" "clock" "notifications" ];
      right = [ "volume" "network" "bluetooth" "battery" "systray" ];
    };
  };
};

Distribution: NixOS
hyprpanel configured via the home-manager module

@Jas-SinghFSU
Copy link
Owner

Is this happening for you guys after waking from sleep or right off the bat?

@SeeWeedX
Copy link
Author

SeeWeedX commented Jan 8, 2025

Happens all the time for me from the moment I installed HyprPanel.

I kinda worked around it by completely removing the third check and letting the last resort sort it out, and it works for me.

@simonkampe
Copy link

simonkampe commented Jan 8, 2025

Is this happening for you guys after waking from sleep or right off the bat?

Right away, every time, as far as I have tested.

I tried to set two different bar configurations "0"/"eDP-1" and "1" and the correct configuration showed on the monitors, but the workspace indicators were switched around.

@Daholli
Copy link

Daholli commented Jan 8, 2025

Yeah same for me.

@simonkampe
Copy link

On my triple-monitor setup at work the following happens:

Monitor 0 shows workspaces for monitor 2
Monitor 1 shows workspaces for monitor 1 (correct)
Monitor 2 shows workspaces for monitor 0

I do not have more monitors right now to test, but they seem reversed.

@Sawy7 Sawy7 linked a pull request Jan 11, 2025 that will close this issue
simonkampe added a commit to simonkampe/HyprPanel that referenced this issue Jan 14, 2025
simonkampe added a commit to simonkampe/HyprPanel that referenced this issue Jan 14, 2025
simonkampe added a commit to simonkampe/HyprPanel that referenced this issue Jan 14, 2025
simonkampe added a commit to simonkampe/HyprPanel that referenced this issue Jan 14, 2025
simonkampe added a commit to simonkampe/HyprPanel that referenced this issue Jan 14, 2025
simonkampe added a commit to simonkampe/HyprPanel that referenced this issue Jan 14, 2025
@Diaoul
Copy link
Contributor

Diaoul commented Jan 18, 2025

I can reproduce this as well. On my triple-monitor setup at work the following happens:

  • Monitor 0 (laptop) shows workspaces for monitor 0 (OK)
  • Monitor 1 shows workspaces for monitor 2
  • Monitor 2 shows workspaces for monitor 1

Let me know if I can to anything to help or debug 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants