You are not logged in.

#1 2022-03-09 17:32:55

melixc77
Member
Registered: 2022-03-09
Posts: 6

xorg configuration problem with amd+nvidia

Hi everyone, first of all am not really sure if this topic is in the right section, but since am newbie in archlinux, seems fine to me. Also i would like to apologize for the bad english, hope the post can be understood anyway

Am having problems with the configuration of the x server in my laptop when connect and external hdmi monitor. i can only use the laptop screen (with the inbtegrated amd GPU) or the external hdmi monitor (with the nvidia GPU) but cant have both monitors working at the same time, i have done some research and read a lot on internet that amd+nvidia has a lot of problem.

my configuration files are the followings:

 
10-monitor.conf

Section "Monitor"
  Identifier "eDP-1"
  Modeline "1920x1080_60.00"  146.25  1680 1784 1960 2240  1050 1053 1059 1089 -hsync +vsync
  Option "PreferredMode" "1920x1080_60.00"
  Option "DPMS" "true"
EndSection

Section "Monitor"
  Identifier "HDMI-0"
  Modeline "1920x1080_60.00"  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
  Option "PreferredMode" "1920x1080_60.00"
  Option "DPMS" "true"
EndSection
20-radeon.conf

Section "Device"
    Identifier     "Device0"
    Driver         "Radeon"
    BusID          "PCI:5:0:0"
    Option         "Monitor-eDP-1" "eDP-1"
EndSection
30-nvidia.conf

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:1:0:0"
    Option         "Monitor-HDMI-0" "HDMI-0"
    Option         "Monitor-eDP-1"  "eDP-1"
EndSection
40-screen.conf

Section "Screen"
  Identifier "Screen-eDP"
  Device "Device0" 
  Monitor "eDP-1"
  DefaultDepth 24
EndSection

Section "Screen"
  Identifier "Screen-HDMI"
  Device "Device1" 
  Monitor "HDMI-0"
  DefaultDepth 24
EndSection

the output of

 lspci | grep -e VGA -e 3D 
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] (rev c2)

have the nvidia and xf86-video-amdgpu drivers installed, also try with ati drivers with the same results.

Any idea of what am doing wrong?

Offline

#2 2022-03-09 18:34:17

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,182

Re: xorg configuration problem with amd+nvidia

and read a lot on internet that amd+nvidia has a lot of problem

In my experience the vast majority of those problems are caused by incorrect user configuration aka PEBKAC .

Your .conf files look a lot better then the crap usually created by nvidia-xconfig, but do have atleast one issue X autodetect would not have had.

20-radeon.conf

Section "Device"
    Identifier     "Device0"
    Driver         "Radeon"
    BusID          "PCI:5:0:0"
    Option         "Monitor-eDP-1" "eDP-1"
EndSection

That forces X to use the modules from xf86-video-ati .
It's a good driver for older cards , not for modern cards.

Your zen+ processor with picasso / raven 2 grahics is far too new for the X radeon/ati driver and requires the X amdgpu driver/module .
remove xf86-video-ati and the 20-radeon.conf file.

please post full lspci -knn output.

Last edited by Lone_Wolf (2022-03-09 18:34:36)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2022-03-09 20:27:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Offline

#4 2022-03-10 11:37:42

melixc77
Member
Registered: 2022-03-09
Posts: 6

Re: xorg configuration problem with amd+nvidia

Lone_Wolf wrote:
20-radeon.conf

Section "Device"
    Identifier     "Device0"
    Driver         "Radeon"
    BusID          "PCI:5:0:0"
    Option         "Monitor-eDP-1" "eDP-1"
EndSection

That forces X to use the modules from xf86-video-ati .
It's a good driver for older cards , not for modern cards.

Your zen+ processor with picasso / raven 2 grahics is far too new for the X radeon/ati driver and requires the X amdgpu driver/module .
remove xf86-video-ati and the 20-radeon.conf file.

just remove the ati driver and install amdgpu one, also modify that .conf file as follow:

20-amdgpu.conf

Section "Device"
    Identifier     "Device0"
    Driver         "amdgpu"
    BusID          "PCI:5:0:0"
    Option         "Monitor-eDP-1" "eDP-1"
EndSection

still not working, same problem so far


