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,346 views10 comments
  • twitter
  • linkedin

©2019 travis' development blog

bottom of page