Dual Screen issues - Nvidia - Ubuntu 19.10

5,354

Though it would be helpful to others, i had a dual gpu the below script helped me to fix the xconf automatically.

https://devtalk.nvidia.com/default/topic/1024318/linux/-solved-nvidia-prime-on-dual-gpu-configuration-giving-a-blank-screen/post/5210971/#5210971

Updating the thread details here.

https://devtalk.nvidia.com/default/topic/1022670/linux/official-driver-384-59-with-geforce-1050m-doesn-t-work-on-opensuse-tumbleweed-kde/post/5203910/#5203910

Share:
5,354
Sudheej
Author by

Sudheej

Updated on September 18, 2022

Comments

  • Sudheej
    Sudheej over 1 year

    I have a laptop and external monitor connected via HDMI.

    NVIDIA recommended drivers are installed.

    $ ubuntu-drivers devices
    == /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
    modalias : pci:v000010DEd00001F91sv00001043sd0000109Fbc03sc00i00
    vendor   : NVIDIA Corporation
    driver   : nvidia-driver-435 - distro non-free recommended
    driver   : nvidia-driver-430 - distro non-free
    driver   : xserver-xorg-video-nouveau - distro free builtin
    

    I also generated the xorg.conf file, post reboot i could notice that the desktop is available in my external monitor and laptop screen is blank. I presume this has to do with adding additional screen to xorg.conf file.

    Below is xandr output

    $ xrandr -q
    Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
    HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 476mm x 268mm
       1920x1080     60.00*+  74.97    59.94    50.00  
       1680x1050     59.95  
       1440x900      59.89  
       1280x1024     75.02    60.02  
       1280x960      60.00  
       1280x720      60.00    59.94    50.00  
       1024x768      75.03    70.07    60.00  
       800x600       75.00    72.19    60.32    56.25  
       720x576       50.00  
       720x480       59.94  
       640x480       75.00    72.81    59.94    59.93 
    

    Below is my xorg.conf file

    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig:  version 435.21
    
    Section "ServerLayout"
        Identifier     "Layout0"
        Screen      0  "Screen0"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "Mouse0" "CorePointer"
    EndSection
    
    Section "Files"
    EndSection
    
    Section "InputDevice"
        # generated from default
        Identifier     "Mouse0"
        Driver         "mouse"
        Option         "Protocol" "auto"
        Option         "Device" "/dev/psaux"
        Option         "Emulate3Buttons" "no"
        Option         "ZAxisMapping" "4 5"
    EndSection
    
    Section "InputDevice"
        # generated from default
        Identifier     "Keyboard0"
        Driver         "kbd"
    EndSection
    
    Section "Monitor"
        Identifier     "Monitor0"
        VendorName     "Unknown"
        ModelName      "Unknown"
        Option         "DPMS"
    EndSection
    
    Section "Device"
        Identifier     "Device0"
        Driver         "nvidia"
        VendorName     "NVIDIA Corporation"
    EndSection
    
    Section "Screen"
        Identifier     "Screen0"
        Device         "Device0"
        Monitor        "Monitor0"
        DefaultDepth    24
        SubSection     "Display"
            Depth       24
        EndSubSection
    EndSection
    

    I am not sure how to add additional screen to the configuration file. In NVDIA-SETTINGS dialog i see the same information form the configuration file. If i try to use the default opensource drivers provided by ubuntu i see my monitor screen is pixelated and fuzzy.

    Can someone please guide me in getting this fixed. Thanks

  • MickaelFM
    MickaelFM almost 4 years
    Oh my god, thank you so much for this pointer to this script !