10 Apr 2015
A good linux ultrabook: Thinkpad T450s

Table of Contents
- Overview
- Selecting a Laptop
- Requirements
- The Candidates
- My Final Choice
- Installing Linux
- Design
- Arch Linux
- Ubuntu-Gnome installation
- Running Installation notes
- HiDPI screens
- My thoughts when deciding on a laptop
Overview
I've been looking at a decent laptop to travel with, since it seems like I'm going to be traveling to:
- Illinois
- Toronto
- Leipzig
- British columbia
in the next three months. Due to the nature of my job -- I do research in a university -- I find that traveling without a full fledged computer can be a little crippling. I wrote my thesis on a chromebook hacked to run linux; now that I'm no longer below the poverty line, I have no more excuses. I must suck it up and shell out some money for a new ultrabook.
So I'll cover my selection process, and the installation of two flavors of linux on my system.
Selecting a Laptop
Requirements
- Runs linux without too many hiccups: ubuntu certification is a good indicator of this.
- Light, at most 3.5lbs.
- Nice screen, preferably IPS, at least Full HD (1920x1080) with, optionally, a touchscreen. UPDATE: the touchscreen is not that useful really, I wouldn't get one if I bought a computer again. It's nice to have on the rare occasions that I actually use it.
- Runs in clamshell mode
- Backlit keyboard is essential.
The Candidates
I had several candidates initially. I'll copy paste directly from my notes at the time, so they will be a little terse and badly written.
My Final Choice
It finally boiled down to the Dell XPS 13, the T450S, and the X1 Carbon. Once I found out that people were having a lot of trouble installing linux on the Dell, I decided to go with Lenovo, since the X4X series of thinkpads had good linux support. The thinkpad community is also pretty supportive, and I've heard that Lenovo is pretty commited when it comes it Lenovo support. This ruled out the Dell.
Then I called Lenovo, and it turns out that they gave pretty good educational and business discounts. I got quotes for a highest spec X1 Carbon 3rd Gen for about $1100, and a high spec T450S for $1000. Now I had to decide whether I wanted the sleek looking, light X1 Carbon over the heavier, but more functional, upgradeable T450s. I went with the T450s since I figured I'd need the extra ports -- I make presentations on VGA projectors -- and because linux doesn't have great HiDPI screen support. You may object and say that cinnamon and gnome do some screen scaling, but they only scale to integers, unlike the Mac screens. They do this scaling by doubling pixels usually - each pixel becomes 4, and although your picture remains sharp, you lose quite a bit of screen real estate. In other words, the 2560x1440 screen on the X1 Carbon would scale down to 1280x720; my screen would be have the same effective area as a 720p screen. However, a native 1080p laptop screen is just perfect for a 14" screen. If you do choose to go with the X1C, check out this article about using xrandr to get perfect pixel doubling in linux.
People also said that they barely use touchscreens; I've enjoyed mine so far, especially when I'm lying down in bed and watching a movie or reading a pdf. UPDATE (Apr 11 2015): I barely if ever use the touchscreen. But I still like having it.
Installing Linux
Design
I wanted to boot three operating systems: Ubuntu, Arch and Windows. I also wanted to share my home directory, dropbox, vim directory, and usr/local
between the two distributions. The best way to do this, I found, is to use Logical Volume Management or LVM. It's extremely simple to use, and a huge convenience: you create one large partition as a physical device, and create several logical volumes inside of it that you can dynamically resize, even as your system is running.
I've found that LVM2 is very stable, and extremely useful. I highly recommend it. I've even extended by root filesystem on lvm without unmounting it. Isn't that neat?
I decided that I would have the following volumes
Partition |
Space |
Notes |
root for ubuntu |
10 GB |
|
root for arch |
10 GB |
|
home for arch |
5 GB |
mostly config files |
home for ubuntu |
5 GB |
|
usrlocal |
20 GB |
mathematica, matlab, tex, etc |
common dropbox |
5 GB |
|
personal files |
50 GB |
mount bind under home |
swap space |
8GB |
For suspend-to-disk |
I wanted to have one common home directory, but I'd be using two different desktop environments on ubuntu and arch, so I was warned about incompatible ~/.config
files.
Quick instructions
- Booted into arch using a my multiboot stick, and made a large lvm using parted. Create the partition using mkpart, and then turn on the lvm flag in parted using
[code lang=text]
set <part num> lvm on
[/code]
- Then use the pvcreate, lvcreate commands as described in the arch wiki. All partitions can be made using lvm including swap. I think the boot partitions can be inside the roots of each individual distro. swap space must be formatted with
[code lang=text]
mkswap /dev/vol1/swap
[/code]
Arch Linux
Networking
Network manager under Cinnamon is pretty shitty by the way. It was hard to save profiles: I thought it was because gnome-keyring wasn't installed, but this didn't seem to the problem. The problem appeared to be the cinnamon version of nm-applet. Also, Network Manager didn't refresh the list of networks quickly enough, and I found this a bit annoying.
So I tried netctl and netctl-auto for a while, but this is a bit of a pain. You need to download specific profiles for eduroam, and its not quite clear how to configure them a priori. Trying to configure your internet while getting help online is a bit of a pain, as you can imagine.
Then I tried connman and connman-git. These were ok, and connected fast. However, connections were unstable, and notifications were unreliable. I then tried wicd, and was quite unhappy with this too. Although configuring wicd was easier than connman and netctl, it still had connection issues.
However, the connection issues appear to be related to the iwlwifi driver in the 3.18 kernel I'm running. See my running notes on the install for kernel patches, fixes and more info. This is still not fixed, but I'm very happy with the 3.16 kernel on the Ubuntu side, which does not have these connection issues. I've not solved the connection issues on the Arch side, and will get back to it when I have the time.
In the end, suffice it to say that I went back to Network Manager.
This is why I chose it over the others:
- Easier to configure. No problems connecting to WPA2 networks like eduroam.
- Fairly stable.
- Great notifications.
- Automatically switches between ethernet and wifi.
- Scanning issues: I fixed this by manually running
[code lang=text]
sudo iwlist wlp3s0 scan > /dev/null
[/code]
which automatically refreshes the Network Manager list.
- Easy creation of ad-hoc networks. In fact, I don't use a router at home anymore. An ad-hoc network using an old Realtek card running on infrastructure mode is more than enough for my 5Mbps --it's free-- connection at home.
- nm-applet issue in cinnamon: I edited
/usr/share/cinnamon/js/ui/statusIconDispatcher.js
and commented out the line
[code lang=text]
'nm-applet': 'network',
[/code]
Now the default Network Manager applet icon loads, and this is much more stable and usable, although it doesn't fit very well into the cinnamon icon theme.
Touchpad
The touchpad on the arch side worked out of the box, but it needed a little fiddling to get the synaptics driver to work instead of evdev. The trackpoint buttons don't work out of the box, but they work on later kernels (3.18 and 4.0, as far as I know). The touchpad can be disabled entirely using a kernel parameter at boot (see synic's blog).
I prefer having two finger scroll on the touchpad to a trackpoint. But configuring the touchpad to work correctly does take a bit of work. Originally, it was running my touchpad using just the evdev driver, which is a bit basic. So I somehow managed to get it to use the synaptics driver, which probably had something to do with the /usr/share/X11/xorg.conf.d/50-synaptics.conf
configuration file I copied to /etc/X11/xorg.conf.d/50-synaptics.conf
.
I was having trouble with the scrollspeed and mouse pointer speed. I tested different values using
[code lang=text]
xinput
[/code]
which gets a list of all devices with their numbers. Suppose the synaptics device is X. Then do
[code lang=text]
xinput list-props X
[/code]
I had to change
[code lang=text]
Synaptics Scrolling Distance (306)
Synaptics Move Speed (309)
[/code]
and a few others settings. The general syntax is
[code lang=text]
xinput set-prop X "Synaptics Scrolling Distance" "114" "114"
[/code]
Note that these property names are different from the ones you set your xorg.conf
. The synaptics man page gives a mapping from the xinput properties to the options to be set in /etc/X11/xorg.conf.d/50-synaptics.conf
. These have different names from the xinput properties -- god knows why. I've listed some of my values, in case some people might find it useful:
[code lang=text]
Option "FingerHigh" "30"
Option "FingerLow" "25"
Option "MaxTapTime" "180"
Option "HorizScrollDelta" "114"
Option "VertScrollDelta" "114"
[/code]
Display
The icons sizes and screen area in Cinnamon are just perfect for a 14" laptop. The HiDPI display is beautiful at 1080p native resolution. I'm glad I didn't get the X1 Carbon and QHD since I would have had to have scaled the display anyway.
The one thing that I'm having the most trouble with is multiple displays in my dock. Others have dealt with this issue before, and it appears to be solved in the >=3.18 kernels. Also see. There are links there to kernel patches that you can apply yourself. I've not tested these as yet. Maybe once I'm done with taxes.
Battery Life
The tlp
and tlp-sleep
package really helped reduce my idle power (which you can check using powertop
) to about 5W. I get a battery life of about 7-8 hours using the two 3-cells in the T450s. This is good enough for me.
Power management
The gnome-powermanager and acpid work well with each other, except for hibernate. Here is what I did to enable hibernate:
- Edit
/etc/default/grub
and change the following variable
[code lang=text]
GRUB_CMDLINE_LINUX="quiet resume=<swap partition device>"
[/code]
- Install pm-utils, or just use the cinnamon hibernate option. Everything works perfectly.
However, do see my notes on xfce4-power-manager.
I did have trouble with suspend to RAM: the T450s would suspend nicely, but after 3-4 hours would go into some bios induced "deep sleep" mode that it would not wake up from. This is because Intel RapidStart was enabled in the bios. Once I disabled it, everything was fine.
I sort of prefer using pm_utils
for suspend and hibernate. This is because I can run scripts before and after wakeup. For example, some DEs fail to rerun your xmodmap file after wakeup. This comes in handy if, for example, you've swapped the Caps and Control key like any self-respecting vim/emacs (you use Ctrl+[
for escape on your US keyboard) user.
Also consult this link for more information about enabling hibernate.
What doesn't work
- Multiple monitors (apparently fixed on kernels >=3.19) problems with dock.
- Trackpoint buttons and trackpad simultaneously (apparently fixed with kernel >=3.19).
- Bad wifi drivers.
Otherwise everything works. Fingerprint reader, webcam, trackpad, acpi sleep and power buttons. You name it.
Ubuntu-Gnome installation
I've been meaning to try Gnome3 for a while now. The installation process was much smoother, and much more streamlined than Arch. It does install a little bit of bloat, but I couldn't care less. Installation and configuration took less than 20 minutes. Here are some selected notes from my comprehensive running installation notes:
- The desktop was rather sluggish when I first installed it. Turns out that this has something to with Gnome3 version 3.10. Once I added the Gnome3 ppa using
[code lang=text]
apt-add-repository ppa:gnome3-team/gnome3
apt-add-repository ppa:gnome3-team/gnome3-staging
[/code]
Then I updated to Gnome3 3.12 and then the lagginess went away. Apparently Gnome3 3.10 used some older GTK libraries, and this was the reason it was laggy. See.
- Gnome has trouble with remembering enabled extensions. There are a bunch of patches for this, and a fix is in the pipeline for the 4.00 kernel. I did try manually patching gnome-session, but somehow the patches did not have the desired effect. I resolved this by writing a startup script (by putting it into
~/.config/autostart/
):
[code lang=text]
[Desktop Entry]
Name=restore gnome extensions
GenericName=arjunscript
Comment=
Exec=gsettings set org.gnome.shell enabled-extensions "$(cat ~/bin/current-gnome-shell-extension)"
Terminal=false
X-GNOME-Autostart-enabled=true
Hidden=false
NoDisplay=false
[/code]
The gsettings command reads an extension list off the a file stored in my bin directory, and enables all the extensions on startup. A cron script updates the file with my current list of extensions daily.
I keep gnome-shell around since I much prefer nautilus to thunar. Evince also has touch support, which is really amazing when I'm using my "standing desk" (a stack of calculus textbooks).
I still get problems with screen tearing, corruption, refresh issues and font cache corruption after docking and undocking. This happens in both xfce and ubuntu-gnome. xfce is also a little worse at display management than ubuntu-gnome.
Running Installation notes
These are the notes I took when I was setting things up. They're a bit terse and I haven't really edited them. They were written over a period of about a month. Most of the important stuff here I've summarized above.
Arch Linux
I made an EFI, multiple boot USB stick that contained Ubuntu and Arch. The usb stick usually boots off of EFI and legacy bioses, which is a godsend. However, I had a lot of trouble getting it to install windows too; fuck windows. Here is how you do it:
Mar 06 2015 Making a dualbooting usb for arch and ubuntu gnome. It directly boots of the iso files you download from arch or ubuntu - grub2 is pretty cool. I'm using the instructions from
https://wiki.archlinux.org/index.php/Multiboot_USB_drive#Using_GRUB_and_loopback_devices
At the end of this, I ended up having a legacy and UEFI booting USB disk. However, I still had trouble with windows booting, but I think I know how to do this now using bcdboot
. See.
My USB drive output
[code lang=text]
Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdb: 15.6GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 1078MB 1077MB fat32 boot, legacy_boot, esp
2 1078MB 1088MB 10.5MB fat16 bios_grub
3 1088MB 15.6GB 14.5GB ext4
[/code]
Then run
[code lang=text]
mount /dev/efi-partition /mnt/usb1
mount /dev/boot-partition /mnt/usb2
grub-install --efi-directory=/mnt/usb1 --boot-directory=/mnt/usb2 --target x86_64-efi --removable
[/code]
Then create grub.cfg
as appropriate to your system. Then you can also install old bios grub files (for legacy) using
[code lang=text]
grub-install --boot-directory=/mnt/usb2 --target=i386-pc --recheck /dev/sdX
[/code]
The bios_grub
partition does not have to be the first partition, and it need not be fat16. Remember that the grub menuentries in the above arch link assumes that the iso is in the same partition as the /boot directory.
What happens is that grub_install
rewrites the MBR to boot the bios_grub
partition. This reads grub.cfg
from the boot directory and boots the right iso. If it boots in UEFI mode, then the bios loads the grub efi loader, which then, again, reads the grub.cfg
file in the root partition.
This works perfectly on my lenovo thinkpad (presumably, this is the USB stick that works perfectly on the laptop).
Once I created the boot stick, I installed arch.
- I booted into arch, made lvm using parted. You need to create the partition using mkpart, then turn on the lvm flag in parted using
[code lang=text]
set <part num> lvm on
[/code]
The use the pvcreate, lvcreate commands as described in
[code lang=text]
https://wiki.archlinux.org/index.php/LVM#Installing_Arch_Linux_on_LVM
[/code]
All partitions can be made using lvm including swap. I think the boot partitions can be inside the roots of each individual distro. swap space must be formatted with
[code lang=text]
mkswap /dev/vol1/swap
[/code]
- wifi-menu will not connect to eduroam, but you can make a special eduroam profile using info from the netctl-eduroam package from the AUR, or looking at
https://gist.githubusercontent.com/anonymous/ed16e3b191cf627814b3/raw/d476e0dddbc8920b855702737ff69c287e620c7b/eduroam-netctl
- Create mirrorlist by looking at the archlinux.org/mirrorlist for the best mirrors. Remember to sort by mirrorstatus, which tells you how up to date a mirror is.
- I mounted the dirs in /mnt and then actiavted swap using swapon /dev/vol1/swap
- Then you should run pacstrap; its a simple script. To see what groups can be installed, check out
https://www.archlinux.org/groups/
I installed base base-devel xorg xfce4 xfce4-goodies. I wanted to install cinnamon, but I changed my mind and installed xfce4. Maybe I wanted something light. I can always test out cinnamon at some point.
- Check your generated fstab to see if swap and home are mounted correctly.
- I got a warning from mkinitcpio that says that we might have no firmware for module aic94xx. To look into at somepoint.
- Picked a password that looks like (see Private notes directory) three words. This has more entropy than a alphabet + symbol + number password more commonly used. I don't know if this is really true, I read it on xkcd. But it ought to be easy to compute. Shannon entropy, right?
$latex
- \sum_i p_i \log(p_i) = \log(n)
$
If you use symbols + alphabet + numbers in a 10 character hard to remember password, this is about $latex \log(50^{10})$. If you use a three easy to remember words, each of about 10 characters, you have a 30 character word. This goes as $latex \log(26^{30})$. The point is that the entropy goes linearly in the length of the password, but only logarithmically in the size of your character set. Trivial observation.
- Installed grub from inside the chroot. Also installed efibootmgr fuse and os-prober.
- Check whether kernel is booted in uefi mode. This is important. Grub can keep its own boot directory in each root partition, no need to keep grub files in the efi partition.
- I chose to keep the grub files in the root part, not in the uefi part. There appear to be several directories in uefi:
/EFI/Microsoft
/EFI/Lenovo
/EFI/grub_arch
grub-mkconfig will give errors. It will give errors about not being able to load modules like lvmetad. But this is a problem of running grub inside a chroot; there is not /run directory there. Once you reboot, everything ought to work. Check this by checking your grub.cfg
for all the relevant partitions. In fact, once you rerun grub-mkconfig from outside the chroot.
- Before rebooting, however, install
wpa_supplicant
, vim (or gvim)
, dialog
and wifi-menu
(although for some reason I could not find wifi-menu in the repos).
- Once I rebooted, Windows could not boot because I did not resize the windows partition correctly. Apparently parted and gparted work well when the ntfs partition is in lba mode. If not, they sort of mess up the windows partition. So I hit refresh or erase from the windows boot menu, which reset the boot loader default to windows in efi mode. The grub boot loader was there too, but I did not know how to set the default efi boot loader: efibootmgr from linux ought to reset this.
- So I rebooted into arch using the usb stick, arch-chrooted into my hard drive, mounted the efi partition, and ran
[code lang=text]
grub-install --efi-directory=/mnt/efi-part/ --bootloader-id=grub_arch --target=x86_64-efi --debug
[/code]
The --bootloader-id
specifies the name of the directory under /EFI/
where the bootloader files are stored.
grub-install
then stores the grub files under /boot/grub
, and the efi file in the efi partition. You do not need to run grub-mkconfig. What it does is that it just resets the efi boot order. This is an alternative to the proper way, which is to use efibootmgr. The previous grub files were still under /EFI/grub_arch
. It just reinstalled grub there, put the grub files in /boot/grub
and reset the efi boot order priority so that grub is run instead. There ought to be another way to change this directly instead of rerunning grub-install. Ubuntu has an update-grub
script. I wonder if that is any different.
- Network manager is pretty shit btw. It doesn't refresh things fast enough, and somehow I can't create profiles very easily. I'm tempted to install wicd instead. I looked into the network manager refresh networks problem, and there appears to be no way to set it manually unless you rewrite the network manager code. This is a project by itself. Network manager is installed with the networkmanager package. It has to be enabled as a service.
[code lang=text]
systemctl start NetworkManager.service
systemctl enable NetworkManager.service
[/code]
Netctl has to be disabled first. Once NetworkManager is enabled, it pretty much takes over and netctl does not work.
- Unfortunately, cinnamon requires network manager. But you can still disable it as a service and use wicd instead. This is what I'm going to try. I tried wicd, but it had trouble with eduroam. Once I installed the widc-eduroam profiles into the wicd folder, I ought to have better luck. I will try this at somepoint when I'm having trouble with network manager. I don't know why cinnamon is having trouble with it.
- I'm also having trouble with superfast scrolling in the synaptics driver. But it does not appear to be loaded as a kernel module. The evdev driver is loaded though. xinput does recognize a synaptics device.
- I ran
[code lang=text]
xinput --list
xinput --list-props <device num>
xinput --set-prop <device num> "libinput Tapping Enabled" 1
[/code]
Now tapping works.
- gnome-keyring has to be installed for network-manager to be able to store network passwords. The cinnamon network-manager applet still does not work, even after installing gnome-keyring.
- Dropbox has a setting that says "start on system startup", and this appears to be interfering with the systemctl dropbox daemon. I've disabled it for now using systemctl. I don't really know which is better, but systemctl can restart daemons that have crashed.
- Will check on synclient to see if its running. Then you can sort of set your touch sensitivity.
- Look into synclient error: couldn't find synaptics properties. No synaptics driver loaded?
- Look into Peter Hutterer's work on the synaptics driver.
- My Xorg.0.log lists
[code lang=text]
Adding input device SyncPS/2 Synaptics Touchpad.
Applying InputClass "evdev touchpad catchall"
Using input driver "libinput" for "SyncPS/2 Synaptics Touchpad"
[/code]
For the ELAN touchscreen, it says
[code lang=text]
No input driver specified, ignoring this device.
[/code]
- To fix my PS1: It shows my mounted lvm in
\W
as my username. It ought to show a ~
, as this is my home directory.
- I like my terminal set to the solarized (dark) color scheme. Things work well with colors here.
- To fix colors in the xfce terminal.
- I decided on a local install of texlive. I think this works ok. Who cares if there is a little repetition. It is a big package.
- My installation so far is only 3.2GB. This is quite amazing in arch. Crazy. In any case, texlive is only 1GB. Matlab and others are more.
- Installed keys using ssh-keygen and then ssh-copy-id
- Arch has a nice manager that manages your local TEXMF folder pretty well. It also looks up packages you need and what not.
- To do: add multitouch support, add ubuntu gnome so you have a stable fallback.
- Having trouble with wifi switched back to netctl. Can also use connman, which is supposed to be quite good. If you're having trouble try adding the following lines to
/etc/modprobe.d/iwlwifi
[code lang=text]
options 11n_disable=1
[/code]
There are other things to do here too if it doesn't work. For now the netctl seems to be working quite well. I'm getting the
[code lang=text]
iwlwifi 0000:03:00.0: fail to flush all tx fifo queues
[/code]
error. I don't appear to be having connection issues with netctl so far. But also, I don't think I've woken from suspend here. See
https://bugzilla.kernel.org/show_bug.cgi?id=48921
Apparently the bug is caused by NetworkManager trigerring periodical scanning (every 5 minutes). So you can try and disable_hw_scan=1
. But this option appears to have been removed from the driver. There is a kernel patch for this:
https://launchpadlibrarian.net/186572769/0001-iwlwifi-dvm-drop-non-VO-frames-when-flushing.patch
The patch says that the mac80211 wants to ensure a frame is sent, it calls the flush() callback.
The patch was posted in 2014 October by Emmanuel Grumbach. This patch has been tested, and it appears to be working
https://patchwork.kernel.org/patch/5033871/
Some more patches here
http://people.canonical.com/~sforshee/iwlwifi/
Intel said that the firmware wont be fixed. See the comments in the launchpad.net comment section:
https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/1270808
- Adding
acpi_sleep=s3_bios,s3_mode
to my grub configuration. See the thinkwiki
http://www.thinkwiki.org/wiki/Problems_with_ACPI_suspend-to-ram#Troubles_on_resumek
There is more complete information here
http://unix.stackexchange.com/questions/14494/screen-corruption-after-hibernate-is-there-another-way-to-refresh-the-x11-disp
Also suggested to look into pm-suspend debugging. There is another link that produces my symptoms exactly:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/659434
- Connman also has problems with bgscan setting in
wpa_supplicant
just like network manager. This causes frequent disconnects and instability. It might be best to go with a low-tech solution like netctl-auto. It does not need to be installed.
- My network interfaces are wlp3s0 and enp0s25. You can see the current ESSID your connected to using iwconfig.
- I've switched to netctl. It works for my purposes right now. It's a little cumbersome to work with, but it works. To use netctl-auto, install
wpa_actiond
and ifplugd
. Then netctl disable-all and start both as services.
- Installed cryptkeeper. You can run it by moving the
/usr/share/applications/cryptkeeper.desktop
into the usual /etc/xdg/autostart/
directory since cinnamon is gnome based and supports xdg.
- Installed the tp-smapi package for setting battery thresholds in the thinkpad. UPDATE (Apr 11 2015): Apparently doesn't work on newer thinkpads
- Installed and enabled tlp and tlp-sleep service. Pay attention to the optional dependencies in tlp and install them.
- There is a cinnamon setting to allow cinnamon to scale icon sizes so it works better relative to panel sizes. This is very useful for a hipdi display.
- Removed the
acpi_sleep
kernel option. This was causing my system to not wakeup after waking up.
- Cinnamon keeps automatically starting up nm-applet. So I edited
[code lang=text]
/usr/share/cinnamon/js/ui/statusIconDispatcher.js
[/code]
and removed the line
[code lang=text]
// 'nm-applet': 'network',
[/code]
- It's not completely obvious, but the arch wiki page says that NetworkManger is started through dbus. You can mask something to stop NetworkManager completely. Run
[code lang=text]
systemctl mask NetworkManager
[/code]
There is a good troubleshooting guide on the archwiki NetworkManager. See
https://wiki.archlinux.org/index.php/NetworkManager#Disable_NetworkManager
I ought to try connman-git and maybe a netctl applet.
- I'm trying an applet called cinnamon-applet-netctl-systray; I edited the PKGBUILD and did some other stuff with it. I also tried cinnamon-applet-netctl-status. I don't seem to see them on the systray.
- Mathematica install. Copied from university fileservers (after getting legalities sorted out with nelson) and setup links in
/usr/local/
. This seems to be working nicely. Starts up in a second, thanks to this amazing ssd. Mmmm. All I need now is 32GB of ram. Unfortunately, this damn thing doesn't support more than 12. But I've heard that some people have successfully installed 16GB sticks in the extra slot. I could live with 24GB ram.
pam_unix
and pam_tally
errors: there are a bunch of login errors, since pam_unix
and others try to write to /var/log/faillog
without root permissions. There have been arguments about this for a while. See
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383889
https://bugs.launchpad.net/ubuntu/+source/gnome-screensaver/+bug/227994
- Journalctl can be run with
[code lang=text]
journalctl -b -0
[/code]
To get results from the current boot. See
https://wiki.archlinux.org/index.php/systemd#Journal
[code lang=text]
journalctl --since "20 min ago"
[/code]
Use
[code lang=text]
journalctl -f
[/code]
to follow messages.
- The chrony user was not removed. So the pwck (password check) and (grpwk) commands check your usr and group files (integrity check). I prefer ntpd.
- Changed my synaptics settings to make the touchpad less sensitive.
[code lang=text]
xinput set-props 12 "Synaptics Scrolling Distance" "100" "100"
xinput set-props 12 "Synaptics Move Speed" "0.5" "1.5" "0.02" "0.00"
[/code]
where the move speed props are "min" "max" "acce" "deprecated". Also look into Horizontal and Vertical Hysteresis (although I can't seem to find these properties on xinput).
- It's easiest to set the timezone with the gui. You need the root password for this.
- More on synaptics: it seems that it makes sense to set the finger high carefully with a little testing. I dont think the pressure setting makes a difference at all.
- Apparently the iwlwifi driver is not very good in linux. The problems I've been having was not network-managers fault after all, but rather rather the iwlwifi driver's. People also say that the older iwlwifi drivers were more stable in the older kernels. I should check and see if the iwlwifi supports 7265 on the older drivers. Keep in mind that the thinkpad 440p card is a realtek 818b that does not have a linux wireless driver. The 7265 is supported since kernel 3.13.
- It seems that my wireless router sucked a little bit, so I was having trouble with connectivity. Now that I've set everything to b/g mode, the modem is working a little bit better. Actually no, it still sucks. So I got a nice little $10 wifi card off Amazon, and run my old laptop as a wireless router. This works amazingly well.
Ubuntu Install
- Installed, was easy to do a custom install.
- Everything works out of the box except suspend and hibernate.
- Downloaded configuration files from arjundesktop. There are a bunch of configuration files.
- Edited /etc/fstab and did a bunch of mount binds, especially my arch partitions.
- Copied .Xmodmap
- Copied other bash and other configuration scripts from other partition.
- The desktop does feel kind of laggy, for some reason.
- It does seem to be using less ram though.
- There is a problem with the dock not recognizing the VGA output. It's just mirroring the apple display.
- Created a package list from my other ubuntu install. Wireless works stably out of the box.
- Looked at the dropbox .deb file from dropbox.com and the direct download using
[code lang=text]
cd ~ && wget -O Downloads/dropbox.tar.gz "https://www.dropbox.com/download?plat=lnx.x86_64"
[/code]
- The deb file also seems to provide a package called dropbox, which replaces nautilus dropbox. This does not appear to work for me when run as a normal user. I cannot see the dropbox icon, unfortunately.
- Now installing skype. It has a bunch of dependencies. It seems that it requires a bunch of dependencies. It's easier to just install the ppa; add ubuntu partner repositories from archive.ubuntu.com as a deb. Then skype installs easily and works well. Do a
[code lang=text]
dpkg -I skype
[/code]
to get the files it installs. skype seems a little unwieldy and this version of skype appears to conflict with another one that I downloaded from the skype website. It's best to install from the ppa.
- Used the config tar file to quickly copy a bunch of things that I needed. Used the backupconfigs script that I have that does this.
- set hostname in the file. It was set correctly.
/etc/hostname
is set correctly.
- Installed gnome3 ppa. ppa:gnome3-team/gnome3. It updated some packages that didn't make it into the ubuntu 14.04 release. See
https://bugs.launchpad.net/ubuntu-gnome/+bug/1386721
See Dawid Lorenz observations. They're saying that they were having problems when in gnome 3.10 (and some in 3.12). Some people say upgrading to gnome 3.14 completely solves some of the sluggishness issues. My version is 3.10.4 right now.
Adding Gnome3 staging ppa. If you break things, run ppa purge.
[code lang=text]
ppa-purge -p ppa:gnome3-team/gnome3-staging
[/code]
- Now my gnomeshell is 3.12.2 and everything works.
- There was some font corruption in the gnome terminal. I ran
[code lang=text]
sudo fc-cache -f -v
[/code]
This appeared to have helped. Another thing to do is to look at
[code lang=text]
Option "Tiling" False
[/code]
in xorg. It also helped to suspend and open the computer again.
- Now I'm enabling hibernate. By doing the following:
http://ubuntuhandbook.org/index.php/2014/04/enable-hibernate-ubuntu-14-04/
Edit some files in some policykit.
- To do: fix hibernate. Otherwise things seem fine.
- Fix dock: does not appear to detect VGA. It detects VGA as a mirror of the display port monitor. This might have something to do with not receiving EDID data.
- To do: get Xmodmap to load on startup. Can also invoke this using an .xinitrc file. Quite easy to do.
- Making kernel 3.18.10 from kernel.org. Essentially followed the procedure described in
http://cweiske.de/tagebuch/thinkpad-ultradock-screens.htm
Since apparently the ultradock support needed to be coded into the kernel. I'm at the recompiling kernel drivers stage. He still has bugs where docking and undocking causes issues.
There is some more information here
https://wiki.ubuntu.com/KernelTeam/GitKernelBuild
Have to make clean and remake the kernel from above to get both monitors working. In the meantime, I ought to go home, workout, and then cook. Then prepare for the match. And then talk to Shirl.
To do: fix gnome notification icons not appearing. Gnome-do not showing up.
Stop apache2 startup.
Fixed xmodmap by running .xsessionrc
. I chose to do this instead of going xkb because I do external keyboards on non-gnome distributions and legacy linuxes (sometimes), so I'd prefer to hold onto simple xmodmap files for now. Well it doesn't work in this either; I needed to add it to /etc/X11/Xsession.d/
. Now it works. I don't think it will work again on suspend. setxkb is probably a better fix.
vim-gtk is important only for people running some lightweight distro that dont need gnome dependencies. Also libgnome2 is dropped from Gnome 3. I don't really understand the difference.
My thinkpad-acpi module is showing up correctly. They suggest adding ec_intr=0
to your kernel command line. This sets
http://www.linuxtopia.org/online_books/linux_kernel/kernel_configuration/re86.html
the acpi embedded controller interrupt mode to polling versus interrupt mode.
Ok, I added the appindicator button, and it appears to accept new icons, like cryptkeeper and so on. You add it by enabling it in the gnome tweak-tool, or add the firefox gnome shell extension extension. I kind of like gnome now. There are problems with the dropbox icons and stuff like that.
Implement pinch-to-zoom
Where are my nautilus shortcuts and bookmarks stored? I want to sync this across all systems
My viminfo file is owned by root, so there were problems. Now there are none. To be fixed.
To do: Gnome is not remembering which extensions are enabled. Apparently there is a fix in the pipeline. I've saved it as a bookmark.
Suspend works from the menu. Hibernate does not. It's shutting down the computer.
This guys says that you should use dbus to hibernate
http://askubuntu.com/questions/1792/how-can-i-suspend-hibernate-from-command-line
You could also try
[code lang=text]
pmi action hibernate
[/code]
- It works! pm-hibernate works best. Also note that the hibernate file size can be obtained by catting
/sys/power/image_size
. This is usually set to 2/5 the size of the ram, and swap only needs to be a little larger than this. One problem with pm-hibernate is that it does not lock your screen or ask you to relogin. To do - figure out how to make gnome hibernate like in pm-suspend, but maybe through dbus or the GUI.
- Looking into trackpoint woes.
Peter Hutterer has a blog post here. He basically says that the patches have been merged into the new kernel 4.00. There are four sets of patches.
First patch the synaptics.c file. Then patch hwdb so udev detects the lenovo touchpad as a special case.
Then patch libinput. So there are a bunch of diffs here too in dmitry's queue. It only appears to patch synaptics.h and synaptics.c. But Peter Hutterer's work also patches the synaptics.conf file. There is also a good overview of the bug here.
Dmitry's patches appear to not require userspace changes, i.e., no udev changes? They appear to be a newer implementation of Peter Hutterer's work. So, to do: download the patches from dmitry's queue. Patch them into your kernel, and then recompile so that other issues with the dock video output are fixed too.
- To do: reduce your swap space again. You don't need so much to hibernate. Take it down to like 4 GB after looking at the
/sys/power/image_size
file to see how big the hibernate image is.
- Make the power button go to interactive mode when you hit it. I have no idea how to enable this.
- Enabling trim using the arch wiki. Says its preferable to keep relatime instead of noatime since some programs look at access time of files. I like this link more. It says dont use mount (and I don't mount physical volumes using fstab, only lvm volumes), but use fstrim instead. In ubuntu-gnome, there is already an fstrim script in
/etc/cron.weekly
- Hurray! Hibernate works through the gnome menu. I think all it needed was the
resume=/dev/vol1/swap
kernel parameter.
- The gpu crashed on resume.
[code lang=text]
[42014.593037] [drm] stuck on render ring
[42014.594798] [drm] GPU HANG: ecode 0:0xc2852dd6, in Xorg [1421], reason: Ring hung, action: reset
[42014.594802] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[42014.594805] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[42014.594808] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[42014.594810] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[42014.594813] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[42016.593049] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[/code]
I backed up the crash dump to dropbox somewhere.
- To do: fix the gnome shell extensions not being saved problem. UPDATE (Apr 11 2015): Fixed this with a script that uses gsettings to restore my extensions
- gnome-settings-properties appears to have been removed from gnome 3.12 and later. The gnome settings fix is here. There is a patch set out that fixes this. But the ppa for the patch is not useful, since it applies only to trusty proposed, and the version I have installed is from the gnome staging ppa. See below; I patched this manually, it appeared to work, but didn't.
- Suspend wakeup problems on lid closing are still there. Looking at
http://www.thinkwiki.org/wiki/Problems_with_ACPI_suspend-to-ram
See also
http://www.thinkwiki.org/wiki/Problem_with_display_remaining_black_after_resume
He also says, do not pass the ec_intr=0
parameter anymore. In fact, you're discouraged from using it. See this bug
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1331077
- My bios version is
[code lang=text]
JBET41WW (1.06 )
[/code]
My bios release date is
[code lang=text]
12/23/2014
[/code]
There is a bios update for me, so I should try it.
http://support.lenovo.com/us/en/products/laptops-and-netbooks/thinkpad-t-series-laptops/thinkpad-t450s
Apparently there is a problem with the intel rapidstart option, and this should be disabled in the bios. There is an updated bios for the E430/440, and no need to disable usb3.0. Released on 3-20.
https://bugzilla.kernel.org/show_bug.cgi?id=80351
It says update to USB 3.0 and then install the bios update. I did the bios update, but it seems like intel rapidstart was the culprit.
Hurray, my gnome-session patch actually works. Well not mine, but the other gnome developers patch. I did have to run a bunch of patch commands. All icons show up, and oddly enough, cryptkeeper launches without segfaulting! Well, it does not appear to be working anymore. I have no idea why.
Why does cryptkeeper segfault? I was getting this before and I think I recompiled from source and it started working again after that.
How I patched gnome-session. There are patches due to Tim Lunn which fixes fail_whale.c. It's a patch to an updated patch.
https://bugs.launchpad.net/ubuntu/+source/gnome-session/+bug/1385572/+attachment/4339595/+files/fix-whale-trusty.debdiff
http://launchpadlibrarian.net/200827875/gnome-session_3.9.90-0ubuntu12_3.9.90-0ubuntu12.1.diff.gz
I downloaded the source from the gnome-staging ppa. It's version 3.12. Then I manually patched the above diffs one-by-one by modifiying the appropriate line numbers and "affected lines" in the patch file. Then I compiled. There were dependency issues with the package names in gnome-session-bin and others, which I fixed by editing the "Depends" line in the deb. It's now installed, but does not appear to fix the gnome-settings problem. There is another dirty fix in the duplicate bugs page that just resets the extensions each time.
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1236749
Make a file with the current settings with
[code lang=text]
gsettings get org.gnome.shell enabled-extensions > file
[/code]
The make an autostart file in ~/.config/autostart with
[code lang=text]
gsettings set org.gnome.shell enabled-extensions "$(cat file)"
[/code]
You can also make a cronjob to update the enabled-extenions file. This seems to work better for me.
- To do: download the gnome-session package from the staging repositories and see if it has actually changed something. Right now, the my gnome-session does not save the extensions.
- Even gnome-do is working as long as I use startx. Sort of weird. But startx doesn't like to read the xsessionrc file. Startx does run
~/.xinitrc
though. It can't grab the Super+space key since gnome greedily monitors it for the dash. However, gnome-do works with Ctrl+space. Which is quite good.
- My gdm doesn't like the gnome-classic shell for some reason. The errors are
[code lang=text]
GPU HANG: code 0:0x00f000c
Ring hung, action: reset
stuck on rendering
[/code]
- vim-gnome segfaults, sigh. And gnome for some reason ignores my
[code lang=text]
tb=
winpos
[/code]
settings. It definitely reads the .vimrc though. I can probably easily debug this by looking at the startup log. I think I discovered that the menu .vim
files were loading after my .gvimrc
- Can you replace your old gnome-session with the new gnome-session version using apt-get?
- Moved to xfce which looks great and is easy to customize. Cannot use whisker menu very easily, but there is an easy way to find applications and what not. Gnome-do is kind of buggy these days anyway.
- GPM uses upower, which uses pm-suspend and pm-powersave. This means that its easy to run scripts on hibernate or suspend. This is a good blog post about this:
http://vincent.bernat.im/en/blog/2011-gnome-power-manager.html
- Moved to XFCE 4.12 by adding the xfce-developer ppa. The only problem I have with xfce 4.12 is power management, since suspend and hibernate management are disabled. I believe this is a policykit issue, and can be resolved by changing some configuration files. In any case, suspend on lid closure and things like that are still handled nicely by acpid (or systemd). You do have to downgrade upower and remove gnome-power-manager to make xfce4 4.12 power manager handle lid closure and other events.
Miscellaneous Notes
HiDPI screens
Feb 17 2015 Now what I'm having trouble with is the HiDPI problem in linux. Should I get an ultrahigh HD screen or just a 1080p screen? There are problems in linux, but you can scale everything with xrandr.
- I learned a little bit about how apple renders at high resolution, and then scales the whole down using the graphics card.
- Linux solves this problem by assigning 2 pixes as 1 in each direction. Gnome and KDE have different approaches. But both methods require some fooling around with scaling. Gnome works very well in most situations, Cinnamon is supposed to have some good support, and KDE also has some support. The main problem is that X11 was not built to scale correctly. People think that this will be fixed in the coming Gnome
- xrandr can scale an external display correctly if configured correctly. It allows you to use a HiDPI screen with a low DPI screen external monitor if necessary. Here is a good script for this.
- There are two ssd slots on the T450s, both m.2 ssds. One is an ngff, which I'm supposed to get, if I want the third ssd slot. So if I get the third ssd slot, I can install an m.2 sata, on which I can install linux.
- Try adding "tearfree" to xorg if you get display tearing.
- Some guy also loved the 1080p screen so far, and hasn't had to do any special so far. He used
[code lang=text]
google-chrome-unstable
[/code]
and
[code lang=text]
static char font[] = "Terminus:pixelsize=18"
[/code]
Check out st. It's a new terminal of some sort.
See this guy.
- Mir is something that ubuntu is moving towards.
- Use this to fix the mouse temporarily.
- Some more information on display scaling.
- A stackexchange post on X11 scaling to virtual resolutions. It also comments on the fonts becoming blurry. Apparently fonts scale using bitmap, which is not good enough. When something has to be higher resolution, it really ought to be higher resolution; i.e., there ought to be a finer scale description of it. It's not enough to just double pixels, since this will look horrible.
- I really like this page too, which has a good description of scaling.
- This is also a good description of resolution on the gnome.org site which discusses apple's solution.
- This tested page has a great description of scaling. It recommends 1080p IPS on a 13.3" screen. The 2560x1440 is a bit too high to worry about scaling.
- I should look into the linux mint thing which does some pixel doubling, which might work. This scales the desktop by doubling pixels. Even this has a chance of not working since there was a guy who couldn't get xrandr to work. But it worked for a lot of people. It's pretty crisp like this.
- I should also see how pixel doubling works, and whether this will be good enough for me via the linuxmint xrandr trick.
- In 2013, this guy wrote an article about HiDPI scaling. He used KDE and use the nosquint plugin in firefox.
- I looked at a bunch of macbooks for display including the 13.3" macbook retina. It looks good, but not unbelivably good. The effective high resolution screen looked best, but it had small fonts. The icon sizes were fine, and if text size is increased (macs do not allow you to do this, but gnome does), things would work perfectly well. The effective resolution for the 2460 x 1600 mac display at highest setting was 1680 x 1050. The default was exactly half: 1280 x 800. It looked good, but not great at this resolution.
The yoga 3 looked really good in windows (the text was a bit too small) at 3200x1800, and it scaled beautifully to 1920 x 1080. The screen real estate was also idea at this resolution. But it is a 13.3" screen, but its not much smaller than the 14" screen. 1080p looked fine even on the ASUS N550JK 15.6 screen, which was its native resolution. It wasn't great, but it was pretty good. It's an IPS panel as advertised on the ASUS website, but it wasn't quite clear. I think the 15.6" laptops can definitely benefit from 2460 x 1440 without scaling.
I thought about half resolution scaling for the 2460 x 1440 QHD 14" screen, which is 1280 x 720. This seems like too little screen real estate, although it would look quite crisp since you can't see individual pixels.
I guess hidpi works well for linux when you have a decent effective resolution when you halve the screen resolution. What's optimal for screens like 2460 x 1440 is a scaling like 1.5, which is not quite enough.
But I must say, the old macbook which ran at 1280 x 800 is pretty bad. I did not like working on it.
I feels like a 1080p screen, maybe a touchscreen T450s is ideal for me. I could also just get the 1080p X1Carbon because its a solid construction and is very portable. But its a TN screen though. Is this really a big deal? Yeah, it sort of is. The new IPS displays have spoilt me. Damn capitalists.
Cinnamon also only supports 2x scaling. One guy on reddit uses a high dpi screen with a tiling WM and large icons. I suppose I don't want to worry about this right now.
Miscellaneous thoughts when choosing a laptop
Oct 04 2014 Also consider the T440s as a lenovo ultrabook. It's cheap, has a 14" display, weighs only about 3.6lbs. Has a good keyboard and seems to have better reviews that the X series. Also check this link out for thinkpad recommendations:nathan. People dont like the X1 Carbon since they've fucked up the keyboard. See. The mac for education 13" 1440x900 display is $950. That's pretty good.
Jan 22 2015 [laptop] Seems like I'll need this for travel, so maybe I should get one. I like the monitor though. So maybe I could use my laptop at home with the monitor. Does it work in clamshell mode? It does work in clamshell mode, it has a vga port. But the trackpad is annoying as hell. So maybe the x230 is a good machine.
Jan 25 2015 people comparing the t430s to the x230 liked both laptops but preferred the slightly higher resolution in the t430s. But the X230 only has a 12.5" screen. So perhaps the 14" t430s is better at a slightly higher resolution. There are some reviews on this forum. They also note that you can't get a webcamera if you get the 3x3" internal antenna; get the 2x2 instead. So I should also look into the msata thing versus the sata thing on the x230.
In this reddit thread, people say that the Lenovo IPS screen is better than the 2012 macbook air by far. The only thing is the size of the screen in the x230. This is one reason to go with the T430s: it's easier to see on this one.
Jan 25 2015 Some more reviews of lenovo laptops. It does the thinkpad yoga, the ideapad yoga 2 pro, and the x1 carbon. The x1 carbon first gen has a very very good keyboard, and a very nice touchpad, but has only miniDP out.
Jan 25 2015 [best buy, testing]
- macbook pro retina. About $1300, looks very good, decent keyboard. About 0.79" thick.
- macbook air: not such a good keyboard, but very light. looks ok.
- lenovo yoga 14 thinkpad. Good size screen, looks pretty good. The keyboard is comparable to the macbook pro. The mouse is a little annoying with its springyness, but it's ok. It does not have a VGA port, is about 0.8" thick. Reasonably heavy. It had a 1080p IPS touchscreen. It was priced at about $1000. It was very snappy to use. It also had a graphics card, which seems quite good. But its supposed to have bad battery life. It also has a touchscreen. It weighs a good 4.2lbs, which is not unhefty. The display rotates and it also becomes a tablet. It does not have VGA output. It also has an NVidia 840m. The 840m is pretty shit.
- lenovo yoga 2 and yoga 3. Bad keyboard with small backspace key. But very slim, nice looking. Great screens on some of them. I wouldn't buy these, the keyboard is too crappy.
Jan 25 2015 The lenovo thinkpad x230 is also certified for use with Ubuntu. Even forums say that macbook drivers are always funky for ubuntu. I read about problems with wifi and ethernet install. Also, it might be a pain to update the kernel inside ubuntu. You can remote to your server using VNC, which might be a fast way to run things off your desktop.
But that said, VMware also runs ubuntu in a macbook very smoothly. The only way to share things is to have a linux virtualbox and share things over samba.
Jan 25 2015 I'm also thinking again that the chromebook would be pretty good to have. I could test it out on my march trip to Toronto and then decide. Until then, maybe the desktop is a good idea to get.
Jan 25 2015 I'm leaning towards the X1 carbon or the X230.
Feb 13 2015 I'm leaning towards the X1 carbon 2015 or the T450s. I guess I'm ok with both, and I should be able to get either pretty soon. I did some more testing at the computer store, and the lower resolution display at 1920 x 1080 doesn't look as good on the Yoga 3 Pro. The higher resolution is pretty stunning and makes things easier to read. Again, touch is also quite useful to browse or scroll through papers.