Lone_Wolf wrote:

please post full lspci -knn output.

00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex [1022:15d0]
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU [1022:15d1]
	Subsystem: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU [1022:15d1]
00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
00:01.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] [1022:15d3]
	Kernel driver in use: pcieport
00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] [1022:15d3]
	Kernel driver in use: pcieport
00:01.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] [1022:15d3]
	Kernel driver in use: pcieport
00:01.7 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0] [1022:15d3]
	Kernel driver in use: pcieport
00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge [1022:1452]
00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A [1022:15db]
	Kernel driver in use: pcieport
00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B [1022:15dc]
	Kernel driver in use: pcieport
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61)
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
	Kernel driver in use: piix4_smbus
	Kernel modules: i2c_piix4, sp5100_tco
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0 [1022:15e8]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1 [1022:15e9]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2 [1022:15ea]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3 [1022:15eb]
	Kernel driver in use: k10temp
	Kernel modules: k10temp
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4 [1022:15ec]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5 [1022:15ed]
00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6 [1022:15ee]
00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7 [1022:15ef]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] [10de:1f91] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device [1043:109f]
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:10fa] (rev a1)
	Subsystem: ASUSTeK Computer Inc. Device [1043:109f]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
	Subsystem: ASUSTeK Computer Inc. Device [1043:208f]
	Kernel driver in use: r8169
	Kernel modules: r8169
03:00.0 Non-Volatile memory controller [0108]: Intel Corporation SSD 660P Series [8086:f1a8] (rev 03)
	DeviceName: Onboard LAN Brodcom
	Subsystem: Intel Corporation Device [8086:390d]
	Kernel driver in use: nvme
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter [10ec:c822]
	Subsystem: AzureWave Device [1a3b:3750]
	Kernel driver in use: rtw_8822ce
	Kernel modules: rtw88_8822ce
05:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Picasso/Raven 2 [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15d8] (rev c2)
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu
05:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
	Subsystem: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor [1022:15df]
	Kernel driver in use: ccp
	Kernel modules: ccp
05:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 [1022:15e0]
	Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
05:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1 [1022:15e1]
	Subsystem: ASUSTeK Computer Inc. Device [1043:201f]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
05:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Family 17h/19h HD Audio Controller [1022:15e3]
	DeviceName: HD Audio Controller
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel
06:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 61)
	Subsystem: ASUSTeK Computer Inc. Device [1043:18f1]
	Kernel driver in use: ahci

Offline

#5 2022-03-10 15:09:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: xorg configuration problem with amd+nvidia

Remove 10-monitor.conf, 20-radeon.conf, 30-nvidia.conf and 40-screen.conf and see the link I posted and redirect the output.

Offline

#6 2022-03-22 15:05:15

melixc77
Member
Registered: 2022-03-09
Posts: 6

Re: xorg configuration problem with amd+nvidia

seth wrote:

Remove 10-monitor.conf, 20-radeon.conf, 30-nvidia.conf and 40-screen.conf and see the link I posted and redirect the output.

already try that with the same results, try both options described in the link, try with both GPUs as primary GPU but was the same result. when try to set providers for xrandr with

$ xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x1b7 cap: 0x0 crtcs: 4 outputs: 1 associated providers: 0 name:NVIDIA-0
Provider 1: id: 0x1f7 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 1 associated providers: 0 name:AMD Radeon Vega 8 Graphics @ pci:0000:05:00.0

$ xrandr --setprovideroutputsource  0x1b7 0x1f7

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:  35 (RRSetProviderOutputSource)
  Value in failed request:  0x1b7
  Serial number of failed request:  16
  Current serial number in output stream:  17

Offline

#7 2022-03-22 15:29:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: xorg configuration problem with amd+nvidia

Why is the nvidia chip "provider 0"? This smells like you're running on the nvidia chip?
Please post your xorg log.

Offline

#8 2022-03-22 15:59:00

melixc77
Member
Registered: 2022-03-09
Posts: 6

Re: xorg configuration problem with amd+nvidia

seth wrote:

Why is the nvidia chip "provider 0"? This smells like you're running on the nvidia chip?
Please post your xorg log.

xorg.log

Offline

#9 2022-03-22 16:00:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: xorg configuration problem with amd+nvidia

Yeah, you're running on the nvidia chip what won't work.
The reason is the config file that does

[  6642.955] (**) |-->Screen "Screen-HDMI-0" (0)
[  6642.955] (**) |   |-->Monitor "HDMI-0"
[  6642.955] (**) |   |-->Device "Device1"
[  6642.956] (**) |   |-->GPUDevice "Device0"

Edit: you can try to reverse the output redirection (because that's the only way that would make sense for the present configuration anyway) but because of the caps, I'd not hold my breath.

Last edited by seth (2022-03-22 16:02:51)

Offline

#10 2022-03-23 15:17:56

melixc77
Member
Registered: 2022-03-09
Posts: 6

Re: xorg configuration problem with amd+nvidia

seth wrote:

Yeah, you're running on the nvidia chip what won't work.
The reason is the config file that does

[  6642.955] (**) |-->Screen "Screen-HDMI-0" (0)
[  6642.955] (**) |   |-->Monitor "HDMI-0"
[  6642.955] (**) |   |-->Device "Device1"
[  6642.956] (**) |   |-->GPUDevice "Device0"

Edit: you can try to reverse the output redirection (because that's the only way that would make sense for the present configuration anyway) but because of the caps, I'd not hold my breath.

my idea is to use the nvidia GPU as primary GPU to acces both HDMI and laptop screen, i follow the instruction for the link under "reverse prime -> Discrete card as primary GPU". checking the logfile realice that some config files from /usr/share/X11 has been used in my past tests, so now i disable them, the only config file is the next

my xorg.conf file:

    Section "ServerLayout"                                                                                                                                                                                                                        
    Identifier "layout"
    Screen 0 "nvidia"
    Inactive "amdgpu"
EndSection

Section "Device"
    Identifier  "nvidia"
    Driver      "nvidia"
    BusID       "PCI:1:0:0" # Sample: "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
EndSection

Section "Device"
    Identifier  "amdgpu"
    Driver      "amdgpu"
    BusID       "PCI:5:0:0"  # Sample: "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "amdgpu"
    Device "amdgpu"
EndSection

Section "OutputClass"
   Identifier "amdgpu"
   MatchDriver "amdgpu"
   Driver "amdgpu"
   Option "AccelMethod" "glamor"
   Option "ColorTiling" "false"
EndSection
$ xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x1b7 cap: 0x0 crtcs: 4 outputs: 1 associated providers: 0 name:NVIDIA-0
Provider 1: id: 0x1f7 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 4 outputs: 1 associated providers: 0 name:AMD Radeon Vega 8 Graphics @ pci:0000:05:00.0
$ xrandr --setprovideroutputsource 0x1f7 0x1b7

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:  35 (RRSetProviderOutputSource)
  Value in failed request:  0x1b7
  Serial number of failed request:  16
  Current serial number in output stream:  17

my new xorg.log file

Offline

#11 2022-03-23 15:23:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,573

Re: xorg configuration problem with amd+nvidia

What still leads to you running on the nvidia chip.

[ 21865.831] (==) ServerLayout "layout"
[ 21865.831] (**) |-->Screen "nvidia" (0)
[ 21865.831] (**) |   |-->Monitor "<default monitor>"
[ 21865.832] (**) |   |-->Device "nvidia"
[ 21865.832] (**) |   |-->GPUDevice "amdgpu"

And apparently the output redirection doesn't work this way (and tbh, the nvidia provider looks fishy to the degree where I'm not confident that you can direct from or to it at all)

Offline

#12 2022-03-24 09:44:30

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,182

Re: xorg configuration problem with amd+nvidia

Try using the amd card with modesetting driver .
If that also doesn't show outputs / offloads in listproviders for the nvidia card you can't use 'discrete card as primary gpu' on this laptop.

The (bios/efi) firmware may have an option to select which videocard is the primary one .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#13 2022-06-14 16:00:09

melixc77
Member
Registered: 2022-03-09
Posts: 6

Re: xorg configuration problem with amd+nvidia

[UPDATE]

Problem solved with the last kernel update, didnt modify any file at all, with latest kernel, xrandr now detects both screens.

Thanks for the help!

Offline

Board footer

Powered by FluxBB