Bug #1039
closedomxplayer changes resolution on 5" HDMI displays
100%
Description
The Elecrow and GeeekPi 5inch displays i have work fine now but omxplayer will change their resolution for some reason. To get back to the 800x480 default resolution (so the launcher doesn't changes appearance) I need to utilize the following shell commands, either in a script or programmed into picam when omxplayer exits.
#!/bin/bash
cd /opt/vc/bin
./tvservice --off # turn off tv service
./tvservice -e "DMT 87 DVI" # set it on (you will see a black screen)
chvt 5 # change to different virtual terminal
chvt 2 # change back to the previous virtual terminal
fbset -g 800 480 800 480 32 # adjust the size of the framebuffer
xrefresh -black -d unix:0.0
To get the values for "-e" and fbset, just parse the following.
$ /opt/vc/bin/tvservice -s
state 0x6 [DVI DMT (87) RGB full 15:9], 800x480 @ 59.00Hz, progressive
Or I could just strip out the bits I need from tvservice.c
Related issues
Updated by Hammel about 1 year ago
- Related to Feature #1038: Integrate touchscreen support for new displays. added
Updated by Hammel about 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 20
The easiest solution to doing this:
- Add scripts for each display that needs it, re: any that has an ${MANUFACTURER}${MODEL} set in /etc/ts/edid.
- Scripts go under /usr/share/pibox/scripts as RESETDisplay-${MANUFACTURER}${MODEL}.
- Apps that need this check for /etc/ts/edid.
- If there, loads value
- if ( exists(/usr/share/pibox/scripts/${MANUFACTURER}${MODEL} ) then run it
- else do what they used to do.
- Apps that need this
- Anything that runs omxplayer video when that program exits
- Anything that might use DispmanX, possibly.
Unlike other edid files, this script isn't processed by firstboot. It's just installed in the dev system skeleton for each display that needs it and only called directly by apps that need it.
Updated by Hammel about 1 year ago
- Severity changed from 02 - High to 01 - Critical
Updated by Hammel about 1 year ago
- Status changed from In Progress to Closed
- % Done changed from 20 to 100
Implemented and tested on hardware using Elecrow 5" EDID-enabled display. This is the display which caused the need for the RESETDisplay-<> scripts. Test was successful.
Code committed and pushed.
Closing issue.