lutris icon indicating copy to clipboard operation
lutris copied to clipboard

[Bug] Lutris Game not properly reinitializing when launched through terminal while already running

Open Syntist opened this issue 9 months ago • 5 comments

Bug description

If lutris is running and then you run lutris lutris:rungameid/$id

You get:

2025-03-11 20:03:47,700: The Battle.net source is unavailable because Google protobuf could not be loaded: cannot import name 'runtime_version' from 'google.protobuf' (/home/syntist/.local/lib/python3.13/site-packages/google/protobuf/__init__.py)

While if lutris is not running it works perfectly, It effect shortcuts for steam cause then steam can't capture the game so, SteamInput or overlay doesn't work.

Image

How to Reproduce

Steps to reproduce the behavior:

  1. Run Lutris
  2. Open terminal write lutris lutris:rungameid/$id
  3. The game runs through lutris, bypassing the terminal

Expected behavior

It should run from terminal or steam shortcut.

╰─❯ lutris lutris:rungameid/29
2025-03-11 20:12:37,635: The Battle.net source is unavailable because Google protobuf could not be loaded: cannot import name 'runtime_version' from 'google.protobuf' (/home/syntist/.local/lib/python3.13/site-packages/google/protobuf/__init__.py)
2025-03-11 20:12:37,766: Starting Lutris 0.5.19
2025-03-11 20:12:37,827: "card1" is NVIDIA RTX A1000 Laptop GPU (10de:25b9 1028:0b1a nvidia) Driver 570.124.04
2025-03-11 20:12:37,854: "card0" is Intel Iris Xe Graphics (8086:46a6 1028:0b1a i915) Driver 25.0.1
2025-03-11 20:12:38,035: Runtime disabled by system configuration
2025-03-11 20:12:38,036: Runtime disabled by system configuration
lutris-wrapper: AC Brotherhood
Started initial process 51095 from game-performance mangohud /usr/bin/wine /mnt/Local Disk/SharedSteam/SteamLibrary/steamapps/common/Assassins Creed Brotherhood/ACBSP.exe --offline
Start monitoring process.
[2025-03-11 20:12:38.981] [MANGOHUD] [info] [blacklist.cpp:75] process 'explorer.exe' is blacklisted in MangoHud
parsing gpu list num: 1
[2025-03-11 20:12:40.378] [MANGOHUD] [error] [shared_x11.cpp:40] XOpenDisplay failed to open display ''
[2025-03-11 20:12:40.393] [MANGOHUD] [info] [gpu.cpp:95] Set renderD129 as active GPU (id=10de:25b9 pci_dev=0000:01:00.0)

Log output

lutris lutris:rungameid/29
2025-03-11 20:03:47,700: The Battle.net source is unavailable because Google protobuf could not be loaded: cannot import name 'runtime_version' from 'google.protobuf' (/home/syntist/.local/lib/python3.13/site-packages/google/protobuf/__init__.py)

System Information

Vulkan support: YES
Esync support: YES
Fsync support: YES
Wine installed: YES
Gamescope: YES
Mangohud: YES
Gamemode: NO
Steam: YES
In Flatpak: NO
[System]
OS: CachyOS Linux rolling n/a
Arch: x86_64
Kernel: 6.13.6-2-cachyos
Lutris Version: 0.5.19
Desktop: KDE
Display Server: wayland
[CPU]
Vendor: GenuineIntel
Model: 12th Gen Intel(R) Core(TM) i7-12800H
Physical cores: 14
Logical cores: 20
[Memory]
RAM: 15.3 GB
Swap: 31.5 GB
[Graphics]
Vendor: Intel
OpenGL Renderer: Mesa Intel(R) Iris(R) Xe Graphics (ADL GT2)
OpenGL Version: 4.6 (Compatibility Profile) Mesa 25.0.1-cachyos1.2
OpenGL Core: 4.6 (Core Profile) Mesa 25.0.1-cachyos1.2
OpenGL ES: OpenGL ES 3.2 Mesa 25.0.1-cachyos1.2
Vulkan Version: 1.4.304
Vulkan Drivers: NVIDIA RTX A1000 Laptop GPU (1.4.303), Intel(R) Iris(R) Xe Graphics (ADL GT2) (1.4.305)

Media (optional)

No response

Syntist avatar Mar 12 '25 00:03 Syntist

Curious. I think the protobuf error is a red-herring; I don't think your Steam game needs that.

But I tried this, and my game duly start up. So there's that.

There may be more information available from the log coming out of the original Lutris instance- that's the one actually trying to start the game up. Can we get that?

danieljohnson2 avatar Mar 12 '25 00:03 danieljohnson2

It does run the game, it's just that, If the lutris instance is running, it just run the game from that instance.

╰─❯ lutris -d
2025-03-11 20:20:56,367: The Battle.net source is unavailable because Google protobuf could not be loaded: cannot import name 'runtime_version' from 'google.protobuf' (/home/syntist/.local/lib/python3.13/site-packages/google/protobuf/__init__.py)
INFO     2025-03-11 20:20:56,520 [application.do_command_line:478]:Starting Lutris 0.5.19
INFO     2025-03-11 20:20:56,595 [startup.run_all_checks:120]:"card1" is NVIDIA RTX A1000 Laptop GPU (10de:25b9 1028:0b1a nvidia) Driver 570.124.04
INFO     2025-03-11 20:20:56,621 [startup.run_all_checks:120]:"card0" is Intel Iris Xe Graphics (8086:46a6 1028:0b1a i915) Driver 25.0.1
DEBUG    2025-03-11 20:20:56,721 [xrandr.get_resolutions:91]:Retrieving resolution list
DEBUG    2025-03-11 20:20:56,723 [xrandr._get_vidmodes:18]:Retrieving 66 video modes from XrandR
DEBUG    2025-03-11 20:20:56,751 [path_cache._update_missing_games:114]:Checking for missing games
DEBUG    2025-03-11 20:20:56,766 [api.check_stale_runtime_versions:52]:Modified at Tue 11 Mar 2025 06:47:35 PM , will update after Wed 12 Mar 2025 12:47:35 AM 
DEBUG    2025-03-11 20:20:56,767 [lutriswindow.create_runtime_updater_cb:1384]:Runtime up to date
INFO     2025-03-11 20:21:18,081 [application.do_command_line:478]:Starting Lutris 0.5.19
INFO     2025-03-11 20:21:18,146 [startup.run_all_checks:120]:"card1" is NVIDIA RTX A1000 Laptop GPU (10de:25b9 1028:0b1a nvidia) Driver 570.124.04
INFO     2025-03-11 20:21:18,171 [startup.run_all_checks:120]:"card0" is Intel Iris Xe Graphics (8086:46a6 1028:0b1a i915) Driver 25.0.1
INFO     2025-03-11 20:21:18,228 [runner.use_runtime:440]:Runtime disabled by system configuration
INFO     2025-03-11 20:21:18,229 [runner.use_runtime:440]:Runtime disabled by system configuration
DEBUG    2025-03-11 20:21:18,229 [xrandr.get_outputs:26]:Retrieving display outputs
DEBUG    2025-03-11 20:21:18,231 [xrandr._get_vidmodes:18]:Retrieving 66 video modes from XrandR
lutris-wrapper: AC Brotherhood
Started initial process 55204 from game-performance mangohud /usr/bin/wine /mnt/Local Disk/SharedSteam/SteamLibrary/steamapps/common/Assassins Creed Brotherhood/ACBSP.exe --offline
Start monitoring process.
[2025-03-11 20:21:19.652] [MANGOHUD] [info] [blacklist.cpp:75] process 'explorer.exe' is blacklisted in MangoHud
parsing gpu list num: 1
[2025-03-11 20:21:21.183] [MANGOHUD] [error] [shared_x11.cpp:40] XOpenDisplay failed to open display ''
[2025-03-11 20:21:21.203] [MANGOHUD] [info] [gpu.cpp:95] Set renderD129 as active GPU (id=10de:25b9 pci_dev=0000:01:00.0)
INFO     2025-03-11 20:21:24,044 [runner.use_runtime:440]:Runtime disabled by system configuration
DEBUG    2025-03-11 20:21:24,045 [wine.winekill:202]:Killing all wine processes ({55241, 55178, 55227, 55204}) in prefix /mnt/Drive/Games/WineWayland: ['/usr/bin/wineserver', '-k']
DEBUG    2025-03-11 20:21:24,045 [wine.winekill:203]:['/usr/bin/wineserver', '-k']
DEBUG    2025-03-11 20:21:24,045 [wine.winekill:204]:/usr/bin/wineserver -k
DEBUG    2025-03-11 20:21:24,235 [wine.winekill:207]:Waiting for wine processes to terminate
Monitored process exited.
Initial process has exited (return code: 0)
All processes have quit
Exit with return code 0
DEBUG    2025-03-11 20:21:24,248 [monitored_command.on_stop:232]:Process 55178 has terminated with code 0
DEBUG    2025-03-11 20:21:24,335 [wine.winekill:223]:Done waiting.
DEBUG    2025-03-11 20:21:24,337 [game.stop_game:877]:AC Brotherhood (wine) has run for 6 seconds
DEBUG    2025-03-11 20:21:24,337 [game.stop_game:889]:Playtime: 29 minutes
DEBUG    2025-03-11 20:21:24,337 [application.on_game_stopped:791]:Removing 29 from running IDs
DEBUG    2025-03-11 20:21:26,238 [game.beat:910]:Game thread stopped
DEBUG    2025-03-11 20:21:26,238 [game.on_game_quit:966]:AC Brotherhood stopped at Tue, 11 Mar 2025 20:21:26
DEBUG    2025-03-11 20:21:26,278 [path_cache.add_to_path_cache:47]:Adding AC Brotherhood (wine) to path cache

Image

Syntist avatar Mar 12 '25 00:03 Syntist

The thing is, if lutris is already running and you run the game, then the game doesn't run under steam, it will just start from already running instance of lutris and then you won't get overlay and SteamInput

Heroic suffer from same issue, for now I just wrote a script myself which kills the app before launching the game but then it can effect only one game can be run using steam.

Syntist avatar Mar 12 '25 18:03 Syntist

Oh, I didn't understand the problem. I am afraid I don't really understand the dark witchcraft of "overlay", sorry. Maybe someone else will understand what's going on here.

danieljohnson2 avatar Mar 12 '25 20:03 danieljohnson2

@danieljohnson2 Sorry for delay, maybe this can help you understand what I am trying to say, it the same thing happen when you run from command line, if lutris is already open, the command runs the game from already running lutris instances.

Maybe this video can help you understand what i am trying to say.

Video

Uploaded on google drive.

Syntist avatar Mar 26 '25 04:03 Syntist