Xiaomi RedmiBook 14 Pro 2024

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This article is focused on the specific model I own and my specific Gentoo setup, feel free to add more sections

Laptop specifications

  • Intel Core Ultra 5-125H or Intel Core Ultra 7-155H
  • Intel AI Boost NPU 1.4 GHz
  • 16-32GB LPDDR5x 7467MT/s single-channel
  • Intel Arc (on-CPU)
  • 14in Super Retina display 2880x1800
  • 512-GB or 1TB SSD PCle 4.0 2242
  • 80Wh battery with Thunderbolt 4 Type-C 100W
  • x2 USB-A 3.2 Gen1, x1 USB-C, x1 Thunderbolt 4, x1 HDMI 2.1 TMDS, x1 3.5mm Jack

Printout of lspci:

root #lspci

Information from /proc/cpuinfo:

root #cat /proc/cpuinfo

Installation

Kernel

Input devices

USB 3.0 support

KERNEL USB controller: USB controller: Intel Corporation Meteor Lake-P USB 3.2 Gen 2x1 xHCI Host Controller (rev 20), 6.10.7-gentoo
Device Drivers  --->
    [*] USB support  --->
        <*>   xHCI HCD (USB 3.0) support

Kernel version 3.3 at least is required for the USB 3 support.

Drives and storage

KERNEL Non-Volatile memory controller: Yangtze Memory Technologies Co.,Ltd PC300 NVMe SSD (DRAM-less) (rev 03), 6.10.7-gentoo
Device Drivers  --->
    NVME Support  --->
        <*>   NVM Express block device

If you want to install the user space tools run this:

root #emerge --ask sys-apps/nvme-cli

You can also read the full NVMe article for more advanced NVMe support.

Graphics

Warning
This GPU is not officially supported by xe drvier in the current kernel version (6.10.7), but can still be used

Compile the driver for Intel Arc as a module

KERNEL VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Arc Graphics] (rev 08), 6.10.7-gentoo
Device Drivers  --->
    Graphics support  --->
        <*> /dev/agpgart (AGP Support)  --->
            <*>   Intel 440LX/BX/GX, I8xx and E7x05 chipset support
        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
            [*]   Enable DisplayPort CEC-Tunneling-over-AUX HDMI support
            [*]   DRM DP AUX Interface
            <M>   Intel Xe Graphics
            [*]     Enable display suppport

You also need the EFI frame buffer driver

KERNEL VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Arc Graphics] (rev 08), 6.10.7-gentoo
Device Drivers  --->
    Graphics support  --->
            Frame buffer Devices  --->
            <*>   Support for frame buffer device drivers  --->
                [*]   EFI-based Framebuffer Support
Force use of Xe probe

You can add xe.force_probe='7d55' as module paramters in GRUB for example, or you can directly build that into the kernel, like in the exq;ple bellow.

KERNEL VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Arc Graphics] (rev 08), 6.10.7-gentoo
Device Drivers  --->
    Graphics support  --->
        <*> Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)  --->
            <M>   Intel Xe Graphics
            (7d55)     Force probe xe for selected Intel hardware IDs

Wi-Fi

KERNEL Network controller: Intel Corporation Meteor Lake PCH CNVi WiFi (rev 20), 6.10.7-gentoo
[*] Networking support  --->
    [*]   Wireless  --->
        <*>   Generic IEEE 802.11 Networking Stack (mac80211)

Device Drivers  --->
    [*] Network device support  --->
    [*]    Wireless LAN  --->
            [*]   Intel devices
            <M>      Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)

This driver needs some firmware to run

root #emerge --ask sys-kernel/linux-firmware

Sound

Warning
Sound support for Meteor Lake was only added in kernel 6.11, which is to the date of redaction (2024-03-09) a release candidate.
KERNEL Sound device
Device Drivers  --->
    --- Sound card support  --->
        <M>   Advanced Linux Sound Architecture  ---> 
            <*>   ALSA for SoC audio support  --->
               [*]   Intel ASoC SST drivers
               <M>     CometLake-H Platforms
               <M>     CometLake-LP Platforms
               [*]     HDAudio codec support
               [*]   Sound Open Firmware Support  --->
                   <M>   SOF PCI enumeration support
                   <M>   SOF ACPI enumeration support
                   [*]   SOF support for Intel audio DSPs
                   <M>     SOF support for Meteorlake
                   [*]     SOF support for HDA Links(HDA/HDMI)
                   [*]       SOF support for HDAudio codecs

You need to get the firmware from the SOF project

root #emerge --ask sys-firmware/sof-firmware

CPU frequency scaling

KERNEL CPU frequency scaling, 6.10.7-gentoo
Power management and ACPI options  --->
    CPU Frequency scaling  ---> 
    [*] CPU Frequency scaling
    <*>   Intel P-States control
    <*>   ACPI Processor P-States driver

NPU

KERNEL CPU frequency scaling, 6.10.7-gentoo
Device Drivers  --->
     [*] Compute Acceleration Framework  --->
        <M>   Intel NPU (Neural Processing Unit)

Webcam

KERNEL Bus 003 Device 004: ID 2b7e:c817 SunplusIT Inc XiaoMi WebCam
Device Drivers  --->
    <M> Multimedia support  --->
         Media device types  --->
           [*] Cameras and video grabbers
         Media drivers  --->
           [*] Media USB Adapters  --->
              <M>   USB Video Class (UVC)
                    [*]     UVC input events device support
           [*] Media PCI Adapters  --->
              <*>   Intel IPU6 driver

Bluetooth

KERNEL
[*] Networking support  --->
    <*> Bluetooth subsystem support  --->
        
        Select options for Bluetooth applications, see table below:
        <*>   ...

            Bluetooth device drivers  --->

               Select a Bluetooth HCI driver, e.g.:
               <*> HCI USB driver (btusb)

Misc

Fingerprint reader

The laptop is equipied with a fingerprint reader, unfortunantly it's not supported officially by fprint, however there's an easy fix to make it work. Thanks to portage we can automaticcally apply patches to packages, you need to create a directory for patches.

{{RootCmd|mkdir -p /etc/portage/patches/sys-auth/libfprint}

Then create a file wiith .patch or .diff extension under the directory you just ccreated and fill it with this patch :

FILE /etc/portage/patches/sys-auth/libfprint/fixfprintreader.patch
diff --git a/libfprint/drivers/goodixmoc/goodix.c b/libfprint/drivers/goodixmoc/goodix.c
index 5a3ffac..5b9af95 100644
--- a/libfprint/drivers/goodixmoc/goodix.c
+++ b/libfprint/drivers/goodixmoc/goodix.c
@@ -1632,6 +1632,7 @@ static const FpIdEntry id_table[] = {
   { .vid = 0x27c6,  .pid = 0x659A,  },
   { .vid = 0x27c6,  .pid = 0x659C,  },
   { .vid = 0x27c6,  .pid = 0x6A94,  },
+  { .vid = 0x27c6,  .pid = 0x689A,  },
   { .vid = 0,  .pid = 0,  .driver_data = 0 },   /* terminating entry */
 };

You can now install fprint and it will support the laptop's fingerprint reader

root #emerge --ask sys-auth/fprintd