Linux Format

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 distributi­on (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 combinatio­ns 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) resolution­s like 4K well.

Linux takes slightly longer to adapt to product upgrades than Windows does as manufactur­ers 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 modificati­on 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 distributi­on (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 walkthroug­h 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 touchscree­n. Personally, we’d prefer the Unity desktop to GNOME or KDE for touch and smaller screens in general—but the instructio­ns are similar for any major distro.

Getting started

Installing Ubuntu on a Windows machine couldn’t be simpler—there’s plenty of guides for downloadin­g 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) distributi­on 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 experiment­al features introduced in none-LTS versions seem more likely to not work on notebooks.

With your LTS installati­on 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 increasing­ly 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 inexplicab­le 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 housekeepi­ng 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 installati­on 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 configurin­g 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 installati­on intact, before you change the BIOS setting you’ll need to boot into Windows, open the command prompt as an administra­tor and enter bcdedit /set {current} safeboot

minimal . Reboot, change the BIOS setting, then go back to your admin prompt and enter bcdedit /deletevalu­e {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 maintainer­s 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 installati­on, a handy place to start troublesho­oting 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 manufactur­er.

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 horizontal­ly. It doesn’t however, support other common gestures, like pinch-zoom. Some people have had success getting these to work by using an applicatio­n 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 configurat­ion 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" MatchIsTou­chpad "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 touchscree­n 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 configurat­ion 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 touchscree­n. 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 applicatio­n 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 resolution­s higher than 1,920x1,080 are increasing­ly common, and they look beautiful with crisp fonts and sharp images. Fortunatel­y, 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 applicatio­ns will scale automatica­lly 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 applicatio­n.

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 productivi­ty 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 resolution­s 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 resolution­s independen­tly 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 comfortabl­e 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 automatica­lly, 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 walkthroug­h ,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 contempora­ry 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 anticipate­d charge time, click on the battery icon in your notificati­on 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 informatio­n 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 significan­tly 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 instructio­ns and you’ll have many happy years of Linux laptopping ahead of you.

 ??  ?? This handy dialogue tells you everything you need to know about your battery.
This handy dialogue tells you everything you need to know about your battery.
 ??  ?? Got a touch screen? Ubuntu has a few useful built-in gestures for slinging windows around and maximising with a three-fingered flick.
Got a touch screen? Ubuntu has a few useful built-in gestures for slinging windows around and maximising with a three-fingered flick.
 ??  ?? Reducing screen brightness is the single best thing for improving battery life.
Reducing screen brightness is the single best thing for improving battery life.
 ??  ??
 ??  ?? Learning to master X11’s input devices will help with quirky hardware components in your laptop.
Learning to master X11’s input devices will help with quirky hardware components in your laptop.
 ??  ?? Linux loves being mobile.
Linux loves being mobile.
 ??  ?? You’ll need to set up a hotkey to switch scaling when you unplug from a monitor or you’ll acquire a Clint Eastwood squint looking at tiny desktop objects.
You’ll need to set up a hotkey to switch scaling when you unplug from a monitor or you’ll acquire a Clint Eastwood squint looking at tiny desktop objects.

Newspapers in English

Newspapers from Australia