Install Ubuntu 18.04 on Dell Inspiron 7567

Usually, to install Ubuntu in a desktop computer is a very simple task. However, when we’re talking about notebooks, then things start to get a little bit complicated. Mainly because recent notebooks have hybrid video cards and they have a system to change between one and other (NVIDIA has Optimus), for both performance and energy saving.

During the Ubuntu 18.04 installation on Dell Inspiron 7567 (Gaming edition) some bugs did occur, like for example the system freezing, video tearing on both built-in and external monitors, hdmi port not working and so on. I’ll explain step by step how to install Ubuntu in a manner to avoid those bugs from occur.

BIOS Config used:

Below the bios configuration that I did use:

  • AHCI Mode for disks
  • UEFI Segure Boot enabled
  • Pre-installed Windows 10 with a partition already reserved to Ubuntu

Step 1: Booting usb

During the creation of the usb bootable drive with Ubuntu 18.04 I went through some issues, sometimes the notebook not even recognize the usb stick and sometimes it did, but returned a message that some files were missing, even they are not. Finally using a USB 2.0 flashdrive model DT101 G2 of 16GB from Kingston I was able to flash and boot the Ubuntu 18.04 image.

Now, turn on the notebook and press F12 to enter in Boot Selection Mode

Step 2: Edit grub boot parameters

One of the behaviors that I’ve noticed not only on 18.04 but on previous Ubuntu versions (what lead me to create this article) is that the video mode is somewhat bugged. And it’s causing the system to freeze right after the live boot or after the whole installation (if you have lucky and it don’t freeze). And it seems that this issue occurs not only on notebooks but in desktop PCs too.

So to temporally fix this issue during the installation, let’s edit some grub parameters so we can install without the system freezing

As soon as the grub screen with the option “Try Ubuntu Without Installing” appear, press the “E” key to enter the set parameters screen

In the set parameters screen, look for the line starting with “linux /casper/vmlinuz…” and before the three dashes (—) insert the following: nomodeset

Then press “F10” key to proceed with the live boot

After that, Ubuntu 18.04 will start normally and it won’t freeze again. Then, install Ubuntu 18.04 as usual by double clicking into the “Install Ubuntu 18.04 LTS” icon and go over all the installation steps

When the installation finishes, reboot the system and repeat the Step 2 since the changes weren’t saved so we need to repeat that step again. Otherwise is almost certain that the system will freeze after the login screen.

Step 3: Configuring NVIDIA driver, switching from GDM to LightDM, create config files and persist changes to GRUB

Basic for the next steps we’ll do the following:

  • Install proprietary NVIDIA drivers
  • Install LightDM
  • Create xorg.conf file
  • Create lightdm.conf file
  • Create lightdm-script file
  • Persist modeset=1 to the boot loader

First we need to update the repos and install the drivers from NVIDIA, for this type:

sudo apt-get update; sudo ubuntu-drivers autoinstall;

After everything was installed (NVIDIA 390.48 at the moment), let’s install LightDM to replace GDM since it’s causing issues with multiple monitors. So using the same terminal, type:

sudo apt-get install lightdm;

Now let’s configure X server with both Intel and NVIDIA cards. For that we need to create a xorg.conf file e put the configs inside it, just execute the whole block below and it will be done

sudo tee -a /etc/X11/xorg.conf << EOF
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection

Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection

Section "Screen"
Identifier "nvidia"
Device "nvidia"
#Monitor "LG IPS FULLHD"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection

Option "AllowEmptyInitialConfiguration"
Option "metamodes" "HDMI-0: nvidia-auto-select +1920+0 { ForceFullCompositionPipeline = On }, eDP-1-1: nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
Option "BaseMosaic" "off"
Option "MultiGPU" "Off"
Option "TripleBuffer" "on"
Option "AllowIndirectGLXProtocol" "off"
EndSection

Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0"
Option "AccelMethod" "none"
EndSection

Section "Screen"
Identifier "intel"
Device "intel"
EndSection

EOF

Now let’s add a command to be executed every time the X server launches, this command choose the correct mode set for the NVIDIA card, again copy and paste the lines below and execute it in the terminal

sudo tee -a /etc/lightdm/lightdm.conf << EOF
[SeatDefaults]
display-exec-script=~/.lightdm-script

EOF
tee -a ~/.lightdm-script << EOF
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
EOF
chmod +x ~/.lightdm-script

And for the finale, let’s persist the “modeset” parameters to the grub, edit the grub config file

sudo nano /etc/default/grub

Modify the line starting with “GRUB_CMDLINE_LINUX_DEFAULT” to be something like this

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"

Save the file, and run the command below, that will rebuild the grub config and reboot the system

sudo update-grub2; reboot

If everything worked as expected you’ll have a multi monitor enabled system without tearing, yay!

If you have any doubt please comment below and I will try to help you out.

Cya!

Source: