External monitor with NVIDIA Drivers on Laptop. Extended display working

Use external monitor and laptop screen together with discrete nvidia card.
System information where the below tutorial has worked:
CPU i7-9750H.
GPU GTX 1650 ( Mobile ).
HDMI Output hardwired to NVIDIA card.
Parrot OS 5.0.1 freshly installed

INSTRUCTIONS:
It is HIGHLY recommended to CLEAN install ParrotOS 5.0.1 Electro Ara

Install Nvidia Drivers:

  1. From the GRUB loader select Parrot Linux and press E
  2. Now navigate the cursor to the row starting with Linux, then at the end of the row replace quiet splash with nouveau.modeset=0 (without quote marks). Then press F10.
  3. sudo parrot-upgrade
  4. sudo apt install linux-headers-$(uname -r)
  5. echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf
  6. update-initramfs -u && reboot
  7. sudo apt install nvidia-driver -t parrot-backports
  8. sudo apt install nvidia-smi
  9. sudo apt install bumblebee-nvidia primus-nvidia primus-vk-nvidia nvidia-smi nvidia-cuda-dev nvidia-cuda-toolkit

Configure Bumblebee

  1. sudo nano /etc/bumblebee/bumblebee.conf
  2. Look for the string Driver= and add nvidia, then look for the string KernelDriver= and add nvidia-current.
  3. Save the file and reboot.

Upgrade again

  1. sudo parrot-upgrade

SETUP EXTERNAL MONITOR ON LAPTOP WITH DISCRETE GRAPHIC CARD

Output wired to the INTEL chip:

  1. sudo nano /etc/X11/xorg.conf

  2. copy this : Section "Screen" Identifier "Screen0" Device "intelgpu0" - Pastebin.com

  3. You need to probably change the BusID for both the Intel and the NVIDIA card.

  4. lspci | grep VGA

  5. 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

  6. The BusID is 0:2:0. Note that lspci outputs hexadecimal values, but Xorg expects decimal values.

  7. Reboot

  8. Connect HDMI cable

Output wired to the NVIDIA chip

  1. sudo nano /etc/X11/xorg.conf.d/20-intel.conf

  2. copy this : https://pastebin.com/Z1WzhX7A

  3. sudo nano /etc/bumblebee/xorg.conf.nvidia

  4. erase the content of /etc/bumblebee/xorg.conf.nvidia

  5. copy this: Section "ServerLayout" Identifier "Layout0" Option "AutoAddDevic - Pastebin.com

  6. Reboot

  7. Connect HDMI cable

  8. optirun intel-virtual-output

The external monitor will now be recognized and you can adjust it. Preferences->Hardware->Displays

1 Like

I edited your post to show some commands in markdown syntax.
It be nice if you can add your system information: laptop model, gpu version
p/s: i’m having a laptop that’s having issue with external monitor as well. It’s having a problem so I can’t test your tutorial on my laptop right now. I’ll try again later. If it works, I’ll tell doc team to add your tutorial on our documentation, with a big big thank.

@danterolle Please track this topic. I think we can try it and add to the doc.

System information added.
Relevant links:
Bumblebee - ArchWiki.
We could improve the solution by letting optirun intel-virtual-output run automatically as soon as HDMI cable is connected.