Skip to content

Instantly share code, notes, and snippets.

@Zeitwaechter
Last active October 30, 2024 15:21
Show Gist options
  • Save Zeitwaechter/ef0464be39b1efde45f5acd16ff8f8ea to your computer and use it in GitHub Desktop.
Save Zeitwaechter/ef0464be39b1efde45f5acd16ff8f8ea to your computer and use it in GitHub Desktop.
Genshin Impact / Linux / Steam / Deck

Patching

Update 2023-09

This is deprecated.

Currently, the game launches without the need for any patch whatsoever.

Original Post

Special thanks to legluondunet for their work with the patch(es)

Their work is also referenced in this Lutris Install Script

First Time

  1. Visit legluondunet/MyLittleLutrisScripts's repository (or e.g. a fork, like zeroday0619/MyLittleLutrisScripts) and search for the Genshin Impact directory.
  2. Download the gi_patch_xyz.zip archive (xyz being the current number) and the gi_patch.sh file.
  3. Extract the archive where you have downloaded it to.
  4. Copy the resulting gi_patch directory to the /pfx/drive_c/ directory of your (Steam) WINE bottle.
  5. Copy the gi_patch.sh file to /pfx/ directory of your (Steam) WINE bottle.
  6. Login as root (sudo su).
  7. Make the gi_patch.sh file executable: chmod +x gi_patch.sh.
  8. cd into your (Steam) WINE bottle's /pfx/ path.
    • If you do not do that legluondunet's scripts won't work and won't find e.g. the UnityPlayer.dll (at the time of writing).
  9. Finally, execute the patch.sh file (still being root).
  10. Hope(?).

Please also see the comments down below, if you have still issues - there might already be any useful hint for your situation.

Thanks in advance and cheers :)

@TeaJeep
Copy link

TeaJeep commented Apr 30, 2022

Thank you so much for this guide. I'm sure im just making a small mistake somewhere, but I keep getting this error:
md5sum: UnityPlayer.dll: No such file or directory
[ERROR] Wrong file version or the patch is already applied
-> md5sum:
I do see UnityPlayer.dll in the Genshin Impact game directory too, so it is there.
Any ideas?

@Zeitwaechter
Copy link
Author

Zeitwaechter commented Apr 30, 2022

Hey, so I have just started the launcher and even though it did write something about "Update" at first, it still started just fine (hadn't started it up for about 28 days (later; pun), therefore.

You may be more in the loop of what did happen with this patch, but here as a reference:
update-size

current-version-string-while-verifying


Now to your issue at hand.

Let's first take another approach in where to place the files in question - because this might already help, no(?):

pfx-path-dir

pfx-drive_c-gi_patch-dir

Notice: As you can see I have renamed the patch files and I also did rename the references to the patch files in the other files of the package that legluondunet provides.
This way I know myself which was the latest version that got patched, as I do not play really regularily (anymore), was more like an experiment to me if it would actually run with the patch of them in place :)

Anyway, if you have placed gi_patch.sh correctly and it really does find the (normally named) drive_c/gi_patch/patch.sh file, which it seem to do in your case, you can only just check for the md5sums for yourself.

At the time of writing it looks like the checksums that are checked for are starting on line 31 (ff.), in the patch.sh file:

checksums-reference

You could still try to overwrite them manually with the checksums you are getting.

That would be my only real suggestion here, besides rechecking the placements of the files.

I hope I could help in any way useful to you.

Cheers! 👍

@TeaJeep
Copy link

TeaJeep commented May 1, 2022

This helps a lot actually, thank you! I had actually skipped the gi_patch.sh file and was calling the ex_apatch.sh file directory, which does work, but the issue was actually a really simple mistake, but I used gi_patch.sh this time, and I ran into some trouble running it, but thats thanks to that mistake I mentioned, which I didn't understand (yet) as a new(ish) linux user. but for anyone else new to this, you have to cd into the pfx directory before running gi_patch.sh, otherwise it runs from your user directory (or root if you switch to root user instead of using sudo), where of course c_drive/pfx does not exist. Picture of terminal posted for reference. I thought that it would look for c_drive/pfx from where the patch file was, not from where it was being called from. Lesson learned, just took a bit of poking through the files. Sorry for the trouble!
image

@Zeitwaechter
Copy link
Author

I'm happy to hear that it finally worked out for you.

If anyone is to blame for misunderstandings it's me for not documenting the steps too well.

I'm sorry for that :(

I will update the step to make this a bit more clear 👍

@TeaJeep
Copy link

TeaJeep commented May 5, 2022

It was a good learning experience for me! I'm pretty sure most linux users looking for a patch like this would typically be a bit more advanced than I am, and would've understood! I don't think there's any blame here. I really appreciate the help as I was completely lost before this.

@filipopo
Copy link

Thanks
Still works and works if you've manually installed the game too, just that pfx is ~/.wine and drive_c is ~/.wine/drive_c

@Zeitwaechter
Copy link
Author

Hey, thanks for reaching out!

Good to know :)

Future readers: Check if your paths are equal to @filip98's setup instead, besides the described manual approach for the setup via Steam / Deck.

On that note, I would really rather suggest to directly use the Lutris install script, that legluondunet provides though, instead of going directly via wine.

IMHO it's easier to maintain games via another layer above Wine than doing everything yourself, but pick your own poison 🥳

There is also still playonlinux, but the UI.. well. 😅

@filipopo
Copy link

I've never used Lutris, even wine is too much "not minimalist" for me haha
But sure, I'll try it the next time I'm setting up a personal Linux machine

@Zeitwaechter
Copy link
Author

That's the spirit! 🥳 👍

@Zeitwaechter
Copy link
Author

Zeitwaechter commented Oct 31, 2022

Can confirm it's still working with v3.1.

V3.2 is imminent though, if I have followed that correctly?

Geshin Impact - Version 3.1 - Revision


Edit:

Last Check - V4.0 - 2023-08-31:

Currently, the game launches without the need for any patch whatsoever.

Thanks to @misaka18931 (reference) for pointing that out.


Edit:

Last Check - V3.8 - 2023-08-13:

Genshin Impact - Preview Version 3.8 running / patched

Troubleshooting

In case of Launcher update issues:
Genshin Impact Launcher - Update Error
Fastest way is to simply update the Launcher via their website, select "Other Downloads" then click "Windows", if the first button does also not work for you:
Genshin Impact Website - HOYOVERSE/COGNOSPHERE
Use Protontricks to open+install the .exe:
Genshin Impace - Protontricks - Select and install Launcher Update

@TeaJeep
Copy link

TeaJeep commented May 6, 2023

Just wanted to update that the patch is no longer needed with proton experimental! Genshin runs out of the box now.

@Zeitwaechter
Copy link
Author

Ah, yeah, thank you! :)

Just saw that I currently also have it set to the older Proton 7.0-6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment