This is a collection of the tweaks and modification I've made to my Arch Linux installation over the months. These may be applicable to other distros, but please check first before doing anything. I also included Arch Wiki references for all the procedures I mentioned. My recommendation is not to blindly follow this gist but to always check with the Arch Linux wiki first. Things move fast and by the time you're reading this my gist may be out of date. Lastly, the golden rule: never execute a command you don't understand.
- Create Touchpad Gestures on Ubuntu. Gestures provides an easy-to-use graphical front-end to libinput-gestures, thus saving you the need to craft a bespoke libinput-gestures config file by hand (or browse around to find a pre-prepared one online).
- The Finger Gestures. TouchEgg does not have any user interface at the time of writing this article, but it comes with an easy to configure text file for all the finger gestures goodness that you can use in Linux. TouchEgg supports up three-fingers pinch, two to five-fingers tap, and two-fingers to four-fingers swipes.
- Unfortunately those gestures are really only meant for touchscreens. If you have a touchscreen try em, they'll work. I was hoping they would be implemented for the touchpad eventually, but I haven't seen any updates on that front =. I did know Linux kernel for a long time now since I was a kid but for me (as a kid) it looked bad.
- Customize Linux Touchpad Gestures with ‘Gestures’ App If you want to set-up touchpad gestures on Linux, but don’t know how, you should check out the following app. The app is called ‘Gestures’ and is described by its developer as being a “minimal Gtk+ GUI app for libinput-gestures”.
Installing the KDE Plasma desktop
Linux Touchpad gestures. Hello guys, first of all, thank you for taking your time to read this. I am quite new to Linux, even if I am a 'proficient newbie' since I am used to code, reading writing digging for answers but this one gets me by the 'nose'.
My current DE of choice is KDE's Plasma. I find it just about perfect.
There are various ways to install it on Arch. The most popular one is to install
plasma
and plasma-applications
, but I don't like doing that because it comes with too many programs I'll never use. I, instead, install the base plasma
group, remove the few extra packages that come with it, then I finish off by installing a few KDE apps that don't come with the plasma
group, plus packages needed to use some of their features. I'm aware it's possible to get an even more minimal install by foregoing the plasma
group and just installing plasma-desktop
and a few other packages, but there are nice features, such as the browser integration, that I actually use.I then export the
export GTK_USE_PORTAL=1
environment variable so that programs that read it might load KDE-specific APIs, which can influence some programs to present the Qt file picker over the GTK one - it's way better integrated with Plasma and it's, frankly, superior.Even though Plasma was built with customization in mind, I mostly use it with its default settings: I just change the action key to META, import my keyboard shortcuts and set the double-click, not the single-click, to open a file or folder.
Yay!
I use
yay
as my AUR helper. You can install it from the AUR:![Touchscreen linux os Touchscreen linux os](https://intouchscreens.com.au/wp-content/uploads/2017/07/InTouch-15-inch-touch-screen-on-desktop-stand-portrait-400x516.jpg)
If you don't want Golang dependencies,
yay-bin
is the package you're looking for.Fonts!
Installing missing fonts
DEs often don't include common fonts that some programs require:
Enabling ClearType rendering
Microsoft no longer holds their patents on the ClearType font rendering, but at the time of writing only a few select distros (including Ubuntu, Fedora and Void Linux) make use of it by default. However, it can be enabled in Arch by replacing the
freetype2
package with a patched version from the AUR:This already improves the situation, but many fonts are still rendered as bitmap, which makes them look horrible. This can, however, be fixed. Let's begin with some symbolic linking:
Let's then add the following line to
/etc/profile.d/freetype2.sh
:Franz 5 mac. Please note that the way I did this is not endorsed by the Arch Wiki and it's a way I found to make the change permament. Unless you know how to revert all of this, you should just stick to what the Arch Wiki does, which I did too anyway.
Create the file
~/.config/fontconfig/conf.d/20-no-embedded.conf
and make it look like the following:Finally, log in again. This is an user setting and it will be reverted if you ever delete this file and it won't work on other users.
I'm using the Plasma desktop. I use the SF Mono Display Medium font everywhere (SF Mono Medium as a monospace font) and I enabled RGB antialiasing with Slight hinting and no forced font DPI. San Francisco fonts can be installed from the AUR:
Installing Windows fonts
I finally added Microsoft fonts as they're handy to keep around and tend to be necessary to display web pages and Office documents correctly.
To install them system wide, copy the
C:WindowsFonts
folder from a Windows installation to /usr/share/fonts
:These commands assume your Windows partition is mounted at /windows as they've been copied verbatim from the Arch Wiki. If you don't dual boot or don't mount your Windows partition to /windows, just replace
/windows/Windows/Fonts/*
with wherever location you copied that folder to.I also install some packages that are generally needed in order to make things work well but don't really fall under any category here:
Improving I/O performance
Using the BFQ scheduler
Arch Wiki reference: https://wiki.archlinux.org/index.php/Improving_performance#Changing_I/O_scheduler
Linux notoriously gets very slow with I/O intensive operations such as moving a lot of files at once and swapping. If you have a spinning hard drive or a not-so-fast SSD, the BFQ scheduler can help improve system responsiveness during I/O intensive operations. I still use a SATA SSD for lack of a faster connector on my laptop and I have perceived significantly better overall performance by using the BFQ I/O scheduler. If your boot disk is a fast NVme SSD it's generally not the best idea to use the
bfq
scheduler for it, but since the I/O scheduler is set per-disk, it might be a good idea to use it for any spinning hard disk permanently connected to the computer (e.g. a secondary disk to store games and movies).To set the BFQ scheduler, you need to specify some
udev
rules to tell Linux what scheduler to use on what kind of disks. For example, you could use the mq-deadline
scheduler on your NVme drives and the bfq
scheduler on your SSDs. I decided to set my rules in such a way that no scheduler is used for NVme SSDs, but bfq
is used for everything else. To do this, create the file /etc/udev/rules.d/60-ioschedulers.rules
and fill it in as below:Reboot and you're done.
Setting ext4 commit frequency to 60
Arch Wiki reference: https://wiki.archlinux.org/index.php/Ext4#Improving_performance
Another way to improve performance on not-so-fast SSDs is increasing the ext4 commit frequency from every 5 seconds up to 60. Just add
commit=60
to the mount options for the boot partition in /etc/fstab
:Reboot and you're done.
Improving laptop battery life with TLP and powertop
Arch Wiki reference: https://wiki.archlinux.org/index.php/TLPhttps://wiki.archlinux.org/index.php/Powertop
Linux distros tend to deplete laptops' batteries quite quickly, which can be detrimental to some.
tlp
is a set-and-forget, auto-tuning option for laptops that I have found to work very well (albeit it comes with drawbacks, such as a perceived decrease in performance). Setting it up on Arch Linux is pretty straightforward:powertop
is a powerful commandline program to keep track of battery consumption. It also allows the user to quickly alter some system settings that have an impact on battery life. You can use it to make a quick tuning:However, don't enable
powertop
's service if you already use TLP.Systemd configuration
Arch Wiki reference: https://wiki.archlinux.org/index.php/Systemd/
Taming the journal's size
Systemd's system journal's size can go out of control. There are some things you can do to keep it in control:
Forwarding the journal to /dev/tty12
This is very simple. Just create the file
/etc/systemd/journald.conf.d/fw-tty12.conf
and fill it like this:Then, restart the service:
Improving performance on Intel + Intel graphics
I'm using a Intel i5 7200-U CPU with Intel HD 620 integrated graphics. It's not a particularly powerful chip by any means, but with some tuning I got it to run very respectably and even allow me to play some lightweight games on the side without framerate drops or having to set low graphics (notably osu, the Portal series, Don't Starve, Starbound, Minecraft and others).
Needed packages
Install necessary packages:
Intel microcode
Arch Wiki reference: https://wiki.archlinux.org/index.php/Microcodehttps://en.wikipedia.org/wiki/Intel_Microcode
The first thing you should do on Arch Linux if you have an Intel CPU is setting up
intel-ucode
.The first thing to do to set up the microcode on my Intel laptop was to install the
intel-ucode
package:The second thing was to configure my bootloader, GRUB, with microcode early-loading. I just let
grub-mkconfig
handle this:Reboot and you're done.
Using the modesetting driver
Arch Wiki reference: https://wiki.archlinux.org/index.php/Kernel_mode_setting#Early_KMS_start
I use the kernel modesetting driver for my Intel processor. To use it, it's sufficient to make sure the
xf86-video-intel
package is not installed. This is important because how I set up HuC / GuC depends on the kernel modesetting being used.Enabling Early KMS
Arch Wiki reference: https://wiki.archlinux.org/index.php/Kernel_mode_setting#Early_KMS_starthttps://wiki.archlinux.org/index.php/Mkinitcpio#Image_creation_and_activation
I decided to start kernel modesetting during the initramfs stage. To do this, you can just add the
i915
module to /etc/mkinitcpio.conf
like this:And then
Finally, reboot.
Enabling HuC / GuC firmware loading
Arch Wiki reference: https://wiki.archlinux.org/index.php/Intel_graphics#Enable_GuC_/_HuC_firmware_loading
Since I have a Kaby Lake processor, some video features require updated GPU firmware that is not provided by default because it doesn't play nicely with all hardware. I'm happy to report no problems on Dell Inspron 5567.
Since I have set up early KMS, it's sufficient to create a file called
/etc/modprobe.d/i915.conf
the contents of which should be:Reboot, then, make sure both are enabled:
Using Alternative Iris OpenGL driver
Arch Wiki reference: https://wiki.archlinux.org/index.php/Intel_graphics#Alternative_OpenGL_Driver_(Iris)https://wiki.archlinux.org/index.php/Mpv#Hardware_video_acceleration
I use the experimental Intel Iris driver to start games or other graphically demanding applications. It's sufficient to
export MESA_LOADER_DRIVER_OVERRIDE=iris
before starting the application itself, but I suggest doing this in shells you open after starting up your DE or adding it to the desktop entries of the interested programs, since not every single program plays nicely with it and it would be foolish to export this environment variable globally.Setting up VA-API
Arch Wiki reference: https://wiki.archlinux.org/index.php/Hardware_video_accelerationhttps://wiki.archlinux.org/index.php/Chromium#Hardware_video_acceleration
Something that's really annoying in the Linux desktop is that video acceleration is disabled by default. If you have modest hardware, you'll probably notice watching a YouTube video is enough to bring your CPU near to the maximum usage. This can, of course, be worked around in some ways.
If you use Intel Graphics, you have to find out if your Intel chip requires the
intel-media-driver
or the libva-intel-driver
. My processor supports the latter. It's not installed by default, so you should do it yourself:After doing this, look at the output of
vainfo
, provided by the package libva-utils
we have installed earlier, to make sure everything is fine. Lines terminating in VAEntrypointVLD
or VAEntrypointEncSlice
indicate success.I use the
mpv
media player mostly. It's sufficient to start it with arguments mpv --hwdec=auto
to enable hardware acceleration for Xorg and mpv --gpu-context=wayland
on Wayland. I'm currently using the Plasma desktop which doesn't have very good Wayland support yet at the time of writing, so I'm using a Xorg session. mpv
can also be used to play YouTube videos, as long as the youtube-dl
package is also installed. The best command for this use case is mpv --hwdec=auto --profile=a4k --ytdl-format='bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' [link to the youtube video]
Although my primary browser is Firefox, I also want to have a GPU-accelerated browser around to browse intensive websites with and, realistically, to play online videos on - it gets tedious to use
mpv
all the time. Neither Firefox nor Chromium support VA-API by default, so I use the chromium-vaapi-bin
package from the AUR:Ubuntu Gestures
Arch Forums reference: https://bbs.archlinux.org/viewtopic.php?id=244031
However, the work is not over. You should create a
~/.config/chromium-flags.conf
that looks like the following:Note:
--force-device-scale-factor=1.25
is not a necessary argument to enable GPU acceleration, as all it will do is to scale the Chromium window by 125%. My laptop has a 1080p monitor and I don't find Chromium to scale well by default, and I find the interface much more readable at 125% scale. This value changes depending on your dpi and eyesight.To make sure this works well, start a YouTube video and then check for the following things:
- In chrome://media-internals/ > your video stream, a table should show up. The value associated to
video_decoder
should either be MojoVideoDecoder or GpuVideoDecoder. If it reads anything else but one of these two strings, then you're still using software acceleration. - In chrome://gpu 'Video Decode' should read 'Hardware Accelerated'.
Installing the
h264ify
extension might help in case CPU usage is still too high, but it's a workaround, rather than a solution.Solaar
My mouse is a Logitech MX Master 2S. It's fantastic, but Logitech does not provide any Linux software to control some of its settings. Fortunately, FOSS project Solaar helps with this:
I hide its system tray icon because KDE Plasma already tells me my mouse's remaining battery life. Divx plus pro 10 6 2 download free.
Setting up touchpad gestures
Arch Wiki reference: https://wiki.archlinux.org/index.php/Libinput
libinput-gestures README: https://github.com/bulletmark/libinput-gestures/blob/master/README.md
My laptop comes with an excellent touchpad. Unfortunately, Linux distros don't ship an equally excellent touchpad driver / implementation. The only real fix would be to contribute to the Libinput project and improve it, but for now we can use
libinput-gestures
as a workaround.The first thing you should do is to make sure you're using the
libinput
driver. If you are not, remove the xf86-input-synaptics
, xf86-input-evdev
packages and reboot. Finally, I'm using Xorg for this and I don't recommend using this hack in Wayland since desktop environments in Wayland typically have better touchpad gestures already.Once that's cleared, it's time to install AUR package
libinput-gestures
as well as other packages from the repos we will need.libinput-gestures
will detect touchpad gestures and run a command when any set gesture is detected. xdotool
will react to this by simulating keyboard events. To allow xdotool
to work, the user you're using should be added to the input
group:My dotfiles already contain a valid
~/.config/libinput-gestures.conf
file that works well with a Plasma session set up with my own keybindings. Finally, let's finish the setup:Touchscreen laptops are all the rage these days, and each month we see more and more 2-in-1 and convertible laptops hit the market. Now all of these laptops are powered by Windows 10, which has been optimized to provide both a traditional desktop experience as well as a touchscreen experience that is much more in line with a tablet. Even in desktop mode, Windows 10 is pretty easy to use with touch. But what if you don’t want to use Windows 10?
Linux is, of course, your main alternative to Windows on a PC. This operating system is free and open source and there are hundreds of different versions, known as distributions for you to choose from for your laptop. But which one of these are optimized to work with touchscreens? That’s what I hope to answer for you today. Today we will look at a few of the best Linux distributions for touchscreen laptops so you can choose the right version of Linux for your touchscreen laptop.
A Few Things You Should Know
Before we get into discussing specific Linux distributions, there are a few things you need to know.
- First, pretty much any Linux distribution will work with the right GUI, but there are some that are designed to work better out of the box.
- The setup will take a little work. No Linux distribution is designed and optimized for touchscreen without a few tweaks and software additions on your part.
- Your mileage may vary. In the end, it will come down to the type of laptop you have and what drivers and support are avaiable for your particular hardware in Linux.
Remember, sometimes things take a little more work on Linux to get right, but it’s so worth it. In the end, you will get the satisfaction of setting it up and I’m betting you will learn a thing or two along the way, and learning something is always a good thing. Just don’t give up. There are tons of resources online that can help you along the way. If you are lucky, you may even find a specific guide for your device, and that will make things much easier.
It’s All About the GUI
At the end of the day, it really all comes down to the graphical user interface. It is here where all the commands for both your mouse and keyboard as well as your fingers are controlled. The great thing about Linux is that you can install almost any GUI on any version of Linux.
In my experience, there are two graphical user interfaces that work best for touchscreens. They are:
- Gnome 3
- Unity
Gnome 3 has been around for quite some time now and is very mature and stable. It includes an interface that is built with touch in mind while still working great in a traditional keyboard and mouse setup. It’s also found as the default GUI on many different distributions, so any of these would make a great option for you.
Unity, on the other hand, is the graphical user interface designed by Canonical for Ubuntu. These days, Unity is pretty mature, and quite sleek and stylish. However, its days may be numbered, as Canonical has announced it is moving back to Gnome in future releases. But they do say Unity will continue to be developed, so that is some good news at least. That being said, Unity is one of my personal favorites when it comes to touchscreen GUIs out there, and one I believe you will all enjoy using.
Best Linux Distributions for Touchscreens
Now that we’ve gotten that out of the way, let’s look at a few distributions that will work great on your touchscreen laptop.
Fedora
Fedora is one of the most advanced Linux distributions around today. Strongly affiliated with the Red Hat group, Fedora is often a test bed for new software. Because of this, it often features cutting edge technology. But it does emphasize open source code only, so you won’t find any proprietary drivers included with it. That doesn’t mean you can’t install it yourself. Fedora includes Gnome 3 right out of the box, so you won’t have to worry about manually installing it, and it includes all the software you need for a good touchscreen experience, minus some swipe gestures.
Ubuntu
Ubuntu has long been criticized for the Unity desktop, but if there is one thing that Unity does do very well is touchscreens. The design of the graphical interface was made for it. On top of that, Ubuntu is one of the most popular and feature-rich Linux operating systems available, and many credit Ubuntu with popularizing Linux and bringing it to the mainstream more than any other Linux distribution has managed to do. With its rich features and great support for third party software, you will be hardpressed to find a better option for your touchscreen laptop.
Debian
Debian is one of the most stable Linux operating systems available today. Heck, it’s the distribution that Ubuntu is built upon. Without Debian, we would never have Ubuntu. The great thing about Debian is its customization. Using Debian you can install Gnome 3 or Unity on it, whichever you prefer, to gain that touchscreen interface you want. At the same time, it doesn’t contain the bloat that Ubuntu has, so if will run much better and much more efficiently. This is great for older laptops that have touchscreens or even an aging x86 tablet that you want to repurpose.
Another Tool You Should Consider
Multi-touch gestures is almost a must have if you want a seamless, cohesive experience when using your fingers for navigation. While Gnome and Unity do a good job optimizing the look and feel to be very touch friendly, sadly they lack multi-touch and gesture support out of the box. For that, I recommend grabbing Touchegg. Touchegg is a multi-touch gesture application that runs in the background. It allows you to setup your own gestures and multi-touch commands, and customize them in many different ways. For a complete touch experience on Linux, i recommend grabbing this application right after you complete your installation. While you can tweak all the settings yourself, there are tons of config files floating around the Internet to help you get started much faster.
Parting Thoughts
Ubuntu Touchscreen Gestures
While I wish I could give you a specific distribution that will just work right out of the box without any work, I just can’t. That being said, there are a few distributions in existence that will work better than others. The ones in this list provide you with most of what you will need for a decent touchscreen experience on your laptop. However, for best results, you may need to tweak a few drivers and settings here and there and you will definitely want Touchegg.
With a few tweaks and the addition of a little software, you can create an amazing touchscreen experience using Linux. By installing Linux on your touchscreen laptop, you get all the power and security of Linux while getting to keep your amazing touchscreen interface. So why wouldn’t you want to?
Gestures Linux Mint
Have any of you out there tried to create a good touchscreen experience in Linux? If so, what was your experience like? What tools did you use to get the job done? Tell me about your experience in the comments below.