gurrgur / er-patcher

Elden Ring enhancement patches (ultrawide support, custom frame rate limits and more) seamlessly integrated with steam.
MIT License
311 stars 25 forks source link

Issues on Steam Deck #20

Closed n00mkrad closed 2 years ago

n00mkrad commented 2 years ago

Running via Game Mode does not do anything, game won't launch.

If I try konsole -e python -i er-patcher --all -- %command% on Desktop Mode, I get the following:

/run/media/mmcblk0p1/WindowsGames/ELDENRING/Game/er-patcher:133: DeprecationWarning: pathlib.Path.link_to() is deprecated and is scheduled for removal in Python 3.12. Use pathlib.Path.hardlink_to() instead.
  f.link_to(game_dir_patched / f)
Traceback (most recent call last):
  File "/run/media/mmcblk0p1/WindowsGames/ELDENRING/Game/er-patcher", line 138, in <module>
    subprocess.run(steam_cmd, cwd=steam_cmd[-1].parent.absolute())
  File "/usr/lib/python3.10/subprocess.py", line 501, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.10/subprocess.py", line 966, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.10/subprocess.py", line 1842, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: PosixPath('/run/media/mmcblk0p1/WindowsGames/ELDENRING/Game/er-patcher-tmp/eldenring.exe')

Maybe I need to do chmod?

gurrgur commented 2 years ago

Hey,

are you running this from within steam or directly from a terminal?

I'm asking because the error is the same as one from a comment on another issue https://github.com/gurrgur/er-patcher/issues/3#issuecomment-1079392040. The error occurs because the proton part is missing from the launch command so the script tries to launch "eldenring.exe" directly. This fails of course because "eldenring.exe" is not marked as executable.

n00mkrad commented 2 years ago

I'll try with Steam. But not sure if I can get a console output that way.

gurrgur commented 2 years ago

That's what the konsole -e part is for. It spawns a terminal window so you can see what the program prints out. The -i flag for python enables interactive mode so the window won't close in case the patcher crashes or the game stops running.

n00mkrad commented 2 years ago

That's what the konsole -e part is for. It spawns a terminal window so you can see what the program prints out. The -i flag for python enables interactive mode so the window won't close in case the patcher crashes or the game stops running.

But konsole is a native Linux application, I can't use Proton with that, right?

gurrgur commented 2 years ago

It will work, at least when you run steam in desktop mode. The reason is that proton is run within konsole and not the other way round ;)

Edit: Just to clarify, I mean these launch options: konsole -e python -i er-patcher --all -- %command%

n00mkrad commented 2 years ago
ERROR: ld.so: object '/home/deck/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
/usr/bin/python: can't open file '/home/deck/.local/share/Steam/er-patcher': [Errno 2] No such file or directory

Well I need an absolute path here, one sec

gurrgur commented 2 years ago

Are you running Elden Ring from steam with the launch options above when you get that output? When doing that, absolute paths shouldn't be needed. On a regular desktop steam automatically sets the working dir to the "Game" folder.

n00mkrad commented 2 years ago

Are you running Elden Ring from steam with the launch options above when you get that output? When doing that, absolute paths shouldn't be needed. On a regular desktop steam automatically sets the working dir to the "Game" folder.

Well I'm starting Konsole from Steam, let me try using that in the ER launch opts

n00mkrad commented 2 years ago

That works. Let my try Desktop Mode but without the konsole/python args

n00mkrad commented 2 years ago

Yep - to recap:

konsole -e python -i er-patcher --all -- %command% WORKS

./er-patcher --all -- %command% DOES NOT WORK

gurrgur commented 2 years ago

Does python er-patcher --all -- %command% work in deck mode? The problem might be caused by the python shebang not working for some reason.

Edit: Or it could be caused by missing execution permissions in which case running chmod +x er-patcher once would do the trick (not as launch option, just spawn a terminal in the game directory).

n00mkrad commented 2 years ago

Does python er-patcher --all -- %command% work in deck mode? The problem might be caused by the python shebang not working for some reason.

Edit: Or it could be caused by missing execution permissions in which case running chmod +x er-patcher once would do the trick (not as launch option, just spawn a terminal in the game directory).

It is a bit buggy in Game Mode because Gamescope keeps switching between the Konsole and ER windows (optimally for Game Mode there should only be a single window) but it seems like it stops glitching once the main menu has loaded. So yeah that works.

gurrgur commented 2 years ago

Try this one, it should behave like the one which spawns konsole except it doesn't spawn konsole:

python er-patcher --all -- %command%

I just removed the konsole -e part and the -i flag for python.

n00mkrad commented 2 years ago

Okay, doing chmod +x er-patcher seems to have worked!

It now runs fine in Game Mode without konsole using ./er-patcher --all -- %command%

Try this one, it should behave like the one which spawns konsole except it doesn't spawn konsole:

python er-patcher --all -- %command%

I just removed the konsole -e part and the -i flag for python.

This also works. Might be the preferred method for most people since this avoids having to chmod anything and works completely in Game Mode as long as the files are installed.

gurrgur commented 2 years ago

Alright cool and thanks for helping debug this! I'll update the readme and replace all mentions of "./er-patcher" with "python er-patcher". I suppose we can close this issue then :)

n00mkrad commented 2 years ago

Thanks for the support and this patcher! Makes for a great experience on the Deck.