Can't configure AMD/ATI Radeon Graphics

Hello,
I have a laptop with two graphic cards. I’m trying to follow the steps on Arch Wiki, but my Xorg doesn’t show the Radeon GPU.

$ uname -a

Linux dell-pc 5.6.15-arch1-1 #1 SMP PREEMPT Wed, 27 May 2020 23:42:26 +0000 x86_64 GNU/Linux

$ lspci | grep VGA

00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Chelsea LP [Radeon HD 7730M]

$ xrandr --listproviders

Providers: number : 1
Provider 0: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel

Xorg.log: https://pastebin.com/ckyRwiSE

I also tried to use this config, but then the Xorg doesn’t initialize:

Section "Device"
	Identifier		"Radeon"
	Driver		"radeon"
	BusID		"PCI:1:0:0"
EndSection

i dont know the exact mechanic, but is like a optimus , standard is focused on one card this is intel. using the same port you need a switcher or blacklist and load radeon at start in mkinitcpio, just make sure you have a usb to ‘chroot’ intoo the system… this reversable the change…or look intoo the bios some bios you set which is standard.

Welcome !
This can help

@judd, I removed the radeon driver and installed the amdgpu, Xorg doesn’t load either.

Xorg.log:

[    11.012] (II) LoadModule: "amdgpu"
[    11.012] (II) Loading /usr/lib/xorg/modules/drivers/amdgpu_drv.so
[    11.013] (II) Module amdgpu: vendor="X.Org Foundation"
[    11.013] 	compiled for 1.20.8, module version = 19.1.0
[    11.013] 	Module class: X.Org Video Driver
[    11.013] 	ABI class: X.Org Video Driver, version 24.1
[    11.013] (II) AMDGPU: Driver for AMD Radeon:
	All GPUs supported by the amdgpu kernel driver
[    11.013] (II) AMDGPU(0): [KMS] Kernel modesetting enabled.
[    11.022] (EE) AMDGPU(0): amdgpu_device_initialize failed
[    11.022] (II) AMDGPU(G0): [KMS] Kernel modesetting enabled.
[    11.039] (EE) AMDGPU(G0): amdgpu_device_initialize failed
[    11.039] (II) AMDGPU(1): [KMS] Kernel modesetting enabled.
[    11.055] (EE) AMDGPU(1): amdgpu_device_initialize failed
[    11.056] (II) AMDGPU(2): [KMS] Kernel modesetting enabled.
[    11.072] (EE) AMDGPU(2): amdgpu_device_initialize failed
[    11.072] (II) AMDGPU(G1): [KMS] Kernel modesetting enabled.
[    11.089] (EE) AMDGPU(G1): amdgpu_device_initialize failed
[    11.089] (EE) Screen 0 deleted because of no matching config section.
[    11.089] (II) UnloadModule: "amdgpu"
[    11.089] (EE) Screen 0 deleted because of no matching config section.
[    11.089] (II) UnloadModule: "amdgpu"
[    11.089] (EE) Screen 0 deleted because of no matching config section.
[    11.089] (II) UnloadModule: "amdgpu"
[    11.089] (EE) Device(s) detected, but none match those in the config file.
[    11.089] (EE) 
Fatal server error:
[    11.089] (EE) no screens found(EE) 

@ringo I looked the BIOS, there is nothing about the cards.

Few years ago I installed pure Arch, following the Installation Guide, and I could configure PRIME to choose between both cards.

The way you configure prime should be the same as on arch since nothing special for graphics card, those configs could be adapted also.

Hybrid graphics mostly need blacklisting or setup like bumblebee/prime to work, if you do not have the option inside Bios/Firmware to use only one.

If you use amdgpu the xorg has to be something like this and if you use open source driver would be radeon?

/etc/X11/xorg.conf.d/20-amdgpu.conf

Section “Device”
Identifier “AMD”
Driver “amdgpu”
EndSection

https://wiki.archlinux.org/index.php/AMDGPU#Xorg_configuration
https://wiki.archlinux.org/index.php/PRIME

Sure, I’m trying to follow the steps on https://wiki.archlinux.org/index.php/PRIME, but it’s firrt step is to check the graphics cards with xrandr, but it only shows one of them.

Yes, I had to create this configuration, without it the system just load the Intel GPU. With this configuration, Xorg crash.

Here is some info. Read the Arch part. This is related to muxless/hybrid graphics Intel and AMD.

I followed until Step 3, when I found this:

# cat /sys/kernel/debug/vgaswitcheroo/switch 
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0

Is it because of it that xrandr --listproviders doesn’t show the Radeon card?

is in /etc/default/grub any information as example modesetting ?

just curius…( mayby ) thats from the intel side even its switched it should give the information properly

$ cat /etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=3"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT="true"
GRUB_DISABLE_SUBMENU=y

First off did you log in as root to run?
sudo su
cat /sys/kernel/debug/vgaswitcheroo/switch

What does this this show after also?

xrandr --listproviders

Yes, i’ve run as root and with sudo, same results.

Here some outputs:

$ cat /sys/kernel/debug/vgaswitcheroo/switch  
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynOff:0000:01:00.0
$ xrandr --listproviders                           
Providers: number : 1
Provider 0: id: 0x48 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 5 associated providers: 0 name:Intel
$ glxheads
glxheads: exercise multiple GLX connections (any key = exit)
Usage:
  glxheads xdisplayname ...
Example:
  glxheads :0 mars:0 venus:1
Name: :0
  Display:     0x55712782d1d0
  Window:      0x800002
  Context:     0x557127857770
  GL_VERSION:  3.0 Mesa 20.0.7
  GL_VENDOR:   Intel Open Source Technology Center
  GL_RENDERER: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2)
$ DRI_PRIME=1 glxheads
glxheads: exercise multiple GLX connections (any key = exit)
Usage:
  glxheads xdisplayname ...
Example:
  glxheads :0 mars:0 venus:1
Name: :0
  Display:     0x5632f0ba21d0
  Window:      0x800002
  Context:     0x5632f0bcc730
  GL_VERSION:  4.5 (Compatibility Profile) Mesa 20.0.7
  GL_VENDOR:   X.Org
  GL_RENDERER: AMD VERDE (DRM 2.50.0, 5.6.15-arch1-1, LLVM 10.0.0)

Same time with above

$ cat /sys/kernel/debug/vgaswitcheroo/switch                  
0:IGD:+:Pwr:0000:00:02.0
1:DIS: :DynPwr:0000:01:00.0

Can you not continue on and Enable prime/optimus dynamic switching. I guess you need another number?

What does inxi -FGz show?

Also which AMD driver do you have installed?

xf86-video-ati

or

xf86-video-amdgpu

and Intel

xf86-video-intel

xrandr --listproviders must see the Gpu naturally

I don’t have this hardware. I’m just going by what it says and i see it doesn’t show the AMD card which is an HD 7730M. So he might need to use the opensource xf86-video-ati? Not sure why it’s not showing.

@TADebastiani Did you check the Bios to make sure the discrete graphics is enabled?