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

Display Control (Sleep display, CEC Commands, blank display, screensaver time) #19

Open
andiohn opened this issue Jul 18, 2024 · 12 comments
Labels
question Further information is requested
Milestone

Comments

@andiohn
Copy link

andiohn commented Jul 18, 2024

This would be super handy! BTW, I love this.

@debloper
Copy link
Owner

Hey thanks for filing the issues (and for using PiOSK)... glad you like it!

I'm looking into HDMI/CEC - rather, looking into how to make it use as a trigger to control processes. If I understand this correctly, you want to use a consumer remote control to control (some aspects of) PiOSK, right?

@debloper
Copy link
Owner

Did some preliminary research. As this is HDMI-only solution, might have to add this as an optional addon on the dashboard page to enable on demand. Will need cec-utils for the cec-client tool.

This request seems very similar to how chilipie-kiosk have these features implemented.

@debloper debloper added this to the v3.0.0 milestone Jul 23, 2024
@debloper
Copy link
Owner

Here's a gist on HDMI/CEC: https://gist.github.com/rmtsrc/dc35cd1458cd995631a4f041ab11ff74
And an excellent 'playground' to simulate HDMI/CEC commands: https://www.cec-o-matic.com/

@debloper debloper modified the milestones: v3.0.0, .NEXT Jul 29, 2024
@andiohn
Copy link
Author

andiohn commented Jul 30, 2024

I used another one that would trigger the display to sleep using the wayfire commands, but it wouldn't have the browser fullscreen when coming back from suspend. If we used this method, it would work with all inputs? Might be a better way?

@andiohn andiohn changed the title Scheduled Tasks section (Reboot, CEC Turn off Display, CEC Turn on Display) Display Control (Sleep display, CEC Commands, blank display, screensaver time) Jul 30, 2024
@debloper
Copy link
Owner

debloper commented Aug 1, 2024

It usually lakes less half a minute to start the kiosk mode... isn't it better just to shutdown when not needed and restart when the kiosk mode is needed?

Any specific reason or benefit to specifically turn off the display or send device to sleep?

I'm trying to ratify the implementation details between this issue and #28, and I think I need some clarity on the requirement. I am not accustomed to using TV/remote as part of my daily life, so I may be missing something obvious here; in that case please let me know.

@debloper debloper added the question Further information is requested label Aug 1, 2024
@andiohn
Copy link
Author

andiohn commented Oct 3, 2024

Hey @debloper, the reason for the CEC commands is then we can control the TV. Currently one of my signs is running 6 websites, it would be nice to have it turn on and off the TV just with a couple commands. If we have a scheduling type system, we should add 'turn on hdmi 1 display with CEC' and 'turn off hdmi 1 display with CEC' as options.

Here's another idea. Use something like the result here? WayfireWM/wayfire#455

@andiohn
Copy link
Author

andiohn commented Oct 9, 2024

@andiohn
Copy link
Author

andiohn commented Oct 9, 2024

Ok, so according to this (raspberrypi/bookworm-feedback#67) I tried the following commands and it worked well.

export WAYLAND_DISPLAY=wayland-1
wlr-randr --output HDMI-A-1 --off
wlr-randr --output HDMI-A-1 --on

but now we need to the specify the resolution some how. But It's close.

@andiohn
Copy link
Author

andiohn commented Oct 9, 2024

Ok, this works great, however now I need to trigger pressing F11 after setting the mode. That's the only issue right now.

You send the on command and then the mode command

wlr-randr --output HDMI-A-1 --mode 1920x1080@60

@andiohn
Copy link
Author

andiohn commented Oct 9, 2024

It does go back to full screen but not in F11 mode. I'm thinking of scheduling the turn off the screen at like 10pm and then trigger the reboot to 6 in the morning and see if that does it

@debloper
Copy link
Owner

however now I need to trigger pressing F11 after setting the mode
It does go back to full screen but not in F11 mode

You should be able to use wtype to send FK11 (iirc, not entirely sure about the key name & their documentation is weak) to go back to F11 fullscreen mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants