
これまで Raspberry Pi にはいつもRaspberry Pi OSを入れて、ヘッドレス運用を常としていました。試したい液晶用に今回、Raspberry Pi Zero W に軽量と言われている DietPi を入れ、軽量デスクトップ環境 LXDE を試してみる、その後編です。
前回、DietPi-Configによる初回起動時の設定を一通り確認し、WiFi設定も保存した状態で再起動しました。
DietPi 基本設定
再起動後、有効になったWiFiによりネットワーク有効となったシステムは、ログイン後有無を言わさずアップデートが自動で走ります。v6系だったDietPi自身のv7へのメジャーアップデートも含まれていたことから、30分ぐらいの作業でした。
続く基本設定では、VS Codeレポジトリの削除、システムパスワードの変更、シリアルコンソールの無効化、匿名データの削除を行い、基本的なセットアップは完了です。
DietPi-Configでの基本設定が終わると、その上位のDietPi-Softwareメニューに遷移します。デフォルトでインストールされているSSH Serverは軽量も最低限の機能しか持たないDropbearですが、もしSCPやSFTPを使いたい場合はメニュー中ほどにある、SSH Server設定項でOpenSSHへ変更が可能です。
再びDietPi-Softwareメニューに戻ります。デスクトップ環境などを特に必要としない場合は、これ以上追加するソフトウェアは無いので、下端のInstallを選んでミニマル構成でセットアップを進めれば終わりです。
LXDEデスクトップ環境導入
今回はデスクトップ環境が目的なので、Software Optimised項にてLXDEを選択状態にしてから、Installへ進みます。
ミニマル構成の時とは異なる確認画面の後、インストールが始まります。WiFi経由と言うこともあり、パッケージのダウンロードからインストール完了してプロンプトが戻って来るまで30分程度かかりました。途中、GPUメモリの割当を増やす必要がある旨の確認がありました。
プロンプト状態になったら、一度再起動します。
X server エラー対応
再起動ログイン後、startxしてみるとエラーでX serverは起動失敗してしまいました。
画面にはエラーの具体的な情報は表示されないので、促されるままにログを確認してみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# cat /var/log/Xorg.0.log [ 61.219] X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 [ 61.256] Build Operating System: Linux 5.4.0-54-generic armv8l Raspbian [ 61.272] Current Operating System: Linux DietPi 5.10.17+ #1403 Mon Feb 22 11:26:13 GMT 2021 armv6l [ 61.273] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=720 bcm2708_fb.fbswap=1 smsc95xx.macaddr=B8:27:EB:08:A4:5D vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000 console=ttyS0,115200 console=tty1 root=PARTUUID=e8af6eb2-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet net.ifnames=0 [ 61.318] Build Date: 15 January 2021 02:03:57PM [ 61.335] xorg-server 2:1.20.4-1+rpt2+deb10u3 (https://www.debian.org/support) [ 61.351] Current version of pixman: 0.36.0 [ 61.374] Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. [ 61.374] Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. [ 61.431] (==) Log file: "/var/log/Xorg.0.log", Time: Thu Mar 11 15:50:27 2021 [ 61.439] (==) Using config directory: "/etc/X11/xorg.conf.d" [ 61.456] (==) Using system config directory "/usr/share/X11/xorg.conf.d" [ 61.457] (==) No Layout section. Using the first Screen section. [ 61.457] (==) No screen section available. Using defaults. [ 61.457] (**) |-->Screen "Default Screen Section" (0) [ 61.457] (**) | |-->Monitor "<default monitor>" [ 61.471] (==) No monitor specified for screen "Default Screen Section". Using a default monitor configuration. [ 61.472] (**) Option "BlankTime" "0" [ 61.472] (==) Automatically adding devices [ 61.472] (==) Automatically enabling devices [ 61.472] (==) Automatically adding GPU devices [ 61.472] (==) Max clients allowed: 256, resource mask: 0x1fffff [ 61.472] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist. [ 61.472] Entry deleted from font path. [ 61.472] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist. [ 61.472] Entry deleted from font path. [ 61.473] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist. [ 61.473] Entry deleted from font path. [ 61.473] (WW) The directory "/usr/share/fonts/X11/Type1" does not exist. [ 61.473] Entry deleted from font path. [ 61.473] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist. [ 61.473] Entry deleted from font path. [ 61.473] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist. [ 61.473] Entry deleted from font path. [ 61.473] (==) FontPath set to: /usr/share/fonts/X11/misc, built-ins [ 61.473] (==) ModulePath set to "/usr/lib/xorg/modules" [ 61.473] (**) Extension "DPMS" is disabled [ 61.473] (II) The server relies on udev to provide the list of input devices. If no devices become available, reconfigure udev or disable AutoAddDevices. [ 61.473] (II) Loader magic: 0x1fdf80 [ 61.473] (II) Module ABI versions: [ 61.473] X.Org ANSI C Emulation: 0.4 [ 61.474] X.Org Video Driver: 24.0 [ 61.474] X.Org XInput driver : 24.1 [ 61.474] X.Org Server Extension : 10.0 [ 61.485] (++) using VT number 1 [ 61.510] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31 [ 61.511] (II) no primary bus or device found [ 61.511] (II) LoadModule: "glx" [ 61.513] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so [ 61.537] (II) Module glx: vendor="X.Org Foundation" [ 61.537] compiled for 1.20.4, module version = 1.0.0 [ 61.537] ABI class: X.Org Server Extension, version 10.0 [ 61.538] (==) Matched modesetting as autoconfigured driver 0 [ 61.538] (==) Matched fbdev as autoconfigured driver 1 [ 61.538] (==) Assigned the driver to the xf86ConfigLayout [ 61.538] (II) LoadModule: "modesetting" [ 61.539] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so [ 61.550] (II) Module modesetting: vendor="X.Org Foundation" [ 61.550] compiled for 1.20.4, module version = 1.20.4 [ 61.551] Module class: X.Org Video Driver [ 61.551] ABI class: X.Org Video Driver, version 24.0 [ 61.551] (II) LoadModule: "fbdev" [ 61.552] (WW) Warning, couldn't open module fbdev [ 61.552] (EE) Failed to load module "fbdev" (module does not exist, 0) [ 61.552] (II) modesetting: Driver for Modesetting Kernel Drivers: kms [ 61.560] (WW) Falling back to old probe method for modesetting [ 61.560] (EE) open /dev/dri/card0: No such file or directory [ 61.561] (WW) Falling back to old probe method for modesetting [ 61.561] (EE) open /dev/dri/card0: No such file or directory [ 61.561] (EE) No devices detected. [ 61.561] (EE) Fatal server error: [ 61.561] (EE) no screens found(EE) [ 61.561] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 61.562] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. [ 61.562] (EE) [ 61.595] (EE) Server terminated with error (1). Closing log file. |
この「Failed to load module “fbdev” (module does not exist, 0)」で調べてみると、既知の不具合として既に挙がっていて、対処法まで提示されていました(Great Tnx!!)。早速実行してみます。
1 2 3 4 5 6 7 8 9 10 11 |
# /boot/dietpi/func/dietpi-set_hardware rpi-opengl vc4-kms-v3d-pi4 DietPi-Set_hardware ───────────────────────────────────────────────────── Mode: rpi-opengl (vc4-kms-v3d-pi4) [ INFO ] DietPi-Set_hardware | Checking for required APT packages: libgl1-mesa-dri libgles2 libegl1 mesa-utils [ OK ] DietPi-Set_hardware | All required APT packages are already installed. [ OK ] DietPi-Set_hardware | Added setting dtoverlay=vc4-kms-v3d to end of file /boot/config.txt [ OK ] DietPi-Set_hardware | Comment in /boot/config.txt converted to setting: framebuffer_width=1920 [ OK ] DietPi-Set_hardware | Comment in /boot/config.txt converted to setting: framebuffer_height=1080 [ OK ] rpi-opengl vc4-kms-v3d | Completed # reboot |
LXDEデスクトップ起動
再起動後、再びstartxしてみると、やや真っ黒な画面で待たされる時間が長いのですが、デスクトップ画面が表示されました。
最後にDietPi-ConfigのAutoStart Optionに戻り、起動時のランレベルを「2: Automatic Login」へと変更します。
再起動後、ログインされたLXDEデスクトップ画面が表示されました。軽量デスクトップの気になるリソース消費を簡単に確認してみます。
1 2 3 4 5 6 7 8 9 10 11 |
## LXDE未インストールCLI root@DietPi:~#free -mh total used free shared buff/cache available Mem: 429Mi 29Mi 311Mi 3.0Mi 88Mi 348Mi Swap: 1.5Gi 0B 1.5Gi ## LXDE起動中 root@DietPi:~# free -mh total used free shared buff/cache available Mem: 429Mi 123Mi 145Mi 3.0Mi 160Mi 253Mi Swap: 1.5Gi 0B 1.5Gi |
ちなみに同じく軽量デスクトップとして人気のLXQtを採用した場合のリソース消費は次の通りでした。
1 2 3 4 |
root@DietPi:~# free -mh total used free shared buff/cache available Mem: 366Mi 170Mi 86Mi 6.0Mi 109Mi 141Mi Swap: 1.5Gi 1.0Mi 1.5Gi |
さぁこれでRaspberry Pi Zero Wのデスクトップ環境は整いました。次回は話題のツイ廃液晶を繋いで出力してみたいと思います。