Bottles
Bottles copied to clipboard
[Bug]: unable to launch programs in Steam Deck gaming mode, but can launch from script pointing to executable
Describe the bug
Programs installed into a bottle can't be found by program name when in the Steam Deck's gaming mode, per reproduction steps
I spent a fair while digging at this, and this is what I found:
- Bottles launched within gaming mode showed only manually added programs, not auto-detected ones
- Creating a script that called
flatpak run --command=bottles-cli com.usebottles.bottles run -b <bottle name> -e <path>
and adding it to Steam could launch the game - Using the above script approach but with
-p <program name>
only worked with manually added programs
To Reproduce
- Create (gaming) bottle
- Install game
- Add game to Programs if not present
- Add program to Steam (at this point the program will launch fine from Bottles, or from Steam while still in desktop mode)
- Switch to gaming mode
- Launch game
- (either stays on Steam spinner or gives up and goes back to game info)
Package
Flatpak from Flathub
Distribution
Steam Deck
Troubleshooting Logs
Version: 2022.8.28-brescia-2
Display:
X.org: true
X.org (port): :99.0
Wayland: false
Graphics:
vendors:
amd:
vendor: amd
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 5.13.0-valve21.1-1-neptune-02211-gc54cda5a36f3
Distro:
Name: GNOME
Version: '"42 (Flatpak runtime)"'
Disk:
Total: 7778668544
Free: 7778525184
RAM:
MemTotal: 14.5GiB
MemAvailable: 11.4GiB
Bottles_envs: null
Display Protocol
X11, Wayland
Display Backend used by Bottles
No response
Additional context
Flatseal non-default setttings:
Some useful logs? I don't have a steam deck to test (and no time for setting up a vm), idk how steam is launched but I assume you can launch it trough your terminal to catch some logs.
See logs in below message. I'm afraid they're not the most informative. The only way I can get logs when launching games in gaming mode is by using a script I write myself, which is added as a non-Steam game. In this case, it's flatpak run --command=bottles-cli com.usebottles.bottles run -b <bottle name> -p <program name> &>$HOME/bottles.log
. The script correctly launches the game if run from a terminal in desktop mode, which eliminates the possibility of user error.
The "ERROR: ld.so" stuff comes from Steam chucking around a whole load of environment variables when you launch a game through it. You also get these logs when successfully launching a game, so I think they're just noise.
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
[80m21:49:19 [1m(INFO)[0m [36mForcing offline mode[0m [0m
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
Program Cult Of The Lamb not found
I'm getting the exact same thing. At one point I added an export LD_PRELOAD=
line to my script before launching, in which case I only ended up with the two lines (Forcing offline mode & Program
Wondering if this is some kind of steam+flatpak issue, and not an issue with bottles (but if you install Chrome it uses flatpak and launches fine, so maybe that's not the case)
Can confirm, the game installed in bottles can run in bottles. After using add to steam button the game won't run either in game mode or desktop mode in steam. It even won't run with a desktop shortcut generated by bottles.
Can confirm, the game installed in bottles can run in bottles. After using add to steam button the game won't run either in game mode or desktop mode in steam. It even won't run with a desktop shortcut generated by bottles.
@herbzhao that's a different issue to this one then. I can run games from Bottles fine in desktop mode, and through Steam in desktop mode. You may want to grab some logs and file a separate issue
In the meantime, i have found this as a solution, as you stated, you can create a .sh file. and add this as a non-steam game. also works.
#!/bin/bash
flatpak run --command=bottles-cli com.usebottles.bottles run -b {bottle_name} -p "{programme name}"
Boilr has successfully implemented the add to steam, for anyone who is still having this problem.
Can confirm Boilr works fine on programs installed in a bottle that have been manually added manually to the programs list. This appears to be because Boilr uses the flatpak run
command to launch programs too (seen here), as opposed to the xdg-open
command that Bottles adds to Steam
Also had this problem. I had to add the executable to Programs manually (because I just copied the folder from an external drive) and it didn't launch when I added it to Steam via Bottles. Using Boilr did fix the issue.
Hi all i am trying to launch a wii u game from gaming mode, it worked fine before now it keeps crashing annoyingly, is this forum the fix for it??
Please open a new issue in the programs repository.
The topic issue should be already fixed. Can someone confirm?
Tested on Bottles 51.5, issue is still present, the xdg-open
link Bottles creates in Steam doesn't work in gaming mode. Boilr still works as it uses a flatpak
command to start the game
I have the same experience. My shortcuts only work when I use BoilR.
This is all too much it'd supposed to be a gaming unit for emulators but it doesn't work - should we just return it??
flatpak run --command=bottles-cli com.usebottles.bottles run -b {bottle_name} -p "{programme name}"
For this command I have an error "TypeError: unsupported operand type(s) for +: NoneType and str" I fixed this manually patching in bottles-cli line 574:
- _args = program.get("arguments", "") + " " + _args
+ _args = (program.get("arguments", "") or "") + " " + _args
I don't know, why default value don't work for get(). Maybe it is python version dependent
But I couldn't launch the game from steam even after it.
Workaround: Place a single space as command arguments in the launch options of the program's shortcut. If the launch options dialog doesn't appear, try removing and re-adding the program.
For developers: This issue is not specific to the Steam Deck or SteamOS, my Fedora system is also affected. The above workaround works on different systems and different games. The issue also doesn't involve anything Steam related; just running games through the xdg-open URL interface exhibits the same behavior.
The traceback printed when a game fails to launch is:
09:10:46 (INFO) Forcing offline mode
Traceback (most recent call last):
File "/app/bin/bottles-cli", line 652, in <module>
cli = CLI()
^^^^^
File "/app/bin/bottles-cli", line 150, in __init__
self.__process_args()
File "/app/bin/bottles-cli", line 199, in __process_args
self.run_program()
File "/app/bin/bottles-cli", line 574, in run_program
_args = program.get("arguments", "") + " " + _args
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
The traceback printed when the launch options dialog fails to open is:
Traceback (most recent call last):
File "/app/share/bottles/bottles/frontend/widgets/program.py", line 134, in show_launch_options_view
dialog = LaunchOptionsDialog(self, self.config, self.program)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/share/bottles/bottles/frontend/windows/launchoptions.py", line 82, in __init__
self.entry_arguments.set_text(program.get("arguments", ""))
TypeError: Argument 1 does not allow None as a value
In both cases it seems like the string literal ""
isn't interpreted as a string when returned by get() as the default argument. If this is a recent change in Python, you may have a lot of errors like this in your software.
@4903000 Both errors will be fixed by #3211. It was a regression caused by the latest big refactoring, not a recent change in Python, so there shouldn't be more errors like these fortunately
This is the exact same issue I am having. Started after updating bottles from 51.9 to 51.10 then 51.9 as some reason there was an update?
Tried that fix with the --argue but it did not work.