Ubuntuデスクトップで入力装置が使えなくなった場合の復旧方法

2019-03-03
Ubuntu
18.04

バージョンによって手順が異なるとは思うのですが、ひとまずデフォルト状態で使っている16.04LTS以降の場合は、下記の手順で復旧できます。

まずは問題を確認。

そもそも入力装置が使えないから問題は明らかだろうという気もしますが、念の為ログを確認します。

普通にログインしないでリカバリーモードで立ち上げます。bootのメニューに出てきたnetworkを選択してネットワークに接続、rootでコマンドラインを立ち上げます。

入力装置が使えなかったユーザのホームディレクトリで以下のようにログを確認します。

1
$ less ~/.local/share/xorg/Xorg.0.log

こんなログがいっぱい出ていたら、udevというUbuntuのデバイスマネージメントツールが動いてないです。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[    23.598] (II) config/udev: Adding input device HDA Intel PCH Mic (/dev/input/event8)
[ 23.598] (II) No input driver specified, ignoring this device.
[ 23.598] (II) This device may have been added with another device file.
[ 23.599] (II) config/udev: Adding input device HDA Intel PCH Headphone (/dev/input/event9)
[ 23.599] (II) No input driver specified, ignoring this device.
[ 23.599] (II) This device may have been added with another device file.
[ 23.599] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=3 (/dev/input/event10)
[ 23.600] (II) No input driver specified, ignoring this device.
[ 23.600] (II) This device may have been added with another device file.
[ 23.600] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=7 (/dev/input/event11)
[ 23.600] (II) No input driver specified, ignoring this device.
[ 23.600] (II) This device may have been added with another device file.
[ 23.601] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=8 (/dev/input/event12)
[ 23.601] (II) No input driver specified, ignoring this device.
[ 23.601] (II) This device may have been added with another device file.
[ 23.602] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=9 (/dev/input/event13)
[ 23.602] (II) No input driver specified, ignoring this device.
[ 23.602] (II) This device may have been added with another device file.
[ 23.603] (II) config/udev: Adding input device HDA Intel PCH HDMI/DP,pcm=10 (/dev/input/event14)
[ 23.603] (II) No input driver specified, ignoring this device.
[ 23.603] (II) This device may have been added with another device file.

HWEをインストール

HWEというのは、Hardware Enablementの略です。libinputとかを削除する時に、一緒に消えちゃったりしましたので、インストールします。入力装置をxserverでハンドリングするための関連ライブラリもゴソッとインストールされます。

1
2
$ sudo apt install xserver-xorg-hwe-18.04
$ reboot

16.04の人は、上の18.04を16.04に置き換えれば大丈夫。
そう、これできっと復活する。

ザオラル。