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

DPMS power saving with VGA666 #672

Closed
grigorig opened this issue Oct 17, 2016 · 8 comments
Closed

DPMS power saving with VGA666 #672

grigorig opened this issue Oct 17, 2016 · 8 comments

Comments

@grigorig
Copy link

With the HDMI output, it's possible to enable display power saving signalling with the hdmi_blanking config.txt option. There is no counterpart for DPI displays or the VGA adapter. According to the DPMS standard, it should be enough to disable VSYNC and HSYNC signals to enable the display to go to a sleep mode. Is it possible to implemented this for DPI/VGA?

@popcornmix
Copy link
Contributor

Can you confirm if disabling those signals works?
You should be able to do this by changing the ALT mode of the GPIO from DPI to ouput, e.g. using raspi-gpio.

@grigorig
Copy link
Author

grigorig commented Oct 18, 2016

I can confirm that this works. When I set both VSYNC and HSYNC pins to a regular output and pull them to GND, the monitor gets into standby after a few seconds. If I switch back to alt function 2 (as documented), the display wakes up again. So I have a small C program now which does the job, which is neat.

Is it possible to get this integrated into the console and X blanking so that it Just Works like with HDMI? It would be quite nice if the firmware could handle that. Maybe it can also be handled by the Linux kernel instead.

Edit: for reference, this was discussed for HDMI earlier in raspberrypi/linux#487. The kernel bits that call into the VC firmware were implemented to get HDMI blanking working and the same code should work for DPI. It just needs the firmware support.

@popcornmix
Copy link
Contributor

Can you try this:
https://www.dropbox.com/s/s4rcrap077o2gzp/firmware_blank.zip?dl=0

vcgencmd display_power should affect the default display (hdmi or dpi).
If hdmi_blanking=1 is set in config.txt then the DPMS display blanking should also affect the default display.
(Note: I haven't got a DPI display set up here, so I've only tested by stepping over the code).

@grigorig
Copy link
Author

grigorig commented Oct 18, 2016

That was quick. And it works perfectly fine! Several cycles of automatic blanking as well as xset dpms force off were tested. Manual switching with vcgencmd works, too. Thank you.

@grigorig
Copy link
Author

I just noticed: aren't VGA sync signals active low? So while this may work for my monitor, maybe it is not correct. Let me recheck and test that tomorrow. I'm not even sure what polarity the sync pulses of DPI are, but I can also check that tomorrow.

@popcornmix
Copy link
Contributor

Okay, I'm forcing the lines low. Let me know if you thing forcing high would be better.
(I'd have thought low signals to disable monitor would make more sense as it would happen when source is powered off or disconnected. It may just be "absence of clock", so either would work).

@grigorig
Copy link
Author

grigorig commented Oct 19, 2016

Forcing to high definitely makes more sense. And while I can't find any definite source that says it explicitly, various source seems to imply that forcing the signals to high is correct too, e.g. http://lateblt.tripod.com/bit74.txt

On monitors which automatically go into power-saving mode when they receive no signal, connecting pins 13, 14, and 10 should be all that's needed to bring the monitor out of power-saving mode.

Doing this will force the pins to low, as pin 10 is the sync ground. On CRTs that is then supposed to keep the display from going to sleep. On the other hand it means forcing the pins to high should invoke power saving.

TL;DR please change this to force pins to high, this should be the correct way to do it.

popcornmix added a commit that referenced this issue Oct 20, 2016
kernel: drm/vc4: Fix memory leak of the CRTC state
See: raspberrypi/linux#1677

kernel: BCM270X_DT: Update CM3 to use sdhost interface

firmware: isp: Add isp and isp_ilc to standard Pi variant as a cheap resize
firmware: MMAL: Add parameters to configure source pattern
firmware: IL Camera: Minor tidy up in RGB output handling
firmware: Video_render: Support YV12 and NV21 (YVU formats
firmware: IL Source: Add support for YV12 output (YVU420PackedPlanar)
firmware: IL ISP: Major updates
firmware: mmal_ril: Relay buffer alignment from RIL to MMAL

firmware: ldconfig: Increase line buffer length from 80 to 100

firmware: h264: Fix skipping of SPSX in header bytes
See: https://discourse.osmc.tv/t/video-does-not-work-with-hardware-acceleartion/6629/11

firmware: display: Allow display blanking to affect DPI output
See: #672
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Oct 20, 2016
kernel: drm/vc4: Fix memory leak of the CRTC state
See: raspberrypi/linux#1677

kernel: BCM270X_DT: Update CM3 to use sdhost interface

firmware: isp: Add isp and isp_ilc to standard Pi variant as a cheap resize
firmware: MMAL: Add parameters to configure source pattern
firmware: IL Camera: Minor tidy up in RGB output handling
firmware: Video_render: Support YV12 and NV21 (YVU formats
firmware: IL Source: Add support for YV12 output (YVU420PackedPlanar)
firmware: IL ISP: Major updates
firmware: mmal_ril: Relay buffer alignment from RIL to MMAL

firmware: ldconfig: Increase line buffer length from 80 to 100

firmware: h264: Fix skipping of SPSX in header bytes
See: https://discourse.osmc.tv/t/video-does-not-work-with-hardware-acceleartion/6629/11

firmware: display: Allow display blanking to affect DPI output
See: raspberrypi/firmware#672
@grigorig
Copy link
Author

The updated firmware forces the signals high as expect and works fine. Thanks again!

neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
kernel: drm/vc4: Fix memory leak of the CRTC state
See: raspberrypi/linux#1677

kernel: BCM270X_DT: Update CM3 to use sdhost interface

firmware: isp: Add isp and isp_ilc to standard Pi variant as a cheap resize
firmware: MMAL: Add parameters to configure source pattern
firmware: IL Camera: Minor tidy up in RGB output handling
firmware: Video_render: Support YV12 and NV21 (YVU formats
firmware: IL Source: Add support for YV12 output (YVU420PackedPlanar)
firmware: IL ISP: Major updates
firmware: mmal_ril: Relay buffer alignment from RIL to MMAL

firmware: ldconfig: Increase line buffer length from 80 to 100

firmware: h264: Fix skipping of SPSX in header bytes
See: https://discourse.osmc.tv/t/video-does-not-work-with-hardware-acceleartion/6629/11

firmware: display: Allow display blanking to affect DPI output
See: raspberrypi#672
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