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 · 6 comments
Open

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

SeeWeedX opened this issue Dec 26, 2024 · 6 comments

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

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

No branches or pull requests

3 participants