User avatar
Pekka
Posts: 20
Joined: Mon Nov 19, 2012 4:11 pm

Force HDMI mode stopped working

Mon May 26, 2014 6:46 pm

Hello,

after last firmware update (c889591258e0eafeae94915101cc3a5f20c6080a via rpi-update) my Raspberry Pi started ignoring the hdmi_mode and hdmi_group settings in /boot/config.txt.
It is (as it has been for the last year or so) connected to a LG LN5758 TV via HDMI and happily worked in HDMI CEA mode 4 (1280x720 @ 60Hz 16:9, 74 MHz progressive) before the update.

In config.txt it has (and this has not changed):

Code: Select all

hdmi_group=1
hdmi_mode=4
yet now when it boots, "tvservice -s" yields:

Code: Select all

state 0x12001a [HDMI CEA (16) RGB lim 16:9], 1920x1080 @ 60.00Hz, progressive
Setting other supported CEA modes seems to be ignored as well. Setting other HDMI-related config.txt options (hdmi_drive, hdmi_force_hotplug, hdmi_ignore_edid, hdmi_ignore_cec, etc.) does not seem to solve it.
"tvservice -m CEA" reports:

Code: Select all

Group CEA has 15 modes:
           mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive 
           mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive 
           mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive 
           mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive 
           mode 5: 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced 
  (prefer) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive 
           mode 17: 720x576 @ 50Hz 4:3, clock:27MHz progressive 
           mode 18: 720x576 @ 50Hz 16:9, clock:27MHz progressive 
           mode 19: 1280x720 @ 50Hz 16:9, clock:74MHz progressive 
           mode 20: 1920x1080 @ 50Hz 16:9, clock:74MHz interlaced 
           mode 21: 720x576 @ 50Hz 4:3, clock:27MHz x2 interlaced 
  (native) mode 31: 1920x1080 @ 50Hz 16:9, clock:148MHz progressive 
           mode 32: 1920x1080 @ 24Hz 16:9, clock:74MHz progressive 
           mode 33: 1920x1080 @ 25Hz 16:9, clock:74MHz progressive 
           mode 34: 1920x1080 @ 30Hz 16:9, clock:74MHz progressive 
Any idea about how to again force the CEA mode 4? (BTW: forcing a DMT mode works, but the TV does not support any viewable ones.)

sugatam
Posts: 19
Joined: Sat Sep 01, 2012 7:06 pm

Re: Force HDMI mode stopped working

Thu May 29, 2014 3:59 am

I have exactly the same problem. My setting of CEA mode 4 is being ignored on bootup, and mode 2 is being used instead. A tvservice -e "CEA 4 HDMI" fixes it, but it is annoying to have to explicitly run it after bootup.

User avatar
Pekka
Posts: 20
Joined: Mon Nov 19, 2012 4:11 pm

Re: Force HDMI mode stopped working

Thu May 29, 2014 5:14 am

If I do tvservice -e "CEA 4 HDMI" after bootup I only get a black screen in X and a garbled-up console.
I would really appreciate if someone explained what's going on and how to revert the behaviour to what it was before it got broken.

User avatar
rpdom
Posts: 14772
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Force HDMI mode stopped working

Thu May 29, 2014 8:04 am

I don't know what is causing this or how to fix it, but I can tell you how you should be able to get your display working again after the tvservice command.

You'll probably have to type some of these commands "blind", so maybe put them in a script with the tvservice command.

Code: Select all

tvservice -e "CEA 4 HDMI"
fbset -depth 8
fbset -depth 16 -xres 1280 -vxres 1280 -yres 720 -vres 720
xrefresh
That will reset the frame buffer resolution (and fix the console), and the xrefresh will redraw the desktop and apps at the new resolution. xrefresh will need to be run in an Lxterminal or similar session. The other could be run on the console.

trickiedick
Posts: 4
Joined: Sun Jan 13, 2013 12:49 pm

Re: Force HDMI mode stopped working

Thu May 29, 2014 3:07 pm

It's a "Me too" from me as well on this one. Looking at the /boot folder on a cards that will show 720p and on one that wont:

The one that wont show 720p has had a recent firmware update - so shows dates of 28/05/2014.
The one that will show 720p has dates of 07/01/2014

I'd say this is a firmware bug - should I post this on the Github?


dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5288
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Force HDMI mode stopped working

Thu May 29, 2014 3:33 pm

There has been a change in behaviour of hdmi_group/hdmi_mode.

Previously they removed all other modes from the supported list.
This meant you could never subsequently switch to another mode, which might be useful in xbmc to match framerate when playing a video.

Now, it just adjusts the preferred mode to the one given. All other modes are available to switch to with tvservice, but the one chosen for boot should be the on you requested.
If you are not getting this, then that needs investigation.

There is a new option:
hdmi_force_mode=1

which gives the old behaviour of removing all other modes. Does this restore desired behaviour?

Even if that works, I'd like to understand why you aren't getting the desired mode without this.
Post output to the questions asked on the linked github issue.

trickiedick
Posts: 4
Joined: Sun Jan 13, 2013 12:49 pm

Re: Force HDMI mode stopped working

Fri May 30, 2014 9:09 am

Yes - thanks - it seems a firmware bug has been located and fixed for the next release, but for now hdmi_force_mode=1 Works just fine for me.

User avatar
Pekka
Posts: 20
Joined: Mon Nov 19, 2012 4:11 pm

Re: Force HDMI mode stopped working

Fri May 30, 2014 11:42 am

I can confirm that setting hdmi_force_mode=1 restores the behaviour before the update.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5288
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: Force HDMI mode stopped working

Fri May 30, 2014 4:51 pm

Can you run rpi-update and confirm this works without hdmi_force_mode=1

User avatar
Pekka
Posts: 20
Joined: Mon Nov 19, 2012 4:11 pm

Re: Force HDMI mode stopped working

Fri May 30, 2014 5:39 pm

dom wrote:Can you run rpi-update and confirm this works without hdmi_force_mode=1
It does.

Code: Select all

[email protected]:~$ tvservice -s
state 0x12001a [HDMI CEA (4) RGB lim 16:9], 1280x720 @ 60.00Hz, progressive
[email protected]:~$ tvservice -m CEA
Group CEA has 15 modes:
           mode 1: 640x480 @ 60Hz 4:3, clock:25MHz progressive 
           mode 2: 720x480 @ 60Hz 4:3, clock:27MHz progressive 
           mode 3: 720x480 @ 60Hz 16:9, clock:27MHz progressive 
  (prefer) mode 4: 1280x720 @ 60Hz 16:9, clock:74MHz progressive 
           mode 5: 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced 
  (native) mode 16: 1920x1080 @ 60Hz 16:9, clock:148MHz progressive 
           mode 17: 720x576 @ 50Hz 4:3, clock:27MHz progressive 
           mode 18: 720x576 @ 50Hz 16:9, clock:27MHz progressive 
           mode 19: 1280x720 @ 50Hz 16:9, clock:74MHz progressive 
           mode 20: 1920x1080 @ 50Hz 16:9, clock:74MHz interlaced 
           mode 21: 720x576 @ 50Hz 4:3, clock:27MHz x2 interlaced 
  (native) mode 31: 1920x1080 @ 50Hz 16:9, clock:148MHz progressive 
           mode 32: 1920x1080 @ 24Hz 16:9, clock:74MHz progressive 
           mode 33: 1920x1080 @ 25Hz 16:9, clock:74MHz progressive 
           mode 34: 1920x1080 @ 30Hz 16:9, clock:74MHz progressive

jviyer
Posts: 30
Joined: Mon Nov 04, 2013 3:48 pm

tvservice command

Fri Jun 13, 2014 3:28 am

I was using the tvservice -p command.
(i was doing this when testing some suggestions for cleaning screen after omxplayer playing some videos)

how do I get back my usual screen (like the terminal windows etc.) ?
(I rebooted, but wanted to know how to avoid this)
Thanks

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Force HDMI mode stopped working

Fri Jun 13, 2014 3:38 am

To reset the framebuffer you can use

Code: Select all

fbset -depth 32; fbset -depth 16

User avatar
rpdom
Posts: 14772
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Force HDMI mode stopped working

Fri Jun 13, 2014 5:34 am

After using fbset to reset the framebuffer size, you can use "xrefresh" to redraw the desktop and all windows.

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Force HDMI mode stopped working

Fri Jun 13, 2014 5:44 am

rpdom wrote:After using fbset to reset the framebuffer size, you can use "xrefresh" to redraw the desktop and all windows.
If you are running the desktop/X11.

User avatar
rpdom
Posts: 14772
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Force HDMI mode stopped working

Fri Jun 13, 2014 6:54 am

AndyD wrote:If you are running the desktop/X11.
I was assuming that was probably the case, because of "like the terminal windows etc.".

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Force HDMI mode stopped working

Fri Jun 13, 2014 8:09 am

rpdom wrote:I was assuming that was probably the case, because of "like the terminal windows etc.".
Hi rpdom,
Yep I understand. It is hard to guess sometimes. I had thought jviyer was describing the terminal on the framebuffer. No offense meant!

User avatar
rpdom
Posts: 14772
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Force HDMI mode stopped working

Fri Jun 13, 2014 8:29 am

AndyD wrote:
rpdom wrote:I was assuming that was probably the case, because of "like the terminal windows etc.".
Hi rpdom,
Yep I understand. It is hard to guess sometimes. I had thought jviyer was describing the terminal on the framebuffer. No offense meant!
No offense taken :)

Also, I could be wrong about the GUI. As you say, it is hard to guess.

jviyer
Posts: 30
Joined: Mon Nov 04, 2013 3:48 pm

Re: Force HDMI mode stopped working

Sat Jun 14, 2014 7:47 pm

thanks for the responses.
Here is what my situation is. <I may not be explaining technical terms well as a noobie but hopefully I can get my situation across>
I will explain my starting:
I have set it up such that on boot it does not go to any "desktop" but invokes xterm (I did this a while ago and since on boot it goes fast, I think that's what it is invoking).
Then I click on my mouse and select "terminal.." and it opens up a simple terminal window. I then do it again and get another terminal.
I also ssh to it from another computer.
Now, at this juncture, on terminal window #1, I typed "/usr/bin/tvservice -p". The screen goes blank.
How do I then get back ? (I have tried the fbset etc from the ssh window but no luck). On the other "blank" window, I can see what I am typing or where I am, so I am not able to do anything.

<why I am doing all this is:
I want to use omxplayer in a script, play video, and when it ends, do a tvservice, play few more videos and then finally display something else on the screen (a python gui script will take control of screen at that point). But I want the transition from omxplayer between videos to call tvservice since I dont want the gui screen displayed.

I hope I have given some backdrop for all this.
Hence, I need to find out how to get back to normalcy after the tvservice. At this time, I can launch videos one after the other. However, I need to know how to recover the screen as well. Thanks
Thanks,

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Force HDMI mode stopped working

Sun Jun 15, 2014 12:46 am

Hi I don't use the Desktop very often (only when I am using the minecraft python api with my son), but I started it up today. This works for me:-

Code: Select all

tvservice -p ; fbset -depth 32 ; fbset -depth 16 ; xrefresh
I tried it with omxplayer as well

Code: Select all

tvservice -p ; omxplayer /opt/vc/src/hello_pi/hello_video/test.h264 ; fbset -depth 32 ; fbset -depth 16 ; xrefresh
this also worked for me

I ran both of these from an LXTerminal on the Desktop.

jviyer
Posts: 30
Joined: Mon Nov 04, 2013 3:48 pm

Re: Force HDMI mode stopped working

Mon Jun 16, 2014 12:38 am

I tried the sequence of commands you have given and it works. !!
just out of curiosity, I tried giving only fbset 32 and it did not work. I had to do both fbset -16 as well like you
have laid out. they are the same command fbset with different arguments so
I was curious why just doing one would not suffice since the latter one in sequence should
override anyway. but since it did not work I am just
using both.
Great, thanks a lot.

User avatar
AndyD
Posts: 2331
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Force HDMI mode stopped working

Mon Jun 16, 2014 2:58 am

I am glad it is now working for you. There is a discussion about why you need to run fbset twice here.

Return to “Troubleshooting”