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

Dual monitors on raspberry 5 don't work #253

Open
aminta opened this issue Jan 22, 2025 · 9 comments
Open

Dual monitors on raspberry 5 don't work #253

aminta opened this issue Jan 22, 2025 · 9 comments

Comments

@aminta
Copy link

aminta commented Jan 22, 2025

Hi!

I'm using Basilisk II launching it from console on my Raspberry 5 and it works, but only on the first of the two monitors attached to it.

The Raspberry shows correctly the same image on the two monitors when I'm using the console or X, but Basilisk II starts only on the first monitor, why?

@rakslice
Copy link

Do you mean it fails when you try to move the window to the other monitor? What actually happens? Does it stop displaying properly? Is there an error?

@rakslice
Copy link

Oh, sorry, I see: "the same image on the two monitors" -- so you have it set to clone the output but the Basilisk II output does not appear on one of them.

@aminta
Copy link
Author

aminta commented Jan 22, 2025

I try to explain myself better:

I'm using the Macintosh emu Basilisk II launching it from console (outside X11) on my Raspberry 5 and it works, but only on the first of the two monitors attached to it.

The Raspberry shows correctly the same image ("mirroring") on the two monitors when I'm using the console or X, but Basilisk II starts only on the first monitor, why?

I have the same problem with another emulator, Mini vMac. Both these versions of Basilisk II and Mini vMac are compiled with / for SDL2 graphics library, maybe this is the "culprit"?

@rakslice
Copy link

The SDL2 support just uses whatever SDL2 video driver is available in the normal way. Whatever information you can find on configuring the framebuffer for any other applications that use SDL2 on whatever OS you're running on the Pi should apply to Basilisk II also.

FWIW on my regular PC running Ubuntu, the very dumb default 1024x768 grub-provided console is mirrored and when I run Basilisk II on it it's also mirrored; there's nothing special that prevents Basilisk II on a framebuffer console from being mirrored, but it might depend what the actual graphics hardware can do.

@aminta
Copy link
Author

aminta commented Jan 23, 2025

From Raspberry Pi Forum, a Software Engineer at Raspberry Pi Ltd. says: "That's down to how SDL2 is driving the kernel DRM / KMS API then.

The Pi DRM driver exposes the two HDMI ports as independent connectors with their own CRTCs, and can each be given a set of planes to display.
The framebuffers behind those planes can be reused between multiple displays, but doing so is up to the application.

X11 (which isn't the default graphical environment on a Pi using Bookworm) renders the extended desktop to one framebuffer, and gives that to all active display targets with appropriate source cropping rectangles.
The Wayland compositor LabWC (which is the default) renders independent frame buffers for each display target.
The fbcon console rendering creates one framebuffer which is the minimum width and minimum height of all displays, and displays that top/left of each active connector on a DRM device. Each DRM device will get their own framebuffer for all their outputs."

Can be this an useful advice?

@aminta
Copy link
Author

aminta commented Jan 23, 2025

However, in first HDMI monitor I see Basilisk II (and also MiniVMac), on the second I see the console...

@rakslice
Copy link

That you can use the same framebuffer with multiple CRTCs is maybe useful information for whoever wants to add support for taking advantage of that in SDL.

But in the meantime, if it already works in X why not use Basilisk II in X and not try to use it directly on the console that you have no way to configure to work the way you want it seems?

@aminta
Copy link
Author

aminta commented Jan 30, 2025

So this means that dual monitor output doesn't work because it has to be implemented at SDL level?

@rakslice
Copy link

No, just that you asked if that was useful advice, and that's what that advice is useful for.

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

2 participants