Using i3wm on Ubuntu presented me with a lot of bugs and issues that I simply did not have the time to solve.

I needed something that worked right out of the box, was lightweight and had i3wm as the primary desktop environment. I decided to try out the community maintained edition of Manjaro i3.

Now I intend to get away from the whole GPU switching mess and run only NVIDIA Prime and therefore we will be performing additional steps to make sure we only use the dGPU.

Device: Inspiron 7567

Graphics card: Nvidia GeForce GTX 1050 Ti

Installation

Step 1: Downloading

Download the ISO file from here.

Step 2: Making a bootable USB-Stick

# To list drives

sudo fdisk -l # Formatting the drive

sudo mkfs.fat /dev/sdX #Replace X with your own # Burning the ISO to the pendrive

sudo dd if=manjaro.iso of=/dev/sdX status=“progress” bs=4M conv=fdatasync #Replace X with your own

If for some reason, dd does not work for you or you prefer a GUI, you can download Etcher.

# Unzip the file

unzip balena-etcher-electron-1.5.57-linux-x64.zip # Launch Balena with sudo, otherwise it will not work.

sudo ./balenaEtcher-1.5.57-x64.AppImage

Warning:

Do NOT use Unetbootin. Manjaro does not support Unetbootin

Step 3: Turn off Secure Boot

Make sure secure boot is turned off in the BIOS. Manjaro does not play well with the secure boot on.

Step 4: Boot into the live CD

Press F12 for bring up the boot options screen Select the USB drive UEFI Press e on the BOOT option to open up the grub edit screen

GRUB screen. Change the nouveau.modeset=1 to nouveau.modeset=0

4. Change the value of nouveau.modeset to 0 from 1.

5. Press ctrl + x to boot into the live CD

Step 5: Install

Launch the installer

Manjaro Installer

2. Choose appropriate language and keyboard options.

Language and Keyboard options Manjaro i3

3. Choose appropriate partitions. Make sure to provide an /boot/efi FAT32 partition with the esp flag and the boot flag enabled. Choose a ext4 partition as the root partition and proceed.

Setting root partition

Setting the EFI partition.

Once the installation has been completed, reboot.

Step 6: Installing Nvidia drivers

On first restart, when the grub menu loads, press e on the manjaro option.

Go to the end of the line starting with linux and append nouveau.modeset=0

Append nouveau.modeset=0 to the end of the line starting with the word linux. Use ctrl + e to go to the end of the line. Press ctrl + x to boot. Once logged in, use the following command to list the available drivers. You can use mod + enter to open up a new terminal. The mod key is usually the windows key.

# Lists available drivers

mhwd -la --pci

4. Choose the latest nvidia driver. It is video-nvidia-435xx at the time of writing this article for my specific GPU. The driver to be chosen is of the format video-nvidia-xx, do not choose the bumblebee drivers.

# Replace with the appropriate driver number.

sudo mhwd -i pci video-nvidia-4XXxx

Step 7: Setting up Nvidia configuration files

1. Once the installation has completed, you should make the following changes for NVIDIA prime to take effect.

# Change to root

su root # Delete this file

rm /etc/X11/xorg.conf.d/90-mhwd.conf

6. Create a file called optimus.conf with the following command

vim /etc/X11/xorg.conf.d/ optimus.conf

and copy paste the following code inside vim



Section "Module"

Load "modesetting"

EndSection



Section "Device"

Identifier "nvidia"

Driver "nvidia"

BusID "PCI:1:0:0"

Option "AllowEmptyInitialConfiguration"

EndSection

7. Run the following commands to remove certain files at /etc/modprobe.d

# List files starting with mhwd at /etc/modprobe.d

ls /etc/modprobe.d/mhwd* # Delete the files

rm /etc/modprobe.d/mhwd-gpu.conf

rm /etc/modprobe.d/mhwd-nvidia.conf

8. Create the following file named nvidia.conf with with the following command

vim /etc/modprobe.d/nvidia.conf

and copy paste the following inside vim

blacklist nouveau

blacklist nvidiafb

blacklist rivafb

9. Create a new file named nvidia-drm.conf with the following command

vim /etc/modprobe.d/nvidia-drm.conf

and paste the following inside vim

options nvidia_drm modeset=1

9. Setting the output source

Create a new file named optimus.sh with the following command

vim /usr/local/bin/optimus.sh

and paste the following inside

#!/bin/sh



xrandr --setprovideroutputsource modesetting NVIDIA-0

xrandr --auto

Run the following command to add run permissions to the script we just created.

chmod a+rx /usr/local/bin/optimus.sh

Create a new file named lightdm.conf with the following command

vim /etc/lightdm/lightdm.conf

Paste the following under the section [Seat:*]

# Paste the following under [Seat:*]

display-setup-script=/usr/local/bin/optimus.sh

Step 7: Reboot.

Step 8: You are done! Open a terminal and type in the following to make sure you have a working installation.

$ glxinfo | grep -i vendor

server glx vendor string: NVIDIA Corporation

client glx vendor string: NVIDIA Corporation

OpenGL vendor string: NVIDIA Corporation

Thanks to the guide by Jonathon from the Manjaro Team for the graphic issues.

This guide will be updated to include fixes for bluetooth mouse, bluetooth headset and other tweaks soon.