From da5734ac3426a2a690a56bce0d3a8693f62eca26 Mon Sep 17 00:00:00 2001 From: ezntek Date: Mon, 9 Dec 2024 19:05:02 +0800 Subject: [PATCH 1/3] add thinkpad_acpi notices for the T440p, W541 and T480/T480s --- site/docs/install/t440p_external.md | 8 ++++ site/docs/install/t480.md | 68 +++++++++++++++++------------ site/docs/install/w541_external.md | 14 +++++- site/faq.md | 45 ++++++++++++------- 4 files changed, 88 insertions(+), 47 deletions(-) diff --git a/site/docs/install/t440p_external.md b/site/docs/install/t440p_external.md index 0bf7166..6339ba2 100644 --- a/site/docs/install/t440p_external.md +++ b/site/docs/install/t440p_external.md @@ -99,6 +99,14 @@ You should now be able to see the two flash chips near the RAM.\ You can now proceed to [flashing](/docs/install/spi.html) this machine. +`thinkpad_acpi` issues {#thinkpad-acpi} +--------------------------------------- + +It has been reported by that `thinkpad_acpi` does not load correctly on the T440p. + +If you encounter this, check [this page](https://libreboot.org/faq#thinkpad-acpi) +for details as to how to fix this. + Errata ====== diff --git a/site/docs/install/t480.md b/site/docs/install/t480.md index b21e9f3..8eea63f 100644 --- a/site/docs/install/t480.md +++ b/site/docs/install/t480.md @@ -1,9 +1,9 @@ --- -title: Lenovo ThinkPad T480/T480S information +title: Lenovo ThinkPad T480/T480s information x-toc-enable: true ... -Libreboot supports both the T480 and T480S variants. It is available in +Libreboot supports both the T480 and T480s variants. It is available in the *Libreboot 20241206* release or later. **[PLEASE READ THESE INSTRUCTIONS BEFORE INSTALLING](../../news/safety.md), @@ -16,19 +16,19 @@ OR YOU MIGHT BRICK YOUR MACHINE: [SAFETY PRECAUTIONS](../../news/safety.md)** | ***Specifications*** | | |----------------------------|------------------------------------------------| -| **Manufacturer** | Lenovo | -| **Name** | ThinkPad T480 | -| **Variants** | ThinkPad T480, ThinkPad T480S | +| **Manufacturer** | Lenovo | +| **Name** | ThinkPad T480 | +| **Variants** | ThinkPad T480, ThinkPad T480s | | **Released** | 2018 | -| **Chipset** | Intel Kaby Lake Refresh | -| **CPU** | Intel Kaby Lake Refresh | -| **Graphics** | Intel or Intel+Nvidia | -| **Memory** | DDR4 DIMMs; max 40GB (T480S), 64GB(T480) | -| **Architecture** | x86\_64 | -| **Original boot firmware** | Lenovo UEFI firmware | -| **Intel ME/AMD PSP** | Present. Can be disabled with me\_cleaner. | -| **Intel Boot Guard** | [Pwned](deguard.md). Disabled using the deguard utility. | -| **Flash chip** | SOIC-8 16MB/128Mbit system firmware | +| **Chipset** | Intel Kaby Lake Refresh | +| **CPU** | Intel Kaby Lake Refresh | +| **Graphics** | Intel or Intel+Nvidia | +| **Memory** | DDR4 DIMMs; max 40GB (T480s), 64GB(T480) | +| **Architecture** | x86\_64 | +| **Original boot firmware** | Lenovo UEFI firmware | +| **Intel ME/AMD PSP** | Present. Can be disabled with me\_cleaner. | +| **Intel Boot Guard** | [Pwned](deguard.md). Disabled using the deguard utility.| +| **Flash chip** | SOIC-8 16MB/128Mbit system firmware | ``` @@ -43,9 +43,9 @@ P*: Partially works with blobs | ***Features*** | | |---------------------------------------------------|----| -| **Internal flashing with original boot firmware** | N | +| **Internal flashing with original boot firmware** | N | | **Display (if Intel GPU)** | W+ | -| **Display (discrete CPU, SeaBIOS payload only)** | N | +| **Display (discrete CPU, SeaBIOS payload only)** | N | | **Audio** | W+ | | **RAM Init** | W* | @@ -56,7 +56,7 @@ P*: Partially works with blobs | **SeaBIOS with GRUB** | Works | -Regarding memory: T480S (S model) has 8GB onboard RAM, and an available DIMM +Regarding memory: T480s (S model) has 8GB onboard RAM, and an available DIMM slot on which an additional 32GB SODIMM can be installed. The regular T480 has two DIMM slots, allowing 2x32GB DDR4 SODIMMs. @@ -74,10 +74,10 @@ source](../build/), or alternatively an image from Libreboot 20241206 or higher. Official information about the T480 can be found here:\ -...and information about the T480S can be found here:\ +...and information about the T480s can be found here:\ -This port is implemented in Libreboot by merging Mate Kukri's T480/T480S +This port is implemented in Libreboot by merging Mate Kukri's T480/T480s patchset. See: - as of 5 December 2024, Libreboot's code matches that of patchset 22. @@ -118,6 +118,16 @@ you've inserted manually. If it says "Unplugged", try it anyway. The HDA Verb may be incorrect. This will be investigated and a hotfix patch made to the Libreboot 20241206 images. +`thinkpad_acpi` issues {#thinkpad-acpi} +--------------------------------------- + +It has been reported that `thinkpad_acpi` does not load correctly on the T480. +This should also be the case for the T480s. + +If you encounter this issue, check +[this page](https://libreboot.org/faq#thinkpad-acpi) for details at so how +to fix this. + Build ROM image from source --------------------------- @@ -126,7 +136,7 @@ The build target, when building from source, is thus: ./mk -b coreboot t480_fsp_16mb ./mk -b coreboot t480s_fsp_16mb -**NOTE: The T480 and T480S may be similar, but they do have several critical +**NOTE: The T480 and T480s may be similar, but they do have several critical differences in their wiring, so you MUST flash the correct image. Please choose one of the above build targets accordingly.** @@ -161,7 +171,7 @@ Absolutely unsigned Intel ME! ----------------------------- Libreboot already disables the Intel ME by default, using `me_cleaner`, but -the T480/T480S specifically have an additional quirk: +the T480/T480s specifically have an additional quirk: One of the benefits of [deguard](deguard.md) for Intel MEv11 is that it sets the ME in such a state where you can run unsigned code in there. This is how @@ -170,7 +180,7 @@ restrictions; more information about deguard is available on a dedicated page. The deguard utility could also be used to enable the red-unlock hack, which would permit unsigned execution of new CPU microcode, though much more -research is needed. Because of these two facts, this makes the T480/T480S the +research is needed. Because of these two facts, this makes the T480/T480s the most freedom-feasible of all relatively modern x86 laptops. With deguard, you have complete control of the flash. This is unprecedented on @@ -279,12 +289,12 @@ which then allows you to see the inner mainboard: ThinkPad T480 PCB **WARNING: PLEASE MAKE SURE to remove the battery before flashing. The T480 -and T480S can both contain INTERNAL batteries, and the T480 has an additional +and T480s can both contain INTERNAL batteries, and the T480 has an additional external battery. Remove the internal battery via the connector, like so (T480):** ThinkPad T480 internal battery -On the T480S (S model) the internal battery is much larger, and the connector +On the T480s (S model) the internal battery is much larger, and the connector on it is built into the battery, so it is necessary to carefully remove the entire battery; on regular T480 (non-S model) the internal battery can be isolated via the connector as depicted above. @@ -302,7 +312,7 @@ To be clear: the system flash (16MB) is what you put Libreboot on. The Thunderbolt firmware flash is much smaller, so you'll know because flashprog will complain about wrong flash size if you're trying to flash the wrong one. -On the T480S (S model), the flashes are in slightly different places but in +On the T480s (S model), the flashes are in slightly different places but in both machines, the system flash (for Libreboot) is toward the centre, near the memory. @@ -320,7 +330,7 @@ UART ---- A serial console is possible via the line-out (headphone jack). Not yet tested -on the T480S (S model), nor implemented, but it is working on the regular +on the T480s (S model), nor implemented, but it is working on the regular T480 (non-S model). **TODO: show photo and wiring diagram here.** @@ -343,7 +353,7 @@ TX/RX lines as you wish, to a suitable UART adapter; any 3.3v-rated TTL adapter should work. The Raspberry Pi Pico can be used for this, which is handy because that can also be used as a serprog-based NOR flasher! -The T480S (S model) schematics is a bit different and the signals are +The T480s (S model) schematics is a bit different and the signals are properly muxed. Note that this is not to be confused with `spkmodem`, which has not been tested on these boards (but could theoretically be possible too). @@ -359,7 +369,7 @@ possible, quite feasible to design/manufacture and already supported in the Libreboot firmware in principle, since than PCI-E lane is enabled in the devicetree) Mate Kukri came up with this idea. It's a great idea, so it's written here. -This mod is possible on both the T480 and T480S, though on T480S there would +This mod is possible on both the T480 and T480s, though on T480s there would be less clearance; using a smaller internal battery and having a makeshift NVMe caddy in the remaining space would be how to go about it there. On the regular T480, the existing caddy area could easily fit two NVMe drives. @@ -367,7 +377,7 @@ regular T480, the existing caddy area could easily fit two NVMe drives. Errata ====== -On ThinkPad T480/T480S, headphone output works; the internal speaker is disabled +On ThinkPad T480/T480s, headphone output works; the internal speaker is disabled but audio is not automatically redirected to the headphone jack. This switching can be done manually, for example in the `pavucontrol` utility: diff --git a/site/docs/install/w541_external.md b/site/docs/install/w541_external.md index e5f9ece..a5c4149 100644 --- a/site/docs/install/w541_external.md +++ b/site/docs/install/w541_external.md @@ -3,8 +3,8 @@ title: ThinkPad W541/W540 external flashing x-toc-enable: true ... -NOTE: The same image for W541 also works on W541, as it's the exact same -mainboard. +NOTE: The same image for W541 also works on the W540, as the motherboard is +identical. Buy Libreboot preinstalled ========================== @@ -117,6 +117,16 @@ used when flashing either of the chips. You can now proceed to [flashing](/docs/install/spi.html) this machine. +`thinkpad_acpi` issues {#thinkpad-acpi} +--------------------------------------- + +It has been reported by a user that `thinkpad_acpi` does not load correctly on +the T440p. Since the W541/W540/T540p are also haswell machines, you may be +affected by this issue. + +If you encounter this, check [this page](https://libreboot.org/faq#thinkpad-acpi) +for details as to how to fix this. + Errata ====== diff --git a/site/faq.md b/site/faq.md index 2609e54..f3f4cd2 100644 --- a/site/faq.md +++ b/site/faq.md @@ -17,7 +17,7 @@ sure to re-enable them after you're finished. See: [Disabling /dev/mem protection](docs/install/devmem.md) Buy Libreboot pre-installed -========== +============================= If you want professional installation, Minifree Ltd sells [Libreboot pre-installed](https://minifree.org/) on select hardware, and it also provides @@ -169,7 +169,7 @@ Hardware compatibility ====================== What systems are compatible with libreboot? ------------------------------------------------------------------------------------ +-------------------------------------------- Any system can easily be added, so *compatibility* merely refers to whatever boards are integrated in the `lbmk` build system, which libreboot uses. @@ -576,7 +576,7 @@ This will change the default inside that ROM image, and then you can re-flash it. How do I pad a ROM before flashing? --------------------------------------- +------------------------------------- It is advisable to simply use a larger ROM image. This section was written mostly for ASUS KCMA-D8 and KGPE-D16 mainboards, where previously we only @@ -616,7 +616,7 @@ padded 16MiB image do the following: With padding removed cbfstool will be able to operate on the image as usual. Do I need to install a bootloader when installing a distribution? ---------------------------------------------------------------------------------------------------- +----------------------------------------------------------------- Most libreboot setups integrate the GRUB bootloader already, as a *[payload](http://www.coreboot.org/Payloads)*. This means that the GRUB @@ -635,7 +635,7 @@ then the normal MBR bootsector is used on your HDD or SSD, like you would expect. So the above paragraphs only apply to the GRUB payload. Do I need to re-flash when I re-install a distribution? -------------------------------------------------------------------------------------------- +------------------------------------------------------- Not anymore. Recent versions of libreboot (using the GRUB payload) will automatically switch to a GRUB configuration on the HDD or SSD, if it @@ -653,26 +653,39 @@ What does a flash chip look like? You can find photos of various chip types on the following page:\ [External 25xx NOR flashing guide](docs/install/spi.md) -Inability to modprobe thinkpad\_acpi on Haswell -=============================================== +Inability to load `thinkpad_acpi` on post-haswell systems {#thinkpad-acpi} +========================================================================== -This was reported by a user, running Debian 11 with -kernel `5.19.0-0.deb11.2-amd64`. The `thinkpad_acpi` module was not loading, -with the following message: +Reported by a user on Debian 11 (on a ThinkPad T440p) and a user +on Void Linux (ThinkPad T480), Linux may fail to load `thinkpad_acpi`. -``` -modprobe: ERROR: could not insert 'thinkpad_acpi': "No such device" -``` +It is suspected that at least these mainboards are affected: -Battery info in `/sys` was absent, because of this. The user reported that -the following workaround was effective (in Debian). + * [ThinkPad W541](https://libreboot.org/docs/install/w541_external.html) + * [ThinkPad T440p](https://libreboot.org/docs/install/t440p_external.html) + * [ThinkPad T480/T480s](https://libreboot.org/docs/install/t480.html) -Add this line to `/etc/modprobe.d/thinkpad_acpi.conf`: +This may result the following effects, including or not limited to: + + * Temperature reporting not working + * Battery info not working. + * Fan speed reporting not working + * Fan control not working + +For these systems, add the line ``` options thinkpad_acpi force_load=1 ``` +to any file in `/etc/modprobe.d`. You can also add + +``` +thinkpad_acpi.force_load=1 +``` + +to your kernel parameters (in GRUB, or your preferred linux-capable bootloader). + tlp --- From 30387872fa07d6df25e7d50d98ed0e75c7d72d04 Mon Sep 17 00:00:00 2001 From: ezntek Date: Mon, 9 Dec 2024 19:05:54 +0800 Subject: [PATCH 2/3] add raspi pico to SOIC-8 diagram --- site/docs/install/spi.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/site/docs/install/spi.md b/site/docs/install/spi.md index b3264d3..c7dc643 100644 --- a/site/docs/install/spi.md +++ b/site/docs/install/spi.md @@ -131,6 +131,16 @@ Take note of the ttyACMx. Flashrom is now usable spispeed=32M usually works, but since it's not much faster it's probably not worth it. The 12Mbps USB port is limiting the actual speed here. +Raspberry Pi Pico SOIC-8 wiring +------------------------------- + +When using a Raspberry Pi Pico to program a SOIC-8 flash chip with +`pico-serprog`, you may use the following diagram, which contains the +Raspberry Pi Pins and the pinouts of the typical SOIC-8 chip to wire up +your programmer: + +[SOIC-8 to Pico pinout diagram](https://av.libreboot.org/rpi_pico/soic8_pico_pinouts.jpg) + Do not use CH341A! ================== From 91f61408638ca90b42d7f1ac702c99c5683b70f1 Mon Sep 17 00:00:00 2001 From: ezntek Date: Mon, 9 Dec 2024 19:18:26 +0800 Subject: [PATCH 3/3] make thinkpad_acpi modprobe error clearer, fix minor typos in T480 page --- site/docs/install/t480.md | 6 +++--- site/faq.md | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/site/docs/install/t480.md b/site/docs/install/t480.md index 8eea63f..4dad3f9 100644 --- a/site/docs/install/t480.md +++ b/site/docs/install/t480.md @@ -124,9 +124,9 @@ will be investigated and a hotfix patch made to the Libreboot 20241206 images. It has been reported that `thinkpad_acpi` does not load correctly on the T480. This should also be the case for the T480s. -If you encounter this issue, check -[this page](https://libreboot.org/faq#thinkpad-acpi) for details at so how -to fix this. +If you encounter this issue, check\ +[this page](https://libreboot.org/faq#thinkpad-acpi) +for details as to how to fix this. Build ROM image from source --------------------------- diff --git a/site/faq.md b/site/faq.md index f3f4cd2..82de46a 100644 --- a/site/faq.md +++ b/site/faq.md @@ -657,7 +657,12 @@ Inability to load `thinkpad_acpi` on post-haswell systems {#thinkpad-acpi} ========================================================================== Reported by a user on Debian 11 (on a ThinkPad T440p) and a user -on Void Linux (ThinkPad T480), Linux may fail to load `thinkpad_acpi`. +on Void Linux (ThinkPad T480), Linux (or modprobe) may fail to load +`thinkpad_acpi`. + +``` +modprobe: ERROR: could not insert 'thinkpad_acpi': "No such device" +``` It is suspected that at least these mainboards are affected: