Ubuntu on Raspberry Pi で HDMI が反応しないときの対処法
最近、Raspberry PiでUbuntuを使うことが増えてきた。
Raspberry Pi OSと比較して、Ubuntuはまだ熟れていない部分が多い。そのうちの一つがHDMI接続のトラブルに関する内容だ。
Ubuntu on Raspberry Piでは、OSのBoot時にHDMI出力が正常に動作していないとUbuntuが判断した場合、映像系がコンポジット側に移ってしまうことで、以後HDMIが使えなくなってしまう模様。
これを回避するためには、Boot Configで強制的にHDMIを見るように固定しなければならないようだ。
Ubuntuの場合、Boot Configは/boot/firmware/usercfg.txtに存在している。
$ sudo vim /boot/firmware/usercfg.txt
僕の環境では、下記のように追記すると、映像出力がHDMIに固定できた。
code:/boot/firmware/usercfg.txt
# Place "config.txt" changes (dtparam, dtoverlay, disable_overscan, etc.) in
# this file. Please refer to the README file for a description of the various
# configuration files on the boot partition.
hdmi_force_hotplug=1
hdmi_group=2
disable_overscan=1
Ubuntuのバージョンや利用するモニタによって設定は変わると思われるので、試行錯誤してください。
私が試した環境は以下の通り。
Raspberry Pi 4 Model B 4GB
Ubuntu 20.04 64Bit