I finally settled on a new personal Linux laptop, and it's the Lenovo ThinkPad T14s Gen 4 w/AMD processor, 32GB RAM, and Low-power 500 nits display.
I had mine shipped with Ubuntu, it comes with (I think) Ubuntu 22.04.01 LTS. It's nice because they set up the BIOS to come with Secure Boot enabled for Ubuntu. Everything works out of the box.
But there's definitely some not-so-great parts about it by default, so here's the tweaks I added to make it more usable.
I tried a bunch of tweaks and mods to the stock Ubuntu, to try to keep things mostly normal. But I ended up messing up the system bad, trying to get PipeWire working, so that I could use the aftermarket effects software to fix the horrible stock speakers.
I ended up breaking it so bad I had to use the Ubuntu recovery mode to reinstall Ubuntu from the restore partition, which luckily works like a charm. It's too bad they don't set up a separate /home partition or you could do this any time without ever needing to back up and restore your files.
-
From the BIOS, I enable passwords, fingerprints, and switch the Fn and Ctrl keys.
-
Once you're logged in, do an in-place system upgrade to Ubuntu 24.04.01 LTS. This fixes a number of problems. The speakers still aren't very good but they're way better than they are on Ubuntu 22. Using EasyEffects on Ubuntu 24 would probably lead to even better sound, but I'm a little afraid to try again.
-
Install Kubuntu. The GNOME interface of Ubuntu is really bad. It seems to lack almost every single modern feature of a desktop you'd expect, other than having windows and a dock. KDE has most of the things you want built in, without needing to install tons of plugins and add-ons and tweaks and what not.
-
From KDE's system settings, go to:
- Workspace Behavior
- Screen Locking: make sure it's set up the way you want
- Virtual Desktops: create 4 desktops if they aren't already
- Window Management
- Task Switcher: under Shortcuts, enable the alt+tab shortcuts you want. Filter windows by virual desktops (current), activities (current)
- Shortcuts
- Shortcuts
- Applications
- KRunner: add shortcuts for Alt+F2, Alt+Volume Down
- KWin: Scroll down and add shortcuts for Switch to Desktop for each one (Ctrl+F1, Ctrl+Volume Mute; etc)
- Applications
- Shortcuts
- Users
- Select your user and click "Configure Fingerprint Authentication". Add your fingerprints.
- Firewall
- Enable the firewall.
- Input Devices
- Mouse
- Enable 'Press left and right for middle click.'
- Slightly increase pointer speed
- Do not invert scroll direction
- Touchpad
- Enable 'disable while typing'
- Pointer acceleration to 0.20
- Acceleration profile: adaptive
- Unset 'Tapping' and 'Two-finger tap'
- Scrolling: two fingers
- Right-click: 'Press anywhere with two fingers'
- Mouse
- Display and Monitors
- Display Configuration
- Resolution: 1680x1050 (16:10). This is nice because i'm an old blind man, and you get a nice big resolution without having to enable scaling (which will take up CPU and battery)
- Compositor
- Un-set 'enable on startup'
- Night color
- Switching times: sunset and sunrise at current location
- Display Configuration
- Audio
- click 'Configure Volume Controls'
- Select 'Raise maximum volume'
- click 'Configure Volume Controls'
- Power Management
- Energy Saving
- On AC Power:
- Screen brightness: 75%
- Dim screen after 5m
- Screen Energy Saving: switch off after 10m
- Button events handling:
- Laptop lid closed: do nothing, even when external monitor connected
- Power management profile: Balanced
- On Battery Power:
- Screen brightness: 50%
- Dim screen after 2m
- Screen Energy Saving: switch off after 5m
- Suspend session: sleep automatically after 15m
- Button events handling:
- Laptop lid closed: sleep
- Power management profile: Power Save
- On AC Power:
- Advanced Power Settings
- Low level: 10%
- Critical level: 5%
- At critical level: Sleep
- Stop charging at: 80%
- Start charging once below: 70%
- Energy Saving
- Workspace Behavior
-
Install system tools via apt
- curl, wget, git, mplayer, inetutils-ftp, git-credential-oauth, kgpg, ktorrent, vim-gtk3, nmap, ncat, net-tools, tcptrace, macchanger, wireshark, xplot-xplot.org, wireguard, wireguard-tools, kwalletcli, imagemagick, gdm-settings, libpam-fprintd, timeshift, tree, inxi, mesa-utils, gdisk, xserver-xorg-video-amdgpu, xclip
-
Create a GPG key for your user. See: https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key
-
Install kwalletmanager and try to create a new wallet. You may need to follow this guide: https://wiki.archlinux.org/title/KDE_Wallet
-
Open TimeShift. Configure it to use Rsync mode, schedule 2 monthly/3 weekly, for user home directories include only hidden files. Check the include/exclude patterns, make sure it includes every /* folder aside from media, proc, sys, mnt, home, etc.
-
Replace Firefox snap package with Apt package
- Install Firefox from the official supported Mozilla branch: https://support.mozilla.org/en-US/kb/install-firefox-linux
- Close Firefox
- Uninstall firefox from snap (
snap remove firefox
) - Prevent Ubuntu from re-installing the Snap version of Firefox later on
$ sudo tee /etc/apt/preferences.d/firefox-no-snap <<EOF Package: firefox* Pin: release o=Ubuntu Pin-Priority: -1 EOF $ sudo apt update
- Start the new Firefox
-
Install Touchegg for the three-finger swipe between virtual desktops: https://github.com/JoseExposito/touchegg?tab=readme-ov-file#ubuntu-debian-and-derivatives
- Make sure the config is installed for KDE: https://github.com/NayamAmarshe/ToucheggKDE
-
Make sure GDM3 is installed, as we'll use that for the login manager instead of SDDM (sddm doesn't properly support fingerprint authentication, among other things)
-
Modify /etc/pam.d/ files to allow fingerprint authentication
- base64/xz/tar file contents:
/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4E//BgldADOZCfntitHAZBuZdhVcYAX/cihNdZ5QUtRNWGC5eNmNUsh/FB1qd5fjRf051/VB7l96xdXkqaLCTUxWYaovRLVIXC9qQ2jXx7tczCzP/ykp/oApvQjjYanL6q263Iq1xywifADiZYqzUMX2WZZ8g9eTMiiGNM8ljulD6q7U3HlEyDjCu6xQKePnxsiM8T2I5LdAc32Fk00MscEingDj1zj/7Qbmna1dUwOXBrYhaXZ45X83K+NDatJ98U0Sg1b3AizftWlLgexBbXGHiw+kD1UuMmugTgHQVNNC7y9SL4R1ucw+buLRVc2QUHaCwzPnB+HwzScKKBkHvHe/XYWZUbTAwAd73B8Vl10CbotR1oxilhL+pQSOaOAedhbL3JdlxRLZ2U8JIb6pjaGDKutf1WSOXeqfGYiNgejck/g9f2jpIjk6CsiIe3w5fyRXxgSF2OfGP3ng22S2y1J7oL/kxrZDvc7+Mj3lX3w1mzsAUt2PsL/XX4KxMqQR1pVaKM3uSIfFtzpx2n4QN9tZm8Ztg5YFBGNfEwn2a/72dlGV7Emo+Q7AcGKctv5theWlAz9sdLe13h5HaEVko8GA4RGg5IhHyUcREP0yrSyZsLaetMtd3+qDkoABGUAySNccmuICBlu8IYFJ5+7JlX3E3gz6xcojZPi07/38ikOe3nbMk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W2IATeoQ/ZHCCZdajMcV9ypedl7CcSiZ/QylfB01aYDqrjK4JTHFzcB1XjUXoHsIaDs6k1yEWT6sOtS8MNOAVWI/XL7Y1fHxwj9BXBR6tfvn3vti3XFV36p1UyktwBxsoQD7rC/5pBIDKkce8Q5O5dbpoYe9mmRiKZKlzTHCvZWqEkus/ecLj+vXtQA+v6KMHBDPu/EVY+/zzx5jnIx0TzN90kJz0tBQZ0lZD8Y2cOc/hHsTq77WQ+GUT9kCsOQJmd5PpkKBp0S6DWmiR+hW8Kuw9GDT7odAoaD1+xeLo3ySey16Mls8LRejFTaAAAAADYc63CqOCP+wABpQyAoAEAm2NOYrHEZ/sCAAAAAARZWg==
- This does the following:
- For GDM login, you must first use your fingerprint, then you can enter your password.
- For KDE lock screen, either put in your password, or hit "Enter" with an empty password, and you will be prompted for fingerprint.
- For sudo, first it will prompt for fingerprint; ctrl+c will allow you to enter your password.
- For KDE Plasma auth (and polkit), either fingerprint or password works.
- base64/xz/tar file contents:
-
Disable display quality change under low-power mode
- By default, if your machine switches to the power-saving setting, the low-power display will kind of go... crap. It gets lighter and the colors suck. But luckily you can disable this and still keep power-saving mode.
- Open /etc/default/grub and make sure this line exists:
GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.abmlevel=0 quiet splash"
- While you're at it, add this too:
GRUB_INIT_TUNE="1750 523 1 392 1 523 1 659 1 784 1 1047 1 784 1 415 1 523 1 622 1 831 1 622 1 831 1 1046 1 1244 1 1661 1 1244 1 466 1 587 1 698 1 932 1 1175 1 1397 1 1865 1 1397 1"
- Run
sudo update-grub
- Reboot
-
Install AMDGPU-PRO drivers
- I'm not sure if this helps at all, but it might?
- Follow directions here: https://amdgpu-install.readthedocs.io/en/latest/install-overview.html
- You will need to enroll a new MOK key for these drivers. On reboot, put in the password you created for Secure Boot enrollment, and scroll down to "Enroll MOK" and follow the prompts.
-
Install 1Password via apt: https://support.1password.com/install-linux/#debian-or-ubuntu
-
Enroll in Ubuntu Pro
- Create an account at ubuntu.com
- Create a free personal token
- Use the
sudo pro attach ...
command listed in your account to enroll your laptop - Use
sudo apt update && sudo apt upgrade
to upgrade to Pro packages
-
Add a panel to desktops on other monitors
- Connect the other monitor and move your mouse over to that monitor's desktop
- Right-click the desktop, go to Add Panel, and click Kubuntu Default Panel
-
Enable tear-free mode in the X11 config
- Put this file in
/etc/X11/xorg.conf.d/amdgpu.conf
(stops tearing in videos) :Section "Device" Identifier "Device0" Driver "amdgpu" Option "TearFree" "on" EndSection
- Put this file in
-
Install Insync: https://www.insynchq.com/downloads/linux#apt
-
Install DisplayLink driver for Dell D6000 USB-C dock. (not strictly necessary but why not use the upstream packages?)
wget https://www.synaptics.com/sites/default/files/Ubuntu/pool/stable/main/all/synaptics-repository-keyring.deb
sudo apt install ./synaptics-repository-keyring.deb
sudo apt update
sudo apt install displaylink-driver
- Reboot
-
Swap the left-alt and left-meta keys on my usb keyboard
- Install and run
evtest
- In the list of inputs show, type the number of your USB keyboard.
- Scroll up to the first immediate output lines and copy them down.
They'll look like
Input device ID: bus 0x3 vendor 0x46d product 0x4088 version 0x1111
. - Tap the first key you want to map, then the second key. The output should look like:
The value after MSC_SCAN is the scan code (Event: time 1743882565.848917, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e2 Event: time 1743882565.848917, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
700e2
) and the letters after KEY_ is the alias of the key. - As root, create file
/etc/udev/hwdb.d/99-custom-keyboard.hwdb
with this entry:
Theevdev:input:b0003v046Dp4088* KEYBOARD_KEY_700e2=leftmeta KEYBOARD_KEY_700e3=leftalt
0003
is the bus hex code from earlier, the046D
is the vendor code from earlier, the4088
is the product code from earlier, the700e2
and700e3
are the scan codes of each key from earlier, andleftmeta
andleftalt
are the aliases from earlier. sudo systemd-hwdb update && sudo udevadm trigger
- Install and run
-
When logging in on the desktop (using GDM3), somewhere in the righthand corner, there should be a menu that lets you select the session type. Select X11 Plasma. Then log in.
-
Sometimes on waking from suspend, fingerprint stops working. Use Ctrl+WindowsKey+Alt+F1, then Alt+RightArrow, to bring up the GDM3 login window. Login here and it should unlock the screen.
-
I don't know why but Firefox is doing a weird thing where the mouse and UI don't seem to respond for seconds at a time when video is playing and you try to mouse-over the video player's seeking area.
-
If you set up KDE to automatically switch your only monitor to the secondary monitor on connecting your dock, and you let the laptop sleep, and then unplug it and wake it from sleep, you won't be able to see your screen on the laptop's monitor (it doesn't switch back).