Switch from NVIDIA GPU to AMD RADEON - Wayland

Hi, always me. :sweat_smile:

While checking at garuda-inxzi I noticed a weird thing

Complete:

System:
  Kernel: 5.16.14-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=14d91570-f762-4106-889d-9a851d6dc02c rw [email protected]
    quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
    systemd.unified_cgroup_hierarchy=1
    resume=UUID=f1d4967a-02c4-4be4-be76-96ec8d6adaf1 loglevel=3
  Desktop: GNOME 41.4 tk: GTK 3.24.33 wm: gnome-shell dm: GDM 41.3
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: PRIME Z690-A v: Rev 1.xx
    serial: <superuser required> UEFI: American Megatrends v: 1304
    date: 03/07/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: Discharging
CPU:
  Info: model: 12th Gen Intel Core i9-12900K bits: 64 type: MST AMCP
    arch: Alder Lake family: 6 model-id: 0x97 (151) stepping: 2 microcode: 0x18
  Topology: cpus: 1x cores: 16 mt: 8 tpc: 2 st: 8 threads: 24 smt: enabled
    cache: L1: 1.4 MiB desc: d-8x32 KiB, 8x48 KiB; i-8x32 KiB, 8x64 KiB
    L2: 14 MiB desc: 8x1.2 MiB, 2x2 MiB L3: 30 MiB desc: 1x30 MiB
  Speed (MHz): avg: 4470 high: 4921 min/max: 800/5200:3900 scaling:
    driver: intel_pstate governor: performance cores: 1: 4900 2: 4900 3: 4900
    4: 4900 5: 4833 6: 4900 7: 4900 8: 4921 9: 4900 10: 4900 11: 4900
    12: 4900 13: 4900 14: 4900 15: 4229 16: 4900 17: 3701 18: 3697 19: 3697
    20: 3706 21: 3699 22: 3704 23: 3699 24: 3706 bogomips: 152985
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Enhanced IBRS, IBPB: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 24 [Radeon RX 6400 / 6500 XT] vendor: Sapphire PULSE
    driver: amdgpu v: kernel ports: active: DP-1 empty: HDMI-A-1
    bus-ID: 0000:03:00.0 chip-ID: 1002:743f class-ID: 0300
  Device-2: Generalplus GENERAL WEBCAM type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-2.2:6 chip-ID: 1b3f:2247
    class-ID: 0102 serial: <filter>
  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.0
    compositor: gnome-shell driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: amdgpu display-ID: 0
  Monitor-1: DP-1 model: MSI MAG272CQR serial: <filter> built: 2020
    res: 2560x1440 dpi: 109 gamma: 1.2 size: 598x336mm (23.5x13.2")
    diag: 686mm (27") ratio: 16:9 modes: max: 2560x1440 min: 720x400
  OpenGL:
    renderer: AMD BEIGE_GOBY (DRM 3.44.0 5.16.14-zen1-1-zen LLVM 13.0.1)
    v: 4.6 Mesa 21.3.7 direct render: Yes
Audio:
  Device-1: Intel Alder Lake-S HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel alternate: snd_sof_pci_intel_tgl bus-ID: 0000:00:1f.3
    chip-ID: 8086:7ad0 class-ID: 0403
  Device-2: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT]
    driver: snd_hda_intel v: kernel bus-ID: 0000:03:00.1 chip-ID: 1002:ab28
    class-ID: 0403
  Device-3: Generalplus GENERAL WEBCAM type: USB
    driver: snd-usb-audio,uvcvideo bus-ID: 1-2.2:6 chip-ID: 1b3f:2247
    class-ID: 0102 serial: <filter>
  Device-4: Sennheiser USB-ED 01 type: USB
    driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-7:5 chip-ID: 1395:003c
    class-ID: 0300 serial: <filter>
  Sound Server-1: ALSA v: k5.16.14-zen1-1-zen running: yes
  Sound Server-2: PulseAudio v: 15.0 running: no
  Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
  Device-1: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel
    port: N/A bus-ID: 0000:07:00.0 chip-ID: 8086:15f3 class-ID: 0200
  IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: docker0 state: up speed: 10000 Mbps duplex: unknown
    mac: <filter>
  IF-ID-2: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A
  IF-ID-3: vethf7c1fc9 state: up speed: 10000 Mbps duplex: full
    mac: <filter>
RAID:
  Hardware-1: Intel Volume Management Device NVMe RAID Controller driver: vmd
    v: 0.6 port: N/A bus-ID: 0000:00:0e.0 chip-ID: 8086:467f rev:
    class-ID: 0104
Drives:
  Local Storage: total: 4.56 TiB used: 2.89 TiB (63.4%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Crucial model: CT1000P1SSD8
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: P3CR013
    temp: 30.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Western Digital
    model: WD40EFAX-68JH4N0 size: 3.64 TiB block-size: physical: 4096 B
    logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A82 scheme: GPT
  ID-3: /dev/sdb maj-min: 8:16 type: USB vendor: SanDisk model: Cruzer Edge
    size: 14.66 GiB block-size: physical: 512 B logical: 512 B type: N/A
    serial: <filter> rev: 1.27 scheme: MBR
Partition:
  ID-1: / raw-size: 896.84 GiB size: 896.84 GiB (100.00%)
    used: 215.66 GiB (24.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 576 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  ID-3: /home raw-size: 896.84 GiB size: 896.84 GiB (100.00%)
    used: 215.66 GiB (24.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-4: /var/log raw-size: 896.84 GiB size: 896.84 GiB (100.00%)
    used: 215.66 GiB (24.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
  ID-5: /var/tmp raw-size: 896.84 GiB size: 896.84 GiB (100.00%)
    used: 215.66 GiB (24.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 34.38 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
  ID-2: swap-2 type: zram size: 31.1 GiB used: 4.2 MiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 27.8 C mobo: N/A gpu: amdgpu temp: 39.0 C
    mem: 38.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 0
Info:
  Processes: 515 Uptime: 57m wakeups: 14 Memory: 31.1 GiB
  used: 12.52 GiB (40.3%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1425 lib: 452 Shell: fish
  v: 3.3.1 default: Bash v: 5.1.16 running-in: gnome-terminal inxi: 3.3.13
Garuda (2.5.6-2):
  System install date:     2021-11-03
  Last full system update: 2022-03-16
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       No/Undetected
  Snapshots:               Snapper
  Failed units:  

The thing that triggered me:

  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.0
    compositor: gnome-shell driver: X: loaded: nvidia unloaded: modesetting
    alternate: fbdev,nouveau,nv,vesa gpu: amdgpu display-ID: 0

How can it be possible that the nvidia driver is still getting the loaded status since i completely removed from the system ?!

Thanks :anatomical_heart:

1 Like

Garuda uses the Zen kernel and DKMS drivers for nvidia. DKMS packages are not modules themselves but when combined with the headers of the installed kernel, they can generate modules to be used with any installed kernel. These modules have to be updated with each kernel and driver uodate. When you uninstall nvidia-dkms, the module files remain. If you really want to get rid of them, wait for next kernel update or try
sudo dkms uninstall nvidia
The syntax might be wrong because I don't exactly know it :grin:

1 Like

thanks for the reply Victory,

the command is not giving me anything since dkms modules from nvidia doesnt exists anymore.

 ╰─λ dkms status
vboxhost/6.1.32_OSE, 5.16.15-zen1-1-zen, x86_64: installed

also, /var/lib/mhwd/db/pci, now is clean and the nvidia files were totally removed.

Did you add the nvidia modules to your initramfs (via /etc/mkinitcpio.conf)?

cat /etc/mkinitcpio.conf

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau)
MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau)

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap consolefont plymouth resume filesystems"

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used. Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

this morning I saw that in the field 'MODULES' was present something related to nvidia, but now it is gone :melting_face:

Hmm. Try rebuilding the initramfs and reboot and see if that makes the module disappear:

sudo mkinitcpio -P

Having it in the initramfs just has the kernel load the module, it doesn't actually activate it. :thinking: So, maybe inxi is getting confused about the module being loaded?

sudo mkinitcpio -P

==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'default'
  -> -k /boot/vmlinuz-linux-zen -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-zen.img
==> Starting build: 5.16.15-zen1-1-zen
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
  -> Running build hook: [plymouth]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-zen.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux-zen.preset: 'fallback'
  -> -k /boot/vmlinuz-linux-zen -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-zen-fallback.img -S autodetect
==> Starting build: 5.16.15-zen1-1-zen
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
  -> Running build hook: [plymouth]
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-zen-fallback.img
==> Image generation successful

then i rebooted; inxi always with X: loaded: nvidia;

are the MODULES=(crc32c-intel intel_agp i915 amdgpu radeon nouveau) I have correct , right?

two ideas:

  • what if it is just an inxi false check?
  • can it be related to X ?

if so, how could i check the two ?!

Hmm. Just to make sure, what's the output of

lsmod | grep nvidia

?

 ╰─λ lsmod | grep amdgpu
amdgpu               9244672  20
gpu_sched              53248  1 amdgpu
drm_ttm_helper         16384  3 amdgpu,radeon,nouveau
ttm                    90112  5 amdgpu,radeon,drm_ttm_helper,i915,nouveau

i really appreciate your help/interest =)

@jonathon

EDIT:

 ╰─λ lsmod | grep nvidia

no output!

Sorry, so tired.

:person_facepalming: :stuck_out_tongue_winking_eye:

1 Like

This is a corner case I believe, clearly the Xorg.0.log file that inxi is reading to get the loaded/unloaded X driver list is not updating on reboot, which is unusual.

Alternately, the log file location that xorg actually updates might be different than the one inxi is trying to read, though inxi does look through all known locations and selects the most recently modified one if I remember right.

The sequence inxi goes through is to check the log file for load events, failed events, and unload events, and to update each driver status as it goes down the log file.

You can determine which issue is happening by: updatedb
then: locate Xorg.0.log

then seeing which paths are listed. It's possible that Xorg is simply not starting at all, that's my guess, which means the log rotate is not happening, though I'm not fully up on wayland stuff, the new wayland support in inxi was only introduced in 3.3.13, so it's very fresh and will encounter some issues.

the giveaway here is that the driver being used by the monitor port is amdgpu, but the xorg drivers are listing driver from the nvidia device, so that suggests that simply because it's wayland, xorg itself is not starting, though it's installed. A 'true' wayland would not have xorg installed, only xwayland, but I do not know what happens with xwayland and the Xorg.0.log file being updated, I just don't have enough data from wayland yet to determine every scenario.

One step at a time. But I can say, if gpu: lists a driver for one graphics device, and x lists drivers from another, then the x driver will be wrong, as you can see in this scenario.

But it is an interesting example.

[note, I'm the inxi author, was just checking to see how the new graphics full refactor is doing before releasing the fixes for 3.3.14, which are mostly ready to go, though we're trying to pin down some more monitor corner cases before releasing next inxi].

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.