0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Ubuntu でうまく認識できないディスプレイ解像度を直す

Last updated at Posted at 2023-09-09

セカンダリディスプレイの解像度がうまく認識できない。

image.png

本来は HD解像度 (1366x768)であるのだが VGA 固定になってしまい選択肢が表示されない。

「Ubuntu で 4K Display @ThinkPad X230(Intel HD 4000 Graphics)」
https://qiita.com/nanbuwks/items/dc26353486df80660e1f
では、4K解像度が表示されないのを xrandr で表示させましたが、同様に xrandr を使って対応します。

環境

  • セカンダリディスプレイ Panasonic TH-L26X3 (1366x768) HDMI接続
  • プライマリディスプレイ AIWA TV-43UF30H (4K 3840 x 2160) VGA接続
  • AMD Ryzen 5 5600G with Radeon Graphics
  • マザーボード Gigabyte B550M S2H (グラフィックポートはHDMI,VGA,DVI 出力を備える)
  • Ubuntu 22.04 LTS + カーネル 6.3.13

「Ubuntu 22.04 で画面が XGA になった」
https://qiita.com/nanbuwks/items/03898d781f885eb730bf
でインストールしたカーネルを使っています。

xrandr でチェック

$ xrandr
Screen 0: minimum 320 x 200, current 4480 x 2160, maximum 16384 x 16384
HDMI-A-0 connected primary 3840x2160+640+0 (normal left inverted right x axis y axis) 698mm x 392mm
   3840x2160     60.00*+  50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   4096x2160     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1920x1200     60.00  
   1920x1080     60.00    50.00    59.94    30.00    25.00    24.00    29.97    23.98  
   1600x1200     60.00  
   1680x1050     60.00  
   1280x1024     60.00  
   1440x900      60.00  
   1366x768      59.79  
   1280x800      60.00  
   1280x720      60.00    50.00    59.94  
   1024x768      60.00  
   800x600       60.00  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       60.00    59.94  
HDMI-A-1 disconnected (normal left inverted right x axis y axis)
DisplayPort-0 connected 640x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   640x480       59.94* 

問題となっているセカンダリディスプレイはVGAポートにつなげてますが、xrandrの認識では DisplayPort になってますね。

最適解像度を登録

Panasonic TH-L26X3 の解像度は1366x768であり、HDMI-A-0 に使えそうなモードが表示されてますので、以下のように登録します。

$ xrandr --addmode DisplayPort-0 "1366x768"

モードを作る場合

なお、もし使えそうなモードが表示されていないときには以下のようにしてモードを登録する必要があります。

まずは cvt でパラメータを計算します。

$ cvt 1366 768 60 
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync

何故か、 水平解像度が 1368 になってますが、これを登録します。

$ xrandr --newmode Modeline "1368x768_60.00"   85.25  1368 1440 1576 1784  768 771 781 798 -hsync +vsync
$ xrandr --addmode DisplayPort-0 "1366x768_60.00"

解決

設定変更ができました。

image.png

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?