8000 Support for BIOS V2.51 (2025): ACPI path changes (TBMD moved to VGBS) and Makefile improvements for Debian??? · Issue #1 · fstanis/chuwi-minibook · GitHub
[go: up one dir, main page]

Skip to content

Support for BIOS V2.51 (2025): ACPI path changes (TBMD moved to VGBS) and Makefile improvements for Debian??? #1

Closed

Description

@victorewik

i @fstanis,

I've been testing your tools on a Chuwi MiniBook X N150 running Debian 13 with the latest BIOS V2.51 (04/16/2025). I found some breaking changes in this BIOS version compared to previous ones:

  1. Tablet Mode Switch (ACPI Changes)

The traditional TBMD method used in minibook_ec is missing in this DSDT. Instead, it seems Chuwi has moved to a more modern Intel-style implementation:

Device: CONV (Convertible)

Method: VGBS

ACPI Path found: \_SB.PC00.LPCB.EC0.VGBS (Note: TBMD calls returned AE_NOT_FOUND).

Replacing TBMD with VGBS in minibook_ec_core.c is required for the tablet mode switch to be registered on this BIOS version.
2. Makefile Issues on Debian

The Makefiles for vbt_patch and goodix_ts currently fail on Debian because they try to fetch headers from kernel.org using the exact string from uname -r.
On Debian, the version string often includes a suffix (e.g., 6.12.86+deb13), which results in a 404 error when curl attempts to download intel_vbt_defs.h or goodix.c.

Suggestion: Add a fallback or a way to strip the distro-specific suffix from the version string in the Makefile.
3. VBT Patcher

In this environment, reading from /sys/kernel/debug/dri/0/i915_vbt failed with "VBT signature not found". I had to extract the VBT directly from ACPI using acpidump -n "VBT " -b to successfully apply the 60Hz patch.
Device Info:

Model: MiniBook X (N150)

BIOS: DNN20A V2.51 (2025-04-16)

OS: Debian 13 (Trixie/Stable)

Kernel: 6.12.86+deb13-amd64

I hope this info helps to improve compatibility for newer batches of the MiniBook X!

Activity

  1. fstanis commented on May 12, 2026

    @fstanis
    Owner

    Hey, thank you for the feedback @victorewik! I actually have the exact same BIOS version (see devices.md) so something else must be different.

    Can you please share the full output of ./tools/detect-hardware.sh and sudo acpidump (with no parameters) so we can compare what's different between our two devices? It would be great if we can document the different variations CHUWI made.

    Thank you for reporting the Debian issue too - I fixed it in #2, let me know if it builds with this.

  2. victorewik commented on May 12, 2026

    @victorewik
    Author

    hardware_victorewik.txt
    ID DRIVER NAME
    dmi:vendor CHUWI Innovation And Technology(ShenZhen)co.,Ltd
    dmi:product MiniBook X
    dmi:bios DNN20A V2.51 04/16/2025
    cpu:0 Intel(R) N150
    pci:8086:46d4 i915 Intel Corporation Alder Lake-N [Intel Graphics]
    pci:8086:461d proc_thermal_pci Intel Corporation Alder Lake Innovation Platform Framework Processor Participant
    pci:8086:54ed xhci_hcd Intel Corporation Alder Lake-N PCH USB 3.2 xHCI Host Controller
    pci:8086:54f0 iwlwifi Intel Corporation CNVi: Wi-Fi
    pci:8086:54c4 sdhci-pci Intel Corporation Alder Lake-N eMMC Controller
    pci:8086:54c8 snd_hda_intel Intel Corporation Alder Lake-N PCH High Definition Audio Controller
    pci:1e4b:1202 nvme MAXIO Technology (Hangzhou) Ltd. NVMe SSD Controller MAP1202 (DRAM-less) (rev 01)
    usb:8087:0026 usb
    usb:1b0a:2bc9 usb Hy-Usb2.0-1*MIC
    i2c: mxc4005
    i2c:GDIX1002 Goodix-TS Goodix Capacitive TouchScreen
    i2c:MDA6655 mxc4005
    i2c:XXXX0000 i2c_hid_acpi XXXX0000:05 0911:5288 Touchpad
    acpi:ACPI0003
    acpi:ACPI000C
    acpi:ACPI000E
    acpi:GDIX1002
    acpi:INT33A1
    acpi:INT33D3
    acpi:INT340E
    acpi:INTC1041
    acpi:INTC1046 Thermistor Ambient
    acpi:INTC1057
    acpi:INTC1070
    acpi:INTC1099
    acpi:MDA6655
    acpi:MSFT0001
    acpi:MSFT0101 tpm_crb TPM 2.0 Device
    acpi:PNP0103
    acpi:PNP0C02
    acpi:PNP0C02
    acpi:PNP0C02
    acpi:PNP0C09 ec
    acpi:PNP0C0A battery
    acpi:PNP0C0C button
    acpi:PNP0C0D button
    acpi:PNP0C0E button
    acpi:PRP00001
    acpi:PRP00001
    acpi:XXXX0000
    blk:nvme0n1 driver AirDisk 512GB SSD (476 GB)
    drm:card0-DSI-1 Internal panel 1200x1920
    backlight:intel_backlight raw
    hwmon:hwmon0 acpitz
    hwmon:hwmon1 BAT0
    hwmon:hwmon2 nvme
    hwmon:hwmon3 ADP1
    hwmon:hwmon4 iwlwifi_1
    hwmon:hwmon5 coretemp
    tpm:tpm0 v2
    victorewik@debianewik:~/chuwi-minibook$

    acpidump_victorewik.txt

    In the end I went back to the minibook support I was using because I couldn't find the path to that sensor and the screen was inverted.

  3. fstanis commented on May 12, 2026

    @fstanis
    Owner

    Thank you for sharing! Our ACPI tables are practically identical, other than checksums, i.e. no difference in implemented methods. Hardware dump is identical as well.

    761c761
    <     0000: 54 50 4D 32 4C 00 00 00 04 6E 41 4C 41 53 4B 41  TPM2L....nALASKA
    ---
    >     0000: 54 50 4D 32 4C 00 00 00 04 50 41 4C 41 53 4B 41  TPM2L....PALASKA
    765c765
    <     0040: 00 00 01 00 00 90 26 73 00 00 00 00              ......&s....
    ---
    >     0040: 00 00 01 00 00 80 54 73 00 00 00 00              ......Ts....
    1341c1341
    <     0000: 55 45 46 49 48 00 00 00 01 FF 41 4C 41 53 4B 41  UEFIH.....ALASKA
    ---
    >     0000: 55 45 46 49 48 00 00 00 01 DF 41 4C 41 53 4B 41  UEFIH.....ALASKA
    1344c1344
    <     0030: 87 0C DE FC 36 00 02 00 98 DF BD 73 00 00 00 00  ....6......s....
    ---
    >     0030: 87 0C DE FC 36 00 02 00 98 FF BD 73 00 00 00 00  ....6......s....
    1348c1348
    <     0000: 44 53 44 54 D9 36 08 00 02 76 41 4C 41 53 4B 41  DSDT.6...vALASKA
    ---
    >     0000: 44 53 44 54 D9 36 08 00 02 A1 41 4C 41 53 4B 41  DSDT.6....ALASKA
    3672c3672
    <     9140: 50 49 4D 0C 18 90 27 73 08 50 50 49 4C 0A 1C 08  PIM...'s.PPIL...
    ---
    >     9140: 50 49 4D 0C 18 80 55 73 08 50 50 49 4C 0A 1C 08  PIM...Us.PPIL...
    3675c3675
    <     9170: 4E 42 0C 98 90 27 73 08 53 41 4E 4C 0B B7 01 08  NB...'s.SANL....
    ---
    >     9170: 4E 42 0C 98 80 55 73 08 53 41 4E 4C 0B B7 01 08  NB...Us.SANL....
    3737c3737
    <     9550: 00 0C 00 10 24 73 0B 14 0D 5B 81 88 5B 02 47 4E  ....$s...[..[.GN
    ---
    >     9550: 00 0C 00 00 52 73 0B 14 0D 5B 81 88 5B 02 47 4E  ....Rs...[..[.GN
    4345c4345
    <     BB50: 56 42 0C 00 70 0D 73 08 43 4E 56 4C 0B 20 00 5B  VB..p.s.CNVL. .[
    ---
    >     BB50: 56 42 0C 00 80 3C 73 08 43 4E 56 4C 0B 20 00 5B  VB...<s.CNVL. .[
    5256c5256
    <     F440: 48 49 44 44 0A CF 08 53 4E 56 42 0C 00 70 24 73  HIDD...SNVB..p$s
    ---
    >     F440: 48 49 44 44 0A CF 08 53 4E 56 42 0C 00 60 52 73  HIDD...SNVB..`Rs
    5457c5457
    <    100D0: EA 08 50 4E 56 42 0C 18 9B 27 73 08 50 4E 56 4C  ..PNVB...'s.PNVL
    ---
    >    100D0: EA 08 50 4E 56 42 0C 18 8B 55 73 08 50 4E 56 4C  ..PNVB...Us.PNVL
    37700c37700
    <     0000: 53 53 44 54 CE 5C 00 00 02 70 43 70 75 52 65 66  SSDT.\...pCpuRef
    ---
    >     0000: 53 53 44 54 CE 5C 00 00 02 5A 43 70 75 52 65 66  SSDT.\...ZCpuRef
    37757,37763c37757,37763
    <     0390: 49 53 54 20 00 0C 98 52 0D 73 0C A3 01 00 00 0D  IST ...R.s......
    <     03A0: 41 50 49 53 54 20 20 20 00 0C 18 60 0A 73 0C AF  APIST   ...`.s..
    <     03B0: 1B 00 00 0D 43 50 55 30 43 53 54 20 00 0C 98 57  ....CPU0CST ...W
    <     03C0: 0D 73 0C 94 03 00 00 0D 41 50 43 53 54 20 20 20  .s......APCST
    <     03D0: 00 0C 18 30 0A 73 0C BB 0F 00 00 0D 43 50 55 30  ...0.s......CPU0
    <     03E0: 48 57 50 20 00 0C 18 80 0A 73 0C B5 04 00 00 0D  HWP .....s......
    <     03F0: 41 50 48 57 50 20 20 20 00 0C 18 10 0A 73 0C 38  APHWP   .....s.8
    ---
    >     0390: 49 53 54 20 00 0C 98 62 3C 73 0C A3 01 00 00 0D  IST ...b<s......
    >     03A0: 41 50 49 53 54 20 20 20 00 0C 18 70 39 73 0C AF  APIST   ...p9s..
    >     03B0: 1B 00 00 0D 43 50 55 30 43 53 54 20 00 0C 98 67  ....CPU0CST ...g
    >     03C0: 3C 73 0C 94 03 00 00 0D 41 50 43 53 54 20 20 20  <s......APCST
    >     03D0: 00 0C 18 40 39 73 0C BB 0F 00 00 0D 43 50 55 30  ...@9s......CPU0
    >     03E0: 48 57 50 20 00 0C 18 90 39 73 0C B5 04 00 00 0D  HWP ....9s......
    >     03F0: 41 50 48 57 50 20 20 20 00 0C 18 20 39 73 0C 38  APHWP   ... 9s.8
    37766,37767c37766,37767
    <     0420: 00 0C 18 55 0D 73 0C AB 01 00 00 0D 41 50 50 53  ...U.s......APPS
    <     0430: 44 20 20 20 00 0C 18 40 0A 73 0C 49 13 00 00 08  D   ...@.s.I....
    ---
    >     0420: 00 0C 18 65 3C 73 0C AB 01 00 00 0D 41 50 50 53  ...e<s......APPS
    >     0430: 44 20 20 20 00 0C 18 50 39 73 0C 49 13 00 00 08  D   ...P9s.I....
    37813c37813
    <     0710: 54 50 43 00 5B 80 50 4E 56 53 00 0C 00 A0 27 73  TPC.[.PNVS....'s
    ---
    >     0710: 54 50 43 00 5B 80 50 4E 56 53 00 0C 00 90 55 73  TPC.[.PNVS....Us
    39198c39198
    <     0000: 46 41 43 50 14 01 00 00 06 86 41 4C 41 53 4B 41  FACP......ALASKA
    ---
    >     0000: 46 41 43 50 14 01 00 00 06 2C 41 4C 41 53 4B 41  FACP.....,ALASKA
    39200c39200
    <     0020: 13 00 00 01 00 B0 29 73 00 D0 14 73 00 02 09 00  ......)s...s....
    ---
    >     0020: 13 00 00 01 00 A0 57 73 00 C0 42 73 00 02 09 00  ......Ws..Bs....
    39206c39206
    <     0080: 06 00 00 05 00 00 00 00 00 00 00 00 00 D0 14 73  ...............s
    ---
    >     0080: 06 00 00 05 00 00 00 00 00 00 00 00 00 C0 42 73  ..............Bs
    39218c39218
    <     0000: 46 50 44 54 44 00 00 00 01 B1 41 4C 41 53 4B 41  FPDTD.....ALASKA
    ---
    >     0000: 46 50 44 54 44 00 00 00 01 59 41 4C 41 53 4B 41  FPDTD....YALASKA
    39220,39221c39220,39221
    <     0020: 13 00 00 01 00 00 10 01 00 00 00 00 00 70 38 42  .............p8B
    <     0030: 00 00 00 00 01 00 10 01 00 00 00 00 00 30 3C 43  .............0<C
    ---
    >     0020: 13 00 00 01 00 00 10 01 00 00 00 00 00 B0 38 72  ..............8r
    >     0030: 00 00 00 00 01 00 10 01 00 00 00 00 00 30 F9 6E  .............0.n
    41266c41266
    <     0000: 4D 53 44 4D 55 00 00 00 03 4C 41 4C 41 53 4B 41  MSDMU....LALASKA
    ---
    >     0000: 4D 53 44 4D 55 00 00 00 03 D2 41 4C 41 53 4B 41  MSDMU.....ALASKA
    41269,41271c41269,41271
    <     0030: 00 00 00 00 1D 00 00 00 4D 56 44 39 43 2D 50 4E  ........MVD9C-PN
    <     0040: 32 56 38 2D 39 50 4D 43 58 2D 54 4B 57 57 58 2D  2V8-9PMCX-TKWWX-
    <     0050: 43 37 4B 43 59                                   C7KCY
    ---
    >     0030: 00 00 00 00 1D 00 00 00 57 32 4E 32 56 2D 57 33  ........W2N2V-W3
    >     0040: 33 44 39 2D 43 47 39 37 4D 2D 59 52 56 44 44 2D  3D9-CG97M-YRVDD-
    >     0050: 39 44 38 47 4D                                   9D8GM
    41963c41963
    <     0000: 53 53 44 54 44 01 00 00 02 82 49 6E 74 65 6C 20  SSDTD.....Intel
    ---
    >     0000: 53 53 44 54 44 01 00 00 02 F5 49 6E 74 65 6C 20  SSDTD.....Intel
    41966,41967c41966,41967
    <     0030: B0 48 71 08 45 50 54 52 0C 00 B0 49 71 08 43 50  .Hq.EPTR...Iq.CP
    <     0040: 54 52 0C 20 B0 48 71 5B 01 4D 4D 55 54 00 5B 80  TR. .Hq[.MMUT.[.
    ---
    >     0030: B0 77 71 08 45 50 54 52 0C 00 B0 78 71 08 43 50  .wq.EPTR...xq.CP
    >     0040: 54 52 0C 20 B0 77 71 5B 01 4D 4D 55 54 00 5B 80  TR. .wq[.MMUT.[.
    42443c42443
    <     0000: 46 41 43 53 40 00 00 00 7F A1 8E 3A 00 00 00 00  FACS@......:....
    ---
    >     0000: 46 41 43 53 40 00 00 00 8D 26 81 FB 00 00 00 00  FACS@....&......
    42449c42449
    <     0000: 42 47 52 54 38 00 00 00 01 E0 41 4C 41 53 4B 41  BGRT8.....ALASKA
    ---
    >     0000: 42 47 52 54 38 00 00 00 01 B9 41 4C 41 53 4B 41  BGRT8.....ALASKA
    42451c42451
    <     0020: 13 00 01 00 01 00 07 00 18 80 8D 6B 00 00 00 00  ...........k....
    ---
    >     0020: 13 00 01 00 01 00 07 00 18 80 B6 69 00 00 00 00  ...........i....

    One difference I noticed is that my card is drm:card1-DSI-1 while yours is drm:card0-DSI-1, but this is probably not relevant. Re-reading your original post, I noticed two things:

    1. You said reading from /sys/kernel/debug/dri/0/i915_vbt failed - is this something you did manually? The script in tools actually reads it from a different path:

      readonly SYS_VBT="/sys/kernel/debug/dri/0000:00:02.0/i915_vbt"

    2. You mentioned changes to minibook_ec for the tablet mode switch - that module is just for thermal zones keyboard backlight etc. For tablet mode / screen rotation, you actually want the patched iio-sensor-proxy (link to how to install). If you use DE with Wayland, either it'll just work out of the box when you install that (KDE Plasma, GNOME) or you need to install iio-hyprland for most others.

  4. victorewik commented on May 13, 2026

    @victorewik
    Author

    Hi @fstanis,
    Thanks for the explanation!

    • Debian fix: I will try tomorrow but with kernel 6.12 mayby i change to cachy (i love so much debian so idk)
    • VBT Path: You are right. I was trying to read from /dri/0/ manually instead of using the full PCI path. That's why it failed for me. And i modify to use 60hz.
    • Tablet Mode: I didn't realize your minibook_ec doesn't expose a tablet_mode switch and that the logic is handled entirely by iio-sensor-proxy calculating the hinge angle. That makes much more sense now.
    • Orientation: Even though we have the same BIOS, my device reported "right-up" as the default orientation in landscape mode. I had to apply a custom ACCEL_MOUNT_MATRIX via HWDB/udev to get the auto-rotation to align correctly with GNOME's "Horizontal" setting.

    Thanks for the amazing work!

  5. victorewik commented on May 15, 2026

    @victorewik
    Author

    @fstanis I tryed now in more specific for debian an i have some big problems
    I've successfully finished a full installation of your tools on Debian 13 (Trixie/Stable). While I got it working, I encountered several issues that might be useful for improving compatibility with non-Arch distributions and newer hardware batches.

    1. Build & DKMS Issues

    Standard Debian uses GCC. The LLVM=1 flag in dkms.conf for the modules causes build failures. I had to manually strip them using:
    find modules/ -name "dkms.conf" -exec sed -i 's/LLVM=1 //g' {} +
    2. Service Installation Paths

    On Debian, thermald and iio-sensor-proxy installation scripts default to paths that the system doesn't prioritize or where unit files are missing. I had to use specific flags to make them visible to systemd:

    Thermald: ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-systemdsystemunitdir=/lib/systemd/system
    
    IIO-Sensor-Proxy: meson setup build --prefix=/usr
    
    1. 180° Rotation Conflict (GRUB vs Proxy)

    This is the most critical UX issue. I use video=DSI-1:panel_orientation=right_side_up in GRUB to ensure the boot logo and TTY are correctly oriented.

    However, your patched iio-sensor-proxy seems to force a right-up orientation internally when in laptop mode. The result is a double rotation (90° + 90° = 180°).

    Problem: When returning from Tablet to Laptop mode, the screen stays upside down.
    
    Behavior: In Laptop mode, the screen still tries to rotate to "Left" and "Right" but never hits the correct "Horizontal".
    
    Gnome: The rotation lock button in Gnome doesn't appear or doesn't work as expected because the proxy is forcing a state. monitor-sensor reports right-up when the device is flat on the table, while it should ideally be normal to align with the GRUB-rotated frame-buffer.
    
    1. Backlight Sync Issue

    The keyboard backlight slider in Gnome works, but it is not synchronized with the physical keyboard hotkey.

    If I change the brightness via the physical key, the Gnome UI slider doesn't update.
    
    The UI only "wakes up" if I move the Gnome slider first.
    
    1. Single vs Dual Accelerometer

    Despite having the same BIOS/Hardware, monitor-sensor only detects one accelerometer:
    code Code

    +++ iio-sensor-proxy appeared
    === Has accelerometer (orientation: right-up, tilt: vertical)
    === No ambient light sensor

    Since the second accelerometer (base) isn't detected, the "Laptop mode" rotation lock isn't triggering, leaving the screen rotating even when used as a standard laptop.
    System Info:

    BIOS: V2.51 (as you)
    
    OS: Debian 13
    
    Kernel: 6.12.86+deb13-amd64
    
    GRUB: video=DSI-1:panel_orientation=right_side_up
    

    I hope this feedback helps in making the project more robust for different setups!

  6. fstanis commented on May 19, 2026

    @fstanis
    Owner

    You shouldn't use video=DSI-1:panel_orientation=right_side_up if you use iio-sensor-proxy to rotate your screen - as you noticed, this will result in double rotation. GRUB (to my knowledge) doesn't support rotation the way Limine does and panel_orientation applies rotation to the framebuffer as a whole which isn't ideal if you want to combine it with rotation.

    iio-sensor-proxy should be able to turn on the second accelerometer, but it won't be exposed via monitor-sensor, instead it'll expose orientation and tilt sensors and will also separately disable the keyboard in tablet mode. Is this working for you while monitor-sensor is running?

    Regarding Debian GCC and paths, do you mind sending a PR? I can guess what the correct options are, but it's probably better if you could verify and send it.

  7. victorewik commented on May 24, 2026

    @victorewik
    Author

    Hi @fstanis,

    I've prepared the changes to make the tools fully compatible with Debian 13 and other GCC-based distributions. Here is a summary of the improvements:

    • GCC Compatibility: Removed the hardcoded LLVM=1 from dkms.conf files. Most standard distributions use GCC for kernel modules. This change allows DKMS to use the system's default compiler.
    • Makefile Robustness: Modified the Makefiles for goodix_ts and vbt_patch to use a generic kernel URL. Debian's uname -r includes a +deb13 suffix which causes 404 errors on the kernel.org servers. The new logic ensures headers are downloaded correctly regardless of the distro suffix.
    • Standard FHS Paths: Updated the Thermal Daemon and IIO-Sensor-Proxy build instructions to use --prefix=/usr and /lib/systemd/system. This aligns with the Filesystem Hierarchy Standard used by Debian/Ubuntu for system services.
    • Keyboard Sync Logic: I'm also including the logic for the keyboard backlight synchronization that handles the BIOS timeout conflict we discussed.

    You will need free debian repos

    sudo sed -i 's/main/main contrib non-free non-free-firmware/g' /etc/apt/sources.list
    sudo apt update
    

    and after install

    sudo apt update && sudo apt install \
    build-essential dkms linux-headers-amd64 git curl patch \
    meson ninja-build libudev-dev libgudev-1.0-dev \
    libpolkit-gobject-1-dev libdbus-1-dev libxml2-dev \
    libevdev-dev libupower-glib-dev systemd-dev libsystemd-dev \
    libelf-dev libssl-dev libglib2.0-dev autoconf automake \
    libtool pkg-config gtk-doc-tools autoconf-archive m4 \
    acpica-tools intel-media-va-driver-non-free mesa-vulkan-drivers \
    vulkan-tools libva-utils clinfo mesa-opencl-icd -y
    

    I have verified these paths and options on a fresh Debian 13 installation and everything works perfectly.

    https://github.com/victorewik/chuwi-minibook-Debian-

  8. fstanis commented on May 27, 2026

    @fstanis
    Owner

    Regarding keyboard sync - I tried to do it slightly differently in #8 by adding to the module itself. This should work since GNOME will autodetect the new /sys path.

    You need to enable the feature using echo 'options minibook_ec poll_hw_changed=1' | sudo tee /etc/modprobe.d/minibook_ec.conf, then reboot (or remove / load the module) and try /sys/class/leds/minibook::kbd_backlight/brightness_hw_changed to read the current value (that's pushed via polling). Let me know if that works.

  9. fstanis commented on Jun 8, 2026

    @fstanis
    Owner

    I think all these issues are no resolved and fixes are merged, feel free to reopen if you find any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0