Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With "MANGOHUD=1", Heroic behaves like the option inside Heroic is set to 1 and uses its own config file #2922

Closed
NerosTie opened this issue Jul 28, 2023 · 8 comments
Labels
bug:unconfirmed Someone works on identifying the issue

Comments

@NerosTie
Copy link

NerosTie commented Jul 28, 2023

Describe the bug

In the case where the user has "MANGOHUD=1" in /etc/environment or launch Heroic with "MANGOHUD=1 heroic", Heroic behaves like the option inside Heroic is set to 1 and uses its own config file. It's not an expected behavior.

In my case, I have "MANGOHUD=1" in /etc/environment to have Mangohud everywhere with my config file. If I run Heroic in this situation, when I launch a game Mangohud is here but not using my config file, it's a default config file instead.

This issue doesn't exist in Heroic 2.8.0.

Add logs

MANGOHUD=1 heroic                                                                                                  

DevTools listening on ws://127.0.0.1:9222/devtools/browser/0f546688-1b27-4a42-a4ce-9e2f4ef379b1
(09:46:20) INFO:    [Legendary]:        Running command: XDG_CONFIG_HOME=/home/neros/.config/heroic/legendaryConfig /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary --version
[2023-07-28 09:46:20.029] [MANGOHUD] [info] [config.cpp:118] skipping config: '/opt/Heroic/MangoHud.conf' [ not found ]
[2023-07-28 09:46:20.029] [MANGOHUD] [info] [config.cpp:118] skipping config: '/home/neros/.config/MangoHud/heroic.conf' [ not found ]
[2023-07-28 09:46:20.029] [MANGOHUD] [info] [config.cpp:123] parsing config: '/home/neros/.config/MangoHud/MangoHud.conf'
(09:46:20) INFO:    [Legendary]:        Legendary location: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary
(09:46:20) INFO:    [Gog]:              GOGDL location: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/gogdl
(09:46:20) INFO:    [Connection]:       Connectivity: check-online
(09:46:20) INFO:    [Connection]:       Pinging external endpoints
(09:46:20) INFO:    [Backend]:          DRM module staus {
  oimompecagnajdejgnnjijobebaeigek: {
    name: 'Widevine Content Decryption Module',
    status: 'new',
    version: '4.10.2557.0'
  }
}
APPIMAGE env is not defined, current application is not an AppImage
(09:46:20) WARNING: [Backend]:          Protocol already registered.
(09:46:20) INFO:    [Connection]:       Connectivity: online
(09:46:20) INFO:    [Gog]:              Checking if login is valid
(09:46:20) INFO:    [Gog]:              Running command: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/gogdl --auth-config-path /home/neros/.config/heroic/gog_store/auth.json auth
(09:46:20) INFO:    [Gog]:              Running command: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/gogdl --auth-config-path /home/neros/.config/heroic/gog_store/auth.json --version
(09:46:20) INFO:    [Backend]:          AreWeAntiCheatYet data downloaded
(09:46:20) INFO:    [Nile]:             Running command: XDG_CONFIG_HOME=/home/neros/.config/heroic/nile_config /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/nile --version
(09:46:20) INFO:    [Backend]:          Loading Screen Ready
(09:46:20) INFO:    [Frontend]:         Refreshing undefined Library
(09:46:20) WARNING: [Backend]:          refresh not implemented on Sideload Library Manager
(09:46:20) INFO:    [Gog]:              Running command: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/gogdl --auth-config-path /home/neros/.config/heroic/gog_store/auth.json auth
(09:46:20) INFO:    [Legendary]:        Refreshing library...
(09:46:20) INFO:    [Legendary]:        Refreshing Epic Games...
(09:46:20) INFO:    [Legendary]:        Game list updated, got 211 games & DLCs
(09:46:20) INFO:    [Backend]:          Frontend Ready
(09:46:20) INFO:    [Gog]:              Saved username to config file
(09:46:20) INFO:    [Legendary]:        Running command: XDG_CONFIG_HOME=/home/neros/.config/heroic/legendaryConfig /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary list --third-party
/bin/sh: ligne 1: hostname : commande introuvable
(09:46:20) INFO:    [Backend]:          Checking for current version changelog
(09:46:20) INFO:    [Gog]:              Getting GOG library
(09:46:20) INFO:    [Gog]:              Running command: /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/gogdl --auth-config-path /home/neros/.config/heroic/gog_store/auth.json auth
(09:46:20) INFO:    [Backend]:          

