Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect Proton saves for non-Steam games added in Steam #130

Closed
Bboy486 opened this issue Sep 28, 2022 · 35 comments
Closed

Detect Proton saves for non-Steam games added in Steam #130

Bboy486 opened this issue Sep 28, 2022 · 35 comments
Labels
enhancement New feature or request
Milestone

Comments

@Bboy486
Copy link

Bboy486 commented Sep 28, 2022

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 Bboy486 added the bug Something isn't working label Sep 28, 2022
@mtkennerly
Copy link
Owner

mtkennerly commented Sep 28, 2022

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 (Add automatic heroic discovery  #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"
    

@Bboy486
Copy link
Author

Bboy486 commented Sep 29, 2022

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
Copy link
Author

Bboy486 commented Sep 29, 2022

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

@mtkennerly
Copy link
Owner

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?

@Bboy486
Copy link
Author

Bboy486 commented Sep 29, 2022

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?

@mtkennerly
Copy link
Owner

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.

@Bboy486
Copy link
Author

Bboy486 commented Oct 1, 2022

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.

@mtkennerly
Copy link
Owner

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"

@Bboy486
Copy link
Author

Bboy486 commented Oct 2, 2022

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

@mtkennerly
Copy link
Owner

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.

@Bboy486
Copy link
Author

Bboy486 commented Oct 2, 2022

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: #130 (comment)

@mtkennerly
Copy link
Owner

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"

@Bboy486
Copy link
Author

Bboy486 commented Oct 2, 2022

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
Copy link
Author

Bboy486 commented Oct 2, 2022

Any ideas about where the logs are located?

@mtkennerly
Copy link
Owner

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

@Bboy486
Copy link
Author

Bboy486 commented Oct 2, 2022

$ 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
Copy link
Author

Bboy486 commented Oct 2, 2022

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

@mtkennerly
Copy link
Owner

mtkennerly commented Oct 2, 2022

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"

@Bboy486
Copy link
Author

Bboy486 commented Oct 2, 2022 via email

@mtkennerly
Copy link
Owner

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

flatpak update com.github.mtkennerly.ludusavi

@Bboy486
Copy link
Author

Bboy486 commented Oct 3, 2022 via email

@mtkennerly
Copy link
Owner

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.

@Bboy486
Copy link
Author

Bboy486 commented Oct 3, 2022

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
Copy link
Author

Bboy486 commented Oct 3, 2022

Here are the logs
ludusavi_r2022-10-03_00-22-02.log
ludusavi_r2022-10-03_00-18-29.log

@mtkennerly
Copy link
Owner

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.

@Bboy486
Copy link
Author

Bboy486 commented Oct 3, 2022

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

@mtkennerly
Copy link
Owner

mtkennerly commented Oct 3, 2022

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?

@Bboy486
Copy link
Author

Bboy486 commented Oct 3, 2022

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

@mtkennerly
Copy link
Owner

mtkennerly commented Oct 3, 2022

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 mtkennerly changed the title Support for Non-Steam /DRM free games Detect Proton saves for non-Steam games added in Steam Oct 3, 2022
@mtkennerly mtkennerly added enhancement New feature or request and removed bug Something isn't working labels Oct 3, 2022
@Bboy486
Copy link
Author

Bboy486 commented Oct 3, 2022 via email

@mtkennerly
Copy link
Owner

mtkennerly commented Oct 3, 2022

Unfortunately, the ID depends on the exact folder where it's installed. For example, if you have /home/deck/Games/Hades/hades.exe and someone else has /home/deck/drm-free/Hades/hades.exe, then they'll get different IDs.

Steam has a config file with the non-Steam games that you've added, so it should be possible for Ludusavi to pull the info from there, though.

@Bboy486
Copy link
Author

Bboy486 commented Oct 3, 2022

Awesome. Please let me know what you find out

@mtkennerly
Copy link
Owner

The functionality I would need for this has been added to steamlocate. Once they publish a new release, I'll be able to add this to Ludusavi :D

@Bboy486
Copy link
Author

Bboy486 commented Oct 29, 2022

Thank you. I'll trust one in that since I don't know how that helps.

@mtkennerly mtkennerly added this to the v0.15.0 milestone Nov 2, 2022
mtkennerly added a commit that referenced this issue Nov 2, 2022
mtkennerly added a commit that referenced this issue Nov 2, 2022
@mtkennerly
Copy link
Owner

This feature will be included in the next release of Ludusavi (0.15.0). I can't promise an exact date, but it should be in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants