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

[Feature Request]: Mirroring config #20

Open
Merrit opened this issue Jul 13, 2022 · 12 comments
Open

[Feature Request]: Mirroring config #20

Merrit opened this issue Jul 13, 2022 · 12 comments
Labels
enhancement New feature or request investigating In process of investigating what it would take to add this feature

Comments

@Merrit
Copy link

Merrit commented Jul 13, 2022

Hi 👋 nice tool you've made, thanks for your work!

Would be great to be able to configure display mirroring, as GNOME itself currently only allows either extended or mirror all.

Example: I have three displays attached and want to mirror 2 as my "primary", leaving the 3rd as an extended.

@maxwellainatchi maxwellainatchi added investigating In process of investigating what it would take to add this feature enhancement New feature or request and removed investigating In process of investigating what it would take to add this feature labels Jul 20, 2022
@maxwellainatchi
Copy link
Owner

Hi! Looks like this doesn't seem to be supported by the dbus API I'm using to manipulate displays. I can take a look into how xrandr does it and see if I can find the matching Wayland API, but it's quite possible this won't be feasible under my current implementation.

@Merrit
Copy link
Author

Merrit commented Jul 20, 2022

I am not super familiar, but I believe that it mirrors by specifying the x + y coodinates, and for mirrored displays they just use the same resolution and coordinates so that they overlap each other in the virtual display.

@maxwellainatchi
Copy link
Owner

Hmm if that's the case, then this is definitely implementable. As a temporary workaround the you can try using the branch in #18, which allows for changing the XY position of displays.

I don't currently have a working Linux computer to test on so I can't test or make this change until I get it back up and running, but you can try that out for now.

@Merrit
Copy link
Author

Merrit commented Jul 22, 2022

Neat, I'll give that a try when I have a chance! 👍

@Merrit
Copy link
Author

Merrit commented Jul 25, 2022

Sounds like the DBus method won't allow it unfortunately:

❯ ./gnome-randr modify -d '0,0,2' HDMI-2
setting displacement to x: 0, y: 0, scale: 2
D-Bus error: Logical monitors overlap (org.freedesktop.DBus.Error.InvalidArgs)
Logical monitors overlap

@maxwellainatchi
Copy link
Owner

Ah, that's unfortunate. I'm not well-versed in Linux APIs, I just learned what d-bus was for this project, so I don't know if I'll be able to implement it otherwise

@Merrit
Copy link
Author

Merrit commented Aug 6, 2022

Yeah, as it stands I don't think there is a way to interact with it except for dbus, and if it forbids this config there isn't much to be done until they change things on their end.

Given that I'll go ahead and close this, hopefully the config options & API will improve in the future! 🌻 :)

@Merrit Merrit closed this as completed Aug 6, 2022
@maxwellainatchi
Copy link
Owner

There definitely is a way to interact with it besides d-bus - I'm pretty sure I can interface with Wayland directly. I'm just unsure of how to actually do that

@maxwellainatchi
Copy link
Owner

I'm pretty sure I can use this crate somehow, but I'd have to dig in to it and I don't currently have time for that. If I do in the future I'll update this issue

@tobiasgrosser
Copy link

tobiasgrosser commented Oct 14, 2022

Just adding a note, that I would be interested in this feature as well.

It seems gnome checks here for the overlapping monitors:

https://gitlab.gnome.org/GNOME/mutter/-/blob/62f4e0501fc19d68a0ee68645e5c9764ef8a3808/src/backends/meta-monitor-config-manager.c#L1647

I wonder what happens if one just disables the check. Could that work?

@maxwellainatchi
Copy link
Owner

I'm not actually directly interacting with mutter, but rather doing it via dbus. In any case, I'm not sure how you would be able to disable that check though without actually recompiling mutter.

@ozgedurgut
Copy link

I'm attaching two screens to the Khadas and I want it to be the same on both screens. So I want to make Mirror. I'm using Khadas vim4 and I can't use xrandr. I thought gnome-randr might work, is there an update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request investigating In process of investigating what it would take to add this feature
Projects
None yet
Development

No branches or pull requests

4 participants