Raspberry Pi and 4k @ 15Hz


96 posts   Page 1 of 4   1, 2, 3, 4
by Demodude123 » Wed Jun 11, 2014 6:21 pm
Hello Raspberry Pi Forum members! I have managed to get 3840 x 2160 (4k x 2k) at 15Hz on a Seiki E50UY04 working under two distributions on the Raspberry Pi :D . (Latest Wheezy/Openelec). The television shows it is receiving this resolution and hertz level, and it looks very crisp. The only other goal I have with this is getting the Pi to playback video at 4k with Openelec. I am having issues where the video is not playing and the timebar freezing after speeding through a few seconds. Openelec can see that the file I am trying to run is in 4k (It has a symbol that says 4k where it displays the resolution of the video). Any other video I have tried works just like they would on a normal television. Other than this, looking at pictures are crisp and the terminal in wheezy is stunningly sharp, and X looks nice except for the text, which probably isn't scaled for 4k.
So if you want to get 4k on your pi, I have my config.txt posted below running the latest raspberry pi firmware as of this post, which has support for custom HDMI output resolutions (HDMI_CVT arguments).

This is my config.txt for wheezy:
Code: Select all
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
overscan_left=-150
overscan_right=-150
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=3840
#framebuffer_height=2160

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=87

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# for more options see http://elinux.org/RPi_config.txt
hdmi_ignore_edid=0xa5000080
hdmi_cvt 3840 2160 15

And here is my config.txt for Openelec:
Code: Select all
################################################################################
#      This file is part of OpenELEC - http://www.openelec.tv
#      Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#      Inspired and partly copied from:
#  http://youresuchageek.blogspot.fr/2012/09/howto-raspberry-pi-openelec-on.html
#
#  OpenELEC is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 2 of the License, or
#  (at your option) any later version.
#
#  OpenELEC is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with OpenELEC.  If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Bootloader configuration - config.txt
################################################################################

################################################################################
# Memory (System/GPU configuration )
################################################################################

# default GPU memory split (do not change if you do not know what you are doing)
  gpu_mem=128

# SDRAM size based GPU memory split, uncomment and setup to override 'gpu_mem'
# gpu_mem_256=128
# gpu_mem_512=128

################################################################################
# Overclocking settings
# WARNING: Do not change/enable if you do not know what you are doing!
#          The System may become unstable or you can have data corruption or
#          you can loose your warranty if you set wrong settings
#
# please read: http://elinux.org/RPi_config.txt#Overclocking_configuration
################################################################################

# Overclock mode settings.
#
# default recommended values are: arm_freq | core_freq | sdram_freq | over_voltage
# no overclocking               :    700   |    250    |    400     |      0
# mode 'Modest'                 :    800   |    300    |    400     |      0
# mode 'Medium'                 :    900   |    333    |    450     |      2
# mode 'High'                   :    950   |    450    |    450     |      6
# mode 'Turbo'                  :   1000   |    500    |    500     |      6

# arm_freq=700
# core_freq=250
# sdram_freq=400
# over_voltage=0

# set to 'force_turbo=1' to disable dynamic overclocking (you can lose your warranty!)
  force_turbo=0

# If you have any data corruption using Turbo Mode and overclocking
# try with this setting uncommented
# If this still fails, try to use Medium mode without "over_voltage=2"
# If it ultimately keeps failing, forget about this until it gets fixed
# Use a more conservative mode that will works fine in any cases:
# initial_turbo=30

################################################################################
# Overscan settings
################################################################################

# Make display smaller to stop text spilling off the screen
# see also http://www.raspberrypi.org/phpBB3/viewtopic.php?f=67&t=15700
# overscan_scale=1
# disable_overscan=1

# Adapt overscan values to your needs
# overscan_left=57
# overscan_right=59
# overscan_top=20
# overscan_bottom=20

################################################################################
# various settings see also: http://elinux.org/RPi_config.txt
################################################################################

# Force HDMI even if unplugged or powered off
# hdmi_force_hotplug=1

# Doesn't sent initial active source message.
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
# rebooting.
  hdmi_ignore_cec_init=1
#framebuffer_width=3840
#framebuffer_height=2160
hdmi_ignore_edid=0xa5000080
hdmi_cvt 3840 2160 15
################################################################################
# License keys to enable GPU hardware decoding for various codecs
# to obtain keys visit the shop at http://www.raspberrypi.com
################################################################################

# decode_MPG2=0x00000000
# decode_WVC1=0x00000000
# decode_DTS=0x00000000
# decode_DDP=0x00000000

################################################################################
# End of default configuration
# all values below this line were inserted from config.txt.bk (your old config)
# and can be merged with the above values
################################################################################

So try them out for yourself, and hopefully you can output 4k with your Raspberry Pi! Any help with getting 4k playback on the Raspberry Pi would be great!
Thanks,
Demodude123
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by dom » Wed Jun 11, 2014 6:44 pm
Interesting. Can you get 3840 x 2160 @ 24Hz?

You may need to increase the hdmi pixel clock limit. It defaults to 163682864. Perhaps try
hdmi_pixel_freq_limit=400000000

I think the framebuffer resolution gets limited to something like 1920x1200, although it may be possible to remove that limit. What does fbset report?
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Wed Jun 11, 2014 7:30 pm
dom wrote:Interesting. Can you get 3840 x 2160 @ 24Hz?

You may need to increase the hdmi pixel clock limit. It defaults to 163682864. Perhaps try
hdmi_pixel_freq_limit=400000000

I think the framebuffer resolution gets limited to something like 1920x1200, although it may be possible to remove that limit. What does fbset report?

I am getting some pretty weird results with changing the hertz to 24 and adding that pixel freq limit. Just setting the Hertz to 24 in my config.txt is making Openelec be set to 1920x1080 @ 24Hz, and with the line you provided makes it 4k @ 13Hz.
Here is my fbset(ssh'ed to get it, hope that isn't effecting the results) with the pixel freq limit, which is also the same when that is off:
    OpenELEC:~ # fbset

    mode "1x1-0"
    # D: 0.000 MHz, H: 0.000 kHz, V: 0.000 Hz
    geometry 1 1 1 1 32
    timings 0 0 0 0 0 0 0
    accel false
    rgba 8/0,8/8,8/16,8/24
    endmode
I will try different Hz levels, such as 30fps.
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by Demodude123 » Wed Jun 11, 2014 7:43 pm
Ok, I tried out 4k @ 30Hz on Openelec with and without hdmi_pixel_freq_limit=400000000. Without it, I got an output of 1920x1080 @ 24Hz and with it I got no picture past the opening logo, which always appears at 1920x1080 @ 60Hz. It is very weird how it is coming up with 24Hz when I enter 30Hz and 13Hz when I enter 24Hz, but is just fine at 15Hz.
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by dom » Wed Jun 11, 2014 9:06 pm
Can you try running rpi-update, and include this in config.txt
Code: Select all
hdmi_group=2
hdmi_mode=87
hdmi_cvt 3840 2160 24
max_framebuffer_width=3840
max_framebuffer_height=2160
hdmi_pixel_freq_limit=400000000

If 24Hz doesn't work, then try 15.

I don't have a display that can handle this, but I get a big framebuffer:
Code: Select all
mode "3840x2160"
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Mon Jun 16, 2014 10:30 pm
dom wrote:Can you try running rpi-update, and include this in config.txt
Code: Select all
hdmi_group=2
hdmi_mode=87
hdmi_cvt 3840 2160 24
max_framebuffer_width=3840
max_framebuffer_height=2160
hdmi_pixel_freq_limit=400000000

If 24Hz doesn't work, then try 15.

I don't have a display that can handle this, but I get a big framebuffer:
Code: Select all
mode "3840x2160"

Under Openelec, I can't upgrade the firmware (Using Openelec 4.04), at least with an ssh connection. It works with all those settings @ 15Hz, but I don't notice any difference using openelec with those settings compared to what I had before. I can try this in Raspbian, but my primary goal was to get it working with Openelec for video playback, which I have achieved all but playback. @ 24Hz the monitor says in it's exact words "Not Support" but comes up fine @ 15. Should I install NOOBS and have a dual boot of Openelec and Rasbian so you can see how both react to these changes?

Edit: There is a new update to openelec that updates the firmware (4.0.5), I could update to that to see if that changes anything
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by dom » Tue Jun 17, 2014 12:31 am
OpenELEC 4.0.5 should include this firmware, so you can try the config.txt settings.

However I'm more interested in raspbian. Run:
Code: Select all
sudo rpi-update && sudo reboot

on your raspbian install, after adding settings to config.txt and see if you get a usable framebuffer.

Realistically, video decode and 3D is not going to handle 4K, so at best you will get a 1080p GUI and 1080p video upscaled by the Pi to 4K. It's unlikely to look any better than a 1080p image.
However there is a chance a real 4K framebuffer will work with raspbian, so you may be able to run X or other console apps at 4K resolution. That is an interesting feature.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Wed Jun 18, 2014 11:49 pm
dom wrote:OpenELEC 4.0.5 should include this firmware, so you can try the config.txt settings.

However I'm more interested in raspbian. Run:
Code: Select all
sudo rpi-update && sudo reboot

on your raspbian install, after adding settings to config.txt and see if you get a usable framebuffer.

Realistically, video decode and 3D is not going to handle 4K, so at best you will get a 1080p GUI and 1080p video upscaled by the Pi to 4K. It's unlikely to look any better than a 1080p image.
However there is a chance a real 4K framebuffer will work with raspbian, so you may be able to run X or other console apps at 4K resolution. That is an interesting feature.

Oh boy am I excited! The text got really small when I changed the config, and it is now in native 4k!!!! X now looks sharp unlike before, which i'm guessing is because before the framebuffer was still set to 1920x1080. Everything is so tiny in 4k! I am running NOOBS with a dual boot of Openelec and Raspbian. I did the rpi-update just like you said and made sure all the commands were in place. I'm pretty sure the only difference that was needed to fully get 4k was the framebuffer, I'll try and do some more experimenting around with the settings. (I got it working @15Hz at the moment). I'm going to have to try this out with Openelec, but it works!
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by dom » Thu Jun 19, 2014 12:23 am
Great!
A picture of X running at 4K would be good to see (or even a YouTube video).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Thu Jun 19, 2014 1:31 am
dom wrote:Great!
A picture of X running at 4K would be good to see (or even a YouTube video).

I did a scrot to get a screenshot of X, but much to my surprise, the resolution only came out to be @ 3792 x 2128. I'm questioning if the issue is that of scrots capturing or maybe it really isn't truly 4k.
Image
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by dom » Thu Jun 19, 2014 3:01 pm
Demodude123 wrote:
dom wrote:Great!
I did a scrot to get a screenshot of X, but much to my surprise, the resolution only came out to be @ 3792 x 2128. I'm questioning if the issue is that of scrots capturing or maybe it really isn't truly 4k.


Add:
disable_overscan=1

to config.txt to get 3840x2160 (which is full 4K).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Thu Jun 19, 2014 6:32 pm
dom wrote:
Demodude123 wrote:
dom wrote:Great!
I did a scrot to get a screenshot of X, but much to my surprise, the resolution only came out to be @ 3792 x 2128. I'm questioning if the issue is that of scrots capturing or maybe it really isn't truly 4k.


Add:
disable_overscan=1

to config.txt to get 3840x2160 (which is full 4K).

I see, I didn't realize that by default, NOOBS has overscan enabled. After I commented out all of the overscan lines and disabled it with the line you provided, I get full 4K of 3840x2160. When I said "isn't truly 4k", I had meant it as in the Pi isn't really outputting at 4k (3840x2160), but my monitor is seeing that as the output resolution, in which that was the case due to overscan being enabled. I have a full 4k picture of the Pi running at 4k. I would also like to note that I have gotten the Pi to work with 4k @ 20Hz, but still nothing with 24 or 30. I know for a fact that the TV says "Not Support" at 30Hz, which is odd, since the TV supports 30Hz. For anyone who wants to see this picture below at 4k, be sure to right click the image and open it in a new tab. I found that zooming in one click in Chrome on a 1920x1080 monitor gives it a nice look to understand how great 4k is, especially for a desktop environment.

Image
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by jamesh » Thu Jun 19, 2014 7:53 pm
You could get a LOT of terminals on that desktop!

Nice job!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 16715
Joined: Sat Jul 30, 2011 7:41 pm
by mimi123 » Thu Jun 26, 2014 6:46 pm
At turbo mode and increasing the pixel clock limit, I got 4K@50hz!!!
But I view that the VPU is running at full tilt.
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm
by dom » Thu Jun 26, 2014 9:12 pm
mimi123 wrote:At turbo mode and increasing the pixel clock limit, I got 4K@50hz!!!
But I view that the VPU is running at full tilt.


Cool. If someone want to make a Youtube video of the Pi doing some desktop stuff at 4K we'd be interested. Might make a blog post.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Thu Jun 26, 2014 9:51 pm
dom wrote:
mimi123 wrote:At turbo mode and increasing the pixel clock limit, I got 4K@50hz!!!
But I view that the VPU is running at full tilt.


Cool. If someone want to make a Youtube video of the Pi doing some desktop stuff at 4K we'd be interested. Might make a blog post.

Correct me if I'm wrong, but I thought that HDMI was limited to 4k @ 30Hz with the latest version of HDMI, I'm curious on how you are achieving it at 50Hz.
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by mimi123 » Fri Jun 27, 2014 6:40 am
Demodude123 wrote:
dom wrote:
mimi123 wrote:At turbo mode and increasing the pixel clock limit, I got 4K@50hz!!!
But I view that the VPU is running at full tilt.


Cool. If someone want to make a Youtube video of the Pi doing some desktop stuff at 4K we'd be interested. Might make a blog post.

Correct me if I'm wrong, but I thought that HDMI was limited to 4k @ 30Hz with the latest version of HDMI, I'm curious on how you are achieving it at 50Hz.

That is for HDMI revisions before 1.4.
On HDMI 1.4 and more , 4K support is not mandatory but it's possible.
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm
by Demodude123 » Fri Jun 27, 2014 10:13 am
mimi123 wrote:That is for HDMI revisions before 1.4.
On HDMI 1.4 and more , 4K support is not mandatory but it's possible.

Ok, I wasn't sure if 4k TV's with HDMI 2.0 had come out yet, but I see they have. Thanks for clarifying that. When I was testing with 4k, I remember reading a lot of articles saying anything over 30Hz wouldn't be ready until 4k TV's had a newer version of HDMI.
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by Bakul Shah » Mon Jul 07, 2014 5:54 pm
dom wrote:Interesting. Can you get 3840 x 2160 @ 24Hz?

You may need to increase the hdmi pixel clock limit. It defaults to 163682864. Perhaps try
hdmi_pixel_freq_limit=400000000

What is the highest supported pixel clock frequency? On plan9 I can get "4k" @20Hz but at 24Hz the display seems to turn itself off ever few seconds. It is stable during those few seconds though. Thanks.
Posts: 297
Joined: Sun Sep 25, 2011 1:25 am
by dom » Tue Jul 08, 2014 3:41 pm
Bakul Shah wrote:What is the highest supported pixel clock frequency? On plan9 I can get "4k" @20Hz but at 24Hz the display seems to turn itself off ever few seconds. It is stable during those few seconds though. Thanks.


Officially it's 162MHz, but like most clocks on the Pi you can overclock it (using hdmi_pixel_freq_limit). At what frequency it will really fail at, I can't say (and will probably depend on the specific pi and display).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by mimi123 » Wed Jul 23, 2014 8:53 pm
Bakul Shah wrote:
dom wrote:Interesting. Can you get 3840 x 2160 @ 24Hz?

You may need to increase the hdmi pixel clock limit. It defaults to 163682864. Perhaps try
hdmi_pixel_freq_limit=400000000

What is the highest supported pixel clock frequency? On plan9 I can get "4k" @20Hz but at 24Hz the display seems to turn itself off ever few seconds. It is stable during those few seconds though. Thanks.

Run the Pi at turbo mode . And get more than the mythical barrier of 30Hz.
Posts: 583
Joined: Thu Aug 22, 2013 3:32 pm
by dom » Wed Jul 23, 2014 10:28 pm
mimi123 wrote:Run the Pi at turbo mode . And get more than the mythical barrier of 30Hz.


Yes, increased sdram_freq and core_freq will help. Also try:
Code: Select all
hvs_priority=0x32ff


which gives the HVS (hardware video scaler) higher priority access to sdram which may help with dropouts.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Tue Jul 29, 2014 5:45 pm
Ok, so getting back into the swing of things with 4k, I was trying to get omxplayer to run a sample video (Skyfall Trailer) at 4K off of an SD card. Omxplayer realized the resolution of the video being 4k, and the videos framerate, but stopped there. It can play another sample video I had at 1280x534 fine at the 15Hz, but nothing appears with 4k. I am assuming that omxplayer doesn't support 4k, or just isn't able to adapt to displaying that many pixels. Is there any other type of video player that I can test that runs as smooth as omxplayer does? Thanks.
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm
by dom » Tue Jul 29, 2014 10:06 pm
Demodude123 wrote:Ok, so getting back into the swing of things with 4k, I was trying to get omxplayer to run a sample video (Skyfall Trailer) at 4K off of an SD card. Omxplayer realized the resolution of the video being 4k, and the videos framerate, but stopped there. It can play another sample video I had at 1280x534 fine at the 15Hz, but nothing appears with 4k. I am assuming that omxplayer doesn't support 4k, or just isn't able to adapt to displaying that many pixels. Is there any other type of video player that I can test that runs as smooth as omxplayer does? Thanks.


Yes, the video hardware in the Pi was designed for 1920x1080 max.
You won't be able to play 4K videos.

If you really wanted to try, you could attempt playing 4 1920x1080 videos concurrently using the --win option of omxplayer to tile them together on screen.
But I suspect you will run out of memory and CPU.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5041
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Demodude123 » Tue Aug 19, 2014 3:16 pm
Ok, I have Openelec running in 4k at 18Hz (not overclocked), but I noticed I wasn't getting any sound through HDMI to my TV. I went back down to 1920x1080 and sound came out of my television. I also tried forcing audio in the config file to the TV, but that attempt was unsuccessful. Is there any reason why sound isn't coming through a 4k signal from the Pi? What are your thoughts?
Posts: 16
Joined: Wed Jun 11, 2014 5:57 pm