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

How to make it run even if no screen is connected #324

Open
moham96 opened this issue Apr 16, 2023 · 3 comments
Open

How to make it run even if no screen is connected #324

moham96 opened this issue Apr 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@moham96
Copy link

moham96 commented Apr 16, 2023

If the screen is not powered on then flutter-pi fails with this:

[flutter-pi] Device "/dev/dri/card0" doesn't have a display connected. Skipping.
[flutter-pi] Could not find a connected connector!

In my case I can't guarantee that the screen will be on by the time flutter-pi is ran so how can I make flutter-pi run headless if no screen is connected/powered on and then maybe adjust after a screen is on?

Previously my app was written in pyqt and the pi was using the old framebuffer driver where I had to force a specific HDMI mode so that it works if the screen is connected or not, now I have rewritten my app in flutter and I'm stuck

@moham96
Copy link
Author

moham96 commented Apr 19, 2023

Using fkms driver and setting hdmi_force_hotplug=1 seems to work and the app is able to start at boot even when no screen is connected.and apparently adjust the resolution automatically when a screen is later connected.
But does this have any drawback?
Is the fkms driver well supported by flutter-pi?
Is it possible to achieve the same results with kms driver?

@ardera
Copy link
Owner

ardera commented Apr 20, 2023

But does this have any drawback?

The fkms driver showed some flickering in the past (even though vsync is enabled), at least on DSI. Not sure that's still the case

Is the fkms driver well supported by flutter-pi?

Yep, same as the KMS one

Is it possible to achieve the same results with kms driver?

Don't think so I'm afraid, flutter itself doesn't support display hotplugging or multi-display, so any solution would require flutter-pi to fake a display itself. That's quite hacky and also requires some fundamental modesetting changes but the benefit is pretty small. I'll rather wait till flutter has true multi-display & display hotplugging support (that's WIP at the moment, but you can already see some of the work in flutter stable) and then implement it using that

@FlorianAlt
Copy link

I had the same issue and was able to get this running by setting this options:

hdmi_force_hotplug=1

hdmi_group=1
hdmi_mode=76
hdmi_force_mode=1

dtoverlay=vc4-fkms-v3d

@ardera ardera added the enhancement New feature or request label Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants