ludusavi icon indicating copy to clipboard operation
ludusavi copied to clipboard

Detect Proton saves for non-Steam games added in Steam

Open Bboy486 opened this issue 1 year ago • 32 comments

Ludusavi version

v0.13.0

Operating system

Linux (Steam Deck)

Installation method

Flatpak

Description

For non steam games is there a way for your tool to locate the saves and backup? I added the folder but it is only finding the games installed in steam (ignores anything that is a non-steam game).

I set the roots for the SD card and also ssd where the games are along with the steam root (which it finds the installed steam games), and heroic locations. However it doesn't detect any of the non steam games.

Logs

No response

Bboy486 avatar Sep 28 '22 13:09 Bboy486

Thanks for your report! I suspect this may be an issue with Flatpak permissions, but let's try to narrow it down.

  • Heroic isn't currently supported (#94). Other than Heroic and Steam, what other sources/stores do you have? Could you give me a specific example of a non-Steam/Heroic game that can't be found and where it's installed?

  • Could you please upload your config file? I'd like to see how your roots are configured.

  • For whichever game you answered to the first question (let's say $GAME), please run this command and then upload your logs (make sure to type the game exactly matching its PCGamingWiki article title):

    RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusavi backup --preview "$GAME"
    

mtkennerly avatar Sep 28 '22 14:09 mtkennerly

config.TXT I'm not seeing the config under ~/.config/ludusavi and not sure where that other file is.

On the deck is found it in .var/app/com.github.mtkennerly.ludusavi/config/ludusavi

GitHub didn't like the .yaml so I changed to txt

Bboy486 avatar Sep 29 '22 01:09 Bboy486

I'm not seeing logs where the wiki said or in the path above

RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusavi backup --preview "$GAME" No info for these games:

Game: Deadpool Location: home > deck > Games

Bboy486 avatar Sep 29 '22 01:09 Bboy486

Ah, it didn't get far enough to generate any logs because it didn't understand the title. $GAME was just a placeholder - you should change it to Deadpool, like this:

RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusavi backup --preview "Deadpool"

Based on PCGW, and since the game is in an other-type root, it should find saves at /home/deck/Games/Deadpool/TransGame/Config/PC/Cooked. Could you confirm that that folder exists and is not empty?

mtkennerly avatar Sep 29 '22 03:09 mtkennerly

I can but to be clear /Games is the actual folder with all my non-steam games on both the internal and SD card.

So based on what you are saying I would have to go into the subfolder for each game one by one and set them up as roots?

Bboy486 avatar Sep 29 '22 14:09 Bboy486

No, you shouldn't make each individual game into a root. That won't work. Roots are for groups of games, not individual games.

Since you have /home/deck/Games as an other-type root, that means Ludusavi will automatically look for any games installed inside of it:

  • /home/deck/Games/Deadpool
  • /home/deck/Games/Celeste
  • /home/deck/Games/Steelrising

...and so on. There's more info about roots in the docs.

I can but to be clear /Games is the actual folder with all my non-steam games on both the internal and SD card.

Can you elaborate on this?

  • Do you really mean /Games (directly under the file system root), or do you mean /home/deck/Games?
  • How do you have it containing both internal and SD card installations? Are you using symlinks? Is this managed by some other launcher/program?
  • Can you give me a concrete example of how you installed Deadpool? Please be very specific and detailed. Is it on the internal storage or on the SD card? If /home/deck/Games/Deadpool is a symlink, where does it point to? Did you use a launcher like Heroic to install it, and if so, which launcher? All of these questions could affect the Flatpak permissions for Ludusavi to be able to scan that folder.

mtkennerly avatar Sep 29 '22 15:09 mtkennerly

I mean home/deck/Games for ssd and /SD card/Games for SD card or external HDD

No symlinks at all So your Deadpool example is correct: home/deck/Games/Deadpool within /Games/ are all of my other non steam games. They are setup by game name like you had in your example.

Deadpool is on the ssd. I lives in the /deck/Games folder. I add them as non steam games.

Heroic is also in the /Games/ folders but I'm not focusing on that based on the open issue you linked to previously.

-No, you shouldn't make each individual game into a root. That won't work. Roots are for groups of games, not individual games.

Since you have /home/deck/Games as an other-type root, that means Ludusavi will automatically look for any games installed inside of it-

This is the issue. Even though I have 20 games in folders within home/deck/Games/ Ludusavi doesn't see any of them. Same is true for the games on my SD card.

Bboy486 avatar Oct 01 '22 18:10 Bboy486

Thank you for clarifying!

I do still need you to run this command and provide the logs, please:

RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusavi backup --preview "Deadpool"

mtkennerly avatar Oct 01 '22 23:10 mtkennerly

RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusav error: app/com.github.mtkennerly.ludusav/x86_64/master not installed

$ RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusavi backup --preview "home/deck/Games/Deadpool" No info for these games:

  • home/deck/Games/Deadpool

Bboy486 avatar Oct 02 '22 02:10 Bboy486

That's not the command from my previous comment 😅 Please copy/paste it and run it exactly as-is.

Afterwards, I'll need the log file from the config folder, not the command line output.

mtkennerly avatar Oct 02 '22 02:10 mtkennerly

Sorry 😐

RUST_LOG=ludusavi=trace flatpak run com.github.mtkennerly.ludusavi backup --preview "Deadpool" Overall: Games: 0 Size: 0 B Location: /run/media/mmcblk0p1/ludusavi

Still.dont see files in the location: https://github.com/mtkennerly/ludusavi/issues/130#issuecomment-1261636913

Bboy486 avatar Oct 02 '22 16:10 Bboy486

Hmm... Could you try this instead, with Flatpak's own --env option? Maybe it just wasn't seeing the environment variable.

flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Deadpool"

mtkennerly avatar Oct 02 '22 19:10 mtkennerly

flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Deadpool" Overall: Games: 0 Size: 0 B Location: /run/media/mmcblk0p1/ludusavi

Bboy486 avatar Oct 02 '22 21:10 Bboy486

Any ideas about where the logs are located?

Bboy486 avatar Oct 02 '22 21:10 Bboy486

Just to double check, what does this command say?

flatpak run com.github.mtkennerly.ludusavi --version

Logging wasn't available before v0.13.0. I know you already specified v0.13.0 in the initial comment, but just making sure the update went through.

Let's also try double checking a few locations:

ls -a ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/*
ls -a $XDG_CONFIG_HOME/ludusavi/*
ls -a ~/.config/ludusavi/*

flatpak run --command='ls -a ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/*' com.github.mtkennerly.ludusavi
flatpak run --command='ls -a $XDG_CONFIG_HOME/ludusavi/*' com.github.mtkennerly.ludusavi
flatpak run --command='ls -a ~/.config/ludusavi/*' com.github.mtkennerly.ludusavi

mtkennerly avatar Oct 02 '22 22:10 mtkennerly

$ flatpak run com.github.mtkennerly.ludusavi --version ludusavi 0.12.1

flatpak run com.github.mtkennerly.ludusavi --version ludusavi 0.12.1

(deck@steamdeck ~)$ ls -a ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/* /home/deck/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/config.yaml /home/deck/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/manifest.yaml (deck@steamdeck ~)$ ls -a $XDG_CONFIG_HOME/ludusavi/* ls: cannot access '/ludusavi/*': No such file or directory

(2)(deck@steamdeck ~)$ ls -a ~/.config/ludusavi/* ls: cannot access '/home/deck/.config/ludusavi/*': No such file or directory

(2)(deck@steamdeck ~)$ flatpak run --command='ls -a ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/' com.github.mtkennerly.ludusavi bwrap: execvp ls -a ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi/: No such file or directory

(1)(deck@steamdeck ~)$ flatpak run --command='ls -a $XDG_CONFIG_HOME/ludusavi/' com.github.mtkennerly.ludusavi F: Can't get document portal: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.portal.Documents': timed out (service_start_timeout=120000ms) bwrap: execvp ls -a $XDG_CONFIG_HOME/ludusavi/: No such file or directory

Bboy486 avatar Oct 02 '22 22:10 Bboy486

(deck@steamdeck ~)$ flatpak run --command='ls -a ~/.config/ludusavi/' com.github.mtkennerly.ludusavi bwrap: execvp ls -a ~/.config/ludusavi/: No such file or directory

Bboy486 avatar Oct 02 '22 22:10 Bboy486

ludusavi 0.12.1

Okay, yeah, that's the problem 😅 Please update:

flatpak update flathub com.github.mtkennerly.ludusavi

Then try again, and it should create the log file this time:

flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Deadpool"

mtkennerly avatar Oct 02 '22 23:10 mtkennerly

flatpak update flathub com.github.mtkennerly.ludusavi Looking for updates… error: Invalid id flathub: Names must contain at least 2 periods

On Sun, Oct 2, 2022, 4:22 PM Matthew Kennerly @.***> wrote:

ludusavi 0.12.1

Okay, yeah, that's the problem 😅 Please update:

flatpak update flathub com.github.mtkennerly.ludusavi

And then try again:

flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Deadpool"

— Reply to this email directly, view it on GitHub https://github.com/mtkennerly/ludusavi/issues/130#issuecomment-1264760506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD53IKPYHLNE5CPTS3STQ5DWBIKLBANCNFSM6AAAAAAQXZRDOA . You are receiving this because you authored the thread.Message ID: @.***>

Bboy486 avatar Oct 02 '22 23:10 Bboy486

Ah, sorry, update has different syntax than install. Try this one:

flatpak update com.github.mtkennerly.ludusavi

mtkennerly avatar Oct 03 '22 00:10 mtkennerly

sudo flatpak update com.github.mtkennerly.ludusavi [sudo] password for deck: Looking for updates…

    ID                             Branch Op Remote  Download
  1. [✓] com.github.mtkennerly.ludusavi stable u flathub 5.8 MB / 5.8 MB

Warning: Not exporting file com.github.mtkennerly.ludusavi.appdata.xml of unsupported type.

Note that '/var/lib/flatpak/exports/share' is not in the search path set by the XDG_DATA_HOME and XDG_DATA_DIRS environment variables, so applications may not ID Branch Op Remote Download

  1. [✓] com.github.mtkennerly.ludusavi stable u flathub 5.8 MB / 5.8 MB

Warning: Not exporting file com.github.mtkennerly.ludusavi.appdata.xml of unsupported type. Updates complete.

On Sun, Oct 2, 2022, 5:06 PM Matthew Kennerly @.***> wrote:

Ah, sorry, update has different syntax than install. Try this one:

flatpak update com.github.mtkennerly.ludusavi

— Reply to this email directly, view it on GitHub https://github.com/mtkennerly/ludusavi/issues/130#issuecomment-1264769938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD53IKP3WST72LJYMCCUWVTWBIPPBANCNFSM6AAAAAAQXZRDOA . You are receiving this because you authored the thread.Message ID: @.***>

Bboy486 avatar Oct 03 '22 00:10 Bboy486

Great! Looks like it updated successfully. I think we're almost there. Now let's try these again:

flatpak run com.github.mtkennerly.ludusavi --version
flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Deadpool"

Afterwards, please check ~/.var/app/com.github.mtkennerly.ludusavi/config/ludusavi one more time for the log file.

mtkennerly avatar Oct 03 '22 00:10 mtkennerly

I tried some other games in that folder

(deck@steamdeck ~)$ flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Hades" Overall: Games: 0 Size: 0 B Location: /run/media/mmcblk0p1/ludusavi (deck@steamdeck ~)$ flatpak run --env=RUST_LOG=ludusavi=trace com.github.mtkennerly.ludusavi backup --preview "Disco Elysium" Overall: Games: 0 Size: 0 B Location: /run/media/mmcblk0p1/ludusavi

Bboy486 avatar Oct 03 '22 00:10 Bboy486

Thank you! Here's what I see based on the logs:

Deadpool

I do see that it found one file for Deadpool:

DEBUG [ludusavi::prelude] [Deadpool] found: /home/deck/Games/Deadpool/TransGame/Config/PC/Cooked/Coalesced.ini

Do you see that file in the GUI as well now? I believe this was fixed by v0.13.0's removal of the "exclude saves that have only been confirmed on another OS" setting, which I see was enabled in the config file you provided before.

Hades

PCGamingWiki only has Windows, Mac, and Linux-with-Steam save locations. Since you're using Linux-without-Steam for this game, there are no known save locations currently. In this situation, someone would need to update PCGamingWiki to add the Linux-without-Steam save locations.

Disco Elysium

The logs for this one are probably in a third file, ludusavi_rCURRENT.log. However, looking at PCGamingWiki, it appears to be in the same situation as Hades, so I think that's why it didn't find anything.

mtkennerly avatar Oct 03 '22 01:10 mtkennerly

Yup Deadpool shows now when I run preview ony the app. Thank you.

For the other games can't Ludusavi look into the compdata folders that proton creates? I actually thought that was how you were running the backup since proton is creating the files within the compdata.

https://www.reddit.com/r/SteamDeck/comments/u4h8tg/non_steam_game_location/?utm_medium=android_app&utm_source=share

Bboy486 avatar Oct 03 '22 01:10 Bboy486

Yup Deadpool shows now when I run preview ony the app. Thank you.

Great! It is only the settings, though, not the save data. The only known save location is in the Windows documents folder, which it can't currently find because:

For the other games can't Ludusavi look into the compdata folders that proton creates?

It can do that for Steam roots, but not for other roots. However, if there's a standard location where Proton puts the compatdata folders without Steam involved, then I can definitely add that. Could you tell me a little more about how you have Hades and Disco Elysium set up with Proton?

  • Where are their drive_c folders? (full path please)
  • Did you have to manually specify where to put the compatdata, or does Proton decide the location automatically?
  • Inside of drive_c/users, what usernames are there? Is there a folder for steamuser?

mtkennerly avatar Oct 03 '22 02:10 mtkennerly

Where are their drive_c folders? (full path please) Here is the save for Hades: /home/deck/.local/share/Steam/steamapps/compatdata/4272918735/pfx/drive_c/users/steamuser/Documents/Saved Games/Hades/Profile1.sav

Did you have to manually specify where to put the compatdata, or does Proton decide the location automatically? Proton decides and gives it a name. Searching in the compdata folder for the name usually works to find the game save along with modified date.

Inside of drive_c/users, what usernames are there? Is there a folder for steamuser?

steamuser

Bboy486 avatar Oct 03 '22 02:10 Bboy486

Ah, that's very interesting. The normal app ID for Hades is 1145360, so I had to do some research about where that 4272918735 ID came from. Apparently, Steam generates app IDs for non-Steam games based on the executable location and game name. Ludusavi would need to be able to map Hades -> 4272918735 in order to find the saves, either by predicting the ID or by reading some Steam config file. I think this may be feasible, but I'll need to look into it more.

mtkennerly avatar Oct 03 '22 03:10 mtkennerly

One idea is to have us Steam Deck users provide the IDs for the non steam games. You could then pull from this list (Google sheets) and hardcode it into Ludusavi. This is assuming the ID doesn't change numbers.

On Sun, Oct 2, 2022, 8:20 PM Matthew Kennerly @.***> wrote:

Ah, that's very interesting. The normal app ID for Hades is 1145360, so I had to do some research about where that 4272918735 ID came from. Apparently, Steam generates app IDs for non-Steam games based on the executable and its location. Ludusavi would need to be able to map Hades <-> 4272918735 in order to find the saves, either by predicting the ID or by reading some Steam config file. I think this may be feasible, but I'll need to look into it more.

— Reply to this email directly, view it on GitHub https://github.com/mtkennerly/ludusavi/issues/130#issuecomment-1264880607, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD53IKIRNMGMIQOW4YXNJHDWBJGI5ANCNFSM6AAAAAAQXZRDOA . You are receiving this because you authored the thread.Message ID: @.***>

Bboy486 avatar Oct 03 '22 05:10 Bboy486