From ba53b6bb614b3d581cb371529938b8ce8d7f80a5 Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Sat, 28 Nov 2026 21:14:05 +1000 Subject: [PATCH] aurora-sep: set the M3 GPU switches as aurora.* as well as asahi.* Kernels since the 7.3 line build the GPU driver as aurora.ko, and kmod hands a module only the command line's . keys. The asahi.t8122_start=0 that the boot profile, the persistent route and the retained GPU-off entries write to keep the GPU off does nothing there, and air-gpu-oneshot.sh's asahi.* knobs are ignored; on a MacBook Air M3 the log still read "cap 8 lowered to 2" with asahi.t8122_pstate_cap=5 on the command line, and "lowered to 5" with aurora.t8122_pstate_cap=5. The kernels of the earlier releases build asahi.ko and read asahi.*. Write each switch under both names: each module ignores the other's key. Strip both forms before writing, so an existing asahi.* word is replaced and not doubled. air-gpu-collect.sh counts a boot as armed with either form and matches the aurora driver's refusal and probe lines; air-gpu-oneshot.sh refuses a normal entry that sets either form and looks for the bare parameter name in the kernel image, which both kernels contain. The M3 Max kit's T6031 keys are left alone. --- tools/aurora-sep/air-gpu/air-gpu-collect.sh | 12 ++++----- tools/aurora-sep/air-gpu/air-gpu-oneshot.sh | 23 +++++++++------- tools/aurora-sep/install-aurora-sep.sh | 26 ++++++++++--------- tools/aurora-sep/m3-boot-profile.py | 6 +++-- tools/aurora-sep/tests/test_air_gpu.py | 20 +++++++++----- .../aurora-sep/tests/test_m3_boot_profile.py | 12 ++++----- tools/aurora-sep/tests/test_m3_cmdline.py | 12 ++++----- tools/aurora-sep/tests/test_m3_persistent.py | 6 ++--- 8 files changed, 66 insertions(+), 51 deletions(-) diff --git a/tools/aurora-sep/air-gpu/air-gpu-collect.sh b/tools/aurora-sep/air-gpu/air-gpu-collect.sh index 4a3e92bb346f63..4a67aac86d34c8 100755 --- a/tools/aurora-sep/air-gpu/air-gpu-collect.sh +++ b/tools/aurora-sep/air-gpu/air-gpu-collect.sh @@ -12,7 +12,7 @@ # the tgz has lines naming a serial number dropped and MAC addresses masked. # # The last line printed is the verdict, one of: -# NOT-ARMED the analysed boot did not have asahi.t8122_start=1 (no one-shot boot) +# NOT-ARMED the analysed boot did not have aurora.t8122_start=1 (or asahi.t8122_start=1) (no one-shot boot) # ARMED-NO-LOG the last arming's boot left no kernel log (most likely a hang in the GPU # start, before the journal was written); no older boot's result is shown # ARMED-NOT-STARTED armed, but the driver stopped before it started the firmware @@ -82,11 +82,11 @@ RE_KERNEL_ARMED='M3 G15G start: armed' # 2. Without those lines (a kernel before them, or a test run on an M3 Pro), these extended regexes # decide, in this order: armed? -> firmware started? -> InitData sent? -> accepted? -> job? # The boot was armed: on its command line. -RE_ARMED='(^| )asahi\.t8122_start=1( |$)' +RE_ARMED='(^| )(asahi|aurora)\.t8122_start=1( |$)' # The driver refused or stopped before it started the firmware (the last such line is the reason). -RE_REFUSED='M3 G15G start: (refused|not armed)|GPU startup disabled|identity or ABI rejected|startup refused|no GPU backend|invalid for parameter .asahi\.|InitData self-check failed' +RE_REFUSED='M3 G15G start: (refused|not armed)|GPU startup disabled|identity or ABI rejected|startup refused|no GPU backend|invalid for parameter .(asahi|aurora)\.|InitData self-check failed' # The probe ended in an error (the reason when nothing more specific was logged). -RE_PROBE_FAILED='probe with driver asahi failed' +RE_PROBE_FAILED='probe with driver (asahi|aurora) failed' # The driver probed the GPU at all (without a boot-loader handoff the GPU node is disabled). RE_PROBED='asahi [0-9a-f]+\.gpu: Probing' # The GPU coprocessor's firmware was started. @@ -105,7 +105,7 @@ RE_JOB_NOT_DISPATCHED='GPU is powered down' RE_JOB_FAILED='M3 scheduler: execution failed|M3 completion events=|GPU is powered down|M3 fault render|M3 bank [0-9]+ fault=0x[0-9a-f]*[1-9a-f]|M3 fault mapping' # # The GPU lines kept in gpu-log.txt, and the firmware's own log lines in firmware-log.txt. -RE_GPU_LINES='asahi|agx|G15|M3[ _:]|t8122|gpu|RTKit|devcoredump|macsmc' +RE_GPU_LINES='asahi|aurora|agx|G15|M3[ _:]|t8122|gpu|RTKit|devcoredump|macsmc' RE_FW_LOG='\.gpu: RTKit: (syslog|crashlog|co-processor|Unknown)|firmware crashed|crashlog|M3 firmware|M3 G15G (verdict|start)' # SMC power keys that read zero at idle on an M3 Air (J613) sample (2026-10-06): the GPU rail # candidates. One of them should rise the first time the GPU draws power. @@ -376,7 +376,7 @@ classify_core() { last_line() { { grep -aE "$1" "$log" || true; } | tail -1 | sed -E 's/^\[[^]]*\] *//; s/^[^ ]+ kernel: //'; } if ! [[ " $cmd " =~ $RE_ARMED ]]; then VERDICT=NOT-ARMED VERDICT_SRC=cmdline - REASON="asahi.t8122_start=1 is not on the analysed boot's command line" + REASON="neither aurora.t8122_start=1 nor asahi.t8122_start=1 is on the analysed boot's command line" return 0 fi if grep -qaE "$RE_KERNEL_VERDICT" "$log"; then diff --git a/tools/aurora-sep/air-gpu/air-gpu-oneshot.sh b/tools/aurora-sep/air-gpu/air-gpu-oneshot.sh index 2231a78b2a3465..53a7769f8bc7b8 100755 --- a/tools/aurora-sep/air-gpu/air-gpu-oneshot.sh +++ b/tools/aurora-sep/air-gpu/air-gpu-oneshot.sh @@ -1,6 +1,7 @@ #!/bin/bash # air-gpu-oneshot.sh: arm ONE boot of this M3 MacBook Air with the GPU start switch -# (asahi.t8122_start=1) and the given asahi knobs on the kernel command line. +# (aurora.t8122_start=1, and asahi.t8122_start=1 for kernels that still build asahi.ko) and the +# given knobs on the kernel command line. # # sudo air-gpu-oneshot.sh start arm one boot with the kernel's defaults # sudo air-gpu-oneshot.sh = ... arm one boot with these knobs as well @@ -146,16 +147,17 @@ list_knobs() { printf '%s\n' "$KNOBS" | sed '/^$/d' } -# Fills PARAMS ("asahi.name=value" words, t8122_start first) from the arguments, or refuses. +# Fills PARAMS from the arguments, or refuses: each knob as asahi.name=value and aurora.name=value +# (aurora.ko reads aurora.*, the older asahi.ko asahi.*), t8122_start first. PARAMS=() parse_knobs() { local arg name value line re seen=" " - PARAMS=("asahi.t8122_start=1") + PARAMS=("asahi.t8122_start=1" "aurora.t8122_start=1") for arg in "$@"; do [[ $arg == start ]] && continue [[ $arg == *=* ]] || refuse "\"$arg\" is not a knob=value (or start)." name=${arg%%=*} value=${arg#*=} - name=${name#asahi.} + name=${name#asahi.} name=${name#aurora.} line=$(knob_line "$name") [[ -n $line ]] || refuse "unknown knob \"$name\" (air-gpu-oneshot.sh --list-knobs lists them)." re=$(awk '{ print $2 }' <<<"$line") @@ -165,7 +167,7 @@ parse_knobs() { [[ $seen != *" $name "* ]] || refuse "$name is given twice." seen+="$name " [[ $name == t8122_start ]] && continue - PARAMS+=("asahi.$name=$value") + PARAMS+=("asahi.$name=$value" "aurora.$name=$value") done } @@ -428,9 +430,9 @@ preflight() { refuse "the //$SOURCE_ENTRY entry has no cmdline: with root= to copy." [[ $SRC_CMDLINE != *'"'* && $SRC_CMDLINE != *"'"* ]] || refuse "the //$SOURCE_ENTRY command line has quotes, which this script does not rewrite." - # The kernel reads - and _ alike in a parameter name, and a bare asahi.t8122_start means =1. - [[ ! " $SRC_CMDLINE " =~ \ asahi\.t8122[_-]start([=\ ]) ]] || - refuse "the normal //$SOURCE_ENTRY entry already sets asahi.t8122_start, so every boot would start the GPU. Remove it from /etc/default/limine first." + # The kernel reads - and _ alike in a parameter name, and a bare aurora.t8122_start means =1. + [[ ! " $SRC_CMDLINE " =~ \ (asahi|aurora)\.t8122[_-]start([=\ ]) ]] || + refuse "the normal //$SOURCE_ENTRY entry already sets t8122_start, so every boot would start the GPU. Remove it from /etc/default/limine first." UKI=$(limine_file "$SRC_PATH") [[ -f $UKI ]] || refuse "the //$SOURCE_ENTRY entry's UKI $UKI does not exist." if [[ $SRC_PATH == *#* ]]; then @@ -443,7 +445,8 @@ preflight() { fi grep -qaF "$KREL" "$UKI" || refuse "$UKI is not the kernel this boot runs ($KREL). Reboot into the installed kernel first." for p in "${PARAMS[@]}"; do - p=${p%%=*} + [[ $p == aurora.* ]] && continue + p=${p%%=*} p=${p#asahi.} if ! grep -qaF "$p" "$UKI"; then if is_m3pro && ((ALLOW_M3PRO)); then WARNINGS+=("this kernel has no $p parameter; the test boot ignores it") @@ -511,7 +514,7 @@ new_cmdline() { set +f for w in "${words[@]}"; do skip=0 - [[ $w == asahi.t8122[_-]* || $w == "$TAG"=* || $w == panic=* ]] && skip=1 + [[ $w == asahi.t8122[_-]* || $w == aurora.t8122[_-]* || $w == "$TAG"=* || $w == panic=* ]] && skip=1 for p in "${PARAMS[@]}"; do name=${p%%=*} [[ $w == "$name" || $w == "$name"=* ]] && skip=1 diff --git a/tools/aurora-sep/install-aurora-sep.sh b/tools/aurora-sep/install-aurora-sep.sh index 778bf309e518e1..a144c64369b139 100755 --- a/tools/aurora-sep/install-aurora-sep.sh +++ b/tools/aurora-sep/install-aurora-sep.sh @@ -678,8 +678,8 @@ M3_PERSISTENT_TRANSACTION_ACTIVE=0 M3_PERSISTENT_MAIN_ARMED=0 M3_GPU_BIN=/usr/local/bin M3_GPU_SCRIPTS=( - "air-gpu-oneshot.sh d0259869b8519439a4dbcdae08ef1b0e17fdcaf84ac746fca61febf6a325f8aa" - "air-gpu-collect.sh face8fac811b59c31a8e98e6ca704a2cb33eceada8bc37986397cb393b050b30" + "air-gpu-oneshot.sh 9d41005ecd45485fd573a01237e2b8e4f4a5a4f9ecaad59ec84ca7cedbad3104" + "air-gpu-collect.sh 87d26091209580abadbcf128ec04a59751a2d91830d4018b2ee8506d6420151b" "air-gpu-job.sh 9a0eb9aab52fd099488054e4ed4846c579b19fc9f78144245242b6975a40da1d" ) # The Mesa prefix air-gpu-job.sh runs with: mesa-m3's (12.4 on; it replaces the separate @@ -1741,7 +1741,7 @@ mesa_needs_too_old() { # the tools of an earlier one. m3_gpu_notice() { if ((M3_GPU_PERSISTENT)); then - say "Experimental GPU profile $M3_GPU_PROFILE is selected for subsequent boots with the matched kernel, Mesa and bootloader. The retained previous entry uses asahi.t8122_start=0 and mesa_m3=off." + say "Experimental GPU profile $M3_GPU_PROFILE is selected for subsequent boots with the matched kernel, Mesa and bootloader. The retained previous entry uses aurora.t8122_start=0 (and asahi.t8122_start=0 for kernels that still build asahi.ko) and mesa_m3=off." say "Reboot, log into your desktop, then run: aurora-m3-gpu-check" [[ $M3_GPU_PROFILE != j613-25g83 ]] || say "25G83 native OpenGL is experimental; Vulkan hardware support is unavailable." if m3_25_j615; then m3_25_j615_warning; fi @@ -3474,8 +3474,8 @@ EOF subvol=$(findmnt -no FSROOT /) cmdline=$(sed -e 's/BOOT_IMAGE=[^ ]*//' /proc/cmdline) if ((M3_GPU_PERSISTENT)); then - cmdline=$(sed -E 's/(^| )asahi\.t8122[_-]start(=[^ ]*)?//g; s/(^| )mesa_m3=[^ ]*//g' <<<"$cmdline") - cmdline+=" asahi.t8122_start=0 mesa_m3=off" + cmdline=$(sed -E 's/(^| )(asahi|aurora)\.t8122[_-]start(=[^ ]*)?//g; s/(^| )mesa_m3=[^ ]*//g' <<<"$cmdline") + cmdline+=" asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off" fi if [[ $(findmnt -no FSTYPE /boot) == vfat ]]; then linux=/vmlinuz-aurora-sep-previous initrd=/initramfs-aurora-sep-previous.img @@ -7368,7 +7368,7 @@ if text.count(begin) != text.count(end) or text.count(begin) > 1: raise SystemExit('malformed owned M3 cmdline block') text = re.sub(re.escape(begin) + r'\n.*?' + re.escape(end) + r'\n?', '', text, flags=re.S) if chain == 'grub': - setting = 'GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} asahi.t8122_start=' + armed + '"' + setting = 'GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} asahi.t8122_start=' + armed + ' aurora.t8122_start=' + armed + '"' else: # Limine reads literal assignments; it does not expand shell variables. values = {} @@ -7407,9 +7407,9 @@ else: if not value: value = Path(sys.argv[5]).read_text().strip() if any(c in value for c in ('"', "'", '\n', '\r', '`', '${', '$(', '+=')) or not any(w.startswith('root=') for w in value.split()): raise SystemExit('Limine command line must contain literal root= arguments without quotes, shell expressions or += inside arguments; fix ' + str(path) + ' before retrying') - words = [w for w in value.split() if not re.match(r'asahi\.t8122[_-]start(?:=|$)', w) + words = [w for w in value.split() if not re.match(r'(?:asahi|aurora)\.t8122[_-]start(?:=|$)', w) and not w.startswith(('mesa_m3=', 'air_gpu.oneshot=', 'BOOT_IMAGE='))] - words += ['asahi.t8122_start=' + armed] + words += ['asahi.t8122_start=' + armed, 'aurora.t8122_start=' + armed] if armed == '0': words += ['mesa_m3=off'] setting = 'KERNEL_CMDLINE[linux-aurora]="' + ' '.join(words) + '"' data = text.rstrip() + '\n\n' + begin + '\n' + setting + '\n' + end + '\n' @@ -7502,9 +7502,11 @@ def locks(paths, timeout=30.0): def cmdline(line, armed): if '"' in line or "'" in line or not any(w.startswith('root=') for w in line.split()): raise ValueError('boot command line must contain root= and have no quotes') - words = [w for w in line.split() if not re.match(r'asahi\.t8122[_-]start(?:=|$)', w) + words = [w for w in line.split() if not re.match(r'(?:asahi|aurora)\.t8122[_-]start(?:=|$)', w) and not w.startswith('mesa_m3=') and not w.startswith('air_gpu.oneshot=')] - return ' '.join(words + ['asahi.t8122_start=' + ('1' if armed else '0')] + ([] if armed else ['mesa_m3=off'])) + # aurora.ko reads aurora.*, the older asahi.ko asahi.*; each module ignores the other's key. + value = '1' if armed else '0' + return ' '.join(words + ['asahi.t8122_start=' + value, 'aurora.t8122_start=' + value] + ([] if armed else ['mesa_m3=off'])) def without_block(text): if text.count(BEGIN) != text.count(END) or text.count(BEGIN) > 1: @@ -7756,9 +7758,9 @@ lines=text.splitlines(keepends=True) indices=[i for i,l in enumerate(lines) if re.match(r'\s*linux\s+\S*vmlinuz-aurora-sep-previous\s',l)] if len(indices)!=1: raise SystemExit('retained GRUB entry is missing its unique previous kernel line') i=indices[0] -line=re.sub(r'(^| )asahi\.t8122[_-]start(?:=[^ ]*)?(?= |$)',r'\1',lines[i].rstrip()) +line=re.sub(r'(^| )(?:asahi|aurora)\.t8122[_-]start(?:=[^ ]*)?(?= |$)',r'\1',lines[i].rstrip()) line=re.sub(r'(^| )mesa_m3=[^ ]*',r'\1',line) -lines[i]=line+' asahi.t8122_start=0 mesa_m3=off\n' +lines[i]=line+' asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off\n' path.write_text(''.join(lines)) M3_GRUB_OFF } diff --git a/tools/aurora-sep/m3-boot-profile.py b/tools/aurora-sep/m3-boot-profile.py index ea681588c9ae7c..d58e5a361999b4 100644 --- a/tools/aurora-sep/m3-boot-profile.py +++ b/tools/aurora-sep/m3-boot-profile.py @@ -64,9 +64,11 @@ def locks(paths, timeout=30.0): def cmdline(line, armed): if '"' in line or "'" in line or not any(w.startswith('root=') for w in line.split()): raise ValueError('boot command line must contain root= and have no quotes') - words = [w for w in line.split() if not re.match(r'asahi\.t8122[_-]start(?:=|$)', w) + words = [w for w in line.split() if not re.match(r'(?:asahi|aurora)\.t8122[_-]start(?:=|$)', w) and not w.startswith('mesa_m3=') and not w.startswith('air_gpu.oneshot=')] - return ' '.join(words + ['asahi.t8122_start=' + ('1' if armed else '0')] + ([] if armed else ['mesa_m3=off'])) + # aurora.ko reads aurora.*, the older asahi.ko asahi.*; each module ignores the other's key. + value = '1' if armed else '0' + return ' '.join(words + ['asahi.t8122_start=' + value, 'aurora.t8122_start=' + value] + ([] if armed else ['mesa_m3=off'])) def without_block(text): if text.count(BEGIN) != text.count(END) or text.count(BEGIN) > 1: diff --git a/tools/aurora-sep/tests/test_air_gpu.py b/tools/aurora-sep/tests/test_air_gpu.py index 14a067780a02eb..f34ee866ab3491 100644 --- a/tools/aurora-sep/tests/test_air_gpu.py +++ b/tools/aurora-sep/tests/test_air_gpu.py @@ -224,8 +224,9 @@ def test_arm_consume_disarm(self): self.assertIn(" protocol: efi", lines) self.assertIn(f" path: {self.mac.path}", lines) cmd = next(l for l in lines if l.startswith(" cmdline: "))[len(" cmdline: "):] - self.assertTrue(cmd.startswith(CMDLINE + " asahi.t8122_start=1 asahi.t8122_pstate_cap=1 " - "asahi.t8122_clkgen=e1c panic=10 air_gpu.oneshot="), cmd) + self.assertTrue(cmd.startswith(CMDLINE + " asahi.t8122_start=1 aurora.t8122_start=1 asahi.t8122_pstate_cap=1 " + "aurora.t8122_pstate_cap=1 asahi.t8122_clkgen=e1c aurora.t8122_clkgen=e1c " + "panic=10 air_gpu.oneshot="), cmd) # The normal entry, the default and everything else stay as they were. text = self.mac.conf.read_text() self.assertTrue(text.startswith(before.decode().rstrip("\n")), text) @@ -342,13 +343,16 @@ def test_start_alone(self): self.oneshot("start", check=True) cmd = re.search(r"^ cmdline: (.*)$", self.armed_block(), re.M).group(1) self.assertEqual([w for w in cmd.split() if w.startswith("asahi.")], ["asahi.t8122_start=1"]) + self.assertEqual([w for w in cmd.split() if w.startswith("aurora.")], ["aurora.t8122_start=1"]) def test_knobs_on_the_normal_cmdline_are_replaced(self): - self.mac.conf.write_text(limine_conf(self.mac.path, CMDLINE + " asahi.t8122_pstate_cap=5 asahi.m3_expose=0")) + self.mac.conf.write_text(limine_conf(self.mac.path, CMDLINE + " asahi.t8122_pstate_cap=5 asahi.m3_expose=0 aurora.t8122_pstate_cap=4")) self.oneshot("t8122_pstate_cap=1", "m3_expose=1", check=True) cmd = re.search(r"^ cmdline: (.*)$", self.armed_block(), re.M).group(1).split() self.assertEqual([w for w in cmd if w.startswith("asahi.")], ["asahi.t8122_start=1", "asahi.t8122_pstate_cap=1", "asahi.m3_expose=1"]) + self.assertEqual([w for w in cmd if w.startswith("aurora.")], + ["aurora.t8122_start=1", "aurora.t8122_pstate_cap=1", "aurora.m3_expose=1"]) def test_check_changes_nothing(self): before = self.mac.snapshot() @@ -373,7 +377,7 @@ def test_test_run_on_a_kernel_without_the_knobs(self): # A kernel without the knobs (12.0 on an M3 Pro): the boot steps can still be tested. self.mac = FakeMac(self, board="j516s", uki_params=[b"asahi.m3_expose"]) proc = self.oneshot("--allow-test-on-m3pro", "start", check=True) - self.assertIn("has no asahi.t8122_start parameter; the test boot ignores it", proc.stdout) + self.assertIn("has no t8122_start parameter; the test boot ignores it", proc.stdout) # Refusals: each one changes nothing @@ -429,7 +433,7 @@ def test_initdata_version_bounds(self): def test_refuses_a_knob_the_kernel_lacks(self): self.mac = FakeMac(self, uki_params=[p for p in PARAMS if p != b"asahi.t8122_clkgen"]) - self.assert_refused("has no asahi.t8122_clkgen parameter", "t8122_clkgen=none") + self.assert_refused("has no t8122_clkgen parameter", "t8122_clkgen=none") def test_refuses_unsafe_limine_settings(self): cases = [ @@ -437,8 +441,10 @@ def test_refuses_unsafe_limine_settings(self): limine_conf(self.mac.path, top="remember_last_entry: yes\n"))), ("2 //linux-aurora entries", lambda: self.mac.conf.write_text( limine_conf(self.mac.path, extra=f" //linux-aurora\n protocol: efi\n path: {self.mac.path}\n"))), - ("already sets asahi.t8122_start", lambda: self.mac.conf.write_text( + ("already sets t8122_start", lambda: self.mac.conf.write_text( limine_conf(self.mac.path, CMDLINE + " asahi.t8122_start=1"))), + ("already sets t8122_start", lambda: self.mac.conf.write_text( + limine_conf(self.mac.path, CMDLINE + " aurora.t8122_start=1"))), ("measures BLAKE2b", lambda: self.mac.uki.write_bytes(self.mac.uki.read_bytes() + b"x")), ("Reboot into the installed kernel first", lambda: self.mac.conf.write_text( limine_conf(self.mac.path, kver="7.1.12-2-12.0-sep-ARCH"))), @@ -733,6 +739,8 @@ def test_without_the_kernels_verdict_lines(self): def test_not_armed(self): self.assertEqual(self.verdict(RUNNING, cmd=CMDLINE)[0], "NOT-ARMED") self.assertEqual(self.verdict(RUNNING, cmd=CMDLINE + " asahi.t8122_start=0")[0], "NOT-ARMED") + self.assertEqual(self.verdict(RUNNING, cmd=CMDLINE + " aurora.t8122_start=0")[0], "NOT-ARMED") + self.assertNotEqual(self.verdict(RUNNING, cmd=CMDLINE + " aurora.t8122_start=1")[0], "NOT-ARMED") JOURNALCTL = r"""#!/bin/bash diff --git a/tools/aurora-sep/tests/test_m3_boot_profile.py b/tools/aurora-sep/tests/test_m3_boot_profile.py index 8d406579420d49..773d7428405106 100644 --- a/tools/aurora-sep/tests/test_m3_boot_profile.py +++ b/tools/aurora-sep/tests/test_m3_boot_profile.py @@ -34,18 +34,18 @@ def run_helper(self,action,ok=True,timeout=None): def test_retains_bytes_modules_and_gpu_off_entry(self): self.run_helper('retain') saved=json.loads((self.state/'m3-known-entry.json').read_text()) - self.assertIn('asahi.t8122_start=0 mesa_m3=off',saved['cmdline']) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off',saved['cmdline']) path=self.esp/saved['path'].split('#')[0].removeprefix('boot():/') self.assertEqual(path.read_bytes(),self.uki.read_bytes()) self.assertFalse((self.state/'modules-6.12-test/dtbs').exists()) self.assertIn('/Aurora previous (GPU off)', self.conf.read_text()) - self.assertIn('asahi.t8122_start=0 mesa_m3=off', self.conf.read_text()) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off', self.conf.read_text()) self.assertNotIn('asahi.t8122_start=1', self.conf.read_text()) self.run_helper('publish');self.run_helper('publish') text=self.conf.read_text() self.assertEqual(text.count('/Aurora previous (GPU off)'),1) self.assertIn('root=UUID=abc rw asahi.t8122_start=1',text) - self.assertIn('asahi.t8122_start=0 mesa_m3=off',text) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off',text) def test_hash_mutation_refuses_before_configuration_change(self): self.uki.write_bytes(b'mutated') self.run_helper('retain',False) @@ -156,7 +156,7 @@ def test_post_generation_second_lock_failure_keeps_reachable_fallback(self): self.run_helper('publish',False,timeout=0.15) self.assertEqual(self.conf.read_bytes(),before) self.assertIn('/Aurora previous (GPU off)',self.conf.read_text()) - self.assertIn('asahi.t8122_start=0 mesa_m3=off',self.conf.read_text()) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off',self.conf.read_text()) self.assertNotIn('asahi.t8122_start=1',self.conf.read_text()) def test_missing_custom_entry_refuses_activation(self): @@ -169,7 +169,7 @@ def test_disarm_keeps_both_main_and_fallback_gpu_off(self): self.run_helper('retain');self.run_helper('publish') self.run_helper('disarm') self.assertNotIn('asahi.t8122_start=1',self.conf.read_text()) - self.assertEqual(self.conf.read_text().count('asahi.t8122_start=0 mesa_m3=off'),2) + self.assertEqual(self.conf.read_text().count('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off'),2) def test_remove_drops_gpu_off_entry_and_retained_uki(self): self.run_helper('retain') @@ -212,7 +212,7 @@ def test_remove_refuses_corrupt_state_before_publication(self): def test_remove_refuses_edited_fallback_before_publication(self): self.run_helper('retain') retained,_=self.retained_path() - self.conf.write_text(self.conf.read_text().replace('asahi.t8122_start=0 mesa_m3=off','asahi.t8122_start=1')) + self.conf.write_text(self.conf.read_text().replace('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off','asahi.t8122_start=1 aurora.t8122_start=1')) before=self.conf.read_bytes() self.run_helper('remove',False) self.assertEqual(self.conf.read_bytes(),before) diff --git a/tools/aurora-sep/tests/test_m3_cmdline.py b/tools/aurora-sep/tests/test_m3_cmdline.py index ba35ae68fe123d..728a3a782b5c56 100644 --- a/tools/aurora-sep/tests/test_m3_cmdline.py +++ b/tools/aurora-sep/tests/test_m3_cmdline.py @@ -28,7 +28,7 @@ def setting(self): def test_default_encryption_preserved_without_shell_expression(self): self.run_cmdline() - self.assertEqual(self.setting(), 'KERNEL_CMDLINE[linux-aurora]="root=UUID=root rd.luks.name=crypt=root rw asahi.t8122_start=1"') + self.assertEqual(self.setting(), 'KERNEL_CMDLINE[linux-aurora]="root=UUID=root rd.luks.name=crypt=root rw asahi.t8122_start=1 aurora.t8122_start=1"') original = self.defaults.read_bytes() self.run_cmdline() self.assertEqual(self.defaults.read_bytes(), original) @@ -50,7 +50,7 @@ def test_config_precedence_and_prepend_assignments(self): (directory/'20-options.conf').write_text('KERNEL_CMDLINE[default]+="initramfs_async=0"\n') self.defaults.write_text('KERNEL_CMDLINE[default]+="rootflags=subvol=@"\n') self.run_cmdline() - self.assertEqual(self.setting(), 'KERNEL_CMDLINE[linux-aurora]="rootflags=subvol=@ initramfs_async=0 quiet rd.luks.name=crypt=root root=UUID=vendor rw asahi.t8122_start=1"') + self.assertEqual(self.setting(), 'KERNEL_CMDLINE[linux-aurora]="rootflags=subvol=@ initramfs_async=0 quiet rd.luks.name=crypt=root root=UUID=vendor rw asahi.t8122_start=1 aurora.t8122_start=1"') def test_old_owned_expression_is_repaired_from_literal_defaults(self): self.defaults.write_text(self.defaults.read_text() + '\n# >>> aurora-sep: M3 GPU cmdline\n' @@ -59,12 +59,12 @@ def test_old_owned_expression_is_repaired_from_literal_defaults(self): self.run_cmdline(0) self.assertNotIn('${', self.defaults.read_text()) self.assertIn('rd.luks.name=crypt=root', self.setting()) - self.assertIn('asahi.t8122_start=0 mesa_m3=off', self.setting()) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off', self.setting()) def test_only_gpu_and_boot_image_arguments_are_removed(self): - self.defaults.write_text('KERNEL_CMDLINE="root=UUID=root asahi.t8122-start=1 mesa_m3=off air_gpu.oneshot=1 BOOT_IMAGE=/old loglevel=4 usbcore.autosuspend=-1"\n') + self.defaults.write_text('KERNEL_CMDLINE="root=UUID=root asahi.t8122-start=1 aurora.t8122_start=0 mesa_m3=off air_gpu.oneshot=1 BOOT_IMAGE=/old loglevel=4 usbcore.autosuspend=-1"\n') self.run_cmdline() - self.assertEqual(self.setting(), 'KERNEL_CMDLINE[linux-aurora]="root=UUID=root loglevel=4 usbcore.autosuspend=-1 asahi.t8122_start=1"') + self.assertEqual(self.setting(), 'KERNEL_CMDLINE[linux-aurora]="root=UUID=root loglevel=4 usbcore.autosuspend=-1 asahi.t8122_start=1 aurora.t8122_start=1"') def test_empty_config_uses_etc_kernel_then_running_cmdline(self): self.defaults.write_text('# no configured command line\n') @@ -96,7 +96,7 @@ def test_package_hook_receives_gpu_off_literal_before_transaction(self): chain=limine work="{work}" pacman() {{ - grep -F 'root=UUID=root rd.luks.name=crypt=root rw asahi.t8122_start=0 mesa_m3=off' "$M3_LIMINE_DEFAULTS" + grep -F 'root=UUID=root rd.luks.name=crypt=root rw asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off' "$M3_LIMINE_DEFAULTS" return 23 }} m3_install_packages diff --git a/tools/aurora-sep/tests/test_m3_persistent.py b/tools/aurora-sep/tests/test_m3_persistent.py index cdd7c17680d93e..7dab9c246795cc 100644 --- a/tools/aurora-sep/tests/test_m3_persistent.py +++ b/tools/aurora-sep/tests/test_m3_persistent.py @@ -243,7 +243,7 @@ def test_existing_grub_fallback_is_explicitly_gpu_off(self): self.run_sh(f'm3_grub_fallback_off "{entry}"') text=entry.read_text() self.assertNotIn('asahi.t8122-start=1',text) - self.assertIn('asahi.t8122_start=0 mesa_m3=off',text) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off',text) def transaction_paths(self): defaults=self.etc/'default/limine' @@ -281,7 +281,7 @@ def test_pacman_failure_restores_owned_switches_and_bootbin(self): self.assertFalse((self.state/'m3-gpu-persistent').exists()) self.assertFalse((self.state/'m3-persistent-transaction.json').exists()) self.assertIn('/Aurora previous (GPU off)',fixture.conf.read_text()) - self.assertIn('asahi.t8122_start=0 mesa_m3=off',fixture.conf.read_text()) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off',fixture.conf.read_text()) def test_native_marker_after_package_failure_rolls_back_before_arming(self): setup=self.setup_profile('j613-25g83','source-built-25')+self.transaction_paths() @@ -329,7 +329,7 @@ def test_post_generation_publish_lock_failure_rolls_back_real_helper(self): self.assertNotEqual(result.returncode,0) text=fixture.conf.read_text() self.assertIn('/Aurora previous (GPU off)',text) - self.assertIn('asahi.t8122_start=0 mesa_m3=off',text) + self.assertIn('asahi.t8122_start=0 aurora.t8122_start=0 mesa_m3=off',text) self.assertNotIn('asahi.t8122_start=1',text) self.assertNotIn('asahi.t8122_start=1',(self.etc/'default/limine').read_text()) self.assertEqual((self.etc/'m1n1.conf').read_text(),'# owner setting\n')