summaryrefslogtreecommitdiff
path: root/guides/sysadmin/machines/hirondell/maintenance.org
blob: d6c5182fffb1b4ee952566b721d66de87930e767 (plain)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
* Config
** samba server
- I want most of my music on my laptop.
- I want to access it from my desktop.
- I want anyone on my home network to access it too.
- I am too lazy to remove the Windows partition from my laptop, so
  that partition sits mostly empty, eating 50% of the disk space.

Therefore, the only sensible move is to run Samba on the laptop,
serving a folder on my Linux partition with a symlink to the Windows
partition.

Chosen =/etc/smb.conf= excerpts:

#+begin_src conf
[global]
allow insecure wide links = yes

[sambo]
comment = Files yours truly is sharing with you.
path = /home/[…user…]/Public/smb
browseable = yes
read only = yes
guest ok = yes
wide links = yes
#+end_src

Then:

#+begin_src sh
# Mount Windows disk.
udisksctl mount --block-device /dev/disk/by-label/OS
# Symlink it from shared directory.
ln -s /media/[…user…]/OS/Music ~/Public/smb/
#+end_src

On the desktop side:
#+begin_src sh
sudo mount.cifs //hirondell.local/sambo […somewhere…] \
     -o guest,uid=$(id -u),gid=$(id -g)
#+end_src
* Upgrades
** Bookworm
*** research
**** [[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#non-free-split][Release notes § Issues to be aware of]]
***** minutiae
- ~sed s/non-free/non-free-firmware/~
- =youtube-dl= ⇒ =yt-dlp=
- clear =GRUB_DISABLE_OS_PROBER=
***** System logs ([[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#changes-to-system-logging][ref]])
1. ~apt-mark auto rsyslog ; apt autoremove~
2. double-check that journalctl config saves to persistent storage
3. finally learn ~journalctl~
***** Reduced accessibility from GTK 3⇒4 transition ([[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#gnome-has-reduced-accessibility-support-for-screen-readers][ref]])
Not a huge deal for me (though [[https://github.com/transmission/transmission/discussions/5065][other aspects]] of the transition are
irksome), but [[https://tech.lgbt/@xogium/110507457689374019][dang]].
***** "Externally-managed" Python installation ([[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#python3-pep-668][ref]])
1. inventory & clear out stuff installed with ~pip install --user~
2. upgrade
3. install =pipx=
4. reinstall
***** VLC support for VA-API disabled ([[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#vlc-ffmpeg-5][ref]])
- [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021601][Debian bug#1021601]] =vlc: VAAPI hardware acceleration no more available=
- [[https://code.videolan.org/videolan/vlc/-/issues/26772][VLC#26772]] =VAAPI is disabled with ffmpeg5 on vlc-3x=
  - "we won't support full FFmpeg5 in 3.0" ([[https://code.videolan.org/videolan/vlc/-/issues/26772#note_316827][ref]])
- [[https://code.videolan.org/videolan/vlc/-/merge_requests/1245][VLC!1245]] =[VLC3] Support FFmpeg 5.0 (except for VAAPI)=
  - "it seems that the VAAPI part is far from trivial and requires
    invasive changes (contrary to the other fixes)" ([[https://code.videolan.org/videolan/vlc/-/merge_requests/1245#note_302474][ref]])
- user reports: [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021664][2022-10]], [[https://old.reddit.com/r/debian/comments/z5ectb/vlc_delaying_frames_on_a_fresh_debian_12_install/][2022-11]], [[https://old.reddit.com/r/debian/comments/119x7tr/debian_12_bookworm_no_hw_acceleration_in_vlc_h264/][2023-02]], [[https://old.reddit.com/r/debian/comments/14u38mm/video_choppy_in_vlc_but_not_totem/][2023-07]]

No idea how much that will affect little =hirondell=.  If push comes
to shove, I guess I can either
- build VLC 4,
- learn mpv.
***** systemd naming for Xen network interfaces ([[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#xen-network][ref]])
=eth0= changes to =enX0=.  No idea if my VPS is impacted or not; it
does have an interface named =eth0=, and that name also shows up in
=/etc/network/interfaces=.
***** Known severe bugs ([[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#rc-bugs][ref]])
- [[https://bugs.debian.org/1036041][bug#1036041]]: =upgrade-reports: Dell XPS 9550 fails to boot after
  bullseye to bookworm upgrade - grub/bios interaction bug?=
*** VPS
**** =/etc/cloud/cloud.cfg=
My local version has these two lines:
#+begin_src
mount_default_fields: [~, ~, 'auto', 'defaults,nofail', '0', '2']
manage_etc_hosts: true
#+end_src
No idea if this is OVH-specific.  No idea if I want them.  Let's trust
"the package maintainer" 😐
**** =/etc/ssh/sshd_config=
OK, note to self: *never* choose "do a 3-way merge".  Thought that
would be something along the lines of Emacs's Ediff; instead…
#+begin_quote
Merging changes into the new version
#+end_quote
/Mind giving a couple more details on that "merge" mate?/

OK,

- =/usr/share/openssh/sshd_config= has the new stock config,
- =/etc/ssh/sshd_config.ucf-old= has the /previous/ *local* config
- ~diff -u {/usr/shared/openssh,/etc/ssh}/sshd_config~ suggests that
  the ✨magic merge✨ did TRT; the only differences are
  - stuff I remember changing in (=PermitRootLogin=,
    =PasswordAtuhentication=)
  - a spurious whitespace-only hunk on =Subsystem sftp= (the
    =/usr/share= version uses tabs; the =/etc= version ended up with a
    single space)
**** Removing obsolete stuff
Erm, why does ~apt purge '~c'~ says
#+begin_quote
The following packages were automatically installed and are no longer required:
[…] nginx-core nginx-full […]
#+end_quote

😨

#+begin_src
$ dpkg -S $(sudo which nginx)
nginx: /usr/sbin/nginx
$ apt depends nginx
[…]
  Replaces: nginx-core (<< 1.22.1-6~)
  Replaces: nginx-extras (<< 1.22.1-6~)
  Replaces: nginx-light (<< 1.22.1-6~)
#+end_src

Ah.
***** Rsyslog
Refuses to disappear.  The doc says ~apt-mark auto~ followed by ~apt
autoremove~ should remove it, but that does not seem to be happening
(~autoremove~ does not find anything to remove).  The =rsyslog=
service is still up & running, and watches =syslog.socket= to
re-activate itself 😕

Decided to explicitly ~apt remove~ it on the advice of [[https://blog.frehi.be/2023/06/04/upgrading-from-debian-11-bullseye-to-debian-12-bookworm/][this gentleman]].
*** Laptop
**** non-free & non-free-firmware
#+begin_quote
Assuming the =non-free= component was only added to the APT
sources-list to install firmware,
#+end_quote
#+begin_example
$ apt list '?narrow(?installed, ?section(non-free))'
Listing... Done
doc-rfc-experimental/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-fyi-bcp/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-informational/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-misc/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-old-std/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-others/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-std-proposed/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc-std/oldstable,oldstable,now 20201128-1 all [installed,automatic]
doc-rfc/oldstable,oldstable,now 20201128-1 all [installed]
firmware-iwlwifi/oldstable,oldstable,now 20210315-3 all [installed]
firmware-misc-nonfree/oldstable,oldstable,now 20210315-3 all [installed]
gcc-10-doc/oldstable,oldstable,now 10.2.0-1 all [installed,automatic]
gdb-doc/oldstable,oldstable,now 10.1-1 all [installed]
make-doc/oldstable,oldstable,now 4.3-2 all [installed]
manpages-posix-dev/oldstable,oldstable,now 2017a-2 all [installed]
manpages-posix/oldstable,oldstable,now 2017a-2 all [installed]
tar-doc/oldstable,oldstable,now 1.34-1 all [installed]
#+end_example
Will be keeping =non-free= in addition to =non-free-firmware= then 🫣
**** Fallout
***** GRUB
#+begin_src sh
sudo sed -i \
     s/'^#GRUB_DISABLE_OS_PROBER=false'/'GRUB_DISABLE_OS_PROBER=false'/ \
    /etc/default/grub
sudo update-grub
#+end_src

***** PEP 668
#+begin_src sh
# Before upgrade: keep calm…
pip uninstall $(pip freeze --user | cut -d= -f1)
# After upgrade: … carry on.
sudo apt install pipx
pipx install yt-dlp
#+end_src

***** VLC
+Seems fine?  No choppiness observed on a 2k@24FPS video from yt-dlp+

Is choppy as all hell on /some/ videos, not sure which kind nor why;
could not be bothered discerning the patterns.  Learned me an mpv for
great good.
**** Goodies
- The [[#random-lag][random lag I had been observing since 5.8]] seems gone 🥳
- =libtree-sitter-dev= is new enough for Emacs; can get rid of my
  =/usr/local= version.
** Windows
*** 2025-03
For [[file:../amdahl30/killing-time.org::*SSD?][reasons]], had to dust off my Windows installation.  Asked
update-grub to [[https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#grub-os-prober][run os-prober]], booted, did "the thing"; then, out of
due diligence (at first; quickly replaced by morbid fascination;
sustained by existential ennui), attempted to push Windows Update as
far as it would go.

A lightly edited set of live notes follows; starting with the original
boot following the os-prober restoration.
**** Boot the Ⅰst
- "let's finish setting up your PC" ??? [fn:winup-boot1-setup]
- installed kingston manager thingy [fn:winup-boot1-kingston]
- waiting for updates to finish
  - waiting…
  - "2023-10 Cumulative Update" stuck at "Downloading - 5%" 🤷
    - welp, does not seem to progress anymore, and there are updates
      pending restart, so let's

[fn:winup-boot1-setup] This Windows installation was, AFAIR, pretty
well "set up" when last I booted it.  Hence my surprise at this
greeting.

[fn:winup-boot1-kingston] The [[https://www.kingston.com/en/support/technical/ssdmanager][Kingston® SSD Manager]].  My main reason
for turning on that Windows system, to be able to upgrade the firmware
of amdahl30's primary SSD.
**** Boot the Ⅱnd
- "give us a minute" FFFFFUUUUUUUU
- "we're updating Xbox Game Bar" WAT [fn:winup-boot2-xbox]
- "your version of windows 11 has reached end of service"
  - "click here to download a newer version of windows 11 to stay
    supported"
  - ffs
  - Windows Update not doing anything; "download now" greyed out;
    "cumulative update" dropped down to /0%/
  - 100% CPU still burning 🤷
- update running…
  - "antimalware service executable" taking 50% CPU during the update

[fn:winup-boot2-xbox] I have never owned an Xbox, nor have I ever used
this Windows installation for anything game-related (beside
downloading & running [[https://www.pj64-emu.com/][Project64]] that one time, to evaluate how well
that laptop could handle N64 emulation).
**** Boot the Ⅲrd
- "windows 11, version 23H2"
- hope I don't have to go through =2{4H{1,2},5H1}= 😬
- "need more disk space" are you kidding me
  - removing my music then…[fn:winup-boot3-space]
- "almost ready"
  - "we need to do a few more things before you can update. we'll let
    you know when we're done and what to do next"
  - wtf

[fn:winup-boot3-space] I, perhaps unwisely, split my 128 GB drive into
two roughly equal-sized chunks, one for Windows, one for Debian.  The
former sitting unused, I had dumped something like 5–10 gigs worth of
media onto it.
**** Boot the Ⅳth
- "Your computer may restart a few times"
  - YOU DON'T SAY
- 1h later it's still at 9%
- I think I'm going to sleep tho; which means it will probably reboot
  to Debian without completing 🙄
**** Boot the Ⅴth
Mornin' Debian; no, actually I was installing Windows updates, you can
go back to sleep mate.

Windows is probably done with the external storage, right?  Detaching.
**** Boot the Ⅵth
- "❌ please reattach external storage"
  - /I freed 5 gigs of Music for you/
  - not even tumbleweed full-distro rebuilds are that big
**** Boot the Ⅶth
- "you're up to date (last checked: yesterday, 9:01 PM)"
  - first of all Windows Update: you just spent 15s loading; why is
    the last check yesterday evening?  What were you doing during this
    15s load?
  - second, isn't there, like, a 24H2 or something?
  - "check for updates" again please
- "updates available" 🤪
- some downloads later…
  - "you're up to date"
  - /also on the very same window/ "2025-02 Cumulative Update Preview
    for Windows 11 Version 23H2" to "Download & install"
  - 🎭
- seriously though, is there not an option to climb to 24H2?  why go
  for the "preview" of [[https://en.wikipedia.org/wiki/Windows_11_version_history][a /maintenance/ release]]?
- maybe a reboot will fix it 🙃
  - woah =⊞ restart=…
    - proposes (LLM-backed?) completion
    - says "restart apps after signing in" is the "best match"
  - woaaah, =⊞ reboot=… says the "best match" is a 2022 TV show 🤣
    - the right margin even autoplays the trailer
    - the right margin also shows "results ranked by relevance" and
      /the first one/ is a Microsoft Support link to "restart
      (reboot)" your PC
  - OK fine, that was "fun"; luckily =⊞-x u r= still works
**** Boot the Ⅷth
- well, no, I still must install this "oldstable preview"
- OK then; do that
**** Boot the Ⅸth
- "check for updates"
  - {{{narrator(thinks a lot)}}}
  - "you're up to date (last checked: today, 9:02 AM)"
  - what are you talking about?  It's 9:42, you've just booted, and
    /spent thirty seconds checking for updates/ how can the last check
    be 40 minutes ago??
- {{{narrator(thinks a lot /again/)}}}
  - "you're right 🤪"
    - "have a security intelligence update"
    - "also, 24H2 is available"
- just to be on the safe side, start with the "intelligence update"
  then reboot
**** Boot the Ⅹth
- alright then, "download & install" 24H2
- creeps up to 34%
- "making sure you're ready to install (this may take a few minutes)
  (please wait)"
  - I assure you Windows /I/ am ready to install; please stop
    projecting
- (wait hang on; why are you saying it's 10:26 AM Paris time; it's
  11:26 AM Paris time you goof)
  - "last successful time synchronization: 1/8/2022 7:01:49 PM" 🤣
- "what needs your attention"
  - "this PC can't be upgraded to this version of Windows"
  - "your PC isn't supported yet on this version of Windows"
  - what have you spent the last 30 minutes doing?  how do you realize
    this /34% into the installation process??/
  - there's only a "refresh" button that does nothing
    - close
    - "are you sure you want to quit?" /you will literally not let me
      do anything else; why are you asking me??/
- well then; perhaps disk size?
  - mmm only 6 GB free on =C:/=
  - ah, perhaps the 7 GB =C:/Windows.old= directory is a problem 🙄
  - let's install windirstat I guess
    - winget is neat!
  - I have basically 2 GB of personal files; everything else is
    Windows cruft
  - "System → Storage → Cleanup recommendations" agrees we can reclaim
    the 7 GB =Windows.old=
**** Alas
That was all the energy I could muster this week-end.  We might not
have updated all the way to 24H2, and we might never succeed!  All the
same, we laughed, we cried; quality entertainment.  Sort of.
* Hiccups
** impromptu IBus
Installing [[https://zoom.us/][Zoom]]'s Debian package somehow enabled IBus[fn:: AFAICT
because ibus recommends im-config, and the latter autostarts the
former by default], which unconditionally set my keyboard to English
for some reason[fn:: Before properly running ~apt install
./zoom_amd64.deb~, I had mistakenly run ~dpkg -i zoom_amd64.deb~,
which failed because of missing dependencies.  Perhaps apt omitted
some post-installation configuration hooks because the first dpkg run
had left an error marker somewhere?].  Remediation steps taken:

1. Tweak IBus preferences, unset shortcuts (Emacs has a better
   interface for searching/inserting Unicode characters), check "use
   system defaults" for the keyboard layout.

2. Go on a hunt for whoever spawns ibus-daemon(1); AFAICT it's
   im-launch(1), which can be told not to use IBus through im-config
   (which eventually just writes ~run_im none~ in =~/.xinputrc=).

3. Eventually, maybe I should just uninstall im-config.
** random lag
*** DONE diagnosing
Since… a few days? weeks? one month? everything randomly becomes
"choppy":

- typing (Emacs, Terminator, Firefox): I can type in a bunch of words,
  sit back, wait a few seconds, then watch the words finally write
  themselves letter by letter.
- launching programs: ~while time $aprogram ; do sleep 0.5 ; done~,
  where ~aprogram~ just starts then exits, shows wildly varying times.
- scrolling a PDF with the touchpad (Evince): the pages stay stuck for
  a few seconds, then the reader jumps to the new location; the mouse
  pointer does change during this delay, as text and whitespace
  (invisibly) scroll by.

I can't remember changing anything recently, nor seeing any scary
update passing by.  journalctl, htop and dmesg do not show any obvious
suspects.  Some things I considered:

- Disabling some services e.g. tor or speech-dispatcher ⇒ no effect.
- Uninstalling xserver-xorg-video-intel ⇒ no effect.
- Upgrading systemd from backports ⇒ no effect.
- htop sometimes shows pulseaudio acting up despite no application
  playing or recording sound?
- Maybe I should try reinstalling Debian's stable kernel?
  - Luckily 5.7 was not uninstalled when upgrading to 5.8; booting on
    5.7 solves all of the "choppiness" issues listed above.

Now to pinpoint what's wrong with 5.8…
*** TODO fixing
Found a way to "quantify" the problem; asked around on the
debian-kernel mailing list, to no avail.

- [[https://lists.debian.org/debian-kernel/2020/11/msg00084.html][2020-11]] - original report that 5.8 from backports triggers the
  issue: "wait for 5.9 to be available from backports or even 5.10"
  (LTS for the next Debian stable version)
- [[https://lists.debian.org/debian-kernel/2020/12/msg00040.html][2020-12]] - quick report that 5.9 from backports does not improve
  things: 🦗
- [[https://lists.debian.org/debian-kernel/2021/02/msg00231.html][2021-02]] - quick report that 5.10 from backports does not improve
  things *✨with scripts & numbers✨*: 🦗

#+begin_quote
    for ((i=0; i<100; i++)); do
        time -p terminator -x 'bash -c exit'
    done &> time-$(uname -r)

    grep $mode time-$(uname -r) | sort -k2

Where $mode is either real, user or sys.  Here are the extrema:

                        real            user            sys
                        min     max     min     max     min     max
5.7                     0.44    0.48    0.29    0.35    0.02    0.08
5.10                    0.47    3.30    0.31    2.87    0.02    0.30
5.10-after-suspend      0.46    0.50    0.30    0.36    0.03    0.08

Averages & standard deviations:

                        real            user            sys
5.7                     0.454±0.006     0.322±0.013     0.046±0.013
5.10                    0.961±0.607     0.559±0.518     0.074±0.052
5.10-after-suspend      0.469±0.005     0.332±0.012     0.050±0.011

These results feel consistent with the stutter I observe: 5.7 and
5.10-after-suspend have roughly the same performance, while
freshly-booted 5.10 is overall very jittery: terminator startup is twice
as slow on average, with 100× more variance.


Some more stats, eyeballed from /proc/cpuinfo and
/sys/devices/system/cpu/cpufreq/policy*/scaling_governor:

                        idle frequency  CPU governor
5.7                     <  800 MHz      powersave
5.10                    > 1900 MHz      ondemand
5.10 (after suspend)    <  900 MHz      ondemand
#+end_quote

- [[https://lists.debian.org/debian-kernel/2021/08/msg00278.html][2021-08]] - quick report that 5.10 from a fresh bullseye install does
  not improve things: 🦗
- 2023-08 - bookworm upgrade to 6.1: problem solved 🤷