Heroic Version: 2.9.1 Boa Hancock
Legendary Version:  0.20.32 Dark Energy (hotfix #6)
GOGdl Version: 0.7.3
Nile Version: 1.0.0 Jonathan Joestar

Electron Version: 24.4.1
Chrome Version: 112.0.5615.204
NodeJS Version: 18.14.0

OS: Arch KERNEL: 6.4.6-zen1-1-zen ARCH: x64
CPU: AMD Ryzen 5 3600 6-Core Processor @3.6 GOVERNOR: schedutil
RAM: Total: 31.27 GiB Available: 22.02 GiB
GRAPHICS: GPU0: AMD Radeon RX 6600 XT VRAM: 8176MB 
PROTOCOL: wayland

(09:46:22) INFO:    [Backend]:          Launching The Dungeon Of Naheulbeuk: The Amulet Of Chaos (02fac38ee2614c8ba276b1ea7c1acd7c)
(09:46:22) INFO:    [Backend]:          Preventing display from sleep
(09:46:22) INFO:    [Backend]:          Checking if wine version exists: Wine - lutris-GE-Proton8-12-x86_64
(09:46:22) INFO:    [Backend]:          Preventing machine to sleep
(09:46:22) INFO:    [Backend]:          Stopping Power Saver Blocker
(09:46:22) INFO:    [Winetricks]:       Downloading Winetricks
(09:46:22) INFO:    [Backend]:          Checking if wine version exists: Wine - lutris-GE-Proton8-12-x86_64
(09:46:22) INFO:    [Backend]:          Checking if wine version exists: Wine - lutris-GE-Proton8-12-x86_64
(09:46:22) INFO:    [Backend]:          Checking if wine version exists: Wine - lutris-GE-Proton8-12-x86_64
(09:46:22) DEBUG:   [Backend]:          Running Wine command: wineboot --init
(09:46:23) INFO:    [Gog]:              Saved games data
(09:46:23) WARNING: [Backend]:          listUpdateableGames not implemented on Sideload Library Manager
(09:46:23) INFO:    [Gog]:              Found 0 game(s) to update
(09:46:23) INFO:    [Legendary]:        Checking for game updates: XDG_CONFIG_HOME=/home/neros/.config/heroic/legendaryConfig /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary list --third-party
(09:46:23) INFO:    [DXVKInstaller]:    installing dxvk on... /home/neros/Jeux/Heroic/compatdata/The Dungeon Of Naheulbeuk The Amulet Of Chaos
(09:46:23) INFO:    [DXVKInstaller]:    dxvk already installed!
(09:46:23) INFO:    [DXVKInstaller]:    installing vkd3d on... /home/neros/Jeux/Heroic/compatdata/The Dungeon Of Naheulbeuk The Amulet Of Chaos
(09:46:23) INFO:    [DXVKInstaller]:    vkd3d already installed!
(09:46:23) INFO:    [Legendary]:        Launching The Dungeon Of Naheulbeuk: The Amulet Of Chaos: LD_PRELOAD= WINEPREFIX="/home/neros/Jeux/Heroic/compatdata/The Dungeon Of Naheulbeuk The Amulet Of Chaos" WINEDLLOVERRIDES=winemenubuilder.exe=d WINE_FULLSCREEN_FSR=0 WINEESYNC=1 WINEFSYNC=1 ORIG_LD_LIBRARY_PATH= LD_LIBRARY_PATH=/home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/lib64:/home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/lib GST_PLUGIN_SYSTEM_PATH_1_0=/home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/lib64/gstreamer-1.0:/home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/lib/gstreamer-1.0 WINEDLLPATH=/home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/lib64/wine:/home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/lib/wine XDG_CONFIG_HOME=/home/neros/.config/heroic/legendaryConfig /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary launch 02fac38ee2614c8ba276b1ea7c1acd7c --language fr --wine /home/neros/.local/share/lutris/runners/wine/lutris-GE-Proton8-12-x86_64/bin/wine
(09:46:24) INFO:    [Legendary]:        Found 0 games to update
(09:46:25) INFO:    [Backend]:          Starting the Download Queue
(09:46:29) INFO:    [Backend]:          Stopping Display Power Saver Blocker
(09:46:29) INFO:    [Frontend]:         Refreshing legendary Library
(09:46:29) INFO:    [Legendary]:        Refreshing library...
(09:46:29) INFO:    [Legendary]:        Refreshing Epic Games...
[200774:0728/094629.964912:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
(09:46:30) INFO:    [Legendary]:        Game list updated, got 211 games & DLCs
(09:46:30) INFO:    [Legendary]:        Running command: XDG_CONFIG_HOME=/home/neros/.config/heroic/legendaryConfig /opt/Heroic/resources/app.asar.unpacked/build/bin/linux/legendary list --third-party

Steps to reproduce

  1. Edit the file .config/MangoHud/MangoHud.conf to have something different from default
  2. Set "MANGOHUD=1" to /etc/environment or launch Heroic with "MANGOHUD=1 heroic"
  3. Launch a game
  4. Heroic uses its own config file

Expected behavior

Heroic shouldn't bypass the user's config file for Mangohud when MANGOHUD=1

Screenshots

No response

Heroic Version

Latest Stable

System Information

  • Arch

Additional information

Only with games from the Epic Store, no issue with games from GOG.

@NerosTie NerosTie added the bug:unconfirmed Someone works on identifying the issue label Jul 28, 2023
@Trevonn
Copy link
Contributor

Trevonn commented Oct 8, 2023

I have this bug too. The reason is because of the code linked below.

process.env.XDG_CONFIG_HOME,

@Trevonn
Copy link
Contributor

Trevonn commented Oct 8, 2023

#2841 is the offending commit.

globally set MANGOHUD_CONFIGFILE is ignored because of the code.

syslinking XDG_CONFIG_HOME/MangoHud/MangoHud.conf to my config file fixes the issue

@alterNERDtive
Copy link

syslinking XDG_CONFIG_HOME/MangoHud/MangoHud.conf to my config file fixes the issue

What exactly did you link from where to where? Cause just setting an explicit XDG_CONFIG_HOME doesn’t work, and this issue is quite annoying given that it also doesn’t load vkBasalt configs.

@Etaash-mathamsetty
Copy link
Member

Etaash-mathamsetty commented Oct 13, 2023

working on trying to resolve the XDG_CONFIG_HOME overrides, I fixed it with nile so far, legendary is waiting on a PR

@Etaash-mathamsetty
Copy link
Member

Etaash-mathamsetty commented Oct 14, 2023

this should fix it for yall: #3137

@Etaash-mathamsetty Etaash-mathamsetty linked a pull request Oct 14, 2023 that will close this issue
4 tasks
@alterNERDtive
Copy link

TYVM 👍

@Myned
Copy link

Myned commented Oct 21, 2023

syslinking XDG_CONFIG_HOME/MangoHud/MangoHud.conf to my config file fixes the issue

What exactly did you link from where to where? Cause just setting an explicit XDG_CONFIG_HOME doesn’t work, and this issue is quite annoying given that it also doesn’t load vkBasalt configs.

In lieu of the fix being merged (much appreciated!), the exact symlink for MangoHUD is:

ln -s ~/.config/MangoHud ~/.config/heroic/legendaryConfig/

For vkBasalt, it would likely be:

ln -s ~/.config/vkBasalt ~/.config/heroic/legendaryConfig/

This is because XDG_CONFIG_HOME is set to ~/.config/heroic/legendaryConfig by Heroic during game runtime, at least on my system according to the logs.

@arielj
Copy link
Collaborator

arielj commented Nov 4, 2023

This should be fixed now in heroic 2.10.0 since we don't use the XDG_CONFIG_HOME env anymore

@arielj arielj closed this as completed Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:unconfirmed Someone works on identifying the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants