3
3

More than 5 years have passed since last update.

elementary osで4Kディスプレイの解像度を設定

Posted at

elementary osを入れたlaptopに4Kディスプレイを接続した際に4Kサイズの解像度を設定することに苦労したのでメモ。

  • OS: elementary OS 0.4.1 Loki
  • Laptop: Mi notebook air 13.3 2018
  • display: Iiyama ProLite GB2888UHSU
  • 接続方法: HDMI

うまく設定できた方法

$ wget https://raw.githubusercontent.com/kevinlekiller/cvt_modeline_calculator_12/master/cvt12.c 
$ gcc cvt12.c -O2 -lm -Wall -o cvt12
$ ./cvt12 3840 2160 34.16 -b
$ xrandr --newmode "3840x2160_34.16_rb"  299.92  3840 3888 3920 4000  2160 2183 2188 2195 +hsync -vsync 
$ xrandr --addmode HDMI-2 3840x2160_34.16_rb
$ xrandr --output HDMI-2 --mode 3840x2160_34.16_rb 

/etc/X11/xorg.conf.d/10-monitor.confに追加して永続化

Section "Monitor"
Identifier     "HDMI-2"
Modeline "3840x2160_34.16_rb"  299.92  3840 3888 3920 4000  2160 2183 2188 2195 +hsync -vsync
EndSection

参照: https://forums.gentoo.org/viewtopic-t-1065770-start-0.html

症状

ここに書かれているように、おそらくlinuxでは一般的なcvt, xrandrを使って解像度を設定しようとしたが、うまくいかない。

cvt -r 3840 2160
xrandr --newmode "3840x2160R"  533.00  3840 3888 3920 4000  2160 2163 2168 2222 +hsync -vsync
xrandr --addmode HDMI-2 3840x2160R
xrandr --output HDMI-2 --mode 3840x2160R

HDMIケーブルを疑って確実に4K/60p対応のものを購入してみたが、それでもうまくいかず。

/var/log/Xorg.0.logのログによると、 modeset(0): failed to set mode: Invalid argumentというエラーログで失敗していそう。

[   499.724] (--) modeset(0): HDMI max TMDS frequency 300000KHz
[   522.227] (II) modeset(0): Allocate new frame buffer 5760x2160 stride
[   522.408] (EE) modeset(0): failed to set mode: Invalid argument
[   522.693] (II) modeset(0): Allocate new frame buffer 3968x1152 stride
[   523.645] (II) modeset(0): EDID vendor "BOE", prod id 1719
[   523.645] (II) modeset(0): Printing DDC gathered Modelines:

解決策

このforumを見て解決した。
4k screen Samsung U28E590 stuck at 1080p on Lenovo W540

ログに、HDMI max TMDS frequency 300000KHzと出ているように、TMDS frequencyというものが300MHzに制限されていることが原因っぽい。

どうやらcvt12というツールを使用してかつ、TMDS Frequencyが300MHzを超えないようにrefresh rateを調整してmodelineをジェネることが必要なよう。

なぜ300MHzのlimitが設定されてしまっているかはforum上ではわかっていない。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3