Yotazo Lab.

ほぼ自分用。でも誰かの役に立つかもしれない話題

Raspberry Pi 解像度設定メモ

Raspberry Piセットアップ中に余計なことをして手間取った話

画面が消えた

ネットワーク設定中につまらないミス。気持ちがはやっていたというのもありますが、実はそれ以上にディスプレイの文字が細かい上にボケており、とても見えづらかったというのが主な原因でした。

そこで解像度の設定をするべく設定ファイルをいじることにしたのです。

/boot/config.txt

を開きます。hdmi_groupとhdmi_modeというのをいじればいいのか、フムフム・・・と、すごく適当にやっていたら、見事に画面が映らなくなりました(笑)

こうなるとSSHで遠隔操作か、MicroSDカードをPCに挿し、直接ファイルを設定しなおすしかないようです。なんとなくMicroSDカードの抜き差しはしたくなかったので、遠隔操作のほうを選択しました。

しかしなかなかうまくいかず、おかげで居間と2階にあるPCの間をバタバタ行ったりきたりするハメになってしまったのです。しかも、HDMIの信号が出ていないとHDMIセレクタが勝手に切り替わり、いつのまにかテレビが映っていたりするし……。

ファイルを書き換えてreboot、階段を降りて、セレクタ切り替えて、画面の様子見て、また上に行って・・・を何回繰り返したか。

CEAとDMTどちらを選ぶの?

そもそも、hdmi_groupのCEAとDMTもわからずにやったのが大間違い。

CEA modes are intended for TV, they include plenty of interlaced and progressive modes, usually with 25/50/100Hz (PAL) or 30/60/120Hz (NTSC) frame rates and TV resolutions of 288/480/576/720/1080 scan lines. DMT modes are intended for computer monitors, therefore there are none of the interlaced modes, the resolutions are 640/720/800/1024/1280 and the frame rates are compatible with the computer monitors, something like 60/70/75/80/85/120Hz.

hdmi - What is the difference between CEA and DMT? - Raspberry Pi Stack Exchange

調べたら、テレビはCEA、パソコン用の1024x768みたいなディスプレイはDMTを選べばよさそうです。

http://elinux.org/RPiconfig#VideoRPiconfig - eLinux.org

じゃあ、ここにあるリストから選ぶべきは・・・??

まず、hdmi_groupは、テレビなのでCEAhdmi_group=1 選んで・・・・
hdmi_modeは、日本はNTSCなので、30/60/120Hzの中から選べばOKってことかな?

そうすると、このあたりから選べばOK?

These values are valid if hdmi_group=1 (CEA)
hdmi_mode=1 VGA
hdmi_mode=2 480p 60 Hz
hdmi_mode=3 480p 60 Hz H
hdmi_mode=4 720p 60 Hz
hdmi_mode=5 1080i 60 Hz
hdmi_mode=6 480i 60 Hz
hdmi_mode=7 480i 60 Hz H
hdmi_mode=8 240p 60 Hz
hdmi_mode=9 240p 60 Hz H
hdmi_mode=10 480i 60 Hz 4x
hdmi_mode=11 480i 60 Hz 4x H
hdmi_mode=12 240p 60 Hz 4x
hdmi_mode=13 240p 60 Hz 4x H
hdmi_mode=14 480p 60 Hz 2x
hdmi_mode=15 480p 60 Hz 2x H
hdmi_mode=16 1080p 60 Hz
hdmi_mode=34 1080p 30 Hz
hdmi_mode=35 480p 60 Hz 4x
hdmi_mode=36 480p 60 Hz 4xH
hdmi_mode=46 1080i 120 Hz
hdmi_mode=47 720p 120 Hz
hdmi_mode=48 480p 120 Hz
hdmi_mode=49 480p 120 Hz H
hdmi_mode=50 480i 120 Hz
hdmi_mode=51 480i 120 Hz H

H means 16:9 variant (of a normally 4:3 mode).
2x means pixel doubled (that is, higher clock rate, with each pixel repeated twice)
4x means pixel quadrupled (that is, higher clock rate, with each pixel repeated four times)

あとはテレビの走査線数で1080とか720を選べばいいのか・・・?
1080だと小さくて字が見えない・・・

てな感じで、

hdmi_group=1
hdmi_mode=4

で落ち着きました。
疲れた・・・。

CEA: Consumer Electronics Association 米国家電協会
DMT: Display Monitor Timing

その他 config.txtの設定メモ

hdmi_ignore_edid

hdmi_ignore_edid Enables the ignoring of EDID/display data if your display doesn't have an accurate EDID.

hdmi_ignore_edid=0xa5000080

ディスプレイが正しいEDID情報を持っていない場合、EDID情報を無視
ディスプレイ側のEDID情報に引っ張られないようにする場合に使えばいい?

hdmi_ignore_hotplug

hdmi_ignore_hotplug Pretends HDMI hotplug signal is not asserted so it appears a HDMI display is not attached

hdmi_ignore_hotplug=1 Use composite mode even if HDMI monitor is detected

HDMIホットプラグの信号を検出しないので、HDMIディスプレイが接続されていないように見える。HDMIディスプレイが検出されてもコンポジット使用。

hdmi_safe

hdmi_safe Use "safe mode" settings to try to boot with maximum hdmi compatibility. This is the same as the combination of: hdmi_force_hotplug=1, hdmi_ignore_edid=0xa5000080, config_hdmi_boost=4, hdmi_group=2, hdmi_mode=4, disable_overscan=0, overscan_left=24, overscan_right=24, overscan_top=24, overscan_bottom=24

hdmi_safe=1

下記設定と同じ状態

hdmi_force_hotplug=1
hdmi_ignore_edid=0xa5000080
config_hdmi_boost=4
hdmi_group=2
hdmi_mode=4
disable_overscan=0
overscan_left=24
overscan_right=24
overscan_top=24
overscan_bottom=24

参考:
RPiconfig - eLinux.org
http://astra.digi2.jp/a/e/g13_147_pc_1.html
NVIDIA Developer
電子回路の豆知識