You are not logged in.

#1 2021-06-16 02:43:48

thundr67
Member
Registered: 2021-06-16
Posts: 7

[SOLVED] Xrandr does not detect second monitor but that monitor...

I recently bought a second monitor, and I connect it to my pc's onboard VGA port. My primary monitor is connected to NVIDIA graphics card using HDMI port. At first when I ran xrandr, it detected my second monitor. Then, i enabled force full composite pipeline on  nvidia settings to fix screen tearing. Once I rebooted, xrandr stopped detecting the second monitor which it did before settings  update on DP-1-1

Last edited by thundr67 (2021-06-16 12:39:27)

Offline

#2 2021-06-16 05:59:31

seth
Member
Registered: 2012-09-03
Posts: 64,663

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

You wrote a static xorg config and are not running on the nvidia driver / w/o access to your IGP.
Remove the static config and see https://bbs.archlinux.org/viewtopic.php … 5#p1975925

Offline

#3 2021-06-16 06:23:30

thundr67
Member
Registered: 2021-06-16
Posts: 7

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Thanks for the prompt reply.

I didn't get you. You mean I should delete /etc/X11/xorg.conf

Last edited by thundr67 (2021-06-16 06:30:51)

Offline

#4 2021-06-16 06:25:42

seth
Member
Registered: 2012-09-03
Posts: 64,663

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Yes.
The stuff written by nvdia-settings/nvidia-xconfig (and Xorg -configure and probably every other existing config writer) is garbage and can't  deal w/ optimus systems.
Don't use that and injec the full copmposition pipeline as illustrated in the linked post instead.

Edit: you might also have to restore your previous configuration to run the server on the nvidia chip w/ the IGP as output provider only (if you did that in /etc/X11/xorg.conf)

Last edited by seth (2021-06-16 06:27:09)

Offline

#5 2021-06-16 06:30:39

thundr67
Member
Registered: 2021-06-16
Posts: 7

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

So I deleted xorg.conf then created a file /etc/X11/xorg.conf.d/20-nvidia.conf with the following content

Section "Device" # section header. mandatory. always.
    Identifier "Default nvidia Device" # section id - string doesn't matter but mandatory. always.
    Driver      "nvidia"  # match so we apply to the proper driver
    Option       "ForceCompositionPipeline" "true" # the option you want to set
EndSection # section footer. mandatory. always.

I rebooted and logged in, but xrandr still only shows one monitor and not my second monitor. Though, my second monitor does get a signal but is black.

BTW, I forgot to mention that my second monitor is connected to the motherboard's port while my primary is connected to GPU

Offline

#6 2021-06-16 06:46:10

seth
Member
Registered: 2012-09-03
Posts: 64,663

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Please post your xorg.conf and see my prev. edit: how did you configure optimus to use the IGP as outputprovider only before?

Offline

#7 2021-06-16 07:07:07

thundr67
Member
Registered: 2021-06-16
Posts: 7

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

I deleted xorg.conf, but this is what it was before

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 465.31

Section "ServerLayout"
    Identifier     "layout"
    Screen      0  "nvidia" 0 0
    Inactive       "intel"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
    ModulePath      "/usr/lib/nvidia/xorg/"
    ModulePath      "/usr/lib/xorg/modules/"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
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 "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    Option         "DPMS"
EndSection

Section "Device"

#   Option              "DPI" "96 x 96"  # Uncoment to fix the size of fonts
    Identifier     "nvidia"
    Driver         "nvidia"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
    Identifier     "intel"
    Driver         "intel"
    Option         "AccelMethod" "uxa"
EndSection

Section "Screen"

    # Uncomment this line if your computer has no display devices connected to
    # the NVIDIA GPU.  Leave it commented if you have display devices
    # connected to the NVIDIA GPU that you would like to use.
    # Option "UseDisplayDevice" "none"
    Identifier     "nvidia"
    Device         "nvidia"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "nvidia-auto-select"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "intel"
    Device         "intel"
    Monitor        "Monitor0"
EndSection

As for the optimus, I don't know what that is, I never configured optimus

Offline

#8 2021-06-16 07:43:35

thundr67
Member
Registered: 2021-06-16
Posts: 7

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Ok, now it seems to work.

I deleted xorg.conf and every conf file inside xorg.conf.d folder. After reboot it works, xrandr detects the second monitor. However, I am now having screen tearning, but if I enable force full composite, nvidia will generate xorg.conf, which was the root problem.
So now, how do I get rid of screen tearing

Offline

#9 2021-06-16 07:47:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 24,479

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Post a xorg log. If the external output actually runs on an integrated GPU then going with nvidia's composition pipeline is the wrong approach regardless. Why can't you plug the second monitor into the actual nvidia GPU as well?

Offline

#10 2021-06-16 07:55:40

thundr67
Member
Registered: 2021-06-16
Posts: 7

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

[    17.242] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): connected
[    17.242] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): Internal TMDS
[    17.242] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): 600.0 MHz maximum pixel clock
[    17.242] (--) NVIDIA(GPU-0): 
[    17.242] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.242] (--) NVIDIA(GPU-0): DFP-2: Internal DisplayPort
[    17.242] (--) NVIDIA(GPU-0): DFP-2: 1440.0 MHz maximum pixel clock
[    17.242] (--) NVIDIA(GPU-0): 
[    17.242] (--) NVIDIA(GPU-0): DFP-3: disconnected
[    17.242] (--) NVIDIA(GPU-0): DFP-3: Internal TMDS
[    17.242] (--) NVIDIA(GPU-0): DFP-3: 165.0 MHz maximum pixel clock
[    17.242] (--) NVIDIA(GPU-0): 
[    17.250] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    17.250] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    17.250] (--) NVIDIA(GPU-0): DFP-0: 330.0 MHz maximum pixel clock
[    17.250] (--) NVIDIA(GPU-0): 
[    17.294] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): connected
[    17.294] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): Internal TMDS
[    17.294] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): 600.0 MHz maximum pixel clock
[    17.294] (--) NVIDIA(GPU-0): 
[    17.294] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.294] (--) NVIDIA(GPU-0): DFP-2: Internal DisplayPort
[    17.294] (--) NVIDIA(GPU-0): DFP-2: 1440.0 MHz maximum pixel clock
[    17.294] (--) NVIDIA(GPU-0): 
[    17.294] (--) NVIDIA(GPU-0): DFP-3: disconnected
[    17.294] (--) NVIDIA(GPU-0): DFP-3: Internal TMDS
[    17.294] (--) NVIDIA(GPU-0): DFP-3: 165.0 MHz maximum pixel clock
[    17.294] (--) NVIDIA(GPU-0): 
[    17.294] (--) NVIDIA(GPU-0): DFP-0: disconnected
[    17.294] (--) NVIDIA(GPU-0): DFP-0: Internal TMDS
[    17.294] (--) NVIDIA(GPU-0): DFP-0: 330.0 MHz maximum pixel clock
[    17.294] (--) NVIDIA(GPU-0): 
[    17.338] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): connected
[    17.338] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): Internal TMDS
[    17.338] (--) NVIDIA(GPU-0): BenQ GW2283 (DFP-1): 600.0 MHz maximum pixel clock
[    17.338] (--) NVIDIA(GPU-0): 
[    17.338] (--) NVIDIA(GPU-0): DFP-2: disconnected
[    17.338] (--) NVIDIA(GPU-0): DFP-2: Internal DisplayPort
[    17.338] (--) NVIDIA(GPU-0): DFP-2: 1440.0 MHz maximum pixel clock
[    17.338] (--) NVIDIA(GPU-0): 
[    17.338] (--) NVIDIA(GPU-0): DFP-3: disconnected
[    17.338] (--) NVIDIA(GPU-0): DFP-3: Internal TMDS
[    17.338] (--) NVIDIA(GPU-0): DFP-3: 165.0 MHz maximum pixel clock
[    17.338] (--) NVIDIA(GPU-0): 
[   180.773] (EE) event24 - PixArt USB Optical Mouse: client bug: event processing lagging behind by 11ms, your system is too slow

I can't plug my second monitor into gpu because the way my gpu is installed, I can't fit a DVI cable, but I am able to fit HDMI

Offline

#11 2021-06-16 08:07:39

thundr67
Member
Registered: 2021-06-16
Posts: 7

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Ok, finally I fixed everything.

To fix this issue

First remove /etc/X11/xorg.conf and every file in /etc/X11/xorg.conf.d that relates to GPU

Then run this command if faced with screen tearing

nvidia-settings --assign CurrentMetaMode="$(nvidia-settings -q CurrentMetaMode -t|tr '\n' ' '|sed -e 's/.*:: \(.*\)/\1\n/g' -e 's/}/, ForceCompositionPipeline = On}/g')

Thanks seth for you help !!!!!

Offline

#12 2021-06-16 10:48:13

seth
Member
Registered: 2012-09-03
Posts: 64,663

Re: [SOLVED] Xrandr does not detect second monitor but that monitor...

Use the configlet you copy-posted in #5 instead.

Offline

Board footer

Powered by FluxBB