top of page
Writer's pictureTravis Martin

Kali linux setting up 2 external monitors

I am writing a kinda instructional on how to setup your Kali linux with two additional screens (Monitors). This took me a few hours to get working, and one re-install because I broke my system.


My laptop

I own a Velocity micro laptop Raptor MX50 with 32Gb RAM, GTX1650


Settings on laptop

Update your System

  1. Update your System

  2. Upgrade your OS

  3. reboot your system

sudo apt update
sudo apt -y full-upgrade -y
reboot

Install nvidia drivers

I will list the commands however I must give credit to this post that has a deeper explanation on the process (https://www.kali.org/docs/general-use/install-nvidia-drivers-on-kali-linux/).


Commands to run

Run each command in the terminal I will try to explain everything as I go through it.

lspci | grep -i vga
sudo apt install -y nvidia-driver nvidia-cuda-toolkit
sudo reboot -f
  1. lspci will list your PCI Bus devices on your system, (Mine has 2 my NVidia grapics and Intel)

  2. Install the nvidia drivers

  3. reboot your system to allow the nvidia drivers to get applied over the default "nouveau" drivers

  4. If you encounter any issues post them below in comments and also check out that kali blog I mentioned above.

Verifying that your drivers are correctly set

I am writing a small for loop in bash, this will essentially pull your pci version and pull additional information on it. Run this command as a single command. Example output

for version in $(lspci -v | grep VGA | awk '{ print $1 }'); do lspci -s $version -v; done

Example output:

for version in $(lspci -v | grep VGA | awk '{ print $1 }'); do lspci -s $version -v; done
00:02.0 VGA compatible controller: Intel Corporation CometLake-H GT2 [UHD Graphics] (rev 05) (prog-if 00 [VGA controller])
        Subsystem: CLEVO/KAPOK Computer UHD Graphics
        Flags: bus master, fast devsel, latency 0, IRQ 138, IOMMU group 2
        Memory at c2000000 (64-bit, non-prefetchable) [size=16M]
        Memory at a0000000 (64-bit, prefetchable) [size=256M]
        I/O ports at 5000 [size=64]
        Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i91501:00.0 VGA compatible controller: NVIDIA Corporation TU117M (rev a1) (prog-if 00 [VGA controller])
        Subsystem: CLEVO/KAPOK Computer TU117M
        Flags: bus master, fast devsel, latency 0, IRQ 158, IOMMU group 1
        Memory at c4000000 (32-bit, non-prefetchable) [size=16M]
        Memory at b0000000 (64-bit, prefetchable) [size=256M]
        Memory at c0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at 4000 [size=128]
        Expansion ROM at c3000000 [virtual] [disabled] [size=512K]
        Capabilities: <access denied>
        Kernel driver in use: nvidia
        Kernel modules: nvidia

You should see your Kernel driver in use: nvidia and Kernel modules: nvidia


Troubleshooting

Check and see if you have the mesa-opencl-icd installed if you DO uninstall it.


check if mesa-opencl-icd is installed command

dpkg -l | grep -i "mesa-opencl-icd"

If anything gets returned run the following command

sudo apt remove mesa-opencl-icd

Setting up the displaylink drivers (KEY!)

I found these drivers on the following github page (https://github.com/AdnanHodzic/displaylink-debian)

sudo apt-get install git
git clone https://github.com/AdnanHodzic/displaylink-debian.git
cd displaylink-debian/ && sudo ./displaylink-debian.sh
  1. Install git package

  2. download the gitrepo (code)

  3. Change diretory and run the install script.

Might need to restart/reboot and follow the post-install


xrandr --listproviders

Output:

Providers: number : 5
Provider 0: id: 0x44 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:Intel
Provider 1: id: 0x138 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting
Provider 2: id: 0x116 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting
Provider 3: id: 0xf4 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting
Provider 4: id: 0xd2 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting

Notice that each of the Providers #: have the follow message "providers: 0" we need to assign that to "Provider 0:" Which is the actual Graphics provider.


If you have more then 4 providers add them. code I executed below, add more if you have more.

xrandr --setprovideroutputsource 1 0
xrandr --setprovideroutputsource 2 0
xrandr --setprovideroutputsource 3 0
xrandr --setprovideroutputsource 4 0

Connect your Mini DisplayPort --> HDMI adapter and your screen "Should" work I had an issue where my wifi stopped working, I disconnected and reconnected and it worked.


This one a quick blog write there might be spelling issues please post any issues to this and I will try to help.


Update:

I noticed that my wifi stopped working after connecting my second monitor to my Mini Displayport to hdmi adapter. I am not sure why this is happening, however the fix is restart your NetworkManager.


Restart wifi card / adapter

sudo systemctl restart NetworkManager

9,498 views10 comments

10 Comments


Harsh Dambhare
Harsh Dambhare
Jan 26, 2023

how can i control this multiple screen settings?


Like
Travis Martin
Travis Martin
Jan 29, 2023
Replying to

I don’t think there is a settings for multi screen setting for this. You might need to adjust the settings in the command line

Like

Hisham Alnashawaty
Hisham Alnashawaty
Feb 16, 2022

I got this Error


Unsuported kernel version: 5.15

Please wait for a stable DisplayLink release or try to install the beta

No support will be given for the beta version


This tool is Open Source and feel free to extend it

GitHub repo: https://github.com/AdnanHodzic/displaylink-debian/


thnx in advance


Like
Travis Martin
Travis Martin
Feb 17, 2022
Replying to

Hello Hisham,


Let me look into this, from my first look it seems like your kernel is at a higher version.


If you are knowledgable in bash scripting this is the commit that was made to limit "Beta" releases or seems here they put a cap on the version based on your Kernel.

https://github.com/AdnanHodzic/displaylink-debian/commit/0677966e08f80339cbb3d6e96d6cdfc7cc8cdbf3


This is what I would do.

  1. Save all your data if you are doing bug bounties save all your data just in case this goes bad and you lose data (you shouldn't because this is only a display driver)

  2. Make a small change to the file: displaylink-debian.sh

  3. Change the value in line 21: max_kernel_version_supported="5.13"

  4. To: max_kernel_version_supported="5.16"

  5. Then re-run the program: sudo ./displaylink-debian.sh


The changes are hitting…


Like

Johnathan Johnson
Johnathan Johnson
Feb 12, 2022

Man you are a flipping genius i have been trying to figure this problem out for hours and all it was the set provider source thank you so much!!

Like
Travis Martin
Travis Martin
Feb 13, 2022
Replying to

Thank you, glad I was able to help, I am sure you would have figured it out with more time! Thank you for the comment.

Like

Thibault
Thibault
Jan 30, 2022

HUGE Thanks for htis I was really struggling with the external display issue

Like
Travis Martin
Travis Martin
Jan 30, 2022
Replying to

Agree it’s annoy to setup and not much information online to help with setup. Thank you and glad it helped!

Like

thanks to the author. I searched for almost two days until I solved this problem, and at the end this article helped Thank you very much.

Like
Travis Martin
Travis Martin
Dec 27, 2021
Replying to

Thank you for the comment I am glad it helped!

Like
bottom of page