View Issue Details

IDProjectCategoryView StatusLast Update
0009063Kali LinuxNew Tool Requestspublic2025-01-30 13:27
ReporterNormal Person Assigned Todaniruiz  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionunable to reproduce 
Summary0009063: Nvidia second display is giving a black screen
Description

When plugging in HDMI the second display is not working even when the drivers are installed with the right version, however this is a solution for the problem
https://github.com/NormalPerson001/display_vidia

Attached Files
display_vidia.sh (2,021 bytes)   
#!/bin/bash

# Check if an argument is passed
if [ $# -eq 0 ]; then
    echo "Usage: $0 <on|off>"
    exit 1
fi

# Get the first argument
arg=$1

# Check the value of the argument
if [ "$arg" == "on" ]; then

echo "Turning on the second display display NOTE: This will turn on the second display when rebooted"

sudo echo "blacklist nouveau
options nouveau modeset=0" > /etc/modprobe.d/blacklist-nouveau.conf

sudo modprobe nvidia-drm

nvidia-xconfig --query-gpu-info
 Similar --> PCI BusID: PCI:1:0:0

sudo echo 'Section "ServerLayout"
        Identifier "layout"
        Screen 0 "nvidia"
        Inactive "intel"
EndSection
 
Section "Device"
        Identifier "nvidia"
        Driver "nvidia"
        BusID "PCI:1:0:0"
EndSection
 
Section "Screen"
        Identifier "nvidia"
        Device "nvidia"
        Option "AllowEmptyInitialConfiguration"
EndSection
 
Section "Device"
        Identifier "intel"
        Driver "modesetting"
EndSection
 
Section "Screen"
        Identifier "intel"
        Device "intel"
EndSection

' > /etc/X11/xorg.conf.d/xorg.conf

sudo echo '
[Desktop Entry]
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer' > /etc/xdg/autostart/optimus.desktop 


sudo echo '
[Desktop Entry] 
Type=Application
Name=Optimus
Exec=sh -c "xrandr --setprovideroutputsource modesetting NVIDIA-0; xrandr --auto"
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer' > /usr/share/gdm/greeter/autostart/optimus.desktop

echo "Done!, Please reboot your system"

elif [ "$arg" == "off" ]; then

echo "Turning on the main display NOTE: This will turn off the second display when rebooted"

sudo rm /etc/modprobe.d/blacklist-nouveau.conf

sudo rm /etc/X11/xorg.conf.d/xorg.conf

sudo rm /usr/share/gdm/greeter/autostart/optimus.desktop

sudo rm /etc/xdg/autostart/optimus.desktop

echo "Done!, Please reboot your system"

else
    echo "Invalid argument. Please use 'on' or 'off'."
    exit 1
fi
display_vidia.sh (2,021 bytes)   
install.sh (135 bytes)   
sudo apt install linux-headers-$(uname -r) nvidia-driver nvidia-xconfig && sudo update-initramfs -u 
mv display_vidia.sh ~/.local/bin/
install.sh (135 bytes)   

Activities

kali-bugreport

kali-bugreport

2025-01-09 21:52

reporter   ~0020232

Doesn't look actionable / doubt that this is the right place for such a report (Kali team doesn't maintain graphic drivers / hardware / kernel support.

daniruiz

daniruiz

2025-01-30 13:26

manager   ~0020306

Thank you for your interest in Kali, but we are not able to deal with such hardware support problems. Please read https://www.kali.org/docs/community/submitting-issues-kali-bug-tracker/ first.
And consider that we are not kernel developers, if you know of a fix, we will gladly integrate it in our kernel build. Otherwise your best bet is to wait the next kernel update and keep around an old kernel that works for you (for example by installing an old known-working Kali image). If you need guidance to keep your Kali system up to date, please refer to https://www.kali.org/docs/general-use/updating-kali/.

Issue History

Date Modified Username Field Change
2025-01-09 08:39 Normal Person New Issue
2025-01-09 08:39 Normal Person File Added: display_vidia.sh
2025-01-09 08:39 Normal Person File Added: install.sh
2025-01-09 21:52 kali-bugreport Note Added: 0020232
2025-01-30 13:26 daniruiz Note Added: 0020306
2025-01-30 13:27 daniruiz Assigned To => daniruiz
2025-01-30 13:27 daniruiz Status new => closed
2025-01-30 13:27 daniruiz Resolution open => unable to reproduce