Not booting due to Xorg being messed up after replacing Nvidia GPU with AMD GPU

So I just upgraded my PC from a NVIDIA RTX 3060 12GB to an AMD RX 7800XT and when I try to boot, after showing running hook [plymouth] for a while, it says: “failed to start load/save rf kill switch status.” I went into tty and startx showed this error. Clearly, Xorg still thinks I am using NVIDIA, so how can I fix it or boot from Wayland, as I plan to use it from now on anyway?



Xorg log file:

[ 37.467]
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[ 37.467] Current Operating System: Linux PregonatorManjaro 6.6.52-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed Sep 18 21:00:34 UTC 2024 x86_64
[ 37.467] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64 root=UUID=98714da6-745c-4d1b-8351-74010758fd60 rw uiet splash acpi=force apm=power_off
[ 37.468]
[ 37.468] Current version of pixman: 0.43.4
[ 37.468] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 37.468] Markers: (–) probed, () from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 37.468] (==) Log file: “/home/davidtatu222/.local/share/xorg/Xorg.0.log”, Time: Mon Oct 14 18:05:25 2024
[ 37.468] (==) Using config file: “/etc/X11/xorg.conf”
[ 37.468] (==) Using config directory: “/etc/X11/xorg.conf.d”
[ 37.468] (==) Using system config directory “/usr/share/X11/xorg.conf.d”
[ 37.469] (==) ServerLayout “layout”
[ 37.469] (
) |–>Screen “Screen0” (0)
[ 37.469] () | |–>Monitor “Monitor0”
[ 37.469] (
) | |–>Device “Device0”
[ 37.469] () | |–>GPUDevice “Device0”
[ 37.469] (
) Allowing byte-swapped clients
[ 37.469] (==) Automatically adding devices
[ 37.469] (==) Automatically enabling devices
[ 37.469] (==) Automatically adding GPU devices
[ 37.469] (==) Automatically binding GPU devices
[ 37.469] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 37.469] (WW) The directory “/usr/share/fonts/OTF” does not exist.
[ 37.469] Entry deleted from font path.
[ 37.469] (WW) The directory “/usr/share/fonts/Type1” does not exist.
[ 37.469] Entry deleted from font path.
[ 37.469] (WW) The directory “/usr/share/fonts/100dpi” does not exist.
[ 37.469] Entry deleted from font path.
[ 37.469] (WW) The directory “/usr/share/fonts/75dpi” does not exist.
[ 37.469] Entry deleted from font path.
[ 37.469] (==) FontPath set to:
/usr/share/fonts/misc,
/usr/share/fonts/TTF
[ 37.469] (==) ModulePath set to “/usr/lib/xorg/modules”
[ 37.469] (**) Extension “COMPOSITE” is enabled
[ 37.469] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 37.469] (II) Module ABI versions:
[ 37.469] X.Org ANSI C Emulation: 0.4
[ 37.469] X.Org Video Driver: 25.2
[ 37.469] X.Org XInput driver : 24.4
[ 37.469] X.Org Server Extension : 10.0
[ 37.470] (++) using VT number 2
[ 37.470] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_31
[ 37.472] (II) xfree86: Adding drm device (/dev/dri/card1)
[ 37.472] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/drm/card1
[ 37.472] (II) systemd-logind: got fd for /dev/dri/card1 226:1 fd 13 paused 0
[ 37.474] (–) PCI:*(3@0:0:0) 1002:747e:1458:2413 rev 200, Mem @ 0x4000000000/17179869184, 0x4400000000/268435456, 0x84a00000/1048576, I/O @ 0x00004000/256, BIOS @ 0x???/131072
[ 37.474] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
[ 37.474] (II) LoadModule: “glx”
[ 37.474] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 37.475] (II) Module glx: vendor=“X.Org Foundation”
[ 37.475] compiled for 1.21.1.13, module version = 1.0.0
[ 37.475] ABI class: X.Org Server Extension, version 10.0
[ 37.475] (II) LoadModule: “nvidia”
[ 37.475] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
[ 37.476] (II) Module nvidia: vendor=“NVIDIA Corporation”
[ 37.476] compiled for 1.6.99.901, module version = 1.0.0
[ 37.476] Module class: X.Org Video Driver
[ 37.476] (II) NVIDIA dlloader X Driver 550.120 Fri Sep 13 10:03:17 UTC 2024
[ 37.476] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[ 37.476] (EE) No devices detected.
[ 37.476] (EE)
Fatal server error:
[ 37.476] (EE) no screens found(EE)
[ 37.476] (EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
[ 37.476] (EE) Please also check the log file at “/home/davidtatu222/.local/share/xorg/Xorg.0.log” for additional information.
[ 37.476] (EE)
[ 37.509] (EE) Server terminated with error (1). Closing log file.

Please post the output of each of the following commands:

cat /etc/mkinitcpio.conf
cat /etc/default/grub
sudo blkid

Please, use the </> button and not the quotes

[manjaro /]# 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=(usbhid xhci_hcd)
MODULES=()

# 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 modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect kms modconf block keyboard keymap consolefont plymouth filesystems fsck)

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

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

# MODULES_DECOMPRESS
# Decompress kernel modules during initramfs creation.
# Enable to speedup boot process, disable to save RAM
# during early userspace. Switch (yes/no).
#MODULES_DECOMPRESS="yes"



[manjaro /]# cat /etc/default/grub
# GRUB boot loader configuration

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Manjaro"
GRUB_CMDLINE_LINUX_DEFAULT="uiet splash acpi=force apm=power_off"
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 'menu' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=hidden

# 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 'videoinfo'
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-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/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

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true



[manjaro /]# sudo blkid
/dev/loop1: BLOCK_SIZE="262144" TYPE="squashfs"
/dev/nvme0n1p1: UUID="7100-FB0E" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="b9bd77c0-ba4d-450b-baba-760de45e0b5e"
/dev/nvme0n1p2: UUID="98714da6-745c-4d1b-8351-74010758fd60" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="root" PARTUUID="ccb3b256-4d92-4a27-b8f7-78a54420818f"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="VTOYEFI" LABEL="VTOYEFI" UUID="223C-F3F8" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="7dd88526-02"
/dev/sdb1: LABEL="Ventoy" UUID="2273-72E3" BLOCK_SIZE="512" TYPE="exfat" PARTUUID="7dd88526-01"
/dev/nvme2n1p1: LABEL="M.2 2242 250GB SSD" UUID="c28f14b0-d276-4353-8251-177b9b3cc2ea" UUID_SUB="14e0520d-23c6-4cd7-9489-888bcb3a2f96" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="f67f5775-6645-40b7-ab81-1825403dff1f"
/dev/loop2: BLOCK_SIZE="262144" TYPE="squashfs"
/dev/loop0: BLOCK_SIZE="262144" TYPE="squashfs"
/dev/mapper/ventoy: BLOCK_SIZE="2048" UUID="2024-08-12-11-23-35-00" LABEL="MANJARO_KDE_2406" TYPE="iso9660" PTTYPE="dos"
/dev/sdc: SEC_TYPE="msdos" LABEL_FATBOOT="DAPLINK-DND" LABEL="MICROBIT" UUID="2702-1974" BLOCK_SIZE="512" TYPE="vfat"
/dev/nvme1n1p2: BLOCK_SIZE="512" UUID="46EE6961EE694A6F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="5e202d3c-1e15-4a02-b9ad-05264211821a"
/dev/nvme1n1p1: PARTLABEL="Microsoft reserved partition" PARTUUID="7e3719f9-73db-47f3-bc4f-afd21c50e2e5"
/dev/sda1: LABEL="250GB SATA SSD" UUID="35754368-500b-4cf4-b7fa-6803a9787866" UUID_SUB="e6375b73-5029-40fa-b17c-8c80a29c0a55" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="fab3e4f7-3ae3-4e1f-85cc-9088d7fc0c14"
/dev/loop3: BLOCK_SIZE="262144" TYPE="squashfs"