[problem help] Two Monitors (notebook and external)
Tofloor
poster avatar
Gelin
deepin
2024-02-14 08:11
Author

I need to configure two monitors (notebook and external monitor). I can to use both monitors separeted, but can't to use together.

My deepin version is:

cat /etc/os-release 

PRETTY_NAME="Deepin 20.9"
NAME="Deepin"
VERSION_ID="20.9"
VERSION="20.9"
VERSION_CODENAME="apricot"
ID=Deepin

In this moment, i using the external monitor (LG 29WL500)

 xrandr
Screen 0: minimum 8 x 8, current 2560 x 1080, maximum 32767 x 32767
HDMI-0 connected primary 2560x1080+0+0 (normal left inverted right x axis y axis) 798mm x 334mm
   2560x1080     59.98*+  74.99    50.00  
   3840x2160     29.97    25.00    23.98  
   2560x1440     59.95  
   1920x1080     75.00    60.00    59.94    50.00  
   1680x1050     59.95  
   1600x900      60.00  
   1280x1024     75.02    60.02  
   1280x800      59.81  
   1280x720      60.00    59.94    50.00  
   1152x864      60.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   720x576       50.00  
   720x480       59.94  
   640x480       75.00    59.94    59.93  

I have two video drivers:

lspci | grep VGA  
                                                                                 
00:02.0 VGA compatible controller: Intel Corporation Device 46a6 (rev 0c)
01:00.0 VGA compatible controller: NVIDIA Corporation GA107BM [GeForce RTX 3050 Mobile] (rev a1)

I tried many configurations in the xorg file, but i didn't success. Actully, i have this configuration:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    Screen      1  "Screen1" leftOf "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     "DELL"
    ModelName      "unknown"
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "LG"
    ModelName      "29WL500"
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
    Screen      0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
    Screen      1
EndSection

Section "Screen"
    Identifier  "Screen0"
    Device      "Device0"
    Monitor     "Monitor0"
    DefaultDepth 24
    Subsection "Display"
        Depth       24
        Modes       "1920x1080" "1600x1200" "1024x768" "800x600" "640x480" 
    EndSubsection
EndSection

Section "Screen"
    Identifier      "Screen1"
    Device          "Device1"
    Monitor         "Monitor1"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes       "2560x1080" "1024x768" "800x600" "640x480" 
    EndSubSection
EndSection

Section "OutputClass"
    Identifier     "nvidia"
    MatchDriver    "nvidia-drm"
    Driver         "nvidia"
EndSection

Please, help me! I need two or more monitors for my job.

Reply Favorite View the author
All Replies
Gelin
deepin
2024-02-14 08:18
#1

xrandr --listproviders

Providers: number : 1
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 1 associated providers: 0 name:NVIDIA-0

Reply View the author
r***[email protected]
deepin
2024-02-24 02:41
#2

Hello;

I am not an expert but what works for me was get rid of xorg conf files and then:

1- sudo apt autoremove nvidia-*

2- sudo nano /etc/modprobe.d/blacklist.conf and add:

blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off

3- sudo update-initramfs -u

4- reboot

5- sudo apt update -y && sudo apt install nvidia-driver nvidia-smi nvidia-settings plymouth-themes console-setup zstd -y

6- sudo nano /etc/default/grub and add nvidia_drm.modeset=1 to the end of the GRUB_CMDLINE_LINUX_DEFAULT="splash quiet " line.

7- sudo update-grub and then reboot

8- log in again, and if you see no HDMI display yet using both try changing scale and frecuency via display settings from control center

Then I was able to load programs using nvidia gpu with __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia google-chrome &

I am investigating a better and suitable way to use nvidia gpu when loading apps.

Good luck!

Reply View the author
r***[email protected]
deepin
2024-02-24 04:29
#3

Hello;

This is an update: You have got to upgrade nvidia driver to latest possible for this to work. In my case I have uninstalled open source drivers and installed latest nvidia propietary driver for my gpu.

Good luck.

Reply View the author
CS_GomesGaioso
Moderator
2024-03-23 06:37
#4
r***[email protected]

Hello;

This is an update: You have got to upgrade nvidia driver to latest possible for this to work. In my case I have uninstalled open source drivers and installed latest nvidia propietary driver for my gpu.

Good luck.

Likely no need to uninstall/re-install/upgrade the Nvidia driver.

With any version you need to switch to the High Peformance (Nvidia) profile - via Nvidia X Server Settings - and reboot in order to use eternal monitors that are only connected to the dGPU.

Reply View the author