Ubuntu24.04へのアップグレード

sudo do-release-upgrade
すればよいらしい、が、
https://gihyo.jp/admin/clip/01/ubuntu-topics/202404/26
Ubuntu 23.10 のユーザーには、リリース後すぐに 24.04 への自動アップグレードが提供されます。ただし、Ubuntu 22.04 LTS のユーザーには、8 月 15 日に予定されている 24.04.1 LTS が利用可能になってからのみ、自動アップグレードが提供されます。ただし、オプションを使用して即時アップグレードを強制し、 22.04 から 23.10 に-dジャンプし、最終的に24.04 LTSにジャンプすることができます。これは 2024 年 8 月 15 日までです。その日以降は、22.04 から 24.04 LTS に直接ジャンプできます。
8/15にdo-release-upgrade でupgradeできるようになるので、これを待つのが良さそうなので待つことに。

はじめにapt updateからdo-release-upgradeをした際はソフトウェアセンターのアップグレードをすべて済ませるようにメッセージが表示されたのでそれに従った
$ sudo do-release-upgrade -d
[sudo] password for aki:
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
ちなみにdオプションをつける必要があった
sudo do-release-upgrade -d
dはdevelopment-releaseを使用した最新のサポートリリースにアップグレードするためのオプションのようだ
その後のメッセージが下記
$ sudo do-release-upgrade -d
[sudo] password for aki:
Checking for a new Ubuntu release
= Welcome to Ubuntu 24.04 LTS 'Noble Numbat' =
The Ubuntu team is proud to announce Ubuntu 24.04 LTS 'Noble Numbat'.
To see what's new in this release, visit:
https://wiki.ubuntu.com/NobleNumbat/ReleaseNotes
Ubuntu is a Linux distribution for your desktop or server, with a fast
and easy install, regular releases, a tight selection of excellent
applications installed by default, and almost any other software you
can imagine available through the network.
We hope you enjoy Ubuntu.
== Feedback and Helping ==
If you would like to help shape Ubuntu, take a look at the list of
ways you can participate at
http://www.ubuntu.com/community/participate/
Your comments, bug reports, patches and suggestions will help ensure
that our next release is the best release of Ubuntu ever. If you feel
that you have found a bug please read:
http://help.ubuntu.com/community/ReportingBugs
Then report bugs using apport in Ubuntu. For example:
ubuntu-bug linux
will open a bug report in Launchpad regarding the linux package.
If you have a question, or if you think you may have found a bug but
aren't sure, first try asking on the #ubuntu or #ubuntu-bugs IRC
channels on Libera.Chat, on the Ubuntu Users mailing list, or on the
Ubuntu forums:
http://help.ubuntu.com/community/InternetRelayChat
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users
http://www.ubuntuforums.org/
== More Information ==
You can find out more about Ubuntu on our website, IRC channel and wiki.
If you're new to Ubuntu, please visit:
http://www.ubuntu.com/
To sign up for future Ubuntu announcements, please subscribe to Ubuntu's
very low volume announcement list at:
http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce
Continue [yN]

aki@aki-MS-7D07:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libc6 : Breaks: libc6:i386 (!= 2.35-0ubuntu3.8) but 2.39-0ubuntu8.2 is installed
libc6:i386 : Breaks: libc6 (!= 2.39-0ubuntu8.2) but 2.35-0ubuntu3.8 is installed
locales : Depends: libc-bin (> 2.39)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
途中でインストールが中断してbrokenになったので言われるがままに治す

ログインしたのちにすぐgnomeが落ちるようになった
JSのエラーが出ているので検索すると以下のようなバグレポートを見つけた

トラブルシュート中
以下のようなUSBエラーが出ていたが、EIZOのディスプレイについているUSBhubにUSBヘッドセットを接続したらでなくなった。(推測だが、これは、USBハブがUbuntu側と相性が悪い問題のように思える)
/var/log/dmesg
dmesg(1129,24) [UTF-8]: [ 33.160640] kernel: usb 1-13.1: device not accepting address 18, error -71

gnome があまりちゃんと動かないという見方が妥当なので
Ubuntuでは、「/var/log/messages」と「/etc/syslog.conf」
から、var/log/messagesとetc/syslog.confを見てみることに

勉強になる記事を見つけた
journalctl -u gdm.service > jounal_gdm.txt
などとし、ログを拾い上げると
ログイン後にDesktopが復帰していないログ
8月 24 20:40:24 aki-MS-7D07 systemd[1]: Starting GNOME Display Manager...
8月 24 20:40:24 aki-MS-7D07 systemd[1]: Started GNOME Display Manager.
8月 24 20:40:35 aki-MS-7D07 gdm-launch-environment][1705]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=125) by (uid=0)
8月 24 20:40:43 aki-MS-7D07 gdm-password][2156]: gkr-pam: unable to locate daemon control file
8月 24 20:40:43 aki-MS-7D07 gdm-password][2156]: gkr-pam: stashed password to try later in open session
8月 24 20:40:43 aki-MS-7D07 gdm-password][2156]: pam_unix(gdm-password:session): session opened for user aki(uid=1000) by aki(uid=0)
8月 24 20:40:43 aki-MS-7D07 gdm-password][2156]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
8月 24 20:40:46 aki-MS-7D07 gdm3[1695]: Gdm: GdmDisplay: Session never registered, failing
8月 24 20:40:47 aki-MS-7D07 gdm3[3134]: modprobe: ERROR: could not insert 'nvidia': Invalid argument
8月 24 20:40:57 aki-MS-7D07 gdm3[3242]: modprobe: ERROR: could not insert 'nvidia': Invalid argument
ログイン後にうまく動いているはずのログ
8月 02 20:54:24 aki-MS-7D07 systemd[1]: Starting GNOME Display Manager...
8月 02 20:54:24 aki-MS-7D07 systemd[1]: Started GNOME Display Manager.
8月 02 20:54:25 aki-MS-7D07 gdm-launch-environment][1532]: pam_unix(gdm-launch-environment:session): session opened for user gdm(uid=125) by (uid=0)
8月 02 20:54:44 aki-MS-7D07 gdm-password][2115]: gkr-pam: unable to locate daemon control file
8月 02 20:54:44 aki-MS-7D07 gdm-password][2115]: gkr-pam: stashed password to try later in open session
8月 02 20:54:44 aki-MS-7D07 gdm-password][2115]: pam_unix(gdm-password:session): session opened for user aki(uid=1000) by (uid=0)
8月 02 20:54:45 aki-MS-7D07 gdm-password][2115]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
8月 02 20:54:50 aki-MS-7D07 gdm3[1527]: Gdm: Child process -1581 was already dead.
8月 02 23:54:28 aki-MS-7D07 systemd[1]: Stopping GNOME Display Manager...
8月 02 23:54:28 aki-MS-7D07 gdm3[1527]: Gdm: Failed to list cached users: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.12 was not provided by any .service files
8月 02 23:54:28 aki-MS-7D07 systemd[1]: gdm.service: Main process exited, code=exited, status=1/FAILURE
8月 02 23:54:28 aki-MS-7D07 systemd[1]: gdm.service: Failed with result 'exit-code'.
8月 02 23:54:28 aki-MS-7D07 systemd[1]: Stopped GNOME Display Manager.
8月 02 23:54:28 aki-MS-7D07 systemd[1]: gdm.service: Triggering OnFailure= dependencies.
8月 02 23:54:28 aki-MS-7D07 systemd[1]: gdm.service: Failed to enqueue OnFailure= job, ignoring: Transaction for plymouth-quit.service/start is destructive (systemd-binfmt.service has 'stop' job queued, but 'start' is included in transaction).

dependenciesなどと書いてあったので気になった
Geminiに聞いてみると以下のような回答が得られた、依存するなんらかのFailによってGDMもFailしているとのこと
gdm.service: Triggering OnFailure= dependencies. の意味
このエラーメッセージは、GNOMEディスプレイマネージャー(GDM)という、Linuxシステムでグラフィカルなログイン画面を表示するためのサービスが、起動に失敗し、その原因が他のサービスとの依存関係にあることを示しています。
より詳しく解説すると
gdm.service: GDMがsystemdというシステムで管理されているサービスであることを示します。
Triggering OnFailure= dependencies: GDMの起動に失敗し、その原因が、GDMが依存している他のサービスの起動失敗であることを意味します。つまり、GDMが正常に動作するために必要な他のサービスが起動していないために、GDM自体も起動できない状態になっています。

gdmの依存を調べればよいということになるが
こちらのリンクによると以下のコマンドで調べられるようだった
systemctl list-dependencies --after gdm.service
依存サービスの量ははかなり多いようで、
緑は成功、赤は失敗、白はその他
以下のログはテキストにしているが●が緑、○が白に相当
gdm.service
● ├─console-setup.service
● ├─dbus.socket
● ├─fwupd.service
○ ├─getty@tty1.service
○ ├─gpu-manager.service
○ ├─plymouth-quit.service
● ├─plymouth-start.service
○ ├─rc-local.service
● ├─system.slice
~~~略 以下258Line


