Solved Can't load compiled acpi

I compiled acpi and am trying to boot with it in order to fix some weird kernel spam in the console.

acpi_tz0: _CRT value is absurd, ignored (256.1C)

I constantly get this type of message and overwrite the output in the tty.

My laptop tolerates this: HP Compaq nx6320

I read this http://wp.xin.at/archives/5312 and this https://docs.freebsd.org/doc/9.2-RELEASE/usr/share/doc/freebsd/en/books/handbook/ACPI-debug.html

My loader.conf has the lines:
Code:
acpi_dsdt_load="YES"
acpi_dsdt_name="/boot/acpi-modded.aml"

nothing has changed after a reboot.

# kldload acpi_dsdt
Code:
kldload: can't load acpi_dsdt: No such file or directory
 
If nothing changed, then your changes didn't work. You can't load it using kldload as it's not a kernel module.

Provide a diff between original and modified asl code.
 
If nothing changed, then your changes didn't work. You can't load it using kldload as it's not a kernel module.

Provide a diff between original and modified asl code.

As you can see there are changes. But I don't understand why they didn't work.
Code:
# diff -u acpi-stock.asl acpi-modded.asl
--- acpi-stock.asl      2023-02-18 16:42:21.424447000 +0200
+++ acpi-modded.asl     2023-02-18 16:53:31.827914000 +0200
@@ -514,6 +514,7 @@
         Method (C02D, 0, NotSerialized)
         {
             Local0 = (C02A + 0x00014F14)
+           Return (Local0)
         }
 
         Method (C02E, 0, NotSerialized)
@@ -822,14 +823,14 @@
                     0x00000000,         // Translation Offset
                     0x00020000,         // Length
                     ,, , AddressRangeMemory, TypeStatic)
-                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
+                DWordMemory (ResourceProducer, PosDecode, MinNotFixed, MaxNotFixed, Cacheable, ReadWrite,
                     0x00000000,         // Granularity
                     0x00000000,         // Range Minimum
                     0xFEDFFFFF,         // Range Maximum
                     0x00000000,         // Translation Offset
                     0x00000000,         // Length
                     ,, _Y02, AddressRangeMemory, TypeStatic)
-                DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
+                DWordMemory (ResourceProducer, PosDecode, MinNotFixed, MaxNotFixed, Cacheable, ReadWrite,
                     0x00000000,         // Granularity
                     0xFEE01000,         // Range Minimum
                     0xFFFFFFFF,         // Range Maximum
@@ -12816,7 +12817,7 @@
 
             Method (_CRT, 0, Serialized)  // _CRT: Critical Temperature
             {
-                Return (C316 (0x04, 0x00))
+                Return (3742)
             }
 
             Method (_TMP, 0, Serialized)  // _TMP: Temperature
 
The iasl command seems to have thrown an error. I don't see any errors in stderr.log though.

Code:
root@hp:~ # iasl ./acpi-modded.asl 2>./stderr.log
Error 6092 - Could not open file "2" (Source Input) - No such file or directory

root@hp:~ # cat stderr.log

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20201113
Copyright (c) 2000 - 2020 Intel Corporation
 
Try without redirection which doesn't seem to be working for you (which shell?). Is the file you put to /boot/ actually non-empty?
 
I understand, it seems he swore at > 2. I switched to the sh shell and tried again.

Code:
# iasl ./acpi-modded.asl 2>./stderr.log

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20201113
Copyright (c) 2000 - 2020 Intel Corporation

ASL Input: ./acpi-modded.asl - 526708 bytes 6849 keywords 14428 source lines
AML Output: ./acpi-modded.aml - 63551 bytes 5651 opcodes 1198 named objects

Compilation successful. 0 Errors, 30 Warnings, 73 Remarks, 2319 Optimizations, 13 Constants Folded
 
Hooray, it worked.
Now sysctl shows the correct value!

Code:
sysctl hw.acpi.thermal.tz0._CRT
hw.acpi.thermal.tz0._CRT: 101.1C
 
Back
Top