AMD GPU causes black screen after starting game with it


I am using a laptop that has a:

Radeon RX 5500M GPU in it

I have a game called Xonotic installed and I followed this website instructions to start the game with the GPU:

DRI_PRIME=1 xonotic-glx

But after I do that, my screensaver and taskbar disappears and I am left with a black screen. I can see existing windows but can no longer access the menu bar and have to restart the device.

can you try with Ctrl + Alt + F1 to F8 for login , then reboot

Sorry, I don’t understand.

When should I type this? after the black screen?

provide formated output of:
inxi -Fazy
try again running the game and when the game freezes try entering TTY by pressing as stephane sugested ctrl + alt + f2 - if f2 doesnt work try f1-f6 keys instead - if it worked, use this command:
journalctl --boot=0 --priority=5 --no-pager - it will show logs, so check them for some hints
you can reboot from tty with this command: systemctl reboot

and when the game freezes

I should clarify the game does not freeze. I can play the game normally. When I quit the game, the black screen appears.

  • Then try to ctrl + alt + f2 to open TTY
  • Login your user
  • See the error log journalctl -p err -b 0

If TTY can not open, then reboot. Show us journalctl -p err -b -1