Slackware on a Lenovo ThinkPad X1 carbon 6th generation

posted on Apr 23, 2018

This post is about setting up Slackware Linux on the ultrabook Lenovo ThinkPad X1 carbon 6th generation. This is an extremely light laptop with top-end performance, including a superfast 1Tb NVMe drive. I like the fact that this is incredibly thin and light, but yet has two full USB 3 ports, two USB C and a full size HDMI port. The battery holds a pretty good runtime. Check the table at the end to see details of the hardware configuration.


The computer came with Windows 10 Home pre-installed. In the event that I may need to run something on Windows (occasionally I need to use Word with Endnote), I decided to virtualize this and try to have it available as a VM. VMWare has a tool that can do this: VMware vCenter Converter Standalone. Running this in Windows (started with Run as adminstrator) created a VM image that I wrote out to an external drive, hoping to be able to run it with VMPlayer. This worked well as you can see below.

In order to be able to restore the full system, I also made a backup of the recovery partition. To achieve this I booted the system using a GParted thumbdrive and used FSArchiver to archive the partition to an external USB drive (SBo also has a slackbuild of FSArchiver).

Having got all I wanted from the original system, I could now remove the original OS to give way to my Slackware system. Still using the GParted thumbdrive, I deleted all partitions except the EFI System Partition. I created a small 128Mb boot partition formatted with ext4, and another large one, with the rest of the disk size, to be encrypted and store root and swap.

Just to make sure everything will work best with Linux, I changed two settings in the BIOS:

  • disabled "Secure Boot"
  • enabled "Thunderbolt BIOS Assist Mode"

Slackware64 14.2

