This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
snippets:linux_4k_output [2015/09/05 07:18] – [modes] chris | snippets:linux_4k_output [2022/11/13 12:06] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== What? ===== | ||
+ | Notes on 4k output on Linux. I use Fedora22. Output is | ||
+ | * mini displayport 1.1a, coming out of a Thinkpad x230 | ||
+ | * adapter cable mini-Displayport to HDMI (Moshi Mini DisplayPort to HDMI Adapter (4K) silver), a second adapter cable behaves identically | ||
+ | * Samsung UE40HU6900S TV, has 3 HDMI ports, all 3 accepting 4k (so apparently HDMI2 capable) | ||
+ | ===== Notes ===== | ||
+ | * First verifying the smallest 4k modes which the TV can display. Here [[http:// | ||
+ | * I was not able to see any 4k modes available when running " | ||
+ | * These can be created manually or with " | ||
+ | < | ||
+ | cvt 3840 2160 13.8 # I added this for testing | ||
+ | cvt 3840 2160 24 | ||
+ | cvt 3840 2160 25 | ||
+ | cvt 3840 2160 30 | ||
+ | cvt 4096 2160 24 | ||
+ | |||
+ | ### example output: | ||
+ | $ cvt 3840 2160 25 | ||
+ | # 3840x2160 24.97 Hz (CVT) hsync: 54.79 kHz; pclk: 278.75 MHz | ||
+ | Modeline " | ||
+ | </ | ||
+ | * Some howtows guide at this point to modify xorg.conf (i.e. creating / | ||
+ | * As I noticed later, the modes from the normal ' | ||
+ | < | ||
+ | ### lets get newest cvt12 which can remove blank lines: | ||
+ | $ wget https:// | ||
+ | $ gcc cvt12.c -O2 -lm -Wall -o cvt12 | ||
+ | $ ./cvt12 3840 2160 25 -b | ||
+ | # 3840x2160 @ 25.000 Hz Reduced Blank (CVT) field rate 25.000 Hz; hsync: 54.850 kHz; pclk: 219.40 MHz | ||
+ | Modeline " | ||
+ | |||
+ | ### now generate modelines for screenmodes which | ||
+ | ### might work out for us | ||
+ | $ for i in 25 30 50 60; do \ | ||
+ | ./cvt12 3840 2160 $i -b >> | ||
+ | $ for i in 24 25 30; do \ | ||
+ | ./cvt12 4096 2160 $i -b >> | ||
+ | |||
+ | ### Now we need to configure Xorg with the modelines. | ||
+ | ### We can paste these xrandr-lines in a terminal. | ||
+ | $ grep Modeline modelines.txt | \ | ||
+ | sed -e ' | ||
+ | xrandr --newmode " | ||
+ | xrandr --newmode " | ||
+ | xrandr --newmode " | ||
+ | xrandr --newmode " | ||
+ | xrandr --newmode " | ||
+ | xrandr --newmode " | ||
+ | xrandr --newmode " | ||
+ | |||
+ | ### Now we need to configure our HDMI1 output for the modes | ||
+ | $ cat modelines.txt |grep Modeline| \ | ||
+ | sed -e ' | ||
+ | xrandr --addmode HDMI1 " | ||
+ | xrandr --addmode HDMI1 " | ||
+ | xrandr --addmode HDMI1 " | ||
+ | xrandr --addmode HDMI1 " | ||
+ | xrandr --addmode HDMI1 " | ||
+ | xrandr --addmode HDMI1 " | ||
+ | xrandr --addmode HDMI1 " | ||
+ | |||
+ | |||
+ | # now start watching the x.org log | ||
+ | tail -f / | ||
+ | |||
+ | ### and set the mode | ||
+ | $ xrandr --output HDMI1 --verbose --mode 3840x2160_13.80 | ||
+ | crtc 1: 3840x2160_13.80 | ||
+ | |||
+ | xorg-log: (--) intel(0): HDMI max TMDS frequency 300000KHz | ||
+ | => This is a mode the intel chip can output, | ||
+ | but the TV can not display | ||
+ | |||
+ | ### setting 4k 25Hz mode successfully: | ||
+ | $ xrandr --output HDMI1 --verbose --mode 3840x2160_25.00_rb | ||
+ | crtc 1: 3840x2160_25.00_rb | ||
+ | xorg-log: (--) intel(0): HDMI max TMDS frequency 300000KHz | ||
+ | => successfully switches the mode to 4k | ||
+ | |||
+ | ### attempting to set 4k 30Hz, not successful: | ||
+ | $ xrandr --output HDMI1 --verbose --mode 3840x2160_30.00_rb | ||
+ | crtc 1: 3840x2160_30.00_rb | ||
+ | xrandr: Configure crtc 1 failed | ||
+ | crtc 0: disable | ||
+ | crtc 1: disable | ||
+ | crtc 2: disable | ||
+ | crtc 3: disable | ||
+ | screen 0: revert | ||
+ | crtc 0: revert | ||
+ | crtc 1: revert | ||
+ | crtc 2: revert | ||
+ | crtc 3: revert | ||
+ | xorg-log: (EE) intel(0): failed to set mode: Invalid argument [22] | ||
+ | </ | ||
+ | |||
+ | ===== Modes ===== | ||
+ | ^mode ^status^ | ||
+ | |3840x2160_25.00_rb|works for me| | ||
+ | |3840x2160_30.00_rb|not working | | ||
+ | |3840x2160_50.00_rb|not working | | ||
+ | |3840x2160_60.00_rb|not working | | ||
+ | |4096x2160_24.00_rb|works for me| | ||
+ | |4096x2160_25.00_rb|not working | | ||
+ | |4096x2160_30.00_rb|not working | | ||
+ | |||
+ | * Thinkpad x230, " | ||
+ | * Thinkpad x200, " | ||
+ | |||
+ | ===== Final script ===== | ||
+ | < | ||
+ | xrandr --newmode " | ||
+ | 219.40 | ||
+ | sleep .5 | ||
+ | xrandr --addmode HDMI1 " | ||
+ | sleep .5 | ||
+ | xrandr --output HDMI1 --verbose --mode 3840x2160_25.00_rb \ | ||
+ | --below LVDS1 | ||
+ | </ |