You are not logged in.

#1 2020-12-17 16:07:07

john98708
Member
Registered: 2020-12-17
Posts: 5

[SOLVED] XRandr External monitor issues

I have a problem where the external monitor is not working. My laptop has a dedicated Nvidia and internal AMD card. The HDMI-1-0 output is from the Nvidia card, the output is only working with Xorg when it is set as the primary Device. This is my current configuration:

Section "Screen"
    Identifier      "Main Screen"
    Device          "AMD Card"
    GPUDevice       "Nvidia Card"
    #Device          "Nvidia Card"
    #GPUDevice       "AMD Card"
    Monitor         "Main Monitor"
EndSection

Section "Monitor"
    Identifier      "Main Monitor"
    Option          "Primary" "true"
    Option          "DPMS" "true"
EndSection

Section "Monitor"
    Identifier      "Monitor HDMI-1-0"
    Option          "LeftOf" "Main Monitor"
    Option          "DPMS" "true"
EndSection

Section "Device"
    Identifier      "AMD Card"
    Driver          "amdgpu"
    BusId           "PCI:5:0:0"
    Option          "Monitor-eDP" "Main Monitor"
EndSection

Section "Device"
    Identifier      "Nvidia Card"
    Driver          "nvidia"
    BusId           "PCI:1:0:0"
    Option          "Monitor-HDMI-1-0" "Monitor HDMI-1-0"
EndSection

I would like to have the AMD card as the main Device, but then xrandr can not set the appropriate resolution for the external monitor. In the Xorg.log there it says it can not find the size of the device

[   108.454] (WW) NVIDIA(G0): Cannot find size of first mode for NUL (DFP-0); cannot compute
[   108.454] (WW) NVIDIA(G0):     DPI from NUL (DFP-0)'s EDID.

The resolutions in xrand are good but only some of theme works (lower resolution than the prefered) and when trying to resize to a different mode xrand crashes with the error:

xrandr X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 21 (RRSetCrtcConfig)
Value in failed request: 0x0
Serial number of failed request: 63
Current serial number in output stream: 63
  [  5700.099] randr: failed to create shared pixmap
  [  5700.099] (EE) NVIDIA(G0): Failed to configure Reverse PRIME on output HDMI-1-0.
  [  5700.223] (EE) AMDGPU(0): drmmode_do_crtc_dpms cannot get last vblank counter

Last edited by john98708 (2021-02-06 12:51:08)

Offline

#2 2020-12-31 04:26:09

rothloup
Member
Registered: 2020-12-31
Posts: 1

Re: [SOLVED] XRandr External monitor issues

John:

Are you able to set your resolution to 640x480 using xrandr?

I seem to have the exact same problem as you.  Have you found a solution? 

The only way I can get my nVidia output to work is to either set it to 640x480 (no way!) or to pull my Radeon card from the system.  So this must be a config or driver issue.

I posted about it here and here and here with little progress.  If you found a solution please let me know.

Offline

#3 2021-01-04 03:39:06

abhixec
Member
Registered: 2019-07-08
Posts: 26

Re: [SOLVED] XRandr External monitor issues

I am having the same issue https://bbs.archlinux.org/viewtopic.php?id=262228  sad for now the only way I was to get around it was to revert to using linux-lts and nvidia-lts

Offline

#4 2021-01-04 08:22:05

john98708
Member
Registered: 2020-12-17
Posts: 5

Re: [SOLVED] XRandr External monitor issues

rothloup wrote:

John:

Are you able to set your resolution to 640x480 using xrandr?

I seem to have the exact same problem as you.  Have you found a solution? 

The only way I can get my nVidia output to work is to either set it to 640x480 (no way!) or to pull my Radeon card from the system.  So this must be a config or driver issue.

I posted about it here and here and here with little progress.  If you found a solution please let me know.

Yes, usually if I need the external monitor I set it low or make the main Device in my xorg.conf the Nvidia card and use the AMD as GPUDevice. This will make the external monitor the main one and secondary/turn off of the laptop screen, but it will work.
With this setup the problem will be powering the laptop without the external monitor and laptop screen/monitor that is powered off. When it happens I usually Ctrl+Alt+F2, edit back the xorg.conf and reboot. This is more an hack than a solution smile

I found this solution here Xorg - More than one graphics card

Last edited by john98708 (2021-01-04 08:30:42)

Offline

#5 2021-01-04 08:39:09

john98708
Member
Registered: 2020-12-17
Posts: 5

Re: [SOLVED] XRandr External monitor issues

abhixec wrote:

I am having the same issue https://bbs.archlinux.org/viewtopic.php?id=262228  sad for now the only way I was to get around it was to revert to using linux-lts and nvidia-lts

I think I've found this thread before while googling XD. For me on LTS the external monitor still behave the same way. I'll try reading throw the thread again to see if I've missed something.
Thanks

Last edited by john98708 (2021-01-04 08:45:55)

Offline

#6 2021-01-08 08:31:24

john98708
Member
Registered: 2020-12-17
Posts: 5

Re: [SOLVED] XRandr External monitor issues

With the last linux and nvidia update the issue has changed slightly. Xrandr fails with the following output:

xrandr --auto --verbose
crtc 4:     1024x768  60.00 +0+0 "HDMI-1-0"
xrandr: Configure crtc 4 failed

Edit:
- linux 5.10.5.arch1-1
- nvidia 460.32.03-1

Last edited by john98708 (2021-01-08 08:32:19)

Offline

#7 2021-01-14 07:18:42

baron-digit
Member
Registered: 2020-10-12
Posts: 24

Re: [SOLVED] XRandr External monitor issues

Hi, not sure if it's the same issue here, on two laptops the external monitors are not working quite well. I use Arandr as GUI.

e.g.
Dell xps13 2020
Kernel: 5.10.6-arch1-1

or Tuxedo laptop with nvidia RTX.

What I figured out so far is that sometimes the resolutions cannot be fetched.

Any update on this general topic?

Offline

#8 2021-02-06 08:59:36

john98708
Member
Registered: 2020-12-17
Posts: 5

Re: [SOLVED] XRandr External monitor issues

This is a good summary for tracking the issue https://gist.github.com/szpak/71081b402 … 8c7b972067. Best setup for me is proprietary nvidia with reverse prime, closing this.

Offline

#9 2021-02-06 12:43:50

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,786
Website

Re: [SOLVED] XRandr External monitor issues

Please do not use "closed" as that implies the topic is locked to new replies. Use e.g. "solved" instead.

https://gitlab.archlinux.org/archlinux/ … ow-to-post


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB