Change video mode of framebuffer console

When I boot up TX2 with HDMI output disconnected, I’m getting the following video mode on /dev/fb0:

albertr@tx2:~$ dmesg | grep hdmi
[ 1.196527] vdd-hdmi: 5000 mV
[ 1.735103] tegradc 15210000.nvdisplay: hdmi: no prod_list_hdmi_board, use default range

root@tx2:~# cat /sys/class/graphics/fb0/modes
U:640x480p-60
root@tx2:~# cat /sys/class/graphics/fb0/mode
U:640x480p-60
root@tx2:~# cat find /sys -name edid
No EDID
root@tx2:~#

After attaching the HDMI output of TX2 to another SOC computer board:

[ 394.693406] tegradc 15210000.nvdisplay: hdmi: pclk:26154K, set prod-setting:prod_c_54M
[ 396.731054] tegradc 15210000.nvdisplay: hdmi: plugged

root@tx2:~# cat /sys/class/graphics/fb0/modes
U:720x400p-70
V:640x480p-60
V:800x600p-56
V:800x600p-60
V:1024x768p-60
S:1280x720p-60
S:1280x800p-60
S:1280x960p-60
D:1280x720p-60
D:720x480p-59
U:1280x720p-60
U:1280x720p-30
U:720x480p-59
U:1280x720p-50
U:720x576p-50
U:1280x720p-60
U:1280x720p-30

root@tx2:~# cat /sys/class/graphics/fb0/mode
U:720x400p-70

root@tx2:~# cat find /sys -name edid
00 ff ff ff ff ff ff 00 06 d4 00 00 00 00 00 00
00 16 01 03 81 46 27 78 0a 32 30 a1 54 52 9e 26
0a 49 4b a3 08 00 81 c0 81 00 01 01 81 40 01 01
01 01 01 01 01 01 00 00 00 ff 00 31 32 33 34 35
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 fc 00 33
44 52 0a 20 20 20 20 20 20 20 20 20 00 00 00 fd
00 38 4b 20 44 11 00 0a 20 20 20 20 20 20 01 b2
02 03 1a 70 46 04 3e 03 13 12 11 26 15 07 50 09
07 01 67 03 0c 00 10 00 00 1e 01 1d 00 72 51 d0
1e 20 6e 28 55 00 c4 8e 21 00 00 1e 8c 0a d0 8a
20 e0 2d 10 10 3e 96 00 c4 8e 21 00 00 18 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 62
root@tx2:~#

I’d like to force 1280x720p-30 mode by default, but then I do it after system is already booted up with fbset like the following:

echo U:1280x720p-30 > /sys/class/graphics/fb0/mode

The video output becomes very slow and sluggish… How can I troubleshoot it? Why by default without having EDID it comes up with U:640x480p-60 mode? Why it negotiates to U:720x400p-70 mode instead of U:1280x720p-30? Can it be changed?

-albertr

What is “prod_c_54M” and can it be changed?

-albertr

Here’s my EDID timing description as decoded by http://www.edidreader.com/:

Detailed Timing Descriptor
Pixel Clock: 74.25MHz
Horizontal Active: 1280
Horizontal Blanking: 370
Vertical Active: 720
Vertical Blanking: 30
Horizontal Sync Offset: 110
Horizontal Sync Pulse: 40
Vertical Sync Offset: 5
Vertical Sync Pulse: 5
Horizontal Display Size: 708
Vertical Display Size: 398
Horizontal Border: 0
Vertical Border: 0
Interlaced: false
Stereo Mode: 0
Sync Type: 3

-albertr

Please blank your monitor everytime you want to reconfigure and then change the mode. Below command

sudo -s
echo 4 > /sys/class/graphcis/fb0/blank #monitor should be off
echo U:1280x720p-30 > /sys/class/graphics/fb0/mode
echo 0 > /sys/class/graphcis/fb0/blank #monitor should be on again

Thanks Wayne, I’ve tried to blank console before changing the mode, but I didn’t help - still getting very slow and sluggish refresh rate @ 720p-30 mode. It feels about 1 frame per second instead of 30 fps.
I’m using nvoverlaysink with the following gsreamer pipeline to test it:

$PREFIX/bin/gst-launch-1.0 v4l2src device=/dev/video0 io-mode=2 ! ‘video/x-raw, width=1280, height=720, framerate=30/1’ ! nvoverlaysink -e -vvv --gst-debug-no-color=1

However, if I change mode back to U:720x400p-70, the same video is being played fine. Let me know if you have any ideas what it could be…

-albertr

albertr,

May I ask can you see this mode in list when you use Gnome GUI or xrandr setting?

I think there’s some issues with 30 FPS support in the HDMI signal grabber on that SOC board I’m using to capture the HDMI output from TX2. I have switched from 30 FPS over to 60 FPS (echo U:1280x720p-60 > /sys/class/graphics/fb0/mode), and it seems to be running fine since then. Thank you for your help, but it looks like the issue is on the other side.

-albertr