ubuntu-desktopを再インストールしようとして下記のコマンドを入力したところ
sudo apt-get -y install ubuntu-desktop
以下のエラーとなった
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gdm3 : Depends: gnome-shell (>= 3.37.90) but it is not going to be installed
Recommends: ubuntu-session but it is not going to be installed or
gnome-session but it is not going to be installed or
x-session-manager
gnome-shell-extension-ubuntu-tiling-assistant : Depends: gnome-shell (>= 45~) but it is not going to be installed
Depends: gnome-shell (< 47~) but it is not going to be installed
ubuntu-desktop : Depends: gnome-control-center but it is not going to be installed
Depends: gnome-shell but it is not going to be installed
Depends: gnome-shell-extension-appindicator but it is not going to be installed
Depends: gnome-shell-extension-desktop-icons-ng but it is not going to be installed
Depends: gnome-shell-extension-ubuntu-dock but it is not going to be installed
Depends: ubuntu-session but it is not going to be installed
Depends: wireplumber but it is not installable
Recommends: evince but it is not going to be installed
Recommends: gnome-remote-desktop but it is not going to be installed
Recommends: hplip but it is not going to be installed
Recommends: simple-scan but it is not going to be installed
Recommends: xdg-desktop-portal-gnome but it is not going to be installed
ubuntu-desktop-minimal : Depends: gnome-control-center but it is not going to be installed
Depends: gnome-shell but it is not going to be installed
Depends: gnome-shell-extension-appindicator but it is not going to be installed
Depends: gnome-shell-extension-desktop-icons-ng but it is not going to be installed
Depends: gnome-shell-extension-ubuntu-dock but it is not going to be installed
Depends: ubuntu-session but it is not going to be installed
Depends: wireplumber but it is not installable
Recommends: evince but it is not going to be installed
Recommends: gnome-remote-desktop but it is not going to be installed
Recommends: hplip but it is not going to be installed
Recommends: xdg-desktop-portal-gnome but it is not going to be installed
Unable to correct problems, you have held broken packages.

再起動したところ以下のような文章が出ていた
20 updates could not be installed autopatically. For more details,
see /var/log/unattended-upgrades/unattended-upgrades.log

定期的にUSBのエラーが出ている
ほかのトラシューに対してノイジーなのでこの際に解決する
dmesgのログ
kernel: loop23: detected capacity change from 0 to 8
kernel: snd_hda_intel 0000:00:1f.3: Codec #0 probe error; disabling it...
kernel: snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
kernel: snd_hda_intel 0000:00:1f.3: Cannot probe codecs, giving up
kernel: usbcore: registered new interface driver snd-usb-audio
kernel: 8021q: 802.1Q VLAN Support v1.8
kernel: 8021q: adding VLAN 0 to HW filter on device enp3s0f0
kernel: 8021q: adding VLAN 0 to HW filter on device enp3s0f1
kernel: usb 1-13.1: new full-speed USB device number 16 using xhci_hcd
kernel: usb 1-13.1: device descriptor read/64, error -32
kernel: usb 1-13.1: device descriptor read/64, error -32
kernel: usb 1-13.1: new full-speed USB device number 17 using xhci_hcd
kernel: usb 1-13.1: device descriptor read/64, error -32
kernel: usb 1-13.1: device descriptor read/64, error -32
kernel: usb 1-13-port1: attempt power cycle
kernel: usb 1-13.1: new full-speed USB device number 18 using xhci_hcd
kernel: usb 1-13.1: Device not responding to setup address.
kernel: usb 1-13.1: Device not responding to setup address.
kernel: igb 0000:03:00.1 enp3s0f1: igb: enp3s0f1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/T
kernel: usb 1-13.1: device not accepting address 18, error -71
kernel: usb 1-13.1: WARN: invalid context state for evaluate context command.
syslog
Device not responding to setup address.
Device not responding to setup address.
device not accepting address 34, error -71
WARN: invalid context state for evaluate context command.
new full-speed USB device number 35 using xhci_hcd
Device not responding to setup address.
Device not responding to setup address.
device not accepting address 35, error -71
WARN: invalid context state for evaluate context command.
t1: unable to enumerate USB device

からたどることのできる
sudo rm -rf /etc/acpi/events
でもダメだった

どうにも八方ふさがりのため、USBイメージを作成して24.04をインストールしなおすことで対応した
うーむ