Lenovo Thinkpad T430

From Gentoo Wiki
Jump to:navigation Jump to:search
ThinkPad T430

Hardware information

GPU: Intel HD Graphics 4000: seventh generation, Ivy Bridge (released in 2012). You can get GPU information in Firefox in about:support.

Firmware setup

Press Enter during boot to enter BIOS, RAM testing. F12 to choose boot media.

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

Product page for stock i5 CPU.

Ivy Bridge page on Wikipedia.

Compare stock CPU with top available 3840QM, userbenchmark.com, notebookcheck.net, technical.city, cpubenchmark.net, cpu-world.com, cpuboss.com.

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

RAM

Opened back with slot for RAM

ThinkPad T430 supports up to 16 GB of SO-DIMM DDR3/DDR3L memory. Max frequency for some machines is 2133 MHz, but personally I got black screen without loading with 2133 MHz memory, so check in shop before buy. DDR3L is better because it is 1.35V instead of 1.5V so it uses 10 percent less battery with the same performance as DDR3. To check how much of memory the laptop has:

root #dmidecode -t memory | grep -i size
	Size: 4096 MB
	Size: No Module Installed

This shows one 4GB module is installed and a second is unpopulated but available.

To find out the frequency of installed RAM modulesː

root #dmidecode -t memory | grep 'Memory Speed'
	Configured Memory Speed: 1600 MT/s
	Configured Memory Speed: Unknown

When a second RAM module is installed, they will operate on the same frequency (the lowest one from both), but size can differ (for example 4 GB plus 8 GB).

See video about how to replace RAM.

Battery

Get current battery level (useful when using i3 or Sway window managers without GUI battery indicator)[1]ː

user $cat /sys/class/power_supply/BAT0/capacity
89

For all details about the batteryː

user $find /sys/class/power_supply/BAT0/ -type f | xargs -tn1 cat
cat /sys/class/power_supply/BAT0/energy_full 
75390000
cat /sys/class/power_supply/BAT0/manufacturer 
SANYO
cat /sys/class/power_supply/BAT0/cycle_count 
0
cat /sys/class/power_supply/BAT0/power_now 
16751000
cat /sys/class/power_supply/BAT0/capacity_level 
Normal
cat /sys/class/power_supply/BAT0/model_name 
45N1173
cat /sys/class/power_supply/BAT0/voltage_min_design 
10800000
cat /sys/class/power_supply/BAT0/present 
1
cat /sys/class/power_supply/BAT0/energy_now 
70150000
cat /sys/class/power_supply/BAT0/energy_full_design 
93960000
cat /sys/class/power_supply/BAT0/capacity 
93
cat /sys/class/power_supply/BAT0/charge_start_threshold 
0
cat /sys/class/power_supply/BAT0/technology 
Li-ion
cat /sys/class/power_supply/BAT0/power/runtime_suspended_time 
0
cat /sys/class/power_supply/BAT0/power/autosuspend_delay_ms 
cat: /sys/class/power_supply/BAT0/power/autosuspend_delay_ms: Input/output error
cat /sys/class/power_supply/BAT0/power/runtime_active_time 
0
cat /sys/class/power_supply/BAT0/power/control 
auto
cat /sys/class/power_supply/BAT0/power/runtime_status 
unsupported
cat /sys/class/power_supply/BAT0/type 
Battery
cat /sys/class/power_supply/BAT0/status 
Charging
cat /sys/class/power_supply/BAT0/charge_stop_threshold 
100
cat /sys/class/power_supply/BAT0/serial_number 
32255
cat /sys/class/power_supply/BAT0/voltage_now 
12473000
cat /sys/class/power_supply/BAT0/alarm 
3769000
cat /sys/class/power_supply/BAT0/uevent 
POWER_SUPPLY_NAME=BAT0
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000
POWER_SUPPLY_VOLTAGE_NOW=12473000
POWER_SUPPLY_POWER_NOW=16751000
POWER_SUPPLY_ENERGY_FULL_DESIGN=93960000
POWER_SUPPLY_ENERGY_FULL=75390000
POWER_SUPPLY_ENERGY_NOW=70150000
POWER_SUPPLY_CAPACITY=93
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_MODEL_NAME=45N1173
POWER_SUPPLY_MANUFACTURER=SANYO
POWER_SUPPLY_SERIAL_NUMBER=32255

Installation

Firmware

Wi-Fi

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/linux-firmware or sys-firmware/iwl6005-ucode.

FILE /etc/portage/make.conf
# ipw3945 needed for ThinkPad wireless firmware
ACCEPT_LICENSE="@FREE ipw3945"

After every kernel update (after make) execute

root #make modules_install

For more info see iwlwifi.

Note
When error messages saying the kernel isn't able to find the iwlwifi-6000g2a-6.ucode, check content of /lib/firmware/.

Ethernet

root #cd /etc/init.d/

To try to use Ethernet on laptop boot (run by init system):

root #rc-update add net.enp0s25

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. See Broadcom Bluetooth for additional info.

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  --->
      <M> HCI USB driver
      [*] Broadcom protocol support
      [*] Realteck protocol support
  <*> Wireless  --->
    <M> cfg80211 - wireless configuration API
    <M> 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) 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
         <M> 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  --->
       <M> Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)
       <M> Intel Wireless WiFi DVM Firmware support
       <M> 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

Ready to use .config for Linux 5.

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 cpuid2cpuflags
CPU_FLAGS_X86="aes avx f16c mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3"

USE flags

You can get or review my /etc/portage configs.

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="libinput"

USE="glamor libinput"
Firefox video performance

Video performance is better on media-video/mpv, but from 2021 you can USE="vaapi" and enable WebRender in Firefox to use GPU for video and get higher FPS. Also in firefox in about:support enable gfx.webrender.all (tested on Firefox 86).

To check that it works: emerge x11-apps/igt-gpu-tools and run intel_gpu_top: it must show loading when Firefox plays YouTube.

See more at https://en.wikipedia.org/wiki/Video_Acceleration_API

Also Gentoo Wiki about Intel.

Utils

battery charge thresholds

Use: app-laptop/tpacpi-bat. Example config 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/thinkfan.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]

ThinkLight

Fn-Space to enable/disable the ThinkLight, useful to see the keyboard in low light conditions.

Displays

To add more displays, there are several methods: one external display, or attach two external displays but internal panel will be disabled, or connect a dock to have 3 external displays (internal will be disabled).

Fastboot (reduce flickering on boot)

Uncomment and add:

FILE /etc/default/grub
GRUB_CMDLINE_LINUX="i915.fastboot=1"

and regenerate grub, as usual after kernel update:

root #grub-mkconfig -o /boot/grub/grub.cfg

See more about fastboot.

Fix screen tearing

When watching some videos, some frames may be out of sync with the screen rate. Screen tearing can be fixed in multiple ways. For Xorg: Thinkpad T430 has Intel GPU, create this file:

FILE /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"    "true"
EndSection

And emerge x11-drivers/xf86-video-intel (because still not implemented in the default xf86-video-modesetting).

Reboot the system for the new configuration to take effect.

Another option against screen tearing: use Sway window manager, because underlying Wayland protocol has no screen tearing by design, but note that with Wayland you cannot use ffmpeg for screen grabbing.

Alter brightness

Brightness value live in a file /sys/class/backlight/intel_backlight/brightness, to react current valueː

user $cat /sys/class/backlight/intel_backlight/brightness
89

To alter brightnessː

root #echo 100 > /sys/class/backlight/intel_backlight/brightness

Alternatively, install sys-power/acpilight or dev-libs/light to control brightness with the xbacklight or light tools respectively.

See also