Startx, lightdm not working after changing pc

Hello, I bought a new PC. My old PC had 2 hdd with windows and majaro on separate hard drives. This one has ssd with windows and I transferred the 2 hdd to it. I can access ssd windows just fine and use my old windows hdd files. When I boot into hdd with manjaro I don’t get a desktop environment, just a black screen with a blinking cursor. I can access command line with ctrl+alt+f2.

I tried all sorts of things from this forum, but I just made the situation worse. One thing that I did was to upgrade linux kernel from linux513 to linux515. Then when I boot into linux515 the exact same thing happens, but now it just hangs on black cursor screen and I can’t even access command line. Luckily the kernel upgrade left the old kernel selection in grub, so I can get back to that kernel and command line.
Everything was up to date in terms of packages in my manjaro, also my old pc had amd cpu, gpu and the new one also has adm gpu, cpu. So I don’t think it’s a driver issue and I know they were up to date as well as the whole system because I installed updates regularly with pacman -Syu.
But still I tried this from one of the forums solutions:

sudo pacman-mirrors -f3
sudo pacman -Syyu

Now when I boot into my linux513 I get failed to mount and emergency mode… Don’t know what to do now, I think there is no internet in emergency mode so I can’t upgrade/downgrade to restore things.

journalctl returns a lot of output I wanted to post a picture, because I don’t know how else I could show it, but seems like I’m not allowed to post pictures, because I’m a new user…
I get An error occurred: Sorry, you can’t embed media items in a post.
It seems I can’t even share google drive link… How am I supposed to show my logs and info ?

I’m in way over my head here please help me return to my manjaro system…

Can you boot with the fallback initrd ?
If this does not work, boot the Manjaro USB stick and rebuild the initrd.

Can you boot with the fallback initrd ?

I’m not sure what that means, but in my grub selection I can also boot into 513,515 kernels for fallback initramfs, but I get the same thing as with non fallback. Not sure is this what you asked.

If this does not work, boot the Manjaro USB stick and rebuild the initrd.

Okey, I’m preparing USB stick right now, is there a step by step guide on how to rebuild the initrd ? That won’t delete my home dir files ?

I booted Manjaro USB stick and ran sudo mkinitcpio -P in terminal which I think rebuilds the initrd ?
It said successful, but I still can’t boot into my old manjaro hdd. Same problem occurs.

I edited my fstab file in maintenance mode, specifically commented the first file system that tried booting into empty boot/efi and had vfat, which I think was not there previously. This line was only added after I did the force update with new mirrors I think. Now I’m back where it boots to my 513 kernel and I get flashing cursor black screen and can access terminal.

If I try to run startx, now it gives me a different error than previously and says to check a different log file than previously.
Now it says to check /var/log/Xorg.0.log which contains errors:

open /dev/dri/card0: No such file or folder
screen 0 deleted because of no matching config selection
device detected, but none match those in config file.
no screens found (EE)

Previously it said to check ~/.local/share/xorg/Xorg.0.log that had these errors:

AMDGPU(0): [drm] Failed to open DRM device for pci:0000:01:00:0 invalid argument
AMDGPU(1): [drm] Failed to open DRM device for pci:0000:02:00:0 invalid argument
AMDGPU(2): [drm] device is not DRM master
AMDGPU(3): [drm] Failed to open DRM device for pci:0000:03:00:1 invalid argument
AMDGPU(4): [drm] Failed to open DRM device for pci:0000:11:00:0 invalid argument
AMDGPU(5): [drm] Failed to open DRM device for pci:0000:11:00:1 invalid argument

This is the problem: the config for the new hardware is missing.
I don´t know how to solve this.

Looks to me that you try to start X without specifying a desktop session.

So you run it like this?

startx /usr/bin/xfce-session

Of course, when you use XFCE as Desktop Environment.

Yes my Desktop Environment is XFCE.
Unfortunately there is no difference if I run



startx /usr/bin/xfce4-session

still get the same error.

ok I read again carefully:

By “transferring” you mean that you cloned it?

That let me think, that you didn’t upgrade your system for a long time. linux513 is EOL for a very long time. Stable kernel don’t last long, only LTS kernel.

That let me think, that you didn’t upgrade the kernel with the mhwd tools, but just with the package manager. Grub was no updated.

:notebook: Please educate yourself what these commands do. Just running random or recommend commands will not help you.

So in fact, you can only boot in emergency mode. No wonder that startx doesn’t work. Emergency mode operates on the ram disk and not on the file system. Most likely the kernel image stayed, but kernel stuff was removed, therefore it can to switch to the real root.

Booting with kernel 5.15 works at least partially.

A picture of the journal? No thanks. Even if you can post pictures, please only if that is a GUI or you have no other method. If you have internet connection when booting with kernel 5.15 and switching the TTY, then please run it like this:

journalctl --boot 0 | curl -F'file=@-'


cat /var/log/Xorg.0.log | curl -F'file=@-'

That will pipe (see dash |) the output of the command to curl, which will upload the text to and print a short link on the screen.

Write down the links here. Post them with preformatted text (code block), to work around your TL0 abilities.

And again: You are new, so you own Trustlevel 0 (TL0). Spend some time here to reach TL1 and you will be able to post pictures and links.

Assuming you are using an AMD gpu as in your profile…
Lightdm sometimes needs to have the amdgpu module loaded in mkinitcpio:

boot back into OS and get to the terminal, even safe mode should be fine.


sudo nano /etc/mkinitcpio.conf

down at about line 7 is the modules line, make sure that amdgpu is in between the quotes:


Note, if you have more the one entry in the modules section, just separate them with spaces.

Then rebuild with:

sudo mkinitcpio -P

And reboot