There are some issues with installling Slackware on this machine such that it boots off of UEFI and from an NVMe solid state drive (a new and faster version of the SSD protocol). Due to work requirements, the disk also needs to be encryted, which I do using the LVM+LUKS method.

  • Slackware 14.2 does not have support for NVMe drives but Didier Spaier created an ISO image for a USB that deals with it. I installed it on a USB stick and booted the computer from this. For more information see the whole discussion thread at Linux Questions (but make sure you get to post #32 with the updated version!)
  • because I need disk encryption I followed the instructions on the README_CRYPT.TXT file in the installation folder; I use the LVM+LUKS method that encrypts both swap and root. I created a plain ext4 partition (128 Mb) to mount /boot and another one with the rest of the entire disk to encrypt for swap and root. Note that this method will always require an initrd, it won't boot without one (even with the huge kernel).
  • now that I have a partition to encrypt I followed the instructions of README_CRYPT.TXT to encrypt the partition and create two LVM volumes for swap and root. Because I want to be able to hibernate to disk, the swap file has 16Gb (the amount of RAM on this laptop).
  • at this point I inserted another USB with the full Slackware64 14.2 installation (fortunately this laptop has two full USB 3 slots!), mounted it and then started the setup command (from Didier's USB that booted the system). At the point where it asks for the Slackware installation folder I pointed it to the second USB.
  • at this point I just installed the full package. The install went smoothly and it recognized most of the hardware (but we will need a new kernel for the wifi adapted...)
  • then I applied all the patches available at this time (except the kernel since we will need a more updated version).
  • finally I created an appropriate initrd.gz. Note that this laptop needs to load the modules nvme-core and nvme in the initrd, otherwise it cannot read from the solid state drive and it will not boot!
  • after having made the initrd.gz I've put it and the (generic) kernel in the /boot/efi/EFI/Slackware folder. At this point the system is ready to reboot; the newly installed Slackware 14.2 boots like a gem!

Kernel 4.14.34

The kernel that comes in Slackware 14.2 (or the one in the patch folder) does not have a driver that works with the wifi adapter in this machine (Intel Wireless 8265). Fortunately at this time Slackware-current has a kernel that has the driver, so I've installed that one.

  • Maybe I could have just used the Slackware-current kernel packages, but I feared this may depend on a different glibc, etc. To be on the safe side I decided to compile the kernel myself. To avoid going through all of the kernel configuration, I got the .configure file from Pat's Slackware-current kernel packages. You can get this file from the kernel source package and drop it in your kernel build directory. Then just do the typical make, make modules_install and copied the kernel file to /boot/efi/EFI/Slackware.
  • A new initrd.gz needs to be built with this kernel, though the parameters are the same as before. Copy the initrd.gz to /boot/efi/EFI/Slackware
  • adjust the elilo.conf to load the new kernel and initrd.gz. I've added the option "resume=/dev/cryptvg/swap" to enable hibernation to disk
  • there are other options to pass to the kernel too; one is to to better configure CPU turbo mode and another for cooling. I have not done this yet and will update this entry when I figure it out.
  • after booting the new kernel the wifi works fine.


At this point I have a really nice laptop setup. It is increadibly light and fast. I've got the touch screen and that works perfectly well, including with the stylus from the X230t that I had previously (or if you prefer any stylus for tablet will work with it too). I use the stylus to sign documents at work, or to edit photos at home. At this point only the fingerprint reader does not work under Slackware. The specs and functionality of the hardware are listed below.

Hardware details and usability chart

laptopLenovo X1 carbon 6th generation model 20KHCTO1WW worksThinkPad BIOS N23ET37W (1.12 )Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
diskSamsung 1Tbworksnvme_core, nvmesee notes for how to setup Slackware on an NVMe disk
USBIntel Sunrise Point-LP USB 3.0 xHCI, Realtek Semicondictorworksehci_pci, ohci_pci, ehci_pci, xhci_pci2x USB 3.0 and 2x USB C (see photo); charging through USB C
ethernetintegrated Intel 82579LM Gigabitunknowne1000ethe ethernet connector is hidden behind a plastic cap, next to a USB C (see photo with cap still on). Remove cap reveals a mini ethernet, needs an adaptor to connect to RJ-45...
wifiIntel Dual Wireless AC 8265worksiwlwifineeds kernel 4.14 or above
Bluetooth??? worksbluetooth
videointegrated Intel Sky Lake worksi915,hid-multitouch,input,hiddev96,hidraw0I have the 1920x1080 touch screen; touch works
sound cardintegrated Intel HDAworkssnd-hda-intelintegrated microphone works; external mic and heaphones requires single jack.
cameraChicony Electronics 04f2:b61eworksuvcvideoworks up to 1280x720
hotkeyskeyboardpartialthinkpad_acpivolume and brightness work; wifi and bluetooth kill switches work; mic mute does not work
fingerprint reader???does not work apparently can work but needs a driver and software
touch padSynPS/2 Synaptics TouchPadworkspsmousethis one works flawlessly, I hear about othe models that did not; possibly different hardware and I got lucky!
track pointTPPS/2 Elan TrackPointworkspsmousethis is the red "nipple" between keys G,H and B...

Configuring sendmail to forward through Gmail

posted on Sep 5, 2016

These days we get Gmail to manage mail servers (in my case this happened due to the large amount of spam filtering that my email server had to do). However many Linux services may need to send email and yet I don't usually check the local email accounts on each machine. The best way to have those automated emails to work is to have the machine forward email through Gmail. This post describes how I set this up on Slackware 14.2.

Step 1 create Gmail authentication file

  1. mkdir -m 700 /etc/mail/authinfo/
  2. cd /etc/mail/authinfo/
  3. create new file gmail-auth with the following content:
    AuthInfo: "U:root" "" "P:password"
  4. chmod 600 gmail-auth
    (because it has your password!)
  5. makemap hash gmail-auth < gmail-auth

Step 2 configure sendmail

In Slackware 14.2 the sendmail configuration files are kept in /usr/share/sendmail/cf/cf/. We will create a new configuration file by expanding the base slackware sendmail configuration. This will have to be compiled and deployed in /etc/mail, then sendmail needs to be restarted to reload the new configuration (or as in my case, activated for the first time).

  1. cd /usr/share/sendmail/cf/cf
  2. cp
    (but you can use a different base configuration in that folder if it is more appropriate)
  3. edit to include the following code instead of the line dnl define(`SMART_HOST',`'):
    define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
    define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
    define(`confAUTH_OPTIONS', `A p')dnl
    FEATURE(`authinfo',`hash -o /etc/mail/authinfo/gmail-auth.db')dnl
  4. Now we compile the configuration and put it in /etc/mail:
    m4 > /etc/mail/

Step 3 enable or restart sendmail

If you already have sendmail running, you need to restart it, otherwise you need to enable it and start it (my case):

  1. cd /etc/rc.d
  2. chmod a+x rc.sendmail
  3. ./rc.sendmail start

Step 4 enable Gmail to accept messages

In older days the above would be enough, but these days Gmail does not want to accept other applications connecting other than Google apps themselves. So we have to setup the Gmail account to allow "unsecure" connections. (These may be indeed less secure, but note that the configuration above is using TLS to encrypt the connection.)

  1. Login to your Gmail account at
  2. On the account homepage, click Sign-in & security (or navigate to
  3. Turn on Allow less secure apps
  4. Go to the page and press Continue
  5. Now, back on the command line on your server send a message like this:
    echo "Testing mail forwarding through Gmail" | mail -s "Forward test" someother@email.address
    (we're sending to a different email address so that we can check how all forwarded messages arrive; essentially they come from your (added in step 1.3). Note that all accounts on your machine now forward email through this!)

Your test message should have arrived at your test email account. It seems that if the machine forwarding mail to Gmail does not have a reverse DNS entry, the messages may take quite some time to be processed (Gmail slowing down machines that may be suspect of sending spam, as these days most bona fide mail servers would have a reverse DNS entry).

Slackware on a Lenovo ThinkPad X220t

posted on Feb 18, 2012

This is about setting up Slackware Linux on the "Convertible" Laptop-Tablet PC Lenovo X220t. This combines the advantages of a tablet (being able to write with a pen) with the speed of a proper computer (an i5 rather than an ARM processor). I use it both for running lengthy simulations, as well as for editing PDFs with handwriting.

Slackware64 13.37

  • installed the full package, using a USB install as this machine has no optical drive (an option that I did not get). The install went smoothly and it recognized most of the hardware
  • applied all the patches available at the time
  • applied two packages from testing: libdrm-2.4.25 and mesa-7.10.2

Kernel 3.2.6

The kernel that comes in 13.37 has old wacom drivers that don't work with the touch screen of the X220t (which is a USB device). So I upgraded the kernel to 3.2.6.

  • I use this config file.
  • added the kernel parameter i915.semaphores=1 so as to not hang the video, a problem that has pestered all Intel SandyBridge chips. (You add this in /etc/lilo.conf to the append section)
  • added the latest microcode for the Centrino-N 1000 wireless adapter to /lib/firmware (the file iwlwifi-1000-5.ucode in the tarball)

The X11 system in 13.37 comes with an xf86-driver-wacom package that does not support the X220t touchscreen very well. A more recent version is needed to make the table work fine. I've created a package for version 12.0 using the build scripts included in 13.37. Building parts of X11 are not as straightforward as building simpler packages, so I am providing here the package that I build, feel free to download: xf86-input-wacom-0.12.0-x86_64-2.txz

Usability chart

ethernetintegrated Intel 82579LM Gigabitworkse1000e
wifiintegrated Intel Wireless-N 1000 BGNworksiwlwifinot tried N mode
videointegrated Intel SandyBridgeworksi915requires i915.semaphores=1 kernel parameter or else there are frequent GPU hangs
sound cardintegrated Intel HDAworkssnd-hda-intelintegrated microphone works; external mic and heaphones requires single jack and not yet tested
cameraChicony Electronics 04f2:b217worksuvcvideoworks up to 1280x720
hotkeyskeyboardpartialthinkpad_acpivolume and brightness work, suspend and others don't
BluetoothBroadcom 0a5c:217f untestedbluetoothled is up, appears to work but need to test
fingerprint readerUpek 147e:2016does not work apparently can work but needs a driver and software
flash card readerRicoh device e823workssdhci-pcionly tested SD and SDHC cards

On moving from KDE to XFCE

posted on Feb 07, 2012

KDE has been my window manager for ages, but I am getting tired of how it has become slow and wasteful. By and large the KDE applications are fine, but the increasing dependency of the system on its semantic desktop is not. (You may think that a semantic desktop would be a nice feature, and in theory it is, but in practice it consumes large amounts of resources for no visible advantage).

So I am trying out XFCE, a GTK-based window manager that is very slim and sleek (ie nothing like Gnome!). I am not really worried about the disk space that the KDE applications take, so I am happy to leave them on the disk and maybe even use them (as long as they don't require running akonadi or nepomukserver).

This blog post is really meant to be a list of applications that I will use in XFCE instead of the ones I use in KDE. It is an evolving post: I will come back and edit whenever I find better options. If you are interested, do come back to check.

In case you don't follow my blog, I should say that I use Slackware, either 32-bit or 64-bit (pure, I don't like 32-bit compatibility libraries!).

KDE applicationSubstituteComments
KMailThunderbirdI've already done this switch and use it in KDE. It is not better than KMail; I particularly dislike that it uses mbox files rather than Maildir, but I've overcome this by running my own IMAP server (dovecot)
KonquerorFirefoxnothing to be said here, firefox is the leader, otherwise it would be Chrome
Katemedit medit can have several files open, does syntax coloring and can open terminal window - all the features that I use in kate
Amarok VLC not as good as amarok, will try other options too: xmms, audacious, aqualung, exaile
Okular ? candidates:evince, epdfview, acroread (only 32-bit)
Digikam ? This is a toughie, I use Digikam for my large photo database and really haven't found anything equivalent (apart from KPhotoAlbum, but that is also a KDE app) This will be a showstopper, at least on my home PC
KdenliveOpenShot Kdenlive does not use akonadi, only kdeinit4, klauncher and kded4 (the basic processes of KDE), so I consider it usable for my purposes. The alternative, OpenShot is a python program and does seem suitable (not as much features as kdenlive but close)
KSnapshot xfce-screenshooter-plugin Gimp also does the job well
Konsole Terminal defaut XFCE application; works well, especially after setting all properties (window height had to be done on ~/.config/Terminal/terminalrc)
dolphinthunarthis is the default on XFCE, seems ok. Alternatives could be XFE or PCManFM
gwenviewgeeqieworks fine
K3b ?xfburn, Xcdroast?
KCalcgalculator GTK2-based calculator, has scientific and hex modes.
kdesu? ktsuss, gtksu
KHexEditor?GHex, JHEditor?

I already use several applications that are not KDE-specific and these don't have to change: OpenOffice/LibreOffice, Inkscape, Calibre, Sigil, Skype, Hugin, Pidgin, Audacity, XVidCap, Xournal, Eclipse.


This blog is an assorted collection of geeky thoughts, mostly stuff I want to remember about coding, configuring Linux and Slackware.

Creative Commons License

My twitter feed

My Flickr stream