File: 0004-debian-Support-asahi-diagnose.patch

package info (click to toggle)
asahi-scripts 20250713-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 316 kB
  • sloc: sh: 860; makefile: 117
file content (88 lines) | stat: -rw-r--r-- 2,756 bytes parent folder | download | duplicates (2)
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
From: Noisy Coil <noisycoil@tutanota.com>
Date: Thu, 22 Aug 2024 15:56:37 +0200
Subject: debian: Support asahi-diagnose

---
 asahi-diagnose | 42 ++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/asahi-diagnose b/asahi-diagnose
index 57a4386..af99c1d 100755
--- a/asahi-diagnose
+++ b/asahi-diagnose
@@ -69,6 +69,35 @@ EOF
 }
 
 
+apt_sources() {
+    echo "## APT sources"
+    echo
+    for sl in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
+        if [ -f "$sl" ]; then
+            echo "### $sl"
+            echo "\`\`\`"
+            cat "$sl"
+            echo "\`\`\`"
+            echo
+        fi
+    done
+}
+
+apt_preferences() {
+    echo "## APT preferences"
+    echo
+    for pf in /etc/apt/preferences /etc/apt/preferences.d/*; do
+        if [ -f "$pf" ]; then
+            echo "### $pf"
+            echo "\`\`\`"
+            cat "$pf"
+            echo "\`\`\`"
+            echo
+        fi
+    done
+}
+
+
 # Check pipewire profile
 check_macaudio_profile() {
     local profile_config="${HOME}/.local/state/wireplumber/default-profile"
@@ -80,7 +109,7 @@ macaudio_profile=$(check_macaudio_profile)
 
 # Check for the Pro Audio profile (installed before early 2023)
 check_proaudio() {
-    grep "alsa_output.platform-sound.pro-output.." "${HOME}/.local/state/wireplumber/restore-stream" > /dev/null \
+    grep "alsa_output.platform-sound.pro-output.." "${HOME}/.local/state/wireplumber/restore-stream" > /dev/null 2>&1 \
     && echo "yes" \
     || echo "no"
 }
@@ -158,13 +187,20 @@ package_versions() {
             fedora-asahi-remix-scripts tiny-dfr uboot-images-armv8 kernel-16k
             kernel-16k-modules-extra asahi-fwextract dracut-asahi update-m1n1
             asahi-audio speakersafetyd wireplumber pipewire mesa"
+    elif [ -e /etc/debian_version ]; then
+      cmd="dpkg -l"
+      pkgs="m1n1 alsa-ucm-conf-asahi tiny-dfr u-boot-asahi linux-image-*asahi*
+            asahi-fwextract asahi-audio speakersafetyd wireplumber pipewire
+            ligbm1 lib*mesa0 libgl1-mesa-dri mesa-libgallium mesa-*-drivers
+            mesa-opencl-icd asahi-platform* ubuntu-asahi triforce-lv2 bankstown-lv2
+            asahi-bless asahi-btsync asahi-nvram asahi-wifisync asahi-scripts"
     else
       echo "Distribution not supported"
       return
     fi
     cat <<EOF
 \`\`\`
-$($cmd $pkgs 2>/dev/null | sort -u)
+$($cmd $pkgs 2>/dev/null | grep '^ii' | sort -u)
 \`\`\`
 
 EOF
@@ -219,6 +255,8 @@ diagnose() {
         firmware_versions
         boot_config
         system_info
+        apt_sources
+        apt_preferences
         audio_config
         environment
         getfile /proc/mounts "Mounts"