Ubuntu on 2015 Thinkpad Carbon X1

This week Disney gave me a 2015 Thinkpad Carbon X1 and I set it up to run Ubuntu. I choose XUbuntu because it has a smaller disk footprint than Ubuntu, the desktop uses less RAM and CPU, and I prefer XFCE’s simple old fashioned desktop over Unity. Yet the only difference is the desktop – it is the same Ubuntu under the covers, so it has the most up-to-date repos and is one of the most popular distros, which means good support.

This Carbon X1 is really nice – Disney gives us great hardware. i7 processor, 8 GB RAM, 256 GB SSD, and 1920×1080 non-touch screen. Being a fast typist and keyboard snob, I will say this laptop has the best keyboard I have ever used on a laptop. Better than my Macbook Air, and far better than the terrible keyboard on the Dell XPS-13. And this X1 is one fast machine. It puts my Macbook Air to shame.

The 2015 X1 has Broadwell processors and the longer battery life they make possible. It runs Ubuntu right out of the box, basically works including bluetooth, networking, wifi, even the docking box. But there are some bugs that require tweaking to fix. This is what this blog is all about.

Suspend/Wake

First, I observed that it wouldn’t wake properly from suspend. Upon wake I got a screen that was solid black or garbled.

The first thing I tried was adding the “nomodeset” parmeter to the linux kernel:

sudo vi /etc/default/grub
---
GRUB_CMDLINE_LINUX="nomodeset"
---
sudo update-grub
sudo reboot

This fixed suspend/wake but broke the display brightness function keys. The display was stuck at max brightness. Long story short, for both to work I reverted the above change and did the following:

sudo vi /usr/share/X11/xorg.conf.d/20-intel.conf
---
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "uxa"
EndSection
---
sudo reboot

Networking

Sometimes networking won’t connect. This happens wired – ethernet to USB or in the dock, and wireless. Once connected it’s solid; this bug is about initiating a network connection. Disabling and re-enabling networking and wireless don’t fix it. The network settings are often greyed out on the system menu, with no explanation. There’s nothing obvious I can find in the dmesg logs.

It took me a few weeks but I finally figured this out. First use rfkill, which usually fixes it. If not, restart the network manager service. Or just run this script:

#!/usr/bin/env bash
sudo rfkill block all
sleep 2
sudo rfkill unblock all
sleep 2
sudo service networking restart
sudo service network-manager restart
sudo resolvconf -u

Power Management

Ubuntu 15.04 has a feature (I use the word loosely) that cools the CPU by scheduling kernel threads that hog a timeslice while idling. This is redundant and overly complex. There are already 2 ways the laptop cools the CPU: (A) slow down the clock speed, or (B) turn on the fan. Which to use depends on whether you want battery life or performance.

This new feature will have your laptop suddenly become slow and unresponsive at seemingly random times for no apparent reason, and you’ll see mysterious idle threads hogging the CPU.

To disable this blacklist the intel_powerclamp module:

sudo vi /etc/modprobe.d/blacklist.conf
---
# blacklist intel powerclamp, a redundant and overly complex way to keep the CPU cool
blacklist intel_powerclamp
---
sudo update-initramfs -u
sudo reboot

Another action you can take to improve battery life is to enable power save mode:

sudo pm-powersave true

VirtualBox, Windows, and Samba Shares

Disney uses Exchange email, so I created a Windows 7 VirtualBox VM to run Outlook. Thanks to my MSDN subscription, I also have Office 365 but prefer using LibreOffice most of the time.

To access the Linux filesystem from the Windows VM, I create a Samba share in Ubuntu accessible only to my local user and map it to a network drive in the VM. This works mostly fine. But whenever the VM is (re)started, it can take 30 seconds or so before the fileshare is accessible. During this time, Outlook expects to see the drive, gets confused and hangs. It remains unresponsive even after the drive becomes accessible. It must be killed and restarted, which sometimes corrupts the PST file.

I discovered there is a workaround for this. Define the samba share in Virtualbox (in the settings for the VM) instead of in Ubuntu. When I do this, the share is immediately accessible every time the VM (re)starts. No more Outlook hangs and corrupted PST files.

Summary

With these simple changes, my X1 is running XUbuntu 15.04 smoothly and reliably. Even session swapping between users is working! If I encounter any other issues I’ll report them and solutions here.

DNS, Web Hosting and Email

Where’s the old BLOG? It’s here:
Mike’s Old Blog

As is evident from these pages, we have a DNS (mclements.net), host a web site, and email on our DNS. We’ve had this for about 15 years. Started with
Register.com, then used GoDaddy for a few years. The time came to renew and GoDaddy wanted about $145 for 2 years.
Our GoDaddy experience was good, but it had some limitations:

  • Hosting Storage: limited to 10GB unless you pay more
  • Hosting Features: support for WordPress and others cost extra
  • Email storage: about 100MB to share across all accounts
  • Email POP3 only: cost extra to enable IMAP
  • I looked at some alternatives and ended up with Arvixe, as you can see if you ‘whois’ this DNS.

    Arvixe addresses all of the above limitations of GoDaddy:

  • Hosting Storage: unlimited
  • Hosting Features: includes WordPress and others
  • Email storage: unlimited
  • Email IMAP: included
  • The cost is also lower: $96 for 2 years.

    The support is comparable: both respond quickly via email and have 24 hour phone support.

    Of these improvements, I find IMAP email to be the best. We’d been using POP3 for 15 years and got used to the limitations. Key benefits of IMAP include:

    Multi-device: IMAP has one consistent list of which emails you’ve read, stored at the server. When you access the same email account from multiple devices, this list remains consistent. When using different devices, you don’t need to wade through the same emails you’ve already read to find new ones. This is a big improvement over POP3, in which each device separately stores its own list.

    Goodbye, self-BCC: on POP3 if you want to see emails you sent from different devices, you need to BCC yourself else they’ll never appear on other devices. With IMAP, the sent folder is synchronized across all devices so you don’t need to do this.

    Spam management: on POP3 you need to access the email server directly from a browser (not from your email client) to access the folder where it stores Spam, in order to see what’s being flagged as Spam and see if there are any valid emails in there. With IMAP, the server Spam folder is synchronized across all devices so you can access and manage it directly from the email client on any device.

    Synchronized deletes: when you delete emails on IMAP they go to the server Trash folder, which is synchronized just like all other server folders. Thus any email you delete, from any device, goes to the same place. It can be seen and managed directly in the email client on any other device.

    Email refresh: IMAP can use the Idle command to notify clients when emails arrive, instead of having to poll the server periodically like POP3 does.