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

DRM Display Blanking #342

Open
edrose-tewke opened this issue Jun 15, 2023 · 2 comments
Open

DRM Display Blanking #342

edrose-tewke opened this issue Jun 15, 2023 · 2 comments
Labels
drm Topics of DRM backend enhancement New feature or request

Comments

@edrose-tewke
Copy link

I'm just wondering whether there is any way of disabling the display when using the DRM embedder? I guess in DRM terms, that means disabling the CRTC, which will have the knock-on effect of disabling the display further down the chain.

If not, it's a problem I'm prepared to tackle myself (and contribute, if it's a useful feature). However I'm not an expert in flutter. Do you have any recommendation around how to signal down from the flutter app to the embedded to indicate that the display must be turned off? Could it be as simple as just detecting a frame that contains only black pixels?

@HidenoriMatsubayashi HidenoriMatsubayashi added enhancement New feature or request drm Topics of DRM backend labels Jun 15, 2023
@HidenoriMatsubayashi
Copy link
Contributor

I'm just wondering whether there is any way of disabling the display when using the DRM embedder?

No, there isn't.

Do you have any recommendation around how to signal down from the flutter app to the embedded to indicate that the display must be turned off? Could it be as simple as just detecting a frame that contains only black pixels?

If my understanding is correct, official flutter doesn't support screen controls (on/off) including platform specific functions as it's just UI framework. Instead, flutter provides plugin interface.

In this case, we should use method channel (or event channel) APIs.
e.g.
https://stackoverflow.com/questions/61889443/flutter-app-ability-to-turn-off-the-screen

@Thor-x86
Copy link
Contributor

Thor-x86 commented May 29, 2024

As this issue still opened, I'm going to answer anyway.

Do you have any recommendation around how to signal down from the flutter app to the embedded to indicate that the display must be turned off? Could it be as simple as just detecting a frame that contains only black pixels?

Thankfully, Flutter on Linux is now supporting Unix Socket. Thus, you can create a daemon program that listen signal from Flutter via Unix Socket then switch off the display backlight, as example. To conserve power, you could either use systemd to do sleep procedure or use SIGSTOP and SIGCONT to temporarily pause the Flutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drm Topics of DRM backend enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants