Disclaimer: all these notes are from my personal experience in using Arch Linux on this laptop, but I do not assume any responsibility for any damages your device may suffer, it's highly unlikely that anything bad could happen, but yet I think it's important to point it out.
I have the i7-7700HQ, 8GB RAM, 256GB Nvme, 1080p non-touch monitor version.
First and foremost it's important to note something: as any optimus laptop you'll have to add some parameters at boot time to boot properly in any Linux distribution (except Pop-os, which does all these things by default), because Nvidia's optimus (switching between integrated and discrete gpu) isn't opensource and nouveau (the open-source porting of Nvidia drivers, enabled automatically by the kernel because of the presence of the discrete gpu) will break Xorg at some point, not to mention Wayland.
To add boot paramters you need to press 'e' when the bootloader menu appears, find the line ending in 'quiet' and add to it the following things:
nouveau.modeset=0 acpi_rev_override=1 So we'll disable nouveau drivers and set acpi to use bumblebee later.
Connect to the internet: you can either use a type-c ethernet adapter (it'll work flawlessly) or "wifi-menu" command to setup a wifi connection.
This is an UEFI laptop, therefore we need to create a specific boot partition, and also a swap partition is quite useful, so we have this schema: (attention, I have a windows dual boot setup so my linux partitions begin from the fifth one)
| Name | FS_type | Size | My partitions |
|---|---|---|---|
| boot | EF00 | 512MB | nvme0n1p5 |
| swap | 8200 | 4GB (depends on your RAM size) | nvme0n1p6 |
| root | 8300 | Remaining space | nvme0n1p7 |
I use cgdisk as bash utility to partition my disk
After partitioning we must create the filesystems and mount partitions in the proper way:
mkfs.fat -F32 /dev/nvme0n1p5
mkswap /dev/nvme0n1p6
mkfs.ext4 /dev/nvme0n1p7
mount /dev/nvme0n1p7 /mnt
mkdir /mnt/boot
mount /dev/nvme0n1p5 /mnt/boot/EFI
swapon /dev/nvme0n1p6First off, set pacman to use the closest mirror to your location, simply edit /etc/pacman.d/mirrorlist and place your preferred mirror on top of the list, it will be the first used by pacman. If you want to enable multilib repositories (recommended!!) you have to uncomment the lines:
[multilib]
Include = /etc/pacman.d/mirrorlistFrom /etc/pacman.conf file.
Next we can install the base system and some basic utilities:
pacstrap /mnt base base-devel linux linux-frimware nano vimAfter the installation we can generate fstab: genfstab -U -p /mnt >> /mnt/etc/fstab
In order to configure the base system we need to chroot into the just installed system with:
arch-chroot /mnt
Next lets setup some stuff:
# set hostname
echo "your_hostname" > /etc/hostname
# generate locale
# uncomment your preferred locales from /etc/locale.gen, in this guide we'll stick with US, so you have to uncomment these lines
en_US.UTF-8 UTF-8
en_US ISO-8859-1
# actually generate sys language layout
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
# configure system timezone, I'm italian so I'll select my own timezone
ls /usr/share/zoneinfo # to list all available timezones
ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
# set hardware clock to use UTC timing
hwclock --systohc --utcNow we'll need to enable once again multilib repositories (same as before) and select the best mirror for our likings, next just let pacman update everything: pacman -Syu
We need to set root's password and create our own account:
passwd # to set root password
useradd -mg users -G wheel,storage,power -s /bin/bash your_new_user # create new user
passwd your_new_user # set new user passwordWe added our new user to "wheel" group, so we need to edit sudoers file to enable this group to sudo actions:
pacman -S sudo
# edit /etc/sudoers file and uncomment the following line:
%wheel ALL=(ALL) ALLI use arch alongside windows, and after numerous failed attempts I found that good old GRUB is still the more reliable and customizable bootloader available, so that's what I usually stick to:
pacman -S grub efibootmgr dosfstools os-prober mtools
# we must have our boot partition mounted in /boot/EFI directory to proceed!
grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck
# create grub config file
grub-mkconfig -o /boot/grub/grub.cfgNote: grub will handle the detection of Win10 seamlessly during grub-mkconfig
Most guides that I found online stop there, because you actually have a working system, but no one ever tells how to get network capabilities!
To have wifi-menu command available in the system we need to install both netctl and it's dependecies:
pacman -S netctl wpa_supplicant dhcpcd dialog pppSo that's it, we have a working base arch installation!
Now we can proceed to unmount everything and reboot our system:
exit # go back to arch live iso
umount -a # unmount all partitions
reboot nowAfter rebooting, login to your system using the account we created earlier.
First of all, we need to install xorg (I use wayland as graphics server, but it's really useful to have also xorg because of it's stability and wayland poor compatibility with Nvidia optimus, more on that later) and the integrated gpu drivers:
sudo pacman -Syu xorg-server xorg-utils xorg-xinit xterm xf86-video-intelNote: using -Syu we force pacman to update the package database and upgrade the system.
I prefer Gnome as my daily DE, so I'll install this one, look in the arch wiki for informations about other DEs.
So, let's start by installing gnome, it's extras and gdm:
sudo pacman -S gnome gnome-extras gdmNext we need to enable gdm's system service, so it'll start on boot:
sudo systemctl enable gdm.serviceThat's it! now everything should be working fine, and we have a working and usable Arch installation :)
With the growth of Linux kernel (version 5.6 , at the time of writing) lots of issues with this machine have been solved, but first we have to handle the mighty Nvidia GTX 1050 gpu, because even if we disabled nouveau drivers the damn things isn't turned off, therefore fans are really loud, battery drain is unreasonably high (even in idle this gpu uses ~7-8 Watts).
I don't need the discrete gpu when I use Linux, so I simply disable it completely using bumblebee package, to do so we need to pass acpi_rev_override=1 as boot parameter and setup bumblebee:
sudo pacman -S bbswitch bumblebee
sudo systemctl enable bumblebeed.serviceOnce installed and enabled, we just need to reboot the machine and the discrete gpu isn't going to be a problem anymore! Using this method we can also enable Gnome to use Wayland as Graphics server, so we'll be able to use awesome touchpad gesture, butter-smooth scrolling, lots of good stuff!
To check if
Note: Wayland isn't the most stable environment when it comes to Nvidia devices, some crashes may happen with future upgrades or whatever, that's why it's fundamental to have xorg working, just in case we'll ever need to use Gnome over xorg.+
The biggest issue in power saving was the Nvidia gpu, so we just need to install tlp and enable it:
sudo pacman -S tlp tlp-rw powertop
sudo systemctl enable tlp.serviceI also install powertop, but just as a utility to check on my system power drain.
Last but not least, I noticed that the i915 kernel module (manages intel graphics) can achieve some power saving if we pass to it some parameters:
# create a configuration file for this module
sudo nano /etc/modprobe.d/i915.conf
# write these lines inside of it:
options i915 enable_psr=1
options i915 disable_power_well=0
options i915 fastboot=1
# save with ctrl+xOnce created the config file, we'll just need to reboot the machine and some power saving should be noticeable.
Big thanks to each guide available online, my main references are:
-
Arch wiki installation page: https://wiki.archlinux.org/index.php/Installation_guide
-
Arch wiki page for XPS 9560: https://wiki.archlinux.org/index.php/Dell_XPS_15_9560
-
A wonderful infographic from reddit: https://www.reddit.com/r/archlinux/comments/3ya67j/install_arch_infographic/
If you find any errors or any possible improvements, feel free to tell me, I'll gladly update the guide and learn new things about this wonderful distro! :)