Project

General

Profile

Actions

Bug #1039

closed

omxplayer changes resolution on 5" HDMI displays

Added by Hammel 7 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Immediate
Assignee:
Target version:
Start date:
21 Sep 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

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

Related to PiBox - Feature #1038: Integrate touchscreen support for new displays.ClosedHammel16 Sep 2023

Actions
Actions #1

Updated by Hammel 7 months ago

  • Related to Feature #1038: Integrate touchscreen support for new displays. added
Actions #2

Updated by Hammel 7 months ago

  • Description updated (diff)
Actions #3

Updated by Hammel 7 months ago

  • Description updated (diff)
Actions #4

Updated by Hammel 7 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

The easiest solution to doing this:

  1. Add scripts for each display that needs it, re: any that has an ${MANUFACTURER}${MODEL} set in /etc/ts/edid.
    1. Scripts go under /usr/share/pibox/scripts as RESETDisplay-${MANUFACTURER}${MODEL}.
  2. Apps that need this check for /etc/ts/edid.
    1. If there, loads value
    2. if ( exists(/usr/share/pibox/scripts/${MANUFACTURER}${MODEL} ) then run it
    3. else do what they used to do.
  3. Apps that need this
    1. Anything that runs omxplayer video when that program exits
    2. 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.

Actions #5

Updated by Hammel 7 months ago

  • Severity changed from 02 - High to 01 - Critical
Actions #6

Updated by Hammel 7 months 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.

Actions

Also available in: Atom PDF