Stick to boot from 6.11 linux-image

Since Dec 2024, there is a compatibility issue with linux-image 6.12 and nvidia-driver 535.216.03.

#1089513 - nvidia-driver: crash in drm_open_helper on Linux 6.12.3 - Debian Bug report logs

It seems that the upstream was already fixed this issue in newer release, but not available yet on Debian sid.

If you keep installed linux-image-amd64 or linux-headers-amd64, it will be booted from 6.12 by default. Surely it will boot, but it still has the resolution issue. It can't be your daily driver.

Thus workaround is sticking to boot from 6.11 linux-image. As usually older image was listed in "Advanced options for ..." submenu, you need to explicitly choose 6.11 image during booting. In such a case, the changing default boot image is useful. (another option is just purge all 6.12 linux-image, linux-image-amd64 and linux-headers-amd64, but it's out of scope in this article)

See /boot/grub/grub.cfg and collect each menuentry_id_option.

You need to collect the following menuentry id.

  • submenu menuentry's id (It might be 'gnulinux-advanced-.....') [1]
  • 6.11 kernel's menuentry id which you want to boot by default. (It might be 'gnulinux-6.11.10-amd64-advanced-...') [2]

Then, edit GRUB_DEFAULT entry in /etc/default/grub.

GRUB_DEFAULT should be combination with [1] and [2] which is concatenated with ">"

e.g. NOTE: the actual value might vary on your environment

GRUB_DEFAULT="gnulinux-advanced-2e0e7dd0-7e10-4b58-92f7-518dabb5b547>gnulinux-6.11.10-amd64-advanced-2e0e7dd0-7e10-4b58-92f7-518dabb5b547"

After that, update grub entry with sudo update-grub.

/boot/grub/grub.cfg will be updated correctly.

Tips when building debian-installer

Recently, I'm trying to fix d-i Han-Unification issue for Japanese. This issue was not fixed for a long time since Debian 9 (stretch).

#1037256 - debian-installer: GUI font for Japanese was incorrectly rendered - Debian Bug report logs

To know about how Han-Unification is harmful for Japanese in some cases, See "Your Code Displays Japanese Wrong".

heistak.github.io

When building d-i (GUI Installer), you need to build build_netboot-gtk target.

But note that you need recent master because it has nitpick issue with GNU Make 4.4.x.

bugs.debian.org

After that, need to prepare required packages. See README in details.

apt-get update
apt-get install -y myrepos git libgtk2.0-dev fakeroot
apt-get build-dep -y debian-installer

It seems that Bug#1037256 will be fixed with supporting compressed font. I don't know how to do it furthermore , but I'm sure that Mr. Cyril Brulebois will handle this issue better. :-)

(I thought that creating fake fontconfig cache when building image, then decompress compressed font dynamically might work as just an idea, but it didn't work.)

If you would like to tackle fixing d-i issues as a newbie, it might be better to execute "make reallyclean" before rebuilding image not to fall-in pitfalls.

My Free Software Activities in December 2024

12月のハイライト

あんどきゅめんてっどでびあん2024年冬号の現行を間に合わせたり、 mozcやdigimend-dkmsのメンテナンスをしたりした。 たぶんmozcはDebian 13 (trixie)だと2.29.5160.102が採用されることになるだろう。

年末にかけては、debian-installerの日本語の問題を修正しようと試みたが、 以前調査したときとは状況が変わっている部分もある。 どう本体を修正して取り込んでもらえるように道筋をつけるとよいのかが懸念事項である。

12月の活動記録

How to check what matches linux-any?

Usually Architecture: any is recommended in debian/control except upstream explicitly doesn't/won't support that architecture.

In practical use case, linux-any is useful to exclude hurd architecture. (Previously it is also useful to exclude kfreebsd)

Here is the simple script to check whether specific architecutre matches linux-any or not.

2024/12/28: UPDATE

I've got feedback that the following command should be used. (Thanks Cyril Brulebois and Guillem Jover)

dpkg-architecture -L -W linux-any

or

dpkg-architecture --match-wildcard linux-any --list-known

NOTE: the following example is wrong, but for a record what I did wrongly, keep it as is:

#!usr/bin/bash

TARGETS="
amd64
arm64
armel
armhf
i386
mips64el
ppc64el
riscv64
s390x
alpha
hppa
hurd-amd64
hurd-i386
loong64
m68k
powerpc
ppc64
sh4
sparc64
x32
"

for d in $TARGETS; do
    dpkg-architecture -i linux-any -a $d
    if [ $? -eq 0 ]; then
    echo -e "[\e[32m\e[40mOK\e[0m] $d is linux-any (dpkg-architecture -i linux-any -a $d)"
    else
    echo -e "[\e[31m\e[40mNG\e[0m] $d is NOT linux-any (dpkg-architecture -i linux-any -a $d)"
    fi
done

screenshot of shell script

My Free Software Activities in November 2024

11月のハイライト

11月は技術書展17として、以前頒布していた「Debian新コントリビューターガイド」の改訂版を あらためて頒布しました。

techbookfest.org

以前ポチったひとは再度ダウンロードで新しいバージョンを入手できるようになっているはず。 bookworm向けに内容を差し替えています。

あとは、Debian勉強会でMozcパッケージをどうやって更新していこうかというような話をしました。 2.28系から2.29系にあげようとするときの壁とかについて語っています。 ひとまず2.29.5150.102+dfsg-1~exp1として更新するところの目処が立ったのは成果といえるでしょう。

11月の活動記録

2024年にDebian sidで踏んだ不具合8選

Debian Advent Calendar 2024の4日目の記事です。

個人的に印象に残ったDebian sidで踏んだ不具合をピックアップしてみました。 2024年はけっこう豊作だった気がします。(特に記録をしていたわけではないので気分です)

これから年末にかけて踏む可能性もまだ十分にあります。楽しみですね。

Debian sidそのものの不具合というよりかはupstreamの問題がパッケージ化されて広く使われるようになったことで踏みぬいたというケースも含んでいます。

Debian sidはunstableというわりには安定していますが、それなりに不具合を踏む機会は残されているので、新しいバージョンを積極的に使って踏み抜いてフィードバックしたい人にとってはよい環境なのではないでしょうか。

https://security-tracker.debian.org/tracker/CVE-2024-3094

XZにバックドアが仕込まれていたという例の件。 よりアップロードされるパッケージに関して透明性を高めようというtag2uploadの動きとも重なる事件でした。

#1070730 - libglib2.0-0: input regression for users of ibus affecting dead keys, Compose key and non-Latin input - Debian Bug report logs

GTK2のセキュリティアップデートを適用したら、日本語入力できなくなるなど広範囲に影響を与えた不具合。 bullseyeとかbookwormなどの安定版へのバックポートがなされたので、職場の同僚も踏んでいました。 stableは安定しているというのは確かにそうなんですが、それはそうあるべく維持している人たちがいるからなのです。 とはいえこういうリグレッションが発生してしまった稀有な事例でした。

#1068130 - xdg-desktop-portal-gnome cause slow start up time in some application - Debian Bug report logs

GNOME以外のデスクトップ環境でevinceとかgnome-terminalの起動が異常に遅くなるという不具合です。 当時budgie-desktopを使っていたので、この不具合を踏みました。 対策として、当時はxdg-desktop-portal-gnomeを削除してあげる必要がありました。

budgie desktopってmagpieがまだパッケージングされていないため新規でインストールできなくなってしまっているのが切ないところです。 libmagpieがDebian sidにはいったのでDebian sidでも新規にbudgie-desktopをインストールできるようになりましたね。

ただ、この問題また再発しているような気がします。 GNOMEとbudgie-desktop両方デスクトップ環境を選択できるようにインストールしたままにしていると、xdg-desktop-portal-gnomeも依存でインストールされているので発動します。 xdg-desktop-portal-gnomeを削除すると、GNOMEもまるっと消えるので、GNOMEとの共存はあきらめたほうがよいかもしれません。

xdg-desktop-portal-gnomeを削除してしまえばよいのだけれども、 task-gnome-desktop => gnome-core => gnome-session => xdg-desktop-portal-gnomeという依存関係があり、 xdg-desktop-portal-gnomeを削除するとgnome-sessionも消えてしまいます。

いざというときのデスクトップ環境の切り替えに支障をきたしてしまう。 というわけで、回避策として、xdg-desktop-portal-gnomeをマスクすることにした。

systemctl --user mask xdg-desktop-portal-gnome

GNOMEデスクトップ環境にログインするときは設定を戻しておかないとたぶんフル機能は使えないだろうが、そのときはそのときでしょう。

/usr/share/xdg-desktop-portal/budgie-portals.confではxdg-desktop-portal-gtkを優先して使いそうなのだけれども xdg-desktop-portal-gnomeもインストールされている状態だと期待通りに動作しないのかもしれない。

#1074379 - wireplumber: Bluetooth profile switch crashes wireplumber - Debian Bug report logs

Bluetoothのヘッドセットは接続できているのに、Web会議で他の人の話す声が聞こえないことで気づいた不具合でした。 急遽USBなヘッドセットでしのぐ羽目になった不具合です。(こんなときのために有線のやつを必ずバックアップで保持しておきたいですね) wireplumber 0.5.5-1で修正されました。

#1076582 - initramfs-tools: duplicates nvidia firmware files - Debian Bug report logs

/bootが小さいとカーネルを更新できなくなる不具合。 パーティションの切り方次第で困ったことになる強烈な不具合だったという印象です。

initramfs-toolsはカーネル更新のたびにinitdを再作成してくれているのですが、firmware-nvidia-graphicsをインストールした環境だと 重複したファームウェアのファイルをまるっと含めてしまうのでinitrdが肥大化しすぎて/bootに収まらなくなりカーネルの更新に失敗するというものでした。 たしか問題のあるinitramfs-toolsではinitrdが圧縮後で230MBくらいになってしまっていたはずです。 そのためカーネルイメージを複数世代保持しておくことができなくなるつらいやつです。(新しいカーネルで起動できることを確認してから古いカーネルイメージを削除するということができない)

インストール方法によっても変わってきますが、/bootの既定値が512MBくらいなのであっさり超過してしまい踏み抜くやつでした。 現状起動できているカーネルを削除して、新しいカーネルをインストールするというのは賭けなので、おとなしくinitramfs-toolsが更新されるまで待つ必要がありました。

#1077841 - build error for kernel 6.10.2 - Debian Bug report logs

この不具合自体はあまりあってほしくないのですが、nvidia-kernel-dkmsでnvidiaのモジュールがビルドできないという不具合です。

当時nvidia-firmware-gspが古いまま更新されないという別の不具合があり(バグ番号は失念)、nvidia-kernel-dkmsでモジュールがビルドできるようになったので 油断して再起動をかけたところ古いnvidia-firmware-gspと新しくビルドしたnvidia-kernel-dkmsのモジュールのバージョンの不整合によりモジュールが読み込まれず gdmが起動しないという不具合を踏みました。電源いれてデスクトップ環境があがってこなくて焦った記憶があります。 Ctrl+F2だかでコンソールに切り替えてnvidia-firmware-gspを更新して復旧させました。

#1079183 - linux-image-amd64: Bluetooth is disabled - Debian Bug report logs

Bluetoothはちょいちょい不具合を踏み抜きがちな機材の一つという印象があります。

それまで普通につかえていたペアリング済みのBluetoothヘッドセットの電源を入れてもつながらず、USBなヘッドセットでしのぐ羽目になった不具合です。

Bluetooth関連だと起動時に以下のようなエラーが発生していたのをsudo dmesgで確認しています。

[   8.456184] Bluetooth: hci0: command 0xfc05 tx timeout
[   8.456186] Bluetooth: hci0: Reading Intel version command failed (-110)

回避策としてはbtusbモジュールを再読込して、hciconfigでリセットしなおすというのを実行する必要がありました。

sudo rmmod btusb
sudo modprobe btusb
sudo rfkill unblock bluetooth
sudo hciconfig hci0 reset
sudo hciconfig hci0 up

そのあとヘッドセットの電源を入れ直す必要があって面倒でした。

https://tracker.debian.org/news/1561446/accepted-linux-signed-amd64-61071-source-into-unstable/

この問題はlinux-image-amd64 6.10.7-1で発生しなくなりました。 たぶん以下の変更が影響したんじゃないかと思っているが確証はありません。

  • Bluetooth: HCI: Invert LE State quirk to be opt-out rather then opt-in

copy module: modify time on the file (mtime) is not updating · Issue #83013 · ansible/ansible · GitHub

ansible-core 1.7.3でファイルをローカルからサーバーにコピーしたときにmtimeが更新されない問題です。 サーバー側のファイルのタイムスタンプの更新を前提として発動するプログラムが期待通りに動作しないという事がありました。 (サーバー側に配備した設定ファイルが更新されたらコンパイルするしくみが動作せず、設定を変更しているのに反映されなくて問題になった)

upstreamでは修正されているようですが、Debian sidのansible-coreは1.7.3-1なので(2024年9月時点)、不具合を踏みます。

#1078779 - ansible-core: Ansible not updating mtime on changed files, keeping old mtime!!! - Debian Bug report logs にてフィードバックがなされているので修正が待たれます。 2.17.5に更新されたので問題が解消しました。

この記事はUHK 60 v2で書き上げました。

My Free Software Activities in October 2024

10月のハイライト

10月は技術書典17向けの原稿の改訂をしたのが主な活動。 Debian New Contributor Guide パッケージング編の第四版を頒布します。

ほかにもパッケージのメンテナンスだったり、deskflowをnew queueに放り込んだりした。

mozcを新しいリリースに追従させる件もすすめたいが、あれこれ考えることがあって うまくすすんではいない。

10月の活動記録