-
-
Notifications
You must be signed in to change notification settings - Fork 173
[WIP] Implement DPMS get/setValue (Screen Off/On for KMS) #478
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for the contribution @DisDis ! I think providing support for DPMS & backlight is definitely useful, but a generic way to set KMS properties might be a bit too powerful. It's very easy to shoot yourself in the foot with that and it can easily conflict with flutter-pi's modesetting. Might be better to provide an abstraction specifically for DPMS (and/or backlight). Just a package where you can do something like: void main() async {
final dpms = await DPMS.getInstance(); // optionally allow passing the view id here, for multi-view
await dpms.setMode(PowerMode.on);
await Future.delayed(Duration(seconds: 5));
await dpms.setMode(PowerMode.standby);
// ...
} For backlight, one could implement a platform interface for: https://github.com/aaassseee/screen_brightness/ Weston has its own little sub-library to help with backlight: https://gitlab.freedesktop.org/wayland/weston/-/blob/main/libweston/backend-drm/libbacklight.c, that could just be added to the flutter-pi source tree under |
Hi @ardera. |
I added kms drm property set function.
The code is dirty, but it works.
Any suggestions for improvement?
It allows turn off/on screen.
For my case I use HDMI-0.
kmsprint -p
show:
Screen ON:
Screen OFF:
Service:
static final KmsDrmService kmsDrmService = KmsDrmService();