Install Linux Mint 19.1 Xfce on HP Pavilion Gaming 15 (cx0812no)...
USB Stick
- Download linuxmint-19.1-xfce-64bit.iso.
Use Rufus to create the USB stick: rufus-3.5.exe.
BIOS Settings
- Disable every "Secure Boot" and "TPM" security feature.
Enable USB boot and increase the time it waits during boot to 5s (time to press Esc).
Installation and First Boot
- Install Mint and during the first boot press Esc and the continue
the boot by pressing Enter and quickly press Shift to enter Grub
menu. While in the Grub menu, press 'e' to edit the boot settings
and change "quiet splash" to :
"quiet splash nomodeset"
If you fail to enter Grub menu then a hard boot will be needed in the login screen because the system will hang without the 'nomodeset'. Once it is set, reboot and enter the desktop and make the nomodeset permanent:
sudo nano /etc/default/grub
sudo update-grub
reboot
Install applications, Update and Create Backup
- Using the friendly popup screen at the startup, DO NOT install drivers
at this point, install the applications you think you might need, update
the system and reboot to see if it still works after that. If it works
then create a backup of the system with the backup manager.
Install NVidia Driver
- Now that there is a backup to restore to if the driver installation
fails, install the latest nvidia driver (390) using the driver manager and
reboot. Once rebooted, use the following command to check that the driver
installed correctly:
lsmod | grep nvidia
If you see a bunch of nvidia entries in the output, everything is ok (the system is still broken but the driver is there). The next thing that needs to be done is to add xorg.conf:
sudo nano /etc/X11/xorg.conf
Section "Module"
Load "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
Option "AllowEmptyInitialConfiguration"
EndSection
After that, create a script that changes the mode to the discrete GPU when X is started:
sudo nano /usr/local/bin/optimus.sh
xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto
sudo chmod a+x /usr/local/bin/optimus.sh
Then the script needs to be added in the display manager's startup config:
sudo nano /etc/lightdm/lightdm.conf.d/70-linuxmint.conf
[SeatDefaults]
display-setup-script=/usr/local/bin/optimus.sh
The last thing that needs to be done is to remove the 'nomodeset' that was added at the beginning:
sudo nano /etc/default/grub
"quiet splash"
sudo update-grub
reboot
Create another backup and enjoy the roaring fan of the discrete nvidia GPU...
- After everything works, but all animations in the game run slow,
uncheck Sync to VBlank and Allow Flipping in OpenGL Settings in
NVidia X Server Settings.