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:
From the GRUB loader select Parrot Linux and press E
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.
sudo parrot-upgrade
sudo apt install linux-headers-$(uname -r)
echo -e "blacklist nouveau\noptions nouveau modeset=0\nalias nouveau off" > /etc/modprobe.d/blacklist-nouveau.conf
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.
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.
Tested and confirmed it worked on my side. I can’t believe i didn’t follow ALL the step and it failed for me before. I’m so happy now.
Steps:
Add custom nvidia config at /etc/X11/xorg.conf.d
Add custom bash script to run NVIDIA Optimus - ArchWiki
I need some more test to confirm there’s no other configs are required. Now my laptop is using nvidia as the default primary GPU.
Known bug: XFCE’s panel disappeared. Re-add again (using my script) crashed the plugin items.
OK i did it without any extra configuration. But because I did some test on my laptop before so I need somebody to help me test on a fresh environment to make sure it’s correct.
Laptop information:
Model: Gigabyte G5 KC
Graphic: Intel UHD, Nvidia RTX 3060 Mobile
Monitors:
Main monitor, 144hz, connects to Intel UHD by default (information from windows 11)
External monitor, the one i bought for raspberry pi. This is 15inc monitor that i don’t remember the model. Connection: HDMI port (to NVIDIA directly).
Problem: By default, machine can’t detect external monitor
Solution: Run this command: xrandr --setprovideroutputsource NVIDIA-G0 modesetting
Update some news for this topic:
Nvidia driver acts differently on different laptop. The latest test with kernel 6.0.0-12 (amd64) and Nvidia driver 510.85.02. Graphic card Nvidia RTX 3060 mobile. I tested on Gigabyte G5 KC and Gigabyte G5 KE:
Driver installed fine. Everything works fine
G5 KC (fresh install using Home iso) supports offload sink by default
G5 KE (using Netinstall) doesn’t support offload sink
So possible reasons:
G5 KE has option to switch graphic card mode (hybird / dGPU) in BIOS. It could be a reason
G5 KE used netinstall so maybe missing some packages could make this problem. If it’s the case, the required packages are unknown.
For number 2., I can’t write that in the grub config because keyboard works differently in GRUB, I tried many different keys but I couldn’t find key ‘=’. The keyboard works perfectly in Parrot.
I have nvidia packages installed, I did installation according to official parrot instructions:
Hello! Since the same method didn’t work for me on the same laptop from the same vendor (with almost the same hardware spec, the only differences was the Mux switch), i would recommend you not to following any tutorial to modify either Xorg configs or grub configs. I (and i assuming a lot members in Linux community) am not sure what’s the problem and how to fix it. The only thing i’m sure is: you just need to install Nvidia’s driver (nvidia-driver package on repository), no extra packages / configuration is needed. There’s no extra information I can find on Nvidia’s official documentation (for now). If there’s something new, I’ll update it here. I think it needs official help from Nvidia’s developers to check and fix this problem.
Update: I made it work and I have NO IDEA why it worked. The solution is simple: enable dGPU mode only (Only NVIDIA) in BIOS, and start Linux. The funny thing is, it gave me blank screen 2 months ago. And today when i tried, it just worked for no reason, and ofc external monitor just worked, no extra command was required.
Short recap: I’m having Gigabyte G5 KC and G5 KE. Both use the same Nvidia 3060. KE has MUX Switch. The model KC requires only a xrand command to use external monitor. KE doesn’t work. I used HDMI port on both laptops (I didn’t try mini display port). There’s a short explain about MUX switch
A new update (good news): I’m testing Parrot with new Debian stable. The latest Nvidia driver + kernel version on this branch made the external monitor worked with Gigabyte G5 KE. User just need to run command xrandr --setprovideroutputsource NVIDIA-G0 modesetting
I bought the LG portable monitor today. The Gram View model 16MR70.ASDA5. It has a USB Type C cable that plugs to thunderbolt port. Everything worked out perfectly. No need extra setup nor extra command. So I think this is a good solution for anybody is using laptop, want extra monitor (plus it’s portable so you can bring it anywhere) and completely compatible with Linux.