Skip to content

Commit 4babf53

Browse files
committed
Release 26.09.46: CPU Apply, games after the LLVM 22 move, 40 CU at boot (#96, #97, #98)
#96 - Tuner > CPU > Apply said bc250_apply.py was missing. The ISO pipx-installed bc250_smu_oc into /opt/pipx, best effort, and every tool looks in /opt/bc250_smu_oc, which existed only on our boards, placed by hand. New package skillfish-smu-oc (vendor/bc250_smu_oc, upstream 43d6b4c, MIT) installs it there with our bc250-smu-oc.service (ExecCondition=skillfish-is-bc250), not enabled, and no conf: system/etc/bc250-smu-oc.conf is a dev overclock. The Control Center depends on it. "Save at boot" enables our unit instead of running `bc250_apply.py --install`, which wrote upstream's unguarded one. If the tool is missing, Apply says which package to install. Hook 0040 removed. #97 - Steam games aborted with "no present queue families" and the Wayland session did not start. On 21/09 Debian moved its Mesa to LLVM 22. Ours, in /opt/skillfish-gfx1013 and first in the ld.so cache on a BC-250, links libLLVM.so.21.1, but the package depended on python3 only: libllvm21 became an orphan and autoremove took it. Every EGL/GBM user then failed to load the driver: Xorg came up without glamor and DRI3, so Vulkan had no present queue, and kwin_wayland could not start. Reproduced on the .32 by hiding the library. - pacchetto-mesa.sh computes Depends with dpkg-shlibdeps (libllvm21 included; the build stops if it is not found); - a file trigger on /usr/lib/x86_64-linux-gnu reruns `skillfish-mesa avvio`, which now ldd-checks our libraries and gives the machine back to Debian's Mesa if any dependency is missing. Tested on the .32: library gone -> Debian's Mesa, DRI3 on, vkcube presents; library back -> ours again. #98 - "Keep at boot" for 40 CU had no effect. skillfish-cu.service was enabled by nobody: no postinst, and not in hook 0140. The reason the postinst enables "did not take" in the chroot, which hook 0140 left unexplained: they are written inside `if [ -d /run/systemd/system ]`, false in a chroot. The 26.06.5 image shipped off: skillfish-cu, fand, sensori, gpu-calibrate-recovery, hub-refresh.timer, hub-notify (--global), firstboot-flatpaks, cpu-governor, live-no-lock, live-polkit, and aggiorna-mirror.timer, which used `deb-systemd-invoke enable` (it only starts and stops). Enabling only writes symlinks, so it now happens outside the guard in every postinst; starting stays inside. Hook 0140 verifies the new units. The Control Center's cu-keep-boot enables the unit too. Tested on the .32: unit disabled, skillfish-tuner reinstalled, reboot -> 40/40. Release check: - checks_exec: every /opt, /usr/local/bin, /usr/lib/skillfish path our programs name must exist and belong to a package (#91 and #96 were this); - checks_system: every unit shipped with [Install] must be enabled by its postinst outside the /run guard, or be in coverage.UNITS_ON_DEMAND with a reason. `is-enabled` on the test machines could not catch #98: both had the unit enabled by hand. Passed: .32 (BC-250) 207, .22 (x64) 191, no failures. Apply and Save at boot for the CPU exercised on the .32 with /opt/bc250_smu_oc from the package only. Reported by janithdg.
1 parent 6f676cd commit 4babf53

37 files changed

Lines changed: 1654 additions & 240 deletions

‎SECURITY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ report those to their respective projects.
1616
| Kernel | `7.2.6-skillfishos` (+ `-x64`) | yes |
1717
| Kernel | `7.2.0-skillfishos`, `7.1.7-skillfishos` | previous series, best effort |
1818
| Kernel | `7.0.11-skillfishos` and older | no |
19-
| Apps | `skillfish-*` `26.09.45` or newer | yes |
19+
| Apps | `skillfish-*` `26.09.46` or newer | yes |
2020

2121
Fixes are delivered through the signed APT repository — `sudo apt update && sudo apt upgrade`.
2222
The installed system does not point at a single address: it carries a mirror list

‎apps/base/os.skillfish.base.metainfo.xml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@
3333
<pkgname>skillfish-base</pkgname>
3434
<content_rating type="oars-1.1"/>
3535
<releases>
36+
<release version="26.09.46" date="2026-09-22">
37+
<description>
38+
<p>Services that were meant to start on their own now do so on systems installed from an ISO: the 40 compute units at boot, the fan control, the sensors and the Hub update check. Our Mesa gives the desktop back to Debian's if a library it needs goes missing, instead of leaving it without acceleration.</p>
39+
<p xml:lang="it">I servizi che dovevano partire da soli ora partono anche sui sistemi installati da una ISO: le 40 unità di calcolo all'avvio, il controllo della ventola, i sensori e il controllo aggiornamenti dell'Hub. La nostra Mesa restituisce il desktop a quella di Debian se manca una libreria che le serve, invece di lasciarlo senza accelerazione.</p>
40+
<p xml:lang="fr">Les services qui devaient démarrer seuls le font désormais aussi sur les systèmes installés depuis une ISO : les 40 unités de calcul au démarrage, le contrôle du ventilateur, les capteurs et la vérification des mises à jour du Hub. Notre Mesa rend le bureau à celle de Debian si une bibliothèque dont elle a besoin disparaît, au lieu de le laisser sans accélération.</p>
41+
<p xml:lang="es">Los servicios que debían arrancar solos ahora lo hacen también en los sistemas instalados desde una ISO: las 40 unidades de cómputo al arrancar, el control del ventilador, los sensores y la comprobación de actualizaciones del Hub. Nuestra Mesa devuelve el escritorio a la de Debian si falta una biblioteca que necesita, en lugar de dejarlo sin aceleración.</p>
42+
<p xml:lang="pt">Os serviços que deviam arrancar sozinhos passam a fazê-lo também nos sistemas instalados a partir de uma ISO: as 40 unidades de computação no arranque, o controlo da ventoinha, os sensores e a verificação de atualizações do Hub. A nossa Mesa devolve o ambiente de trabalho à do Debian se faltar uma biblioteca de que precisa, em vez de o deixar sem aceleração.</p>
43+
<p xml:lang="de">Dienste, die von selbst starten sollten, tun das jetzt auch auf Systemen, die von einer ISO installiert wurden: die 40 Recheneinheiten beim Start, die Lüftersteuerung, die Sensoren und die Update-Prüfung des Hubs. Unser Mesa gibt den Desktop an das von Debian zurück, wenn eine benötigte Bibliothek fehlt, statt ihn ohne Beschleunigung zu lassen.</p>
44+
<p xml:lang="pl">Usługi, które miały uruchamiać się same, robią to teraz także w systemach zainstalowanych z obrazu ISO: 40 jednostek obliczeniowych przy starcie, sterowanie wentylatorem, czujniki i sprawdzanie aktualizacji w Hubie. Nasza Mesa oddaje pulpit Mesie z Debiana, jeśli brakuje potrzebnej jej biblioteki, zamiast zostawiać go bez akceleracji.</p>
45+
<p xml:lang="ru">Службы, которые должны были запускаться сами, теперь запускаются и в системах, установленных с ISO: 40 вычислительных блоков при загрузке, управление вентилятором, датчики и проверка обновлений в Hub. Наша Mesa возвращает рабочий стол Mesa из Debian, если пропала нужная ей библиотека, вместо того чтобы оставить его без ускорения.</p>
46+
<p xml:lang="uk">Служби, які мали запускатися самі, тепер запускаються і в системах, встановлених з ISO: 40 обчислювальних блоків під час завантаження, керування вентилятором, датчики та перевірка оновлень у Hub. Наша Mesa повертає робочий стіл Mesa з Debian, якщо зникла потрібна їй бібліотека, замість того щоб залишити його без прискорення.</p>
47+
</description>
48+
</release>
3649
<release version="26.09.45" date="2026-09-22">
3750
<description>
3851
<p>skillfish-cpu-governor: the CPU governor chosen in the Tuner or on the Remote Manager is put back at every boot and on every CPU that comes back online.</p>

‎apps/control-center/os.skillfish.control-center.metainfo.xml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@
6969
</screenshot>
7070
</screenshots>
7171
<releases>
72+
<release version="26.09.46" date="2026-09-22">
73+
<description>
74+
<p>Tuner, CPU: Apply works on every installation. The tool it relies on now comes in its own package, skillfish-smu-oc, and Keep at boot for the compute units switches on the service that applies them.</p>
75+
<p xml:lang="it">Tuner, CPU: Applica funziona su ogni installazione. Lo strumento su cui si appoggia ora arriva in un pacchetto suo, skillfish-smu-oc, e Mantieni all'avvio per le unità di calcolo accende il servizio che le applica.</p>
76+
<p xml:lang="fr">Tuner, CPU : Appliquer fonctionne sur toutes les installations. L'outil sur lequel il s'appuie arrive maintenant dans son propre paquet, skillfish-smu-oc, et Conserver au démarrage pour les unités de calcul active le service qui les applique.</p>
77+
<p xml:lang="es">Tuner, CPU: Aplicar funciona en todas las instalaciones. La herramienta en la que se apoya llega ahora en su propio paquete, skillfish-smu-oc, y Mantener al arrancar para las unidades de cómputo activa el servicio que las aplica.</p>
78+
<p xml:lang="pt">Tuner, CPU: Aplicar funciona em todas as instalações. A ferramenta em que se apoia passa a vir no seu próprio pacote, skillfish-smu-oc, e Manter no arranque para as unidades de computação ativa o serviço que as aplica.</p>
79+
<p xml:lang="de">Tuner, CPU: Anwenden funktioniert auf jeder Installation. Das Werkzeug, auf das es sich stützt, kommt jetzt in einem eigenen Paket, skillfish-smu-oc, und Beim Start behalten für die Recheneinheiten aktiviert den Dienst, der sie anwendet.</p>
80+
<p xml:lang="pl">Tuner, CPU: Zastosuj działa w każdej instalacji. Narzędzie, na którym się opiera, jest teraz w osobnym pakiecie, skillfish-smu-oc, a Zachowaj przy starcie dla jednostek obliczeniowych włącza usługę, która je ustawia.</p>
81+
<p xml:lang="ru">Tuner, CPU: «Применить» работает на любой установке. Инструмент, на который оно опирается, теперь поставляется отдельным пакетом skillfish-smu-oc, а «Сохранить при загрузке» для вычислительных блоков включает службу, которая их применяет.</p>
82+
<p xml:lang="uk">Tuner, CPU: «Застосувати» працює на будь-якій установці. Інструмент, на який воно спирається, тепер постачається окремим пакетом skillfish-smu-oc, а «Зберегти під час завантаження» для обчислювальних блоків вмикає службу, яка їх застосовує.</p>
83+
</description>
84+
</release>
7285
<release version="26.09.45" date="2026-09-22">
7386
<description>
7487
<p>The Tuner now lets you choose the CPU governor, which decides how the processor picks its clock: performance keeps it high, schedutil lowers it when idle and raises it under load. The choice stays after a restart and on every core switched back on, and the same list is on the Remote Manager page. On a BC-250 without the CPU P-states, the button to turn them on is there instead. Closing the window no longer prints an error from the gamepad reader.</p>

‎apps/control-center/sfcc/pagine/tuner.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,9 @@ def _motivo_cpu(self, r):
786786
}.get(f.get("campo"))
787787
if frase:
788788
return frase % (f.get("min", 0), f.get("max", 0))
789+
if r.get("err") == "bc250_smu_oc is not installed: sudo apt install skillfish-smu-oc":
790+
return L("bc250_smu_oc non è installato: sudo apt install skillfish-smu-oc",
791+
"bc250_smu_oc is not installed: sudo apt install skillfish-smu-oc")
789792
return r.get("err") or L("non applicata", "not applied")
790793

791794
def _applica_cpu(self):

‎apps/control-center/skillfish-cc-helper‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,9 @@ def apply_cpu_esito(mhz, scale, tmp):
435435
fuori = _cpu_fuori(mhz, scale, tmp)
436436
if fuori:
437437
return False, fuori
438+
if not os.path.exists("%s/bc250_apply.py" % OC_DIR):
439+
# issue #96: the backend was never installed on normal systems
440+
return False, "bc250_smu_oc is not installed: sudo apt install skillfish-smu-oc"
438441
_log("CPU: %d MHz, scale %d, limite %d C" % (mhz, scale, tmp))
439442
prima = _cpu_conf()
440443
_write_cpu_conf(mhz, scale, tmp)
@@ -462,8 +465,10 @@ def _esito_cpu(ok, perche):
462465

463466

464467
def persist_cpu():
465-
sh("python3 %s/bc250_apply.py --install %s" % (OC_DIR, OC_CONF))
466-
sh("systemctl enable bc250-smu-oc.service")
468+
# The unit comes with skillfish-smu-oc, guarded by skillfish-is-bc250.
469+
# `bc250_apply.py --install` would overwrite it with upstream's, which has
470+
# no guard: only the conf (written by apply_cpu_esito) and the enable here.
471+
sh("systemctl daemon-reload; systemctl enable bc250-smu-oc.service")
467472

468473

469474
# An offline CPU has no topology/ in sysfs, so its core can't be read back.
@@ -725,6 +730,11 @@ def cu_keep_boot(on, rows):
725730
Only a mapping that is actually on the card can be kept: saving something
726731
that was never applied would arm the next boot with a routing nobody has
727732
seen work. The idea, and the check, are from tom lima's PR #80."""
733+
# The unit is what reads the saved mapping at boot. Issue #98: on systems
734+
# installed from an ISO it was never enabled, so a saved mapping, and the
735+
# plain 40 CU, were never applied. Enabled here whatever the choice: with
736+
# nothing saved it switches all 40 on.
737+
sh("systemctl enable skillfish-cu.service", 30)
728738
if not on:
729739
p = sh("/usr/local/bin/skillfish-cu boot-clear", 30)
730740
return {"ok": p.returncode == 0, **{k: v for k, v in cu_get().items() if k != "ok"}}

‎apps/tuner/skillfish-tuner-helper‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def apply_cpu(mhz,scale,tmp):
170170
return r.returncode==0
171171

172172
def persist_cpu():
173-
sh("python3 %s/bc250_apply.py --install %s"%(OC_DIR,OC_CONF)); sh("systemctl enable bc250-smu-oc.service")
173+
# the unit comes with skillfish-smu-oc: --install would replace it with upstream's, unguarded
174+
sh("systemctl daemon-reload; systemctl enable bc250-smu-oc.service")
174175

175176
def _gpu_curve(minmhz,minmv,maxmhz,maxmv):
176177
# Build a SMOOTH multi-point voltage curve (gentle clock/voltage transitions).

‎iso/config/hooks/normal/0040-bc250-smu-oc.hook.chroot‎

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎iso/config/hooks/normal/0140-abilita-servizi.hook.chroot‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,19 @@ skillfish-freeze-check.service
4545
skillfish-gpu-freq.service
4646
skillfish-wol.service
4747
skillfish-firstboot-snapshots.service
48+
skillfish-cu.service
49+
skillfish-fand.service
50+
skillfish-sensori.service
51+
skillfish-gpu-calibrate-recovery.service
52+
skillfish-hub-refresh.timer
53+
skillfish-firstboot-flatpaks.service
54+
skillfish-cpu-governor.service
55+
skillfish-mesa.service
4856
"
57+
# ⚠️ Issue #98, and the reason the postinst enables did not take: they were
58+
# written inside `if [ -d /run/systemd/system ]`, which is false in a chroot.
59+
# skillfish-cu.service was missing from this list too, so no installed system
60+
# ever switched its 40 CU on at boot.
4961

5062
mancanti=0
5163
for S in $SERVIZI; do

‎packages/skillfish-mesa-gfx1013/pacchetto-mesa.sh‎

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,34 @@ JSON
6565
install -m 0755 "$QUI/skillfish-mesa" "$P/usr/bin/skillfish-mesa" || exit 1
6666
install -m 0644 "$QUI/skillfish-mesa.service" "$P/usr/lib/systemd/system/skillfish-mesa.service" || exit 1
6767

68+
# ⚠️ ISSUE #97: THE REAL DEPENDENCIES. Until 26.09.45 this said "python3" and
69+
# nothing else, so apt did not know our libraries need libLLVM.so.21.1 and the
70+
# rest. When Debian moved its Mesa to LLVM 22, libllvm21 became an orphan and
71+
# autoremove took it: every 64-bit EGL/GBM user broke with it, the desktop
72+
# included. dpkg-shlibdeps reads what the ELF files actually link against.
73+
# libdisplay-info is left out: the postinst copies the system one next to ours.
74+
SHL=$(mktemp -d)
75+
mkdir -p "$SHL/debian"
76+
printf 'Source: skillfish-mesa-gfx1013\n\nPackage: skillfish-mesa-gfx1013\nArchitecture: amd64\n' > "$SHL/debian/control"
77+
ELF=$(find "$P/opt/skillfish-gfx1013/lib" -type f -name '*.so*' ! -name 'libdisplay-info*' \
78+
-exec sh -c 'head -c4 "$1" | grep -q ELF && echo "$1"' _ {} \; | sort)
79+
(cd "$SHL" && dpkg-shlibdeps -O -l"$P/opt/skillfish-gfx1013/lib/x86_64-linux-gnu" $ELF) \
80+
> "$SHL/out" 2> "$SHL/err" || { cat "$SHL/err" >&2; exit 1; }
81+
SHLIBS=$(sed -n 's/^shlibs:Depends=//p' "$SHL/out")
82+
rm -rf "$SHL"
83+
case "$SHLIBS" in
84+
*libllvm21*) ;;
85+
*) echo "dpkg-shlibdeps did not find libllvm21: '$SHLIBS'" >&2; exit 1 ;;
86+
esac
87+
echo "Depends: python3, $SHLIBS"
88+
6889
cat > "$P/DEBIAN/control" <<CTRL
6990
Package: skillfish-mesa-gfx1013
7091
Version: $VER
7192
Section: libs
7293
Priority: optional
7394
Architecture: amd64
74-
Depends: python3
95+
Depends: python3, $SHLIBS
7596
Recommends: skillfishos-kernel
7697
Maintainer: SkillFishOS <info@skillfishos.com>
7798
Description: SkillFishOS - our Mesa for the BC-250, the whole driver
@@ -103,9 +124,19 @@ Description: SkillFishOS - our Mesa for the BC-250, the whole driver
103124
Part of SkillFishOS.
104125
CTRL
105126

127+
# A file trigger on the library directory: whenever a package puts files in it
128+
# or takes them out, the switch checks again that our libraries still load, and
129+
# gives the machine back to Debian's Mesa if they do not (issue #97). Without it
130+
# the check would only run at the next boot, with the desktop already broken.
131+
echo "interest-noawait /usr/lib/x86_64-linux-gnu" > "$P/DEBIAN/triggers"
132+
106133
cat > "$P/DEBIAN/postinst" <<'POST'
107134
#!/bin/sh
108135
set -e
136+
if [ "$1" = "triggered" ]; then
137+
/usr/bin/skillfish-mesa avvio || true
138+
exit 0
139+
fi
109140
# ⚠️ libdisplay-info: la nostra .so e' compilata su sid e la chiede, ma il
110141
# runtime flatpak dei giochi non ce l'ha. Si copia quella del sistema accanto
111142
# alla nostra invece di spedirne una copia nostra: cosi' resta allineata agli

‎packages/skillfish-mesa-gfx1013/skillfish-mesa‎

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
skillfish-mesa off Debian's driver back, everywhere
66
skillfish-mesa stato what is set right now
77
skillfish-mesa avvio what the boot service calls: apply the gate, quietly
8+
(and the dpkg trigger, after any library change)
89
skillfish-mesa json the same state as JSON, for the Control Center helper
910
1011
TWO HALVES, because a flatpak cannot see the host's ld.so.conf.
@@ -115,6 +116,33 @@ def installata():
115116
return os.path.exists(RADV)
116117

117118

119+
# Every library the machine loads from our directory once the ld.so.conf line
120+
# is there. dri_gbm.so is what libgbm opens for the compositor.
121+
CARICATE = ("libgallium-*.so", "libEGL_mesa.so.0", "libGLX_mesa.so.0", "libgbm.so.1",
122+
"libvulkan_radeon.so", "gbm/dri_gbm.so")
123+
124+
125+
def librerie_mancanti():
126+
"""System libraries ours link against that cannot be found, or [].
127+
128+
⚠️ Issue #97. Our Mesa is linked against libLLVM.so.21.1. On 21/09 Debian
129+
moved its own Mesa to LLVM 22, which left libllvm21 with no reverse
130+
dependency on a user's system, and the next `apt autoremove` took it away.
131+
With our directory first in the ld.so cache every 64-bit process then
132+
failed to load EGL and GBM: Xorg came up without glamor and DRI3, so
133+
Vulkan had no queue that could present (games aborted with signal 6), and
134+
kwin_wayland could not start at all. The package now depends on what it
135+
links, and this check is the second line: if anything is still missing,
136+
the machine goes back to Debian's driver instead of losing its desktop.
137+
"""
138+
fuori = []
139+
for schema in CARICATE:
140+
for so in glob.glob(os.path.join(LIBS, schema)):
141+
r = sh("LD_LIBRARY_PATH=%s ldd %s" % (LIBS, so), 30)
142+
fuori += [l.split()[0] for l in r.stdout.splitlines() if "not found" in l]
143+
return sorted(set(fuori))
144+
145+
118146
def perche_no():
119147
"""The reason our driver must not be switched on here, or None."""
120148
if not installata():
@@ -123,6 +151,10 @@ def perche_no():
123151
return "questa macchina non e' una BC-250: la nostra Mesa e' compilata per quel chip"
124152
if not kernel_nostro():
125153
return "serve il kernel SkillFishOS: su un altro kernel le code compute piantano la GPU"
154+
mancano = librerie_mancanti()
155+
if mancano:
156+
return ("missing system libraries: %s (sudo apt install --reinstall %s)"
157+
% (", ".join(mancano), PACCHETTO))
126158
return None
127159

128160

@@ -293,9 +325,12 @@ def avvio():
293325
come up with a driver that opens the compute queues, and the decision cannot
294326
be taken once at install time because the kernel can change at any boot.
295327
"""
296-
if perche_no():
328+
motivo = perche_no()
329+
if motivo:
297330
if host_attivo():
298331
spegni_tutto(zitto=True)
332+
# the journal is where anybody will look when the desktop changed driver
333+
print("skillfish-mesa: back to Debian's Mesa: %s" % motivo, file=sys.stderr)
299334
return 0
300335
accendi_tutto(zitto=True)
301336
return 0

0 commit comments

Comments
 (0)