Laptops Going mobile....................
Adam Oxford picks up on the pain points that can bring Linux laptops low when you decide to liberate your portable devices.
Ensure your battery keeps on ticking with Adam Oxford’s help as he fires up his trusty Dell XPS 13 to offer a few hints and tips.
Laptops can be tricky things to get your favourite brand of Linux distribution (distro) working on. Despite the fact there are fewer ways for an owner to physically customise a laptop – you can’t upgrade the graphics card like you can on a desktop – there can be more variation in terms of component combinations even within the same model number than there is for a desktop PC.
In particular, hard drives and wireless chips tend to be slightly less well-supported than desktop versions because the technology tends to evolve faster in mobile than on desktop and as more and more laptops are coming with ultra-high definition screens that can cause problems for older software that doesn’t scale to high dots per inch (DPI) resolutions like 4K well.
Linux takes slightly longer to adapt to product upgrades than Windows does as manufacturers of Wi-Fi chips built into notebooks rarely release open source drivers, so it can take a little time for the Linux kernel to catch up with a small modification to a product line—but it always does and it’s getting quicker at doing so. While some problems still exist, more often than not installing a popular Linux distribution (distro) on a laptop is as quick and painless as it is on a desktop.
In this guide, we’re going to show you how to deal with the few foibles you might find, and how to get the absolute most out of putting Linux on a portable PC. For the purposes of this walkthrough we’re going to be focussing on the Ubuntu distro of the Linux desktop, because it’s stable, scales well for modern laptops with high definition screens and is – arguably – the best Linux distro to use with a touchscreen. Personally, we’d prefer the Unity desktop to GNOME or KDE for touch and smaller screens in general—but the instructions are similar for any major distro.
Getting started
Installing Ubuntu on a Windows machine couldn’t be simpler—there’s plenty of guides for downloading the operating system and creating a bootable USB key to install from, so we won’t go over that here. The process is more or less the same as installing Ubuntu on a desktop, but there are a couple of potential issues that may trip you up.
One thing we would advise, however, is to use the latest Long Term Support (LTS) distribution from Ubuntu. At the moment this is version 16.04, not the most recent release, 16.10. The reason for this is that newer and more experimental features introduced in none-LTS versions seem more likely to not work on notebooks.
With your LTS installation media in hand, you’ll need to figure out where you’re going to install it. Laptop storage is much more sacred than that of a desktop—especially if you have a high-end notebook with a solid-state drive. Finding a laptop you can open up to add hard drive space to is increasingly tough and as disk drives get faster and more power efficient they’re also getting smaller.
That’s not such an issue if you’re going to delete the Windows partition of your machine completely, but if you want to set up a dual-boot system with an existing Windows partition, we’d only advise trying this if your entire hard drive
space is 256GB or greater. When installing Ubuntu, we’d recommend that you shrink down the size of the Windows partition to about 100GB and create two new ones.
The first partition should be about 100GB and formatted as an NTSF drive, so it can be read by Ubuntu and Windows— this gives you a space to store files that you can work on from either OS. The second new partition will be what’s left – around 50GB – and just for Ubuntu. The reason for this is that Windows is far more likely to grow over time than Ubuntu: after several years of upgrades and installs, the operating system on our Linux box is still only about 12GB (not including the Home folder). On our six-month-old Windows box, meanwhile, Microsoft’s operating system takes up 27.7GB and for some inexplicable reason has held on to another 15GB in a Windows.old folder because there was a point release a few months ago.
So score one for Ubuntu. If you’ve got limited space on a laptop drive you can go for much longer before engaging in extreme housekeeping and freeing up disk space with Linux.
The second thing to be aware of is that quite a few new laptops now come with a NVMe compatible SSD drive, as opposed to the older mSATA standard. This is especially true if you’re buying a ‘premium’ laptop that’s superthin and light. In itself, NVMe isn’t a problem, as Ubuntu fully supports installation onto this type of drive. But if you’ve bought a Windows laptop that you want to replace the OS or dual boot with, there may be a problem.
Several of these machines ship with a single NVMe drive configured in the BIOS as a RAID array. RAID is usually only for configuring multiple drives to work together, but in this case it’s activated in order to allow some extra features under Windows. If you try to install Ubuntu directly onto an NVMe drive in RAID mode, you’ll probably find that the drive won’t be visible to the installer software. You’ll have to go into the BIOS and change the interface type to AHCI rather than RAID.
This is easy enough, but if you want to keep your Windows installation intact, before you change the BIOS setting you’ll need to boot into Windows, open the command prompt as an administrator and enter bcdedit /set {current} safeboot
minimal . Reboot, change the BIOS setting, then go back to your admin prompt and enter bcdedit /deletevalue {current}
safeboot . Now you can install Ubuntu as normal.
Wi-Fi worries
The single-most common issue people encounter when installing Ubuntu (or most other Linux distros) to their laptop is that Wi-Fi may not work straight away. As explained above, this is because Wi-Fi chips, in particular, are changed and upgraded faster than the Linux kernel maintainers can keep up, so you may need to add some drivers to your laptop.
We don’t have room to provide solutions for every laptop out there, but in general the best advice is to do a web search for the make and model of your particular laptop with ‘install Ubuntu’ before you begin, to see if there’s any common problems and solutions already found so you can prepare the fix before you begin. Most of the time, the solution will simply involve updating Ubuntu itself—but you’ll need internet access to do this.
So if your laptop doesn’t come with an Ethernet port builtin, either make sure you have a USB to Ethernet adaptor handy or an older USB Wi-Fi dongle that you’ve tested works with Linux support in another machine.
If anything else isn’t working after an installation, a handy place to start troubleshooting is to open a terminal window (press Alt+Ctrl+T by default) and enter lspci -nn . This handy command will list all the hardware currently installed along with model number and manufacturer.
Pointer problems
Your laptop almost certainly has a trackpad on it. Trackpad support is good on Ubuntu, but as with Wi-Fi chips there’s a lot of variety in the actual hardware under your thumbs which can create a few quirky issues.
Ubuntu does support multitouch gestures like tapping with two fingers to simulate a right-mouse click or three fingers for a middle click, or using two fingers to scroll vertically and horizontally. It doesn’t however, support other common gestures, like pinch-zoom. Some people have had success getting these to work by using an application called Touchegg, but it’s luck of the draw whether or not its compatible with your laptop.
Ubuntu supports other trackpad features like ‘disable while typing’ (which stops palm taps on the trackpad moving the cursor around while you’re writing in a document). The problem is that due to some quirks of the display manager, these aren’t always available in Settings > Mouse screen. You can see a full list of settings for your trackpad by going to a terminal and entering synclient -l .
Here you’ll see settings such as ‘Tapping’ ‘On’ and ‘FingerLow’ ‘20’ which determine how your trackpad behaves. There’s a full list of settings here: https://wiki.archlinux. org/index.php/Touchpad_Synaptics.
You can create a configuration file to change the way your trackpad works. If you want to turn on palm detection/disable while typing, for example, go to the terminal and type sudo gedit /usr/share/X11/xorg.conf.d/30-touchpad.conf followed by your password at the prompt. In the empty document that appears, type the following: Section "InputClass" Identifier "MyTouchpad" MatchIsTouchpad "On" Driver "synaptics" Option "PalmDetect" "1" EndSection And save and restart. You can add extra lines before the
EndSection comment to enable other features or fine-tune your settings.
If you find that changing the Synaptics settings isn’t having any effect, we have come across a number of laptops which detect a single trackpad as both a USB and a PS/2 mouse. This creates an odd conflict where the mouse that your laptop thinks you’re using isn’t actually the virtual mouse that the settings are prepared for. Open a terminal and type xinput list . This will give you a list of all the input devices connected to your laptop. Assuming that you don’t have a separate USB mouse connected, there should only be one entry for a touchpad (you may see your touchscreen listed here too).
If you see two touchpads, type: sudo gedit /etc/modprobe.d/blacklist.conf and enter your password when prompted. You will need to add a line at the bottom of that file that says blacklist psmouse and save the configuration file. Now type sudo
depmod -a and reboot. Next time you run xinput list , you should only see one touchpad and all your mouse settings should be active.
The other thing that might crop up if you’re using a newish laptop is that you might have a touchscreen. Generally speaking, we’ve found that these are supported well by Ubuntu these days and it shouldn’t give you any problems. We do recommend using Chromium rather than Firefox as your web browser of choice however, because it supports gestures, such as pinch-zoom and finger scrolling much better. To try Chromium – which is more or less identical to Google’s Chrome, but open source—open up the Ubuntu
Software application and search for it there.
High DPI
Sticking with the subject of screens, and if you’re lucky enough to have a high-definition screen on your machine, don’t fret. Machines with resolutions higher than 1,920x1,080 are increasingly common, and they look beautiful with crisp fonts and sharp images. Fortunately, Ubuntu supports them all, although it requires a small tweak after installing.
When you first boot into your new operating system, you might be terrified by the fact that all the icons, task bar and text are tiny. Fixing this is simple: squint a bit while you open up the System Settings (by typing settings ) into the launcher, and click on ‘Displays’.
The slider at the bottom of this screen is called ‘Scale for menu and Title Bars’. Setting this to 2. This will draw icons and text at twice their normal size—usually sorts this out. Most applications will scale automatically to the new desktop ratio too—notable exceptions include the GIMP graphics program, which works best if you install a high-resolution theme specific to that application.
The other place a high DPI (dots per inch) screen might catch you out is if you’re using a second monitor with your laptop. Second screens are an almost essential item these days for those who work on a notebook and increase productivity or make gaming a joy when you’re sat at your desk when you should be working. The last thing you want is to be hunched over a laptop’s tiny display longer than you have to be.
Ubuntu and Linux in general is very good with dealing with multi-monitor setups. In System Settings > Displays you’ll find all the options that you need to set resolutions and relative positions for using more than one monitor at a time. If one of your screens is much higher resolution than the other, however, you might run into issues as Linux isn’t quite
as good at handling different scaling factors as other operating systems yet.
The problem for fancy Retina-type high definition displays is that while you can set resolutions independently for each screen, you can only have one scaling factor for the desktop furniture. If you have a laptop that has a 3,200x1,800 built-in display that’s hooked up to a 1,920x1,080 monitor, you can either have things looking normal on the laptop and huge on the big screen (scaling factor 2) or normal on the big screen and tiny on the laptop (scaling factor 1).
The workaround that we’re most comfortable with is to connect the second screen and then set the laptop monitor to 1,920x1,080 resolution as well and move the scaling factor to 1. It’s not perfect –you lose the benefit of the high DPI resolution while you’re at your desk – but both screens should look ‘normal’.
Ubuntu will remember the resolution settings too – when you unplug the second screen the built-in one will revert back to 3,200x1,800 (for example). When you plug it back in, the resolution will reduce. What won’t change automatically, however, is the scaling factor. When you unplug your screen then objects and text will seem tiny until you change the setting back to 2. You can manually change this in the settings each time, but this gets boring fast. Better to set a hotkey to switch between scaling factor 1 and 2. This is a little tricky to do ( see the Quick Scaling walkthrough ,below).
Power saver
If you’re like us, you’ll want to squeeze every last second out of your laptop’s battery during a long day at work, and the good news is that there’s not much difference, if any, between the length of time a laptop with Ubuntu installed lasts and the length of time the same portable will survive with Windows running on it. Ubuntu has become really good at power management over the last few years.
The single best thing you can do to save power is simple: turn down your screen brightness when your machine isn’t charging. Most of the power used by a contemporary laptop goes into lighting up all those pixels, so turning it down can easily double the time a charged power pack will last. Beyond that, there’s a few other simple things to try.
First of all, if you use Chrome or Chromium as your browser, make sure you go into the settings and turn off the option that lets the web browser run in the background. We’ve found that Google’s browser can eat tons of resources if you let it, so stay in control. Similarly, not leaving your mail client running and constantly pinging servers helps too.
If you want to see more details about your current battery use and anticipated charge time, click on the battery icon in your notification area and then click on the first line in the drop-down menu with the icon in it. This screen will chart the discharge time over the last 24 hours and give you loads of information about the state of your battery.
The ‘Rate’ is the current power draw, which could be anywhere from 5W to 15W depending on how efficient your laptop’s processor is and how well your system is set up. ‘Energy when full’ tells you how much charge your battery can hold. If this is significantly lower than the ‘Energy (design) – which is how much the battery is supposed to hold – it’s time to get a new battery.
But hopefully it won’t come to that. If you keep an eye on your portable and take care of your notebook following our instructions and you’ll have many happy years of Linux laptopping ahead of you.