Author Topic: Unable to boot using AMD graphics  (Read 973 times)

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Unable to boot using AMD graphics
« on: Thu Jul 28 05:54:43 2022 »
Unable to boot the Enlightenment iso as I think I  need amd firmware to load before graphics driver?

I have a tower (desk case) that runs AMD CPU known as an APU which supplies the graphics. I have no onboard graphics nor a discrete graphics card.

I notice packages has no mention of amdgpu

Checking the firmware aspect we have 
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/LICENSE.amdgpu

this appears to be distributable and "should be" but unable to verify ---included with linux-firmware which is already in packages.

2) packages shows we have linux-firmware and xorg-xf86-video-amdgpu which should work but all I see is garbled graphics on bootup.

Any clues what to try?

3) the graphics driver for amdgpu may be the issue?
https://www.amd.com/en/support/linux-eula

but I am not a lawyer.....

this is what I have on another distro

Code: [Select]
pinxi -Gxxx
Graphics:
  Device-1: AMD Picasso/Raven 2 [Radeon Vega Series / Radeon Mobile Series]
    driver: amdgpu v: kernel arch: GCN 5 pcie: speed: 8 GT/s lanes: 16 ports:
    active: HDMI-A-1 empty: DVI-D-1,HDMI-A-2 bus-ID: 26:00.0
    chip-ID: 1002:15d8 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting alternate: vesa gpu: amdgpu display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 model: LG (GoldStar) FULL HD
    res: 1920x1080 hz: 60 dpi: 102 size: 480x270mm (18.9x10.63")
    diag: 551mm (21.7") modes: max: 1920x1080 min: 720x400
  OpenGL: renderer: AMD Radeon Vega 8 Graphics (raven LLVM 14.0.4 DRM 3.46
  5.18.0-12.2-liquorix-amd64)
    v: 4.6 Mesa 22.0.5 direct render: Yes

Code: [Select]
find /lib/modules -name amdgpu.ko
/lib/modules/5.17.0-12.1-liquorix-amd64/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko
/lib/modules/5.18.0-12.2-liquorix-amd64/kernel/drivers/gpu/drm/amd/amdgpu/amdgpu.ko

thanks for reading


Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 649
  • Karma: +12/-0
  • Gender: Male
    • NuTyX distribution
Re: Unable to boot using AMD graphics
« Reply #1 on: Thu Jul 28 07:37:03 2022 »
Hello  aus9

Welcome to NuTyX forums.

Thanks a lot for your effort. Appreciate.
You have a very interesting case to fix here, hope we manage.

May I ask you to test following ISO: https://sourceforge.net/projects/nutyx/files/NuTyX_x86_64-22.07.0-BASE.iso

It will be a basic NuTyX. Then you could check what's missing as firmware via the command:
Code: [Select]
sudo dmesg
As general info, under NuTyX all the kernel modules are compressed now, you can use the command:
Code: [Select]
find /lib/modules -name amdgpu.ko*to find the amdgpu.ko.xz module


Good luck and thanks for trying NuTyX


BR,
Thierry

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #2 on: Thu Jul 28 07:38:35 2022 »
Thierry
as I was about to post....saw your reply but hope reply offers more hope

hmmm downloaded the openbox had better success.

I suggest you amend bootloader to show something like

Press TAB key to edit boot menu

2) Openbox changed to ....delete quiet,  edit vga=ask  (on start....I chose f for a fair font size on a 22 inch monitor)

I tried and failed to use nomodeset.

3) typing on it now.

Code: [Select]
pinxi -Gxxx
Graphics:
  Message: No PCI device data found.
  Display: server: X.org v: 1.21.1.4 driver: X: loaded: N/A
    unloaded: fbdev,modesetting,radeon failed: vesa gpu: N/A display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1280x960 s-size: <missing: xdpyinfo>
  Monitor-1: default res: 1280x960 hz: 77 size: N/A modes: N/A
  Message: Unable to show GL data. Required tool glxinfo missing.

4) still some issues
Code: [Select]
dmesg | grep amdgpu
[   27.279039] [drm] amdgpu kernel modesetting enabled.
[   27.454412] amdgpu: Topology: Add APU node [0x0:0x0]
[   27.568043] amdgpu 0000:26:00.0: amdgpu: SME is not compatible with RAVEN
[   27.681404] amdgpu: probe of 0000:26:00.0 failed with error -524

