bottlesdevs / programs

Repository for programs installation
68 stars 72 forks source link

[Epic Games] EGS doesn't work in Bottles anymore #21

Closed Arcitec closed 2 years ago

Arcitec commented 2 years ago

I'm in the Bottles Flatpak and enabled experimental Installers.

Clicked on Epic Games Store.

I got a Wine popup saying something like "wine-mono not found, we recommend your distribution's version, but we can install an internal version. Install?"

I clicked Install.

Then it said "Checksum failed. Aborting install of corrupt package" or something.

I dunno what could have caused this. Perhaps Bottles is pointing to an outdated version of dotnet installers?

Arcitec commented 2 years ago

I looked in the Dependencies tab, and compared it to what the Epic Games Launcher manifest wanted to install. I can see that these two are missing on my system:

So I did manual installs of them from the Dependencies tab. That worked. Heh? Confusing! :)

Arcitec commented 2 years ago

These issues are mentioned on WineHQ actually:

https://appdb.winehq.org/objectManager.php?sClass=version&iId=35811

Scroll down to "Issues Installing vcrun2019 and dotnet4x". Seems like it could be this error.

Arcitec commented 2 years ago

I've installed every listed dependency manually but the Epic Launcher doesn't run.

I suspect that the manifest is incomplete:

https://github.com/bottlesdevs/programs/blob/main/Games/epicgamestore.yml

The dependencies doesn't list anything about dotnet? From what I can see, epic games is made in dotnet.

But maybe this is all related to the Wine-Mono error earlier.

Arcitec commented 2 years ago

I dunno...

I've manually installed every dependency from the Manifest, plus all of these that were from WineHQ:

dotnet40 dotnet48 vcredist2019 cjkfonts

Everything that I manually installed was installed without any errors.

But Epic Games still doesn't launch. The .exe just sits in the Task Manager list but no activity/GUI. Maybe it became messed up when installing due to the error message I saw. I'll try uninstalling EGS and reinstalling it!

Arcitec commented 2 years ago

Okay I began with a fresh bottle and decided to try installing Dependencies before I run the Epic Games script. I decided to install every dotnet and every vcredist, since games require lots of different versions of these.

This is when I noticed a problem:

On a fresh bottle, with lutris-ge runner (not tried others), trying to install "dotnet35" gives the Wine-Mono error and checksum error. Could this be related to the problem with the Epic Games Store script?

Arcitec commented 2 years ago

Well, darn. I just tried a brand new bottle and tried to install "dotnet40" instead. Same error. What's going on... I think this is a general Winetricks problem, not related to Bottles.

mirkobrombin commented 2 years ago

We do not use winetricks, Botrles came with its built in dependencies system. Can you post a screenshot of that warning about mono?

Arcitec commented 2 years ago

@mirkobrombin Yeah I can post a screenshot in a moment. I may have figured out the issue... It seems like I need to install wine-mono before I can install dotnet. And I see that you added wine-mono 2 days ago:

https://github.com/bottlesdevs/dependencies/blob/main/Essentials/mono.yml

I tried a totally fresh bottle and tried installing just mono, nothing else. Got that error immediately.

I then figured out something interesting...

If I click the Uninstall button on "mono", and get the add/remove dialog, and uninstall it. And then restart Bottles. And then try installing "mono" again, now it installs without error. Interesting...

Arcitec commented 2 years ago

Alright I managed to figure out more about the errors.

Steps to succeed:

  1. Use latest Flatpak version.
  2. Create Gaming bottle.
  3. Use default settings (vaniglia runner).
  4. Go immediately into the bottle and its Dependencies tab.
  5. Click install on "mono". This works.

Steps to fail:

  1. Use latest Flatpak version.
  2. Create Gaming bottle.
  3. Modify its preferences to use this runner: "lutris-ge-7.0rc2-1"
  4. Go to its Dependencies tab.
  5. Click install on "mono". This fails.

Error messages that pop up during install:

Screenshot from 2021-12-22 00-33-34

Screenshot from 2021-12-22 00-33-45

Arcitec commented 2 years ago

@mirkobrombin My theory: Vaniglia has Wine-Mono built-in. Lutris-GE doesn't. And somehow, installers are super confused by the lack of wine-mono, so that even the wine-mono installer itself fails. I dunno, just a theory.

Edit: What's your recommendation? That I game with Vaniglia? Or with Proton-GE?

Edit 2: I am gonna check if an older version of Lutris-GE works. Then I am gonna check Proton-GE.

Edit 3: "lutris-ge-6.21" has the same error. Now I will test Proton-GE...

mirkobrombin commented 2 years ago

Vaniglia is our supported runner, also all our installers are tested on it. Try with vaniglia in a clean new bottle using our experimental installer for egs

Arcitec commented 2 years ago

@mirkobrombin Hmm yeah, the EGS installer script runs without errors when using vaniglia in a clean new bottle with Gaming preset.

So there's something wrong with Lutris-GE's Mono (.NET) support.

However, after EGS install, trying to run EGS (from the Programs tab) gives no GUI window at all with this clean Vaniglia gaming bottle.

Do you think it could be missing some dependencies?

Task list looks like this when I try running EGS in a clean Gaming bottle with zero settings changes:

Screenshot from 2021-12-22 00-45-46

Arcitec commented 2 years ago

Fresh gaming preset bottle, with only runner changed. Trying to install Dependencies: mono. These are my collected results:

Works:

Fails (with error screenshots above):

I also tried installing EGS from installer script with Proton-7.0rc2-GE-1 and it ran the script without errors. But still doesn't display any GUI when I try running EGS afterwards. I'm stuck but at least have narrowed down the wine-mono error to lutris-ge! :)

Arcitec commented 2 years ago

I don't think Epic Games works anymore.

I made a brand new bottle, manually installed 100% of everything (except the broken installers) on the Dependencies tab.

I then manually installed Epic Games via the .msi file via "Run Executable". I had to enable "Copy into the sandbox" for it to work.

The installer ran fine and I got start menu shortcuts that became visible under "Programs". It DOESN'T use the -opengl -SkipBuildPatchPrereq arguments that the installer script uses. In fact, if I add that to the launch parameters, I get the "NO GUI" symptom again.

I started the pure link (no arguments) from Programs afterwards, and actually got a GUI, which downloaded some 500 MB Epic Games Launcher update.

After the download was complete, the GUI displays "Self Update Failed" and that the necessary prerequisites have failed to install:

Screenshot from 2021-12-22 02-32-42

My conclusion:

Arcitec commented 2 years ago

Adding just the -SkipBuildPatchPrereq allows the self-update to complete successfully.

But EGS itself fails to execute after that point.

It seems like -SkipBuildPatchPrereq means "Don't attempt to install Visual C++ runtime and other similar game requirements":

https://www.epicgames.com/help/en-US/epic-games-store-c73/error-codes-c100/ls0019-prerequisites-installation-failed-a7649

Anyway, this is totally borked. I hope my research was useful in some way, but I am stuck for today and tomorrow I'll check if the native Bottles lacks this issue, or if Lutris can install EGS (but I love the idea/design of Bottles so hoping I can make Bottles work).

Arcitec commented 2 years ago

I had one last idea. Made a brand new, fresh, unmodified Gaming bottle, ran the epicgamesstore script. After the install, I manually removed the -opengl part of the line.

Then I ran it.

The GUI appeared and began visually downloading the update:

Screenshot from 2021-12-22 02-57-17

After that, it said that it successfully installed the update. The window disappeared. And nothing was running in Bottles Task Manager.

Trying to run the Programs shortcut again doesn't open any window.

Yeah, final conclusion: Epic Games Store itself is broken on Linux. There's no way that this is working for anyone else either. :P I am using the Flatpak with the same dependencies as everyone else, and the same recipe.

At the very least we need to remove -opengl from the arguments. But that just makes the GUI work. It's still broken and refuses to launch after that.

Edit: Tomorrow I'll try Bottles native, and then if that fails too I will try Lutris.

Arcitec commented 2 years ago

Just to not leave you "hanging" for answers, I uninstalled Bottles flatpak and installed native Fedora RPM: Bottles 2021.11.28-treviso.

This is the link to the tar file they're building it from: https://src.fedoraproject.org/rpms/bottles/blob/f35/f/bottles.spec

Seems like it may be treviso-1 instead of treviso-4, dunno.

Anyway, results:

I even went with a Wine Terminal (from Bottles GUI), and went to:

And ran:

Still no GUI.

I got the following debug output from EGS in the terminal (interesting that it says that it can't find d3dcompiler_43.dll, even though I can confirm that d3dcompiler 43 non-dummy 2.1MB file exists in system32 folder):

013c:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems
013c:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
013c:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
013c:err:combase:RoGetActivationFactory Failed to find library for L"Windows.UI.ViewManagement.UISettings"
02ac:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems
02ac:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
02ac:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems
03a0:err:module:import_dll Loading library D3DCOMPILER_43.dll (which is needed by L"C:\\Program Files (x86)\\Epic Games\\Launcher\\Engine\\Binaries\\Win64\\CrashReportClient.exe") failed (error c000007b).
03a0:err:module:LdrInitializeThunk Importing dlls for L"C:\\Program Files (x86)\\Epic Games\\Launcher\\Engine\\Binaries\\Win64\\CrashReportClient.exe" failed, status c0000135
wine: Unhandled page fault on write access to 0000000000000008 at address 00000001700845CE (thread 013c), starting debugger...
03ac:err:kerberos:kerberos_LsaApInitializePackage no Kerberos support, expect problems
03ac:err:winediag:ntlm_check_version ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
03ac:err:ntlm:ntlm_LsaApInitializePackage no NTLM support, expect problems

And then after a while I got a Winedbg dialog saying that EGS had a "serious problem", with this info (I saved the backtrace):

backtrace.txt

It looks like a null pointer write.

I also tried copying d3dcompiler_43.dll into the EGS exe folder, which removed the "cannot find" error for that dll file, but still doesn't fix anything. And the "cannot find" may have been a consequence of me running things via the Wine terminal/console anyway, so I doubt that this is the issue.

Eh, so yeah tomorrow I try Lutris just in case but I suspect that EGS is broken on Linux no matter what solution is used. I may end up using the Heroic/Legendary native Linux launcher instead, with Proton runtime in there...

Arcitec commented 2 years ago

Well, I've spent like 5 hours on this today, so why not a quick check of Lutris to give you a full report...

This lets me conclude that the script that Lutris provides does the right thing. Something is missing in the Bottles installer script. Not sure what. :) In my own MANUAL install of EGS in Bottles, I actually installed EVERY dependency possible in the Bottles GUI. All of them! Except vcredist2012 due to the crash/bug in that installer. So either the problem is lack of vcredist2012, or it's something else.

The Lutris script that worked is this one:

https://lutris.net/games/install/5835/view

There are only 2 things in that script which I haven't tried in bottles:

system:
  env:
    DXVK_HUD: compiler
    MESA_GL_VERSION_OVERRIDE: 4.4COMPAT
    __GL_SHADER_DISK_CACHE: 1
    __GL_SHADER_DISK_CACHE_PATH: $GAMEDIR

I am gonna uninstall Lutris now because it's such a terrible app. :P

Edit: I tried a fresh Gaming Bottle, set MESA_GL_VERSION_OVERRIDE=4.4COMPAT in the environment, and ran installer. Still not working. I am out of ideas. I can't really see anything else that Lutris does that Bottles doesn't do, apart from potentially the fonts or vcredist2012...

mirkobrombin commented 2 years ago
  1. In Bottles corefonts is allfonts
  2. Installers in Bottles are experimental so expect bugs
  3. dxvk env vars are managed by Bottles
  4. I tried on my own with a clean bottle and both vaniglia 7 RC2 unstable, vaniglia 6 latest stable and it works without the need to alter launch options or anything

Screenshot from 2021-12-22 08-41-50 Screenshot from 2021-12-22 08-41-44 Screenshot from 2021-12-22 08-40-16 Screenshot from 2021-12-22 08-40-00 Screenshot from 2021-12-22 08-39-57 Screenshot from 2021-12-22 08-39-51 Screenshot from 2021-12-22 08-36-10 Screenshot from 2021-12-22 08-36-05

Arcitec commented 2 years ago

@mirkobrombin Thanks for sharing your exact process! This will simplify my debugging, now I won't have to keep trying to install Dependencies manually.

I wish it had been that easy for me too. :D

I may have to install your distro and your exact version of Bottles, as a test, so what distro and Bottles versions are you using?

I am on Fedora 35, with Bottles Flathub (latest) as my main, and did test with Bottles native too. With NVIDIA drivers 495.x series installed.

mirkobrombin commented 2 years ago

Bottles "native" fedora package is not officially supported

Arcitec commented 2 years ago

Yep and I don't want to use the native. I just tried it in case the Flatpak was the problem. But both of them have this problem.

Also, since Lutris works, I have ruled out OpenGL / Wine on my system, and will keep testing to see what's wrong in Bottles Flatpak. :)

mirkobrombin commented 2 years ago

Does Bottles print some logs?

Arcitec commented 2 years ago

Hmm. I created a plain Gaming bottle with no changes, then restarted Bottles.

This is the startup log and the log of using the EGS installer script:

1-install_egs.txt

Then I pressed the "play" icon on the Programs launcher for EGS, and this is all I see:

(14:37:12) INFO Running an executable on the bottle… 
esync: up and running.
002c:err:wineboot:process_run_key Error running cmd L"C:\\windows\\system32\\winemenubuilder.exe -a -r" (2).

There's no GUI visible. And Bottles Task Manager lists this:

Screenshot from 2021-12-22 14-38-47

Arcitec commented 2 years ago

This is in the Flatpak btw, I won't try Native again.

Here is the exact bottle.yml at this moment in time:

Arch: win64
Creation_Date: '2021-12-22 14:32:23.156296'
Custom_Path: false
DLL_Overrides: {}
DXVK: dxvk-1.9.2
Environment: Gaming
External_Programs: {}
Installed_Dependencies:
- d3dx9
- msls31
- arial32
- times32
- courie32
- d3dcompiler_43
- d3dcompiler_47
- riched20
- allfonts
Latest_Executables: []
NVAPI: dxvk-nvapi-v0.5.1
Name: Games
Parameters:
    aco_compiler: false
    discrete_gpu: true
    dxvk: true
    dxvk_hud: false
    dxvk_nvapi: false
    environment_variables: ''
    esync: true
    fixme_logs: false
    fsr: false
    fsr_level: 5
    gamemode: false
    pulseaudio_latency: true
    sync: esync
    use_runtime: false
    virtual_desktop: false
    virtual_desktop_res: 1280x720
    vkd3d: false
Path: Games
Programs:
    EpicGamesLauncher.exe: -opengl -SkipBuildPatchPrereq
Runner: vaniglia-6.23
State: 0
Uninstallers:
    allfonts: false
    arial32: false
    courie32: false
    d3dcompiler_43: false
    d3dcompiler_47: false
    d3dx9: false
    msls31: false
    riched20: false
    times32: false
Update_Date: '2021-12-22 14:35:12.301935'
VKD3D: vkd3d-v2.4
Versioning: false
Windows: win10
WorkingDir: ''
Arcitec commented 2 years ago

I'll record the whole process and upload on YouTube :)

Arcitec commented 2 years ago

@mirkobrombin Alright it took me time to setup OBS and learn it. Here we go! :)

This is the whole process, it even shows my exact installed Flatpak and NVIDIA driver versions and all log messages that Bottles outputs.

https://www.youtube.com/watch?v=oQcLjlF-ROI

yt

Arcitec commented 2 years ago

Oh yeah and here is the full log from the video's terminal but as text file instead:

full_log.txt

Edit: The bottle.yml from the games bottle from the video:

bottle.yml.txt

Keep in mind that EGS works in Lutris (the native Fedora RPM). So I have no idea why Bottles (both native and Flatpak) can't run it. I have, as you know, tried:

Something is broken in Bottles, perhaps just on Fedora, but I don't know what else I can try.

mirkobrombin commented 2 years ago

This will likely take some time to debug the problem. These are problems that I expect from an experimental feature and that is why we have not published it yet but it is also strange that it works on my Fedora installation (also on vm) but not on yours.

The only difference that comes to mind is that GLs are not installed via flatpak but it seems strange to me. I don't remember if you've already written it and it's hard for me to reread the whole conversation from your phone, can you try giving a flatpak update and see if you install the missing GL? In the case of NVIDIA once the proprietary drivers are installed, just do a flatpak update to install the GLs.

Arcitec commented 2 years ago

@mirkobrombin Yeah I thought about OpenGL issues too since it won't run with -opengl. I think that could be the reason. But strangely enough my flatpak list and flatpak update already shows "GL" and "nothing to do (update)". :S

I also tried native Bottles just to bypass the sandboxing to see if it could find the system OpenGL and stuff like that, but native didn't work either. It's super weird.

Whatever the cause is, it's happening in native and flatpak versions of Bottles. No issues in Lutris (which runs lutris-ge 6.something, and uses EGS -opengl startup switch successfully).

My system is Fedora 35, with latest NVIDIA driver (xorg-x11-drv-nvidia = 495.44), installed a few weeks ago and I haven't modified the system.

This is a tough one. :/

Screenshot from 2021-12-22 16-52-50

Arcitec commented 2 years ago

Could you please show your flatpak list and also exact NVIDIA driver and Fedora version? Are you using X11 or Wayland?

It might be a NVIDIA 495 driver issue?

I want to make Bottles work because it's the best idea I have ever seen for managing Wine environments. So I'm ready to try solving this.

Arcitec commented 2 years ago

@mirkobrombin Oh god, I freaking solved it.

So here's the summary:

This means Bottles, both native and Flatpak, is broken on X11. But why? Some environment variable missing perhaps? Or something special that Bottles sets in the environment might be breaking the Wine runtimes?

Since Lutris works, we have that as the "baseline" to know that Wine should be working on X11 too.

mirkobrombin commented 2 years ago

I only use Xorg 😅 also my tests are all on Xorg only. Happy to see that it is working now but I think the problem is related to something in your xorg installation. Please can you open a specific issue in the Bottles repository and move the conversation here?

Arcitec commented 2 years ago

Yeah I have a bunch of ideas for X11 tests. Like checking lsmod | grep -i nvidia to ensure all Nvidia is loaded (please post your own result of that, I need it for debug).

Also need your Nvidia driver version for my own tests.

I will take a break with the family then make a ticket on the main Bottles project later today. :)

mirkobrombin commented 2 years ago
❯ lsmod | grep -i nvidia
nvidia_drm             73728  2
nvidia_modeset       1150976  3 nvidia_drm
nvidia              36950016  98 nvidia_modeset
i2c_nvidia_gpu         16384  0
drm_kms_helper        311296  2 amdgpu,nvidia_drm
drm                   630784  21 gpu_sched,drm_kms_helper,nvidia,amdgpu,drm_ttm_helper,nvidia_drm,ttm

❯ flatpak list | grep nvidia                               
nvidia-495-44   org.freedesktop.Platform.GL.nvidia-495-44       1.4 flathub system
nvidia-495-44   org.freedesktop.Platform.GL32.nvidia-495-44     1.4 flathub system

❯ bash <(curl -s https://raw.githubusercontent.com/bottlesdevs/tools/main/CompatibilityChecks/check-gpu-drivers.sh)
AMD graphics driver detected
NVIDIA graphics driver detected
Found a PRIME configuration.

❯ bash <(curl -s https://raw.githubusercontent.com/bottlesdevs/tools/main/CompatibilityChecks/check-session.sh)
You are running a x11 session
Arcitec commented 2 years ago

@mirkobrombin Thank you, that's very useful. I don't have i2c_nvidia_gpu and I have nvidia_uvm (edit: UVM may be related to ResizableBAR or CUDA, it seems to stand for "unified video memory"). And I see that my nvidia drivers run with different arguments than yours. I will try my best to figure this out.

One idea I have now is to try to run windows OpenGL test-programs in various wine Bottles.

Here are my results of all of that:

 ~  lsmod | grep -i nvidia
nvidia_drm             73728  10
nvidia_modeset       1150976  16 nvidia_drm
nvidia_uvm           1171456  0
nvidia              36950016  770 nvidia_uvm,nvidia_modeset
drm_kms_helper        311296  1 nvidia_drm
drm                   630784  14 drm_kms_helper,nvidia,nvidia_drm

 ~  flatpak list | grep nvidia
nvidia-495-44   org.freedesktop.Platform.GL.nvidia-495-44       1.4 system
nvidia-495-44   org.freedesktop.Platform.GL32.nvidia-495-44     1.4 system

 ~  bash <(curl -s https://raw.githubusercontent.com/bottlesdevs/tools/main/CompatibilityChecks/check-gpu-drivers.sh)
AMD graphics driver detected
Intel graphics driver detected
NVIDIA graphics driver detected
Found a PRIME configuration. <https://wiki.archlinux.org/title/PRIME>

 ~  bash <(curl -s https://raw.githubusercontent.com/bottlesdevs/tools/main/CompatibilityChecks/check-session.sh)
You are running a x11 session

I'll create the new ticket now on the Bottles project.

mirkobrombin commented 2 years ago

How do you install Nvidia prop. drivers in Fedora? Did you use the rpm-fusion repo or nvidia installer?

Arcitec commented 2 years ago

@mirkobrombin I created the new ticket. Should we talk here or in the new one? I linked to this from the new one. We can close this (since the proper repo links to this ticket), and continue the "messy" discussion here, perhaps.

I installed the driver via RPM Fusion:

dnf if xorg-x11-drv-nvidia
Last metadata expiration check: 4:38:38 ago on Wed 22 Dec 2021 14:49:41 CET.
Installed Packages
Name         : xorg-x11-drv-nvidia
Epoch        : 3
Version      : 495.44
Release      : 4.fc35
Architecture : x86_64
Size         : 56 M
Source       : xorg-x11-drv-nvidia-495.44-4.fc35.src.rpm
Repository   : @System
From repo    : rpmfusion-nonfree-nvidia-driver
mirkobrombin commented 2 years ago

@mirkobrombin I created the new ticket. Should we talk here or in the new one? I linked to this from the new one. We can close this (since the proper repo links to this ticket), and continue the "messy" discussion here, perhaps.

I installed the driver via RPM Fusion:

dnf if xorg-x11-drv-nvidia
Last metadata expiration check: 4:38:38 ago on Wed 22 Dec 2021 14:49:41 CET.
Installed Packages
Name         : xorg-x11-drv-nvidia
Epoch        : 3
Version      : 495.44
Release      : 4.fc35
Architecture : x86_64
Size         : 56 M
Source       : xorg-x11-drv-nvidia-495.44-4.fc35.src.rpm
Repository   : @System
From repo    : rpmfusion-nonfree-nvidia-driver

In the other one