I have had tonnes of trouble installing a fully working Manjaro setup on my 2017 Dell XPS 15 9560 (Intel HD Graphics 630 integrated graphics card and Nvidia GeForce GTX 1050 dedicated GPU). Initially I failed to get an installation to work at all, and eventually got it working fine, but with the Nvidia card completely and permanently disabled. Recently, I have finally had a successful installation with access to the fully functioning Nvidia GPU.
Here are the exect steps I have collected from various forums as well as my own trial and error with many broken installations. (Note: that I dual-boot with Windows 10, and so some of the steps reflect that. I also install Manjaro KDE).
#########################
BIOS SETTINGS
#########################
Enter BIOS Settings by repeatedly pressing F10 on boot.
General
-> Boot Sequence -> Boot List Option -> UEFI
-> Advanced Boot Options -> Enable UEFI Network Stack
-> UEFI Root Path Security -> Always
System Configuration
-> SATA Operation -> AHCI
Secure Boot
-> Disabled
Post Behaviour
-> Fastboot -> Thorough
###########################
MANJARO ARCHITECT INSTALLATION
###########################
Manjaro Architect must be used as it allows you to select which display drivers to install. Auto-installing the Nvidia drivers always failed to then boot for me, so using Architect, I only install the Intel drivers, and manually install the Nvidia ones after I have booted into the fresh installation. Architect also allows me to install rEFInd as my bootloader, whcih I always prefer for aesthetic reasons, but more importantly as it allows me to easily set boot parameters, which are vital to getting the Nvidia GPU working (explained later).
Step 1:
i) Boot into Architect
ii) Log in with username: manjaro, password: manjaro
iii) Begin installation process by typing command: setup
iv) Connect to WiFi
Step 2:
Prepare Installation
-> Set Virtual Console -> <set to your required area>
-> Mount Partititions:
- root -> Selected desired root partition -> format as ext4 -> Default mount options
- swap -> Select desired swap partition (if needed)
- boot -> Select Windows UEFI partition -> /boot/efi/ -> Reformat? -> NO
- I don't use a separate /home partition, but you can specify it here if you wish
-> Configure Mirror List
- Rank mirrors by speed -> stable
Step 3:
Install Desktop System
-> Install Base -> yaourt + base-devel + linux414
-> Additional Modules? None
-> Desktop Environment -> KDE
-> Extra Packages? No
-> Select Minimal KDE
Display Driver
-> Select Display Driver -> video-intel
Step 4:
Install Bootloader
-> refind
Step 5:
Configure Base
-> Generate FSTAB -> Device UUID
-> Set hostname, root password, add user, etc...
Step 6:
Installation complete.
Exit installation.
Reboot (1st boot takes a minute and looks like it has frozen - we will take care of this after we have booted)
################################
REFIND BOOT OPTIONS & NVIDIA DRIVERS
################################
Step 1:
Blacklist Nouveau drivers. This appears to be what causes the boot process to hang for a while, and also sometime freezes the system when rebooting/shutting down.
Create the file: /etc/modprobe.d/blacklist.conf
and add the single line to it:
blacklist nouveau
Step 2:
Create custom rEFInd boot entries for Windows and Manjaro (necessary as we need a boot option for the Nvidia drivers to work).
i) Open the app parted
to set the label to "Manjaro" for your Manjaro root partition, and take note of its UUID.
ii) Open /boot/efi/EFI/refind/refind.conf
(location may be slightly different if you are not dual-booting) and add the following lines:
### Do not uncomment until you know that your custom entries actually boot and work!!!
#scanfor external,manual
menuentry "Manjaro" {
icon icon /EFI/refind/icons/<set to any icon in this directory so that you know it is your custom entry>.png
volume "Manjaro"
loader /boot/vmlinuz-4.14-x86_64
initrd /boot/initramfs-4.14-x86_64.img
options "rw root=UUID=0000000a-00a0-00a0-0000-0a00aa00a0a0 quiet acpi_rev_override=1"
}
menuentry "Windows 10" {
icon icon /EFI/refind/icons/<set to any icon in this directory so that you know it is your custom entry>.png
loader /EFI/Microsoft/Boot/bootmgfw.efi
}
-
volume
must be set to whatever label you gave the root partition previously. -
loader
andinitrd
can be found in/boot/
or you can boot into refind, and press tab twice on the defaul Manjaro boot entry to see what they are set to by default. -
options must be
rw root=UUID=<UUID of your root partition>
followed by the space-separated optionsquiet
andacpi_rev_override=1
. This is what allows the Nvidia drivers to work. - Once you have checked that both/all of your custom boot entries work, you can uncomment
scanfor manual,external
so that refind no longer shows its automatically generated entries. If you uncomment this line before checking if your manual entries work, you may no longer be able to boot into any OS. - Icons cane be changed accordingly, I use the ones in the rEFInd Minimal theme I linked earlier.
Step 3:
Install bumblebee (and primus, and mesa if not already installed)
pacman -S bumblebee
sudo systemctl enable bumblebeed.service
sudo systemctl start bumblebeed.service
Step 4:
Install drivers
KDE System Settings
-> Hardware Configuration
- Uninstall
video-intel
- Install
video-hybrid-intel-nvidia-bumblebee
Step 5:
Reboot and cross your fingers.
If successful, run optirun nvidia-smi
to ensure your Nvidia GPU and drivers are recognised. If so, any program can be run on the GPU using the optirun
command prefix.
#########################
BONUS: RUN i3 WITHIN KDE
#########################
I have always been a fan of i3, but also love the convenience of my favourite DE - KDE - for its settings app, other GUI apps, and plenty of other reasons. Here is my setup of i3 integrated within KDE.
And here are the steps to do so:
-
Install i3-gaps
-
Add the following to
~/.config/i3/config
(cp
from/etc/i3/config
if not created yet):
# Set wallpaper, otherwise image of lockscreen stays (must have feh installed)
exec_always --no-startup-id feh --bg-scale /path/to/wallpaper.jpg
### Try to kill the wallpaper set by Plasma (it takes up the entire workspace and hides everything)
exec --no-startup-id wmctrl -c Plasma
for_window [title="Desktop — Plasma"] kill; floating enable; border none
### Avoid tiling popups, dropdown windows from plasma
### for the first time, manually resize them, i3 will remember the setting for floating windows
for_window [class="plasmashell"] floating enable;
for_window [class="Plasma"] floating enable; border none
for_window [title="plasma-desktop"] floating enable; border none
for_window [title="win7"] floating enable; border none
for_window [class="krunner"] floating enable; border none
for_window [class="Kmix"] floating enable; border none
for_window [class="Klipper"] floating enable; border none
for_window [class="Plasmoidviewer"] floating enable; border none
- Add the following to
~/.config/plasma-workspace/env/wm.sh
& make executable (sudo chmod +x ~/.config/plasma-workspace/env/wm.sh
):
### Disable KWin and use i3gaps as WM
export KDEWM=/usr/bin/i3
- Log out and back in, still with Plasma as Xsession. i3 Should now be running within KDE.