2.50/2.60 Linux, AMDgpu, game not starting, black screen

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
darekdeo
Posts: 5
Joined: Thu, 22. Aug 19, 20:03

2.50/2.60 Linux, AMDgpu, game not starting, black screen

Post by darekdeo » Thu, 22. Aug 19, 21:59

Version 2.50 english
No mods
Game doesn't start
Linux, Kubuntu 19.04, no custom PPA repositories, only official Ubuntu repositories
Dell Inspiron 7548, hybrid gpu (Intel HD graphics 5500, AMD Radeon R7 M265)
vulkaninfolog (using radv, not amdvlk): https://pastebin.com/WxZS3rYC

tldr:
Game is running using Intel gpu when vulkan support for AMD gpu is disabled. AMD gpu is able to run other game using vulkan (tested Dota2 only).

long version:
I was able to run game using Intel gpu, but performance was bad and I noticed in Graphic settings that game wasn't using AMD, I've decided to try to fix it up.

First I've runned into problem that "radeon" driver was loaded instead of "amdgpu". When invoking command "vulkaninfo" only Intel GPU was printed, this was interesting for me because I wasn't aware that my AMD gpu was not used before while playing Vulkan games. This is what I did to solve it:
https://github.com/ValveSoftware/Proton ... enGL-games
https://linuxconfig.org/install-and-tes ... n-on-linux
When I've added radeon.si_support=0 amdgpu.si_support=1 to grub, the system could not start, hang at "Starting bpfilter". I've found workaround based on this suggestion:
https://askubuntu.com/a/927880
Noticed also this thread, but couldn't find here anything useful:
https://askubuntu.com/questions/1135590 ... d-on-19-04
In the end my grub looks like this:

Code: Select all

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash modprobe.blacklist=radeon amdgpu.si_support=1"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=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 `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
and I do have file /usr/share/X11/xorg.conf.d/10-amdgpu.conf:

Code: Select all

Section "OutputClass"
	Identifier "AMD"
	MatchDriver "amdgpu"
	Driver "amdgpu"
	Option "DRI3" "on"
EndSection
vulkaninfo now prints content as I've posted above, also "lspci -k" has AMD content:

Code: Select all

08:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Opal XT [Radeon R7 M265/M365X/M465]
        Subsystem: Dell Opal XT [Radeon R7 M265/M365X/M465]
        Kernel driver in use: amdgpu
        Kernel modules: radeon, amdgpu
Looks great! But when I tried to run X4, all I got was black screen, fans running at high speed and after I've closed game by killing it's process the vulkaninfo did not detect my AMD again gpu. Also when tried to reboot PC, the laptop did freeze. Something system and drivers related probably, so I've decided to go futher and test some other game because I wasn't using "amdgpu" driver before (both for OpenGL and vulkan).
First for OpenGL I've tired to run Android device emulator, using DRI_PRIME=1 - this works still fine on AMD.
As for game and Vulkan I've decided to run Dota2, downloaded both game and Vulkan extension. In game settings I've enabled Vulkan renderer and restarted the game. Game was running fine and to see if I am really using AMD Radeon, not Intel (like I though I was using in the past) I've runned performenace tests which prints info about gpu "exec_async perftest": https://steamcommunity.com/sharedfiles/ ... =874421089
Both Render and Driver were Vulkan and AMD Radeon.

Based on information that Dota2 is running on Vulkan and amdgpu I believe at least my hardware is fine, as well as system setup is somewhat fine. Issues with X4 not running can be still related to system drivers (I am not using any custom PPA with latest Mesa drivers, like Oibaf and I don't want to as I had issues with it in the past).

Some more info I've found here on the forums: viewtopic.php?f=180&t=414524&p=4851811& ... x#p4851811
I've installed one missing package: mesa-vulkan-drivers:i386, but it did not help. Still black screen while running X4.
I don't have /etc/modprobe.d/amdgpu.conf or /etc/modprobe.d/radeon.conf. Is it Arch related or should I create these files? Would it help even if driver is detected for Dota2?

Is it driver related, or R7 M265(M270) is not supported by the game? Can I do something more or I should wait for new Ubuntu release with updated newest Mesa drivers to see if it helps?
Last edited by darekdeo on Sun, 15. Dec 19, 13:07, edited 1 time in total.

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by timon37 » Fri, 23. Aug 19, 16:28

Hmm it sounds like a non-trivial incompatibility between X4 and the gpu/driver behavior for M265.
Unfortunately I don't have any means to reproduce it, and it'd be very difficult and time-consuming to track it down remotely:(

So "unsupported" is the most reasonable conclusion, atm. It might suddenly fix itself with either an X4 patch or system update but I wouldn't count on it.
Additionally since it's a fairly old mobile gpu I would assume performance won't be on an acceptable level.

timon37
EGOSOFT
EGOSOFT
Posts: 485
Joined: Fri, 14. Dec 12, 11:02
x4

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by timon37 » Fri, 23. Aug 19, 16:31

Ahh, forgot to ask, do you have means to test under windows on that machine?

darekdeo
Posts: 5
Joined: Thu, 22. Aug 19, 20:03

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by darekdeo » Fri, 23. Aug 19, 17:17

Unfortunately I don't have any means to reproduce it, and it'd be very difficult and time-consuming to track it down remotely:(
You're breaking my heart... ;( but I understand, it's ok. I still should be able to run the game on Intel gpu even after telling kernel to use amdgpu driver instead of radeonsi, found Feral employee made a script that lets switch gpu: https://github.com/aejsmith/vkdevicechooser
I made this post to mostly see if I can provide additional help. I do have superior machine in home, my little brother's PC which is running on RX580(8GB) and Ryzen1600. But I barely use it, my brother occupies it whole day. :)
Additionally since it's a fairly old mobile gpu I would assume performance won't be on an acceptable level.
I do agree that performance can be still problematic, although I am certain R7M265 will handle it better than integrated Intel gpu, which was already being able to run the game (lowest detail, 720p, 20-30 fps, 10fps at station). I know I am a masochist. :)
Ahh, forgot to ask, do you have means to test under windows on that machine?
Sure I could test it, but I don't think Dell does provide new GPU drivers for this laptop with Vulkan support. Latest GPU drivers on Dell website are from 2015, while Vulkan was officialy released in 2016. Since it is hybrid GPU I think simply installing newest drivers from AMD website is not the case, correct me if I am wrong.

Alan Phipps
Moderator (English)
Moderator (English)
Posts: 30421
Joined: Fri, 16. Apr 04, 19:21
x4

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by Alan Phipps » Fri, 23. Aug 19, 17:33

"Since it is hybrid GPU I think simply installing newest drivers from AMD website is not the case, correct me if I am wrong."

It might be just that simple. The driver and gpu should recognise each other. There is no harm in at least trying it. This is the AMD page, I think.
A dog has a master; a cat has domestic staff.

darekdeo
Posts: 5
Joined: Thu, 22. Aug 19, 20:03

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by darekdeo » Fri, 23. Aug 19, 20:16

It might be just that simple. The driver and gpu should recognise each other. There is no harm in at least trying it. This is the AMD page, I think.
Indeed it works, I was also able to run the game on Windows 10 x64. Game detected Radeon R7 M265, I've started new game and had around 20fps at station and 20-40fps outside stations, close to 2x fps increase.

I've mentioned https://github.com/aejsmith/vkdevicechooser for switching Vulkan device on Linux, looks like there is better way to do it based on reddit post https://www.reddit.com/r/linuxquestions ... u/ed546yf/, adding this as game launch parameters:

Code: Select all

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json %command%
I was hoping that the vulkan driver has a problem with detecting which gpu to use, so I've also tried:

Code: Select all

VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json %command%
No success unfortunately.

Thanks for help. Looks like I will use Windows to play this game, at least for now. Maybe it's a mesa radv driver issue (after all it is still experimental), I'll wait till 19.10 ubuntu release, if it won't help, should I report a bug to mesa https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa ?

darekdeo
Posts: 5
Joined: Thu, 22. Aug 19, 20:03

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by darekdeo » Sun, 15. Dec 19, 00:37

Hi, just letting You guys know. I've tested as I said game on latest Ubuntu release... and it works on my AMD gpu! ;)

Ubuntu 19.10
Mesa 19.2.1
AMD Radeon R7 M265 Series (OLAND, DRM 3.33.0, 5.3.0-24-generic, LLVM 9.0.0)
buildId: 4380924 (from Steam game properties)

Solved!
edit: Not. The game launched fine on AMD gpu for the first time, in game options displayed that OLAND is the gpu used. Unfortunatelly next day the previous problem returned. What I did next day was changing my desktop resolution from 4k to 720p and launched the game, black screen returned after that. Setting 4k resolution back, rebooting and relaunching the game did not help, again getting black screen. I am currently in the process of reinstalling the game to see if it helps, will try to launch the game multiple times on 4k res.

darekdeo
Posts: 5
Joined: Thu, 22. Aug 19, 20:03

Re: 2.50 Linux, AMDgpu, game not starting, black screen

Post by darekdeo » Sun, 15. Dec 19, 12:29

Followig previous post, I've reinstalled game, version is: 260 372944 (based on string from menu).

After reinstalling the game:
1 Before first launch I've deleted steam shader cache from: ~/.steam/steam/steamapps/shadercache
2 Launched the game, still black screen
3 Alt tabbed and stopped game process
4 Deleted steam shader cache again same as in step 1
5 Deleted /mesa and /mesa_shader_cache from ~/.cache directory
6 Rebooted PC
7 Launched the game, X4 is working again like yesterday on AMDgpu, checked in game graphic settings to confirm that AMD gpu is detected, it was detected
8 Closed and launched game again, black screen
9 Reproduced steps 3-6 but I am getting still black screen as in step 8

I am not sure if it's shader cache, any other ideas? GPU is capable of running the game, game launched 2 times on 4k res, I haven't passed menu screen, but confirmed in graphics settings that AMD OLAND is used for rendering.

Post Reply

Return to “X4: Foundations - Technical Support”