Lenovo Thinkpad T430

From Gentoo Wiki
Jump to: navigation, search

Following settings aim to make Thinkpad T430 usable.

Hardware information

lscpu

root #lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               58
Model name:          Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz
Stepping:            9
CPU MHz:             1306.347
CPU max MHz:         3300.0000
CPU min MHz:         1200.0000
BogoMIPS:            5188.11
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            3072K
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts

lspci

root #lspci -nnk
00:00.0 Host bridge [0600]: Intel Corporation 3rd Gen Core processor DRAM Controller [8086:0154] (rev 09)
        Subsystem: Lenovo 3rd Gen Core processor DRAM Controller [17aa:21f3]
        Kernel driver in use: ivb_uncore
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166] (rev 09)
        Subsystem: Lenovo 3rd Gen Core processor Graphics Controller [17aa:21f3]
        Kernel driver in use: i915
00:14.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller [8086:1e31] (rev 04)
        Subsystem: Lenovo 7 Series/C210 Series Chipset Family USB xHCI Host Controller [17aa:21f3]
        Kernel driver in use: xhci_hcd
00:16.0 Communication controller [0780]: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 [8086:1e3a] (rev 04)
        Subsystem: Lenovo 7 Series/C216 Chipset Family MEI Controller [17aa:21f3]
        Kernel driver in use: mei_me
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
        Subsystem: Lenovo 82579LM Gigabit Network Connection [17aa:21f3]
        Kernel driver in use: e1000e
00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04)
        Subsystem: Lenovo 7 Series/C216 Chipset Family USB Enhanced Host Controller [17aa:21f3]
        Kernel driver in use: ehci-pci
00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04)
        Subsystem: Lenovo 7 Series/C216 Chipset Family High Definition Audio Controller [17aa:21f3]
        Kernel driver in use: snd_hda_intel
00:1c.0 PCI bridge [0604]: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 [8086:1e10] (rev c4)
        Kernel driver in use: pcieport
00:1c.1 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 [8086:1e12] (rev c4)
        Kernel driver in use: pcieport
00:1c.2 PCI bridge [0604]: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 [8086:1e14] (rev c4)
        Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04)
        Subsystem: Lenovo 7 Series/C216 Chipset Family USB Enhanced Host Controller [17aa:21f3]
        Kernel driver in use: ehci-pci
00:1f.0 ISA bridge [0601]: Intel Corporation QM77 Express Chipset LPC Controller [8086:1e55] (rev 04)
        Subsystem: Lenovo QM77 Express Chipset LPC Controller [17aa:21f3]
        Kernel driver in use: lpc_ich
00:1f.2 SATA controller [0106]: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [8086:1e03] (rev 04)
        Subsystem: Lenovo 7 Series Chipset Family 6-port SATA Controller [AHCI mode] [17aa:21f3]
        Kernel driver in use: ahci
00:1f.3 SMBus [0c05]: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller [8086:1e22] (rev 04)
        Subsystem: Lenovo 7 Series/C216 Chipset Family SMBus Controller [17aa:21f3]
        Kernel driver in use: i801_smbus
02:00.0 System peripheral [0880]: Ricoh Co Ltd PCIe SDXC/MMC Host Controller [1180:e823] (rev 04)
        Subsystem: Lenovo PCIe SDXC/MMC Host Controller [17aa:21f3]
        Kernel driver in use: sdhci-pci
03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)
        Subsystem: Intel Corporation Centrino Advanced-N 6205 AGN [8086:1311]
        Kernel driver in use: iwlwifi

lsusb

root #lsusb
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f2:b2db Chicony Electronics Co., Ltd 
Bus 001 Device 004: ID 0a5c:21e6 Broadcom Corp. BCM20702 Bluetooth 4.0 [ThinkPad]
Bus 001 Device 003: ID 147e:2020 Upek TouchChip Fingerprint Coprocessor (WBF advanced mode)
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 0bdb:1926 Ericsson Business Mobile Networks BV H5321 gw Mobile Broadband Driver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Installation

Firmware

WiFi

The Linux firmware package is needed since the Centrino Advanced-N 6205 AGN wifi adapter requires a specific firmware file.

Firmware file that is needed is the iwlwifi-6000g2a-6.ucode. It can be obtained by installing the Linux firmware package: sys-firmware/iwl6005-ucode. For more info see iwlwifi.

Note
In case you can see error messages saying the kernel isn't able to find the iwlwifi-6000g2a-6.ucode. Check content of /lib/firmware/.

Bluetooth

root #dmesg
bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0a5c-21e6.hcd failed with error -2

Thus a Linux firmware file BCM20702A1-0a5c-21e6.hcd is needed. The file can be obtained from a driver package via:

user $unzip Bluetooth_V1201650_WHQL_Win10.zip
root #hex2hcd Bluetooth/BCM_DriverOnly/64/BCM20702A1_001.002.014.1483.1669.hex -o /lib/firmware/brcm/BCM20702A1-0a5c-21e6.hcd

More info in this Gentoo Forums thread.

Microcode

Intel released microcode updates that fixes fault on processors. Install the officially published microcode package sys-firmware/intel-microcode. For more info see Intel microcode.

Kernel

Gentoo specific Menuconfig. More info at Kernel.

KERNEL Based on 4.12.1:
Processor type and features  --->
  [*] Symmetric multi-processing support
  [*] Support x2apic
  Processor family  --->
    (X) Core 2/newer Xeon
  [*] SMT (Hyperthreading) scheduler support
  [*] Multi-core scheduler support
  Preemption Model  --->
    (X) Preemptible Kernel (Low-Latency Desktop)
  [*] Machine Check / overheating reporting
  [*]   Intel MCE features
  [*] CPU microcode loading support
  [*]   Intel microcode loading support
  Timer frequency
    (X) 1000 HZ

Power management and ACPI options  --->
  [*] ACPI (Advanced Configuration and Power Interface) Support  --->
    <*> AC Adapter
    <*> Battery
    -*- Button
    -*- Video
    <*> Fan
    [*] Dock
    <*> Processor
    <*> Processor Aggregator
    <*> Thermal Zone
  CPU Frequency scaling  --->
    Default CPUFreq governor  --->
      (X) powersave
    <*> 'performance' governor
    -*- 'powersave' governor
    *** CPU frequency scaling drivers ***
    -*- Intel P state control
  [*] Cpuidle Driver for Intel Processors
  Memory power savings  --->
    <*> Intel chipset idle memory power saving driver

Bus options (PCI etc.)  --->
  [*] PCI support
  [*]   Support mmconfig PCI config space access
  [*]   PCI Express Port Bus support
  [*]   Message Signaled Interrupts (MSI and MSI-X)
  [*]   Interrupts on hypertransport devices
  <*> PCCard (PCMCIA/CardBus) support  --->
    -*-   32-bit CardBus support
    <*>   CardBus yenta-compatible bridge support

[*] Networking support  --->
  <*> Bluetooth subsystem support  --->
    Bluetooth device drivers  --->
      <*> HCI USB driver
      [*] Broadcom protocol support
      [*] Realteck protocol support
  <*> Wireless  --->
    <*> cfg80211 - wireless configuration API
    <*> Generic IEEE 802.11 Networking Stack (mac80211)
  <*> RF switch subsystem support

Device Drivers  --->
   Generic Driver Options  --->
     -*- Userspace firmware loading support
     [*]   Include in-kernel firmware blobs in kernel binary
     (intel-ucode/06-3a-09 iwlwifi-6000g2a-6.ucode brcm/BCM20702A1-0a5c-21e6.hcd) External firmware blobs to build into the kernel binary
     (/lib/firmware) Firmware blobs root directory
   Misc Devices --->
     -*- Intel Management Engine Interface
     <*> ME Enabled Intel Chipsets
   SCSI device support  --->
     <*> SCSI disk support
     <*> SCSI media changer support
     [*] Asynchronous SCSI scanning
   <*> Serial ATA and Parallel ATA drivers (libata)  --->
      <*> AHCI SATA support
   [*] Network device support  --->
     [*] Ethernet driver support  --->
       [*] Intel devices
         <*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support
     <*>   USB Network Adapters  --->
       <*>   Multi-purpose USB Networking Framework
       -*-     CDC NCM support
       <*>     CDC MBIM support
     [*] Wireless LAN  --->
       <*> Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
       <*> Intel Wireless WiFi DVM Firmware support
       <*> Intel Wireless WiFi MVM Firmware support
   Input device support  --->
     <*>   Mouse interface
     [*]   Keyboards  --->
       <*>   AT keyboard
     [*]   Mice  --->
       <*>   PS/2 mouse

   I2C support  --->
     I2C Hardware Bus support  --->
        <*> Intel 82801 (ICH/PCH)
   -*- Hardware Monitoring support  --->
     <*> Intel Core/Core2/Atom temperature sensor
   -*- Generic Thermal sysfs driver
     [*] X86 package temperature thermal driver
     [*] Intel PCH Thermal Reporting Driver 
   [*] Watchdog Timer Support  --->
     <*> Intel TCO Timer/Watchdog
   Multifunction device drivers  --->
     <*> Intel ICH LP
   <*> Multimedia support  --->
     [*]   Cameras/video grabbers support
     [*]   Media USB Adapters  --->
       <*>   USB Video Class (UVC)
       [*]     UVC input events device support
   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 legacy fbdev support for your modesetting driver
     <*> Intel 8xx/9xx/G3x/G4x/HD Graphics
       [*]   Enable capturing GPU state following a hang
       [*]     Compress GPU error state
       [*]   Always enable userptr support
     Frame buffer Devices  --->
       [*] EFI-based Framebuffer Support
     Console display driver support  --->
       <*> Framebuffer Console support
   <*> Sound card support  --->
     <*> Advanced Linux Sound Architecture  --->
       [*]   PCI sound devices  --->
             HD-Audio  --->
               <*> HD Audio PCI
               <*> Build Realtek HD-audio codec support
               <*> Build HDMI/DisplayPort HD-audio codec support
   [*] USB support  --->
     <*>   xHCI HCD (USB 3.0) support
     <*>   EHCI HCD (USB 2.0) support
     <*>   USB Modem (CDC ACM) support
     <*>   USB Mass Storage support
   <*> MMC/SD/SDIO card support  --->
     <*>   Secure Digital Host Controller Interface support
     <*>     SDHCI support on PCI bus
     <*> Realtek PCI-E SD/MMC Card Interface Driver
   [*] X86 Platform Specific Device Drivers  --->
     <M>   ThinkPad ACPI Laptop Extras
     [*]     Console audio control ALSA interface
     [*]     Video output control support
     [*]     Support NVRAM polling for hot keys
   [*] IOMMU Hardware Support  --->
     [*]   Support for Intel IOMMU using DMA Remapping Devices
     [*]     Support for Shared Virtual Memory with Intel IOMMU
     [*]     Enable Intel DMA Remapping Devices by default
     [*]   Support for Interrupt Remapping

Configuration

Compiler settings

More info is available at:

FILE /etc/portage/make.conf
# O2 for super-safe output
CFLAGS="-march=ivybridge -O2 -pipe"
CXXFLAGS="${CFLAGS}"
# Dual-core with enabled Hyper-Threading technology - 4 logical processors
MAKEOPTS="-j4"
# AMD64 architecture
CHOST="x86_64-pc-linux-gnu"

Packages settings

For more info: CPU_FLAGS_X86

FILE /etc/portage/make.conf
# Obtained via cpuinfo2cpuflags-x86
CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

USE flags

With Intel Modesetting DDX as video driver and libinput as input driver add the USE flags glamor and libinput.

FILE /etc/portage/make.conf
# Intel GMA Gen 7 - IvyBridge
VIDEO_CARDS="intel i965"
# Input devices
INPUT_DEVICES="libinput"
# Useflags
USE="glamor libinput"

Utils

battery charge thresholds

Use: app-laptop/tpacpi-bat. Example econfig and instructions can be found at: github.com/teleshoes/tpacpi-bat.

fan control

Use: app-laptop/thinkfan.

FILE /etc/modprobe.d/thinkpad.conf
options thinkpad_acpi fan_control=1
FILE /etc/thinkpad.conf
hwmon /sys/class/hwmon/hwmon0/temp1_input
hwmon /sys/class/hwmon/hwmon1/temp1_input
hwmon /sys/class/hwmon/hwmon1/temp2_input
hwmon /sys/class/hwmon/hwmon1/temp3_input

tp_fan /proc/acpi/ibm/fan

(0, 0,  55)
(1, 53, 60)
(2, 58, 65)
(3, 63, 70)
(4, 68, 75)
(5, 73, 80)
(6, 78, 85)
(7, 83, 90)
(127, 88, 32767)

Fingerprint reader

Use: sys-auth/fprintd. Instructons can be found at: [1]

See also