firmware is there as expected
Code: [Select]
ls /lib/firmware/amdgpu | grep pic
picasso_asd.bin
picasso_ce.bin
picasso_gpu_info.bin
picasso_me.bin
picasso_mec.bin
picasso_mec2.bin
picasso_pfp.bin
picasso_rlc.bin
picasso_rlc_am4.bin
picasso_sdma.bin
picasso_ta.bin
picasso_vcn.bin

I am not sure if I can post my full Xorg log?



Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 649
  • Karma: +12/-0
  • Gender: Male
    • NuTyX distribution
Re: Unable to boot using AMD graphics
« Reply #3 on: Thu Jul 28 07:43:50 2022 »
Yes no issue, what's even beter is to use the command:

Code: [Select]
cat /var/log/Xorg.0.log|paste-nutyx
and put the link here.

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #4 on: Thu Jul 28 07:53:21 2022 »
thanks for quick reply

http://ix.io/45TK


Incidently,
Code: [Select]
lsmod | grep amd                                                                                       [17:43 x86_64 5.18.14-NuTyX gor@gor]
amdgpu              13357056  0                                                                                         [17:46 x86_64 5.18.14-NuTyX root@gor]
edac_mce_amd           49152  0
iommu_v2               32768  1 amdgpu                                                                                  [17:46 x86_64 5.18.14-NuTyX root@gor]
gpu_sched              77824  1 amdgpu
i2c_algo_bit           24576  1 amdgpu
drm_ttm_helper         16384  1 amdgpu
ttm                   139264  2 amdgpu,drm_ttm_helper
drm_dp_helper         237568  1 amdgpu
drm_kms_helper        327680  2 amdgpu,drm_dp_helper
drm                  1060864  6 amdgpu,gpu_sched,drm_ttm_helper,ttm,drm_dp_helper,drm_kms_helper
pinctrl_amd            45056  0
gpio_amdpt             20480  0                                                                                         [17:46 x86_64 5.18.14-NuTyX root@gor]
gor [ /var/log ]$ pinxi -Gxxx
Graphics:
  Message: No PCI device data found.
  Display: server: X.org v: 1.21.1.4 driver: X: loaded: N/A                                                             [17:46 x86_64 5.18.14-NuTyX root@gor]
    unloaded: fbdev,modesetting,radeon failed: vesa gpu: N/A display-ID: :0

so the kernel module is loaded....but not quite working according to pinxi.

yet to study Xorg log

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #5 on: Thu Jul 28 08:07:43 2022 »
lspci or lspci -vvv gives me only numbers?

anyhow I have a match to other distro output pinxi
Quote
chip-ID: 1002:15d8
to dmesg snippet
Quote
amdgpu: probe of 0000:26:00.0 failed with error -524

Code: [Select]
lspci SNIP
26:00.0 Class 0300: 1002:15d8

Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 649
  • Karma: +12/-0
  • Gender: Male
    • NuTyX distribution
Re: Unable to boot using AMD graphics
« Reply #6 on: Thu Jul 28 08:09:47 2022 »
Maybe (many thanks to Spiky for that):
Code: [Select]
sudo dmesg|paste-nutyx

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #7 on: Thu Jul 28 08:24:03 2022 »
we can rule out missing amd ids
Code: [Select]
cat /usr/share/libdrm/amdgpu.ids | grep 15D8 | grep "Vega 3"
15D8, C4, AMD Radeon Vega 3 Graphics
15D8, C5, AMD Radeon Vega 3 Graphics
15D8, CC, AMD Radeon Vega 3 Graphics
15D8, CE, AMD Radeon Vega 3 Graphics
15D8, CF, AMD Radeon Vega 3 Graphics
15D8, D4, AMD Radeon Vega 3 Graphics
15D8, DC, AMD Radeon Vega 3 Graphics
15D8, DD, AMD Radeon Vega 3 Graphics
15D8, DE, AMD Radeon Vega 3 Graphics
15D8, DF, AMD Radeon Vega 3 Graphics
15D8, E3, AMD Radeon Vega 3 Graphics
15D8, E4, AMD Radeon Vega 3 Graphics

dmesg|paste-nutyx
http://ix.io/45U1

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #8 on: Thu Jul 28 08:33:04 2022 »
I may have found something regarding the error msg
 SME is not compatible with RAVEN

https://lists.freedesktop.org/archives/amd-gfx/2021-October/069868.html

Quote
and the AMDGPU graphics driver, despite being loaded, does not work, and the framebuffer driver
is used instead.

our config file shows
CONFIG_AMD_MEM_ENCRYPT=y
CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #9 on: Thu Jul 28 08:49:43 2022 »
going to reboot to try bootcode
Quote
mem_encrypt=off

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #10 on: Thu Jul 28 09:07:31 2022 »
OK with that bootcode....vga=ask and no quiet.....things have changed.....change is good  ;D

Before change we had
pinxi -Gxxx
Graphics:
  Message: No PCI device data found.
  Display: server: X.org v: 1.21.1.4 driver: X: loaded: N/A
    unloaded: fbdev,modesetting,radeon failed: vesa gpu: N/A display-ID: :0
    screens: 1
  SNIP

Now I have modesetting driver
]pinxi -Gxxx
Graphics:
  Message: No device data found.
  Display: server: X.org v: 1.21.1.4 driver: X: loaded: modesetting
    unloaded: fbdev failed: vesa alternate: amdgpu gpu: N/A display-ID: :0
    screens: 1
  .

amdgpu has "improved"

Code: [Select]
dmesg | grep amdgpu                               [18:55 x86_64 5.18.14-NuTyX root@gor]
[   26.381957] [drm] amdgpu kernel modesetting enabled.
[   26.501434] amdgpu: Topology: Add APU node [0x0:0x0]
[   26.812217] amdgpu 0000:26:00.0: vgaarb: deactivate vga console
[   26.812352] amdgpu 0000:26:00.0: amdgpu: Trusted Memory Zone (TMZ) feature enabled
[   26.840327] amdgpu 0000:26:00.0: amdgpu: Fetched VBIOS from ROM BAR
[   26.840332] amdgpu: ATOM BIOS: 113-PICASSO-118
[   26.840625] amdgpu 0000:26:00.0: amdgpu: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[   26.840630] amdgpu 0000:26:00.0: amdgpu: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[   26.840634] amdgpu 0000:26:00.0: amdgpu: AGP: 267419648M 0x000000F800000000 - 0x0000FFFFFFFFFFFF
[   26.840674] [drm] amdgpu: 2048M of VRAM memory ready
[   26.840677] [drm] amdgpu: 3072M of GTT memory ready.
[   26.848056] amdgpu 0000:26:00.0: amdgpu: PSP runtime database doesn't exist
[   26.848090] amdgpu: hwmgr_sw_init smu backed is smu10_smu
[   26.858837] amdgpu 0000:26:00.0: amdgpu: Will use PSP to load VCN firmware
[   26.948864] amdgpu 0000:26:00.0: amdgpu: RAS: optional ras ta ucode is not available
[   26.953866] amdgpu 0000:26:00.0: amdgpu: RAP: optional rap ta ucode is not available
[   26.991158] snd_hda_intel 0000:26:00.1: bound 0000:26:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[   27.034311] kfd kfd: amdgpu: Allocated 3969056 bytes on gart
[   27.062555] amdgpu: HMM registered 2048MB device memory
[   27.062635] amdgpu: Topology: Add APU node [0x15d8:0x1002]
[   27.062642] kfd kfd: amdgpu: added device 1002:15d8
[   27.062871] amdgpu 0000:26:00.0: amdgpu: SE 1, SH per SE 1, CU per SH 11, active_cu_number 8
[   27.062986] amdgpu 0000:26:00.0: amdgpu: ring gfx uses VM inv eng 0 on hub 0
[   27.062991] amdgpu 0000:26:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[   27.062995] amdgpu 0000:26:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[   27.062999] amdgpu 0000:26:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 5 on hub 0
[   27.063003] amdgpu 0000:26:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 6 on hub 0
[   27.063007] amdgpu 0000:26:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[   27.063011] amdgpu 0000:26:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[   27.063015] amdgpu 0000:26:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 9 on hub 0
[   27.063018] amdgpu 0000:26:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 10 on hub 0
[   27.063022] amdgpu 0000:26:00.0: amdgpu: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
[   27.063026] amdgpu 0000:26:00.0: amdgpu: ring sdma0 uses VM inv eng 0 on hub 1
[   27.063030] amdgpu 0000:26:00.0: amdgpu: ring vcn_dec uses VM inv eng 1 on hub 1
[   27.063034] amdgpu 0000:26:00.0: amdgpu: ring vcn_enc0 uses VM inv eng 4 on hub 1
[   27.063038] amdgpu 0000:26:00.0: amdgpu: ring vcn_enc1 uses VM inv eng 5 on hub 1
[   27.063041] amdgpu 0000:26:00.0: amdgpu: ring jpeg_dec uses VM inv eng 6 on hub 1
[   27.069934] [drm] Initialized amdgpu 3.46.0 20150101 for 0000:26:00.0 on minor 0
[   27.073617] fbcon: amdgpudrmfb (fb0) is primary device
[   27.121729] amdgpu 0000:26:00.0: [drm] fb0: amdgpudrmfb frame buffer device

suggest we mark this as solved.

As I appear to be the only with an APU, I will in the next few days remaster the openbox iso to
A) change my bootcodes
B) Maybe add some stuff like alsa-utils binutils and so on

I am not yet ready to think of installing....so do not use a virtual machine.

Thanks for reading



Thierry

  • Administrator
  • Hero Member
  • *****
  • Posts: 649
  • Karma: +12/-0
  • Gender: Male
    • NuTyX distribution
Re: Unable to boot using AMD graphics
« Reply #11 on: Thu Jul 28 09:42:33 2022 »
Nice job.

Many thanks for yours inputs.

BR,
Thierry


aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #12 on: Fri Jul 29 01:32:37 2022 »
the kernel module tricked me....

Openbox iso does not have the amdgpu video driver installed.

I had to, using root powers
Code: [Select]
cards install xorg-xf86-video-amdgpu
  xorg-xf86-video-amdgpu 22.0.0-1   59.64 KB (73.16 KB/s) 100 % - 0 s
Retrieve info about the 435 packages: 100 %
   ADD: (gui) xorg-xf86-video-amdgpu 22.0.0-1, 10 files: 100 %[11:12 x86_64 5.18.14-NuTyX root@gor]
post-install: start
  /sbin/ldconfig -r /
post-install: finish

this conflicts with package list that claims that
 xorg-xf86-video-amdgpu 22.0.0   is installed.
ref
https://distrowatch.com/table.php?distribution=nutyx&pkglist=true&version=22.07.0#pkglist

I do not enough about cards or this distro.....as to what packages to what distro desktop were listed at distrowatch.

My fault for not checking....and this will resolve, hopefully if I do an install and then reboot to check
« Last Edit: Fri Jul 29 01:36:48 2022 by aus9 »

aus9

  • Newbie
  • *
  • Posts: 32
  • Karma: +0/-0
Re: Unable to boot using AMD graphics
« Reply #13 on: Fri Jul 29 04:11:27 2022 »
installed into a spare partition and currently using a chainloader to get to grub menu

I have done something wrong as it then hanged with a msg of respawn after 5 minutes ....I waited and it repeated.

So I booted into other distro -> chroot and commented out the line in /etc/inittab for the xdm-nutyx
I also installed via chroot a number of packages including the amdgpu video driver and lightdm, as I am used to lightdm and not lxdm

but on reboot...only gave me a console prompt. I have to relearn sysV!

anyhow started lightdm and we have success

Code: [Select]
uname -r                                                                                          [13:54 x86_64 5.18.14-NuTyX gor@gor]
5.18.14-NuTyX
gor [ ~ ]$ pinxi -Gxxx
Graphics:
  Message: No device data found.
  Display: server: X.org v: 1.21.1.4 driver: X: loaded: amdgpu
    unloaded: modesetting failed: vesa alternate: fbdev gpu: N/A display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-size: <missing: xdpyinfo>
  Monitor-1: HDMI-A-0 res: 1920x1080 hz: 60 dpi: 102
    size: 480x270mm (18.9x10.63") diag: 551mm (21.68") modes: N/A
  Message: Unable to show GL data. Required tool glxinfo missing.

EDIT this is a grub2 entry installed into the PBR of sda3, I will modify it to make it explicit now.
I actually use another distro with grub2 in MBR chainloading to NuTyx

grub2 menu now reads
Quote
menuentry "NuTyX Quiet" {
  set root=(hd0,msdos3)
   linux /boot/kernel-stable root=/dev/sda3 ro quiet mem_encrypt=off
   initrd /boot/initrd-stable
}

EDIT
A simple edit of /etc/inittab and reboot gave me lightdm
Quote
x:5:respawn:/usr/bin/lightdm
« Last Edit: Sat Jul 30 04:50:04 2022 by aus9 »