Lenovo Thinkpad T430
Hardware information
iGPU: Intel HD Graphics 4000 (without Vulkan support): seventh generation, Ivy Bridge (released in 2012-2013). You can get GPU information in Firefox in about:support
.
root #
dmidecode
Firmware setup
Press Enter during boot to enter BIOS, RAM testing. F12 to choose boot media.
lscpu
root #
lscpu
Product page for stock i5 CPU.
Compare stock CPU with top available 3840QM, userbenchmark.com, notebookcheck.net, technical.city, cpubenchmark.net, cpu-world.com, cpuboss.com.
During Gentoo compilation your T430 may became very hot and even turn off, especially on higher CPU - so you will need to replace HSF too, to have 2 pipes:
lspci
root #
lspci -nnk
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
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.
Hard Drive
Better replace for SSD for higher speed, 2.5 inch (SATA III: 6Gb/s) or mSATA (SATA II: 3Gb/s). Good models: Samsung EVO 870, MX500, BX500[1], according to Windows benchmark - Samsung is the best.
Also you can replace DVD ullrabay to SSD caddy[2] - SATA III[3], and have two storages.
Or ExpressCard to NVMe Adapter - so you will be able to install some m.2 storage (speed: Sata III - 6 Gb/s).
So totally you can have 4 drives inside this laptop (plus USB).
Trim
If you have SSD — sometimes you need to trim it for faster writing. Do not mount with discard option - it will be slower and can be harmful. Better trim on poweroff, on Fridays:
/etc/local.d/10-run_on_shutdown.stop
#!/bin/bash
# From
# https://fitzcarraldoblog.wordpress.com/2018/01/13/running-a-shell-script-at-shutdown-only-not-at-reboot-a-comparison-between-openrc-and-systemd/
if [ `who -r | awk '{print $2}'` = "0" ] && [ "$(date +%a)" = "Fri" ]; then
echo /etc/local.d/10-run_on_shutdown.stop: run SSD trim
fstrim / --verbose
sleep 5
fi
make it executable:
user $
chmod +x /etc/local.d/10-run_on_shutdown.stop
/etc/local.d — /etc/local.d/ can contain small programs or light scripts to be run when the local service is started or stopped. .
By default prints are hidden, to show them:
/etc/conf.d/local
rc_verbose=yes
Battery
Get current battery level (useful when using i3 or Sway window managers without GUI battery indicator)[4]ː
user $
cat /sys/class/power_supply/BAT0/capacity
For all details about the batteryː
user $
find /sys/class/power_supply/BAT0/ -type f | xargs -tn1 cat
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.
/etc/portage/make.conf
# ipw3945 needed for ThinkPad wireless firmware
ACCEPT_LICENSE="@FREE ipw3945"
Wireless module can be another one, note that Intel Centrino Advanced-N 6205 does not have bluetooth. If you want bluetooth - you can buy Intel Dual Band Wireless-AC 7260. Also you can get a wireless module that does not need a proprietary blobs, for example something that uses the ath9k driver - in the table look for Mini PCIe (half). [5]
After every kernel update (after make) execute
root #
make modules_install
For more info see iwlwifi.
When error messages saying the kernel isn't able to find the iwlwifi-6000g2a-6.ucode, check content of /lib/firmware/.
To make connection emerge wpa_supplicant:
root #
emerge --ask net-wireless/wpa_supplicant
Edit config file, this is an example (see more at man 5 wpa_supplicant.conf and /usr/share/doc/wpa_supplicant-2.10-r1/wpa_supplicant.conf.bz2):
/etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="A1-13"
psk="this is my password"
priority=1
}
network={
ssid="POCO X3 Pro"
psk="and another password"
priority=2
}
network={
ssid="hackerspace"
psk="yet another password"
priority=9
}
network={
ssid="HUAWEI-25 a-2"
psk="password"
priority=99
}
Connect to Wi-Fi with this command:
root #
/etc/init.d/wpa_supplicant start
See status/log at
root #
wpa_cli status
To see status updates in real time (useful to see when trying to connect) - run wpa_cli and inside status:
root #
wpa_cli
wpa_cli v2.10 Copyright (c) 2004-2022, Jouni Malinen <j@w1.fi> and contributors This software may be distributed under the terms of the BSD license. See README for more details. Selected interface 'wlp3s0' Interactive mode > status bssid=7c:52:59:4d:e9:68 freq=2447 ssid=about.me/zdanevich id=0 mode=station wifi_generation=4 pairwise_cipher=CCMP group_cipher=CCMP key_mgmt=WPA2-PSK wpa_state=COMPLETED ip_address=192.168.100.4 address=a4:4e:31:a0:59:b0
You can replace mini-PCI (half) WLAN module to something that do not need proprietary blobs, for example AR5BHB116.
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
Not integrated in my model - I bought a small USB adapter UB500.
If in dmesg you see:
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.
Sound
If you plan to use Firefox for meetings - you need PulseAudio, because Firefox has the issue that when built with Alsa - your microphone will not work.
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.
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:
/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
/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
.
/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 (use --hwdec=vaapi), but from 2021 you can USE="vaapi"
and enable WebRender in Firefox (if not enabled by default, see about:support) 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 for Video when Firefox plays YouTube, not like this 0%:
root #
intel_gpu_top
intel-gpu-top: Intel Ivybridge (Gen7) @ /dev/dri/card0 437/ 441 MHz; 57% RC6; 0.70/12.20 W; 45 irqs/s IMC reads: 2 MiB/s IMC writes: 618 MiB/s ENGINES BUSY MI_SEMA MI_WAIT Render/3D 8.99% |██ | 0% 0% Blitter 0.00% | | 0% 0% Video 0.00% | | 0% 0%
Note that Intel HD 4000 (Ivybridge) supports only h264 hardware decoding, as you can see in vainfo:
user $
vainfo
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so libva info: va_openDriver() returns -1 libva info: Trying to open /usr/lib64/va/drivers/i965_drv_video.so libva info: Found init function __vaDriverInit_1_13 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.13 (libva 2.13.0) vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Mobile - 2.4.1 vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD VAProfileMPEG2Simple : VAEntrypointEncSlice VAProfileMPEG2Main : VAEntrypointVLD VAProfileMPEG2Main : VAEntrypointEncSlice VAProfileH264ConstrainedBaseline: VAEntrypointVLD VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice VAProfileH264Main : VAEntrypointVLD VAProfileH264Main : VAEntrypointEncSlice VAProfileH264High : VAEntrypointVLD VAProfileH264High : VAEntrypointEncSlice VAProfileH264StereoHigh : VAEntrypointVLD VAProfileVC1Simple : VAEntrypointVLD VAProfileVC1Main : VAEntrypointVLD VAProfileVC1Advanced : VAEntrypointVLD VAProfileNone : VAEntrypointVideoProcVAProfileJPEGBaseline : VAEntrypointVLD
So you can install popular browser extension h264ify. On YouTube make right click on video and choose Stats for nerds, see Codecs line. Also check media.ffmpeg.vaapi.enabled.
You can check video performance on this video, maybe vp9 and av1 will play smoothly for you even without hardware decoding (0% Video in intel_gpu_top).
See more
https://en.wikipedia.org/wiki/Video_Acceleration_API
https://wiki.archlinux.org/title/Hardware_video_acceleration
Utils
battery charge thresholds
Use: app-laptop/tpacpi-bat. Example config and instructions can be found at: github.com/teleshoes/tpacpi-bat.
fan control (noise level)
Use: app-laptop/thinkfan.
/etc/modprobe.d/thinkpad.conf
options thinkpad_acpi fan_control=1
Example config:
/etc/thinkfan.conf
sensors:
- hwmon: /sys/class/hwmon
name: thinkpad
indices: [1]
fans:
- tpacpi: /proc/acpi/ibm/fan
levels:
- [0, 0, 70]
- [1, 70, 90]
- ["level auto", 90, 255]
# [level (0-7), from deg, to deg]
After config change:
root #
rc-service thinkfan restart
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
Multiple displays
To add more displays[6], there are several methods: one additional external display, or attach two external displays but internal panel will be disabled, or to do a triple monitor setup[7] with a T430 (iGPU model) you'll need the 4337 or 4338 dock for its dual DisplayPort, external screens need to have the same setting (resolution & refresh rate) and interface type (DisplayPort, hence needing the dock). If the monitors lack a DisplayPort you can use an Active cable or adapter (passive cables & adapters won't work).
DisplayPort specification here is 1.1a, so daisy chaining (MST) is unavailable here[8][9][10].
Also you can use x11-misc/synergy (Wayland support in development) or x11-misc/barrier (Wayland support in development) to unite multiple computers.
Fastboot (reduce flickering on boot)
Uncomment and add:
/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
eGPU
With ThinkPad T430 it is possible to use external GPU, connected to ExpressCard adapter. The performance will be PCI-e x2: not very good, but on the internet you can find many positive posts about it. See more at:
https://www.reddit.com/r/thinkpad/comments/hwmf91/t430_finally_maxed_out_egpu/
https://www.reddit.com/r/thinkpad/comments/hbzkdz/t430_egpu_how_about_coreboot_and_linux/
https://www.reddit.com/r/thinkpad/comments/727mhn/thinkpad_t430_and_expresscard34_egpu_what_ive/
https://ounapuu.ee/posts/2022/01/09/why-i-went-back-to-using-a-thinkpad-from-2012/
https://www.youtube.com/watch?v=390FuyadPIw?t=222
https://www.youtube.com/watch?v=2TR2qOdrdtE - GPU is Nvidia GTX 1060 3GB, overview of games performance on Windows.
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:
/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.
Pros of Wayland (Sway):
- A little bit better scrolling in Firefox, better video playing (no drop frames, even if Youtube shows 0), more FPS
- No need for xf86-video-intel driver
Cons of Wayland
- Difficult screencasting for Google Meet in Firefox, you will need to mess around with unstable PipeWire, xdg-desktop-portal-wlr, personally I got no success in January 2022 after a few hours of trying, see this defect
- Xorg will be installed if you compile Firefox with PGO, looks like Firefox uses Xorg virtual screen for testing
- Impossible to use ffmpeg for screen grabbing, but other options exists
- The most minor - you will need to change your screenshot software from scrot (or maim) to grim
You can check tearing on this video.
i3 bindsym for screenshot to file with a good name and to clipboard
File name will be like 2022-jan-15--12-05-59_maim.png:
bindsym $mod+Shift+s exec maim --select --hidecursor |\
tee /tmp/$(date +%Y-%b-%d--%H-%M-%S_maim | tr A-Z a-z).png |\
xclip -selection clipboard -t image/png
Full screen, waiting 5 seconds before, with led and "notification":
bindsym $mod+Shift+x exec "\
echo 1 > /sys/class/leds/platform\:\:micmute/brightness; \
sleep 5; \
maim --hidecursor ~/screenshots/$(date +%Y-%b-%d--%H-%M-%S_maim | tr A-Z a-z).png; \
echo 0 > /sys/class/leds/platform\:\:micmute/brightness; \
i3-nagbar --message 'Screenshot created' --type warning & \
sleep 3; pkill i3-nagbar"
To be able to toggle the led as a regular user - chmod to 666 will works only before the reboot, persistent solution: create file /etc/tmpfiles.d/<your name> with content:
/etc/tmpfiles.d/brightness.conf
m /sys/class/leds/platform::micmute/brightness 0664 root video - -
video is the group of your user.
See more about tmpfiles at man 5 tmpfiles.d
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
To alter brightnessː
root #
echo 400 > /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.
Keyboard layouts
This is usual, for example here we add Russian language, change by Caps:
/etc/X11/xorg.conf.d/10-keyboard.conf
Section "InputClass"
Identifier "keyboard-all"
Driver "evdev"
Option "XkbLayout" "us,ru"
Option "XkbOptions" "grp:caps_toggle"
MatchIsKeyboard "on"
EndSection
For led indicator https://gitlab.com/vitaly-zdanevich/keyboard-layout-change-monitor
Screen recording with ffmpeg and vaapi (hardware acceleration, without Nvidia GPU chip)
To h264, because GitHub supports this format (mp4), not webm (vp9), and Ivy Bridge supports hardware encoding to h264 (no audio):
user $
ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1366x768 -i :0+1200,1152 -vf 'format=nv12,hwupload' -c:v h264_vaapi o.mp4
ffmpeg records middle display, where width of the left is 1200 and height is 1920 (1920 - 768 = 1152):
Recording of main screen, with audio (merging system sound + mic) into mono:
main-screen-with-audio.sh
ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1366x768 -i :0.0 \
-f pulse -i alsa_output.usb-GN_Netcom_A_S_Jabra_EVOLVE_LINK_00113735E82E0A-00.analog-stereo.monitor \
-f pulse -i alsa_input.usb-GN_Netcom_A_S_Jabra_EVOLVE_LINK_00113735E82E0A-00.mono-fallback \
-filter_complex "amerge" -ac 1 \
-c:v h264_vaapi -vf 'format=nv12,hwupload' ~/record/out/$(date +%Y-%b-%d%a--%H-%M-%S | tr A-Z a-z).mp4
# Press q to finish the recording.
# https://trac.ffmpeg.org/wiki/Encode/H.264
Another example for meetings recording: system sound + USB mic into mono (using the right external display, so you need to adapt this script for you):
right-with-audio.sh
ffmpeg -vaapi_device /dev/dri/renderD128 -f x11grab -video_size 1920x1200 -i :0.0+2566,720 \
-f pulse -i alsa_output.pci-0000_00_1b.0.analog-stereo.monitor \
-f pulse -i alsa_input.usb-Focusrite_Scarlett_Solo_USB_Y7D1J3F0A66336-00.analog-stereo \
-filter_complex "amerge" -ac 1 \
-c:v h264_vaapi -vf 'format=nv12,hwupload' ~/record/$(date +%Y-%b-%d%a--%H-%M-%S | tr A-Z a-z).mp4
# Press q to finish the recording.
# https://trac.ffmpeg.org/wiki/Encode/H.264
Resulting file name will be like 2023-apr-28fri--13-34-54.mp4/home/vitaly/record/out/2023-jul-27thu--13-22-25.mp4
List your audio devices with
user $
pacmd list-sources | grep -e 'name:' -e 'index:'
Related link: https://trac.ffmpeg.org/wiki/Encode/H.264
Suspend without fan rotation
/lib64/elogind/system-sleep/fan
#!/bin/bash
case $1/$2 in
pre/*)
echo level 0 > /proc/acpi/ibm/fan
pkill --signal SIGINT openconnect &
sleep 5
# Graceful shutdown of Openconnect: without this after suspend will be no internet connection
# and I will need to stop it manually.
# Related link: https://unix.stackexchange.com/a/725171/34318
;;
post/*)
# No need to restart the thinkfan - after a few seconds it will restore the speed according to the config
;;
esac
File name can be anything. Make it executable:
root #
chmod +x fan
See more at Elogind.
See also
References
- ↑ https://www.reddit.com/r/thinkpad/comments/rojn2y/what_ssd_can_you_recommend_for_t430/hpys86n/?context=3
- ↑ https://www.reddit.com/r/thinkpad/comments/8u860n/t430_hdd_ultrabay_caddy/
- ↑ https://www.reddit.com/r/thinkpad/comments/9fk3bf/t430_ultrabay_sata_2_or_sata_3/
- ↑ https://ostechnix.com/how-to-check-laptop-battery-status-in-terminal-in-linux/
- ↑ https://www.reddit.com/r/Gentoo/comments/repy1s/thinkpad_t430_what_is_the_best_wlan_module/
- ↑ https://forums.lenovo.com/t5/T400-T500-and-newer-T-series/T430-Multiple-Monitors-gt-2-with-HD4000/td-p/919831
- ↑ https://www.reddit.com/r/thinkpad/comments/p3q2t3/t430_looks_like_broke_the_mainboard_with_wrong/h8twa36?utm_source=share&utm_medium=web2x&context=3
- ↑ https://forums.freebsd.org/threads/displayport-daisy-chaining.75490/
- ↑ https://community.intel.com/t5/Graphics/Is-the-Intel-HD-Graphics-4000-graphics-card-a-DisplayPort-1-2/td-p/646090?profile.language=en
- ↑ https://en.wikipedia.org/wiki/DisplayPort#Multi-Stream_Transport_(MST)