flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.41k stars 286 forks source link

Error in Lutris with lastest version #73

Closed DanielRios549 closed 4 years ago

DanielRios549 commented 4 years ago

I used to use MangoHud with Lutris with version 0.20, but now with 0.30, the games does not start anymore with MANGOHUD=1 variable, what I have to do? I have a game that uses Origin and other that uses Uplay, both does not start with this variable.

image

flightlessmango commented 4 years ago

does MANGOHUD=1 vkcube still work?

DanielRios549 commented 4 years ago

I don't have vkcube installed, but MANGOHUD=1 glxgears does not work, only mangohud glxgears does

flightlessmango commented 4 years ago

MANGOHUD=1 is only for vulkan, but mangohud work for both. It would be helpful if you could install vkcube so we can see if the vulkan hud work on at least a very basic level

linux-nost commented 4 years ago

I can confirm that adding MANGOHUD to the Environment variables list in Lutris doesn't work with the version 0.3. MANGOHUD=1 vkcube works, as well as adding MANGOHUD=1 %command% to the Steam launch options. Executing MANGOHUD=1 /usr/bin/steam steam://rungameid/{game_id}(the command Lutris uses to launch a game) in the terminal doesn't show the HUD either.

@DanielRios549 I've also had some troubles with some games that didn't start. What I did was remove MANGOHUD from the Environment variables in Lutris. If it isn't enough, try deleting the Wine prefix (do a backup first, if needed) and reinstalling the game. It should work at some point. Unrelated to your particular problem, I've noticed that it happens with Proton 5.0, but the games run fine with Proton 4.11...

DanielRios549 commented 4 years ago

@flightlessmango I though glxgears used Vulkan, it uses OpenGL, right? Sorry about that

DanielRios549 commented 4 years ago

@abiriukov Yes, removing the MANGOHUD variable or seting it to zero, the games work, but there is no hud, I like to have mangohud always enable and using the keyboard shortcut to hide or show it...

jackun commented 4 years ago

Give me the logs! Also add VK_LOADER_DEBUG=all to env vars

Leopard1907 commented 4 years ago

For mangohud to work on Lutris , you need to set it from command prefix section.

unknown

linux-nost commented 4 years ago

@jackun Here are some of the logs with VK_LOADER_DEBUG=all set. lutris-mangohud-acs.log lutris-mangohud-me2.log lutris-mangohud-skyrim.log

Could it have something to do with the error below? ERROR: /usr/lib/mangohud/lib64/libMangoHud.so: wrong ELF class: ELFCLASS64

On the other hand, I've found out that some games do work (e.g. The Elder Scrolls Online). Sadly most of them don't.

@Leopard1907 I've just tried to add manghud to the command prefix instead of using an environment variable, but it doesn't work either.

DanielRios549 commented 4 years ago

Thanks too much for helping guys, I don't have too much time for testing these things

jgabor commented 4 years ago

For mangohud to work on Lutris , you need to set it from command prefix section.

I've ran mangohud without issues using the environment variable, so it has previously not been required to use the command prefix method.

Additionally to the wrong ELF class error, wine crashes with a "unhandled page fault":

MANGOHUD: libXNVCtrl.so.0 dlopen failed: libXNVCtrl.so.0: wrong ELF class: ELFCLASS64
skipping config: /home/jgabor/.config/MangoHud/wine-swtor.conf [ not found ]
skipping config: /home/jgabor/.local/share/lutris/runners/wine/lutris-5.6-2-x86_64/bin/MangoHud.conf [ not found ]
skipping config: /home/jgabor/.config/MangoHud/wine-preloader.conf [ not found ]
parsing config: /home/jgabor/.config/MangoHud/MangoHud.conf [ ok ]
wine: Unhandled page fault on read access to 00000050 at address F277E077 (thread 00cb), starting debugger...
ERROR: ld.so: object 'libMangoHud.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Game is considered exited.
All monitored processes have exited.
Exit with returncode 0
gamemodeauto: 

Not sure if related, or simply a consequence of something previously to wine failing.

I'm mostly playing SW:TOR these days, but I get same error with other games. The SW:TOR launcher works fine, it crashes when it tries to load the actual game. I've tried to find other similar unhandled page faults but only came a across this one that looked like it could be related.

Since I'm using Arch Linux, I suspect it might be related to this issue.

flightlessmango commented 4 years ago

@jgabor the ELF errors are expected since the game is 32bit, I don't see any actual errors. I would recommend you try the mangohud-git version on AUR if you aren't already. Also the difference between using the mangohud command or MANGOHUD env variable is that the env is only for vulkan, but the command works for vulkan and opengl

jgabor commented 4 years ago

@flightlessmango

the ELF errors are expected since the game is 32bit, I don't see any actual errors.

Oh, what a brainfart on my part. I didn't even realize that, since I haven't played a 32-bit game in forever and just recently got back into SW:TOR...

I've installed SW:TOR into a 64-bit wine prefix, would that matter here? Would it be worth trying re-installing into a 32-bit prefix? I've been very reluctant since the downloads speeds are abysmal for me, and I haven't been bothered enough to wait half a day for it to download everything again.

I would recommend you try the mangohud-git version on AUR if you aren't already.

Already running it, but same behavior.

Also the difference between using the mangohud command or MANGOHUD env variable is that the env is only for vulkan, but the command works for vulkan and opengl

Thanks for the clarification, I did not know that!

EDIT: And I perhaps should mention that it has previously worked perfectly in the same wine prefix, and some update of lutris, mangohud, or something else entirely, broke it.

flightlessmango commented 4 years ago

@jgabor have you tried the non-git version too? might be something we've broken recently

jgabor commented 4 years ago

@flightlessmango Yes, I switched to the git version shortly after the non-git version stopped working. I do know it was working during the time 0.3.0 was released, since I remember adding the new fps limiter to my config.

For the heck of it, I tried it once again and installed non-git mangohud 0.3.1-1 from AUR... Still crashes on a unhandled page fault in wine, but interestingly it doesn't produce any ELF errors. Not sure if it's because the error has gone away, or because of additional error management added since.

Here's a gist of the log that Lutris produces with non-git mangohud. And here's a gist with mangohud-git.

jgabor commented 4 years ago

Just tried to enable vkBasalt (and no mangohud) and it crashes with the same unhandled page fault error. Not sure what to make of that, but the problem seems to be with lutris or wine and not mangohud.

I'm out of ideas of what to try next. I've tried re-installing various versions and combinations of lutris, wine, dxvk and nvidia drivers that I'm confident was working previously. Happy to provide any logs or other information, if desired.

flightlessmango commented 4 years ago

The reason the ELF error disappeared is because the nvctrl implementation is not released yet, it's only in develop branch. Could you open a new issue for this? Also does mangohud or vkbasalt work with just glxgears or vkcube?

jgabor commented 4 years ago

@flightlessmango Yes, works just fine with both glxgears and vkcube! FPS limiter, hotkeys, etc. all working just fine.

And I created issue #137, as requested. Please do change the description/title to something more meaningful, I can't quite point to what the actual issue is and had a hard time coming up with a good description.

jackun commented 4 years ago

"Wrong ELF class: ELFCLASS64" for 32-bit applications in a 64-bit WINE prefix #137

Uh, use mangohud.x86. Ideally these would be combined anyway but build system issues etc...

jgabor commented 4 years ago

Uh, use mangohud.x86. Ideally these would be combined anyway but build system issues etc...

I've tried that as well, i.e. by adding mangohud.x86 as a command prefix in Lutris, but it generates the same errors and no changes in behavior. And both glxgears and vkcube are working with both variants of mangohud.

Also, it has worked fine before with this setup so I doubt it's a build or package issue.

DanielRios549 commented 4 years ago

I update Mangohud to 0.3.1, and it is working again, I think there is no more problem

jgabor commented 4 years ago

So I think my issue is unrelated to the Daniel's, so I think this can be closed. I have made some progress, though, and will post an update to #137.