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

Update Steamback to 1.1.2 #556

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

geeksville
Copy link
Contributor

@geeksville geeksville commented Mar 2, 2024

Plugin Name: Steamback

Steamdeck is a plugin that takes snapshots of save-game-state every time a (cloud backup enabled) game exits. It will also take a snapshot on entry if this game has not been seen before. It does not need a network connection to do this backup. These shapshots are primarily intended to allow users to 'roll-back' to previous game states (especially for games that don't normally have this feature).

More info here

Once this build is in the testing store I can ping a few users and have them try it.

This is an update. Summary of changes:

This update is mostly minor bug fixes. But there is one new feature: There is now a "backup now" button which takes a snapshot of the currently running game (without waiting for the game to exit). This button will only appear when the game has already saved changes to disk. Note: this particular feature is slightly risky because it would be possible to take snapshots while the game was not finished writing changes. But it is intended for advanced users who know what they are doing. Even if a corrupted snapshot was captured, the risk is low because users could always use the 'revert' button (which is guaranteed to be atomic) to return to the last good save.

  • fix message for unscanned files to say "scanning, please wait..."
  • add a "backup gameX now" button which is enabled only while the game is running.
  • fix bug where games which are installed on multiple SD cards might not be properly backedup
  • update DFL lib to latest

Checklist:

Developer Checklist

  • I am the original author or an authorized maintainer of this plugin.
  • I have abided by the licenses of the libraries I am utilizing, including attaching license notices where appropriate.

Plugin Checklist

  • I have verified that my plugin works properly on the Stable and Beta update channels of SteamOS.
  • I have verified my plugin is unique or alternatively provides more/alternative functionality to a similar plugin already on the store.

Plugin Backend Checklist

  • No: I am using a custom backend other than Python.
  • No: I am using a tool or software from a 3rd party FOSS project that does not have it's dependencies statically linked.
  • No: I am using a custom binary that has all of it's dependencies statically linked.

Testing

  • Tested on SteamOS Stable/Beta Update Channel.

* fix message for unscanned files to say "scanning, please wait..."
* add a "backup gameX now" button which is enabled only while the game is running.
* fix bug where games which are installed on multiple SD cards might not be properly backedup
* update DFL lib to latest
Copy link
Member

@PartyWumpus PartyWumpus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes LGTM, happy to merge once it's been tested.
(although perhaps you did not mean to commit ssh -i /home/kevinh/.ssh/deck_from_thinkpad [email protected] in the ssh-deck.sh file)

@PartyWumpus
Copy link
Member

build failed because the lockfile version is 6.1 and it should be 6.0.

@geeksville
Copy link
Contributor Author

geeksville commented Mar 8, 2024 via email

geeksville added a commit to geeksville/steamback that referenced this pull request Mar 10, 2024
@geeksville geeksville changed the title Update Steamback to 1.1.0. Update Steamback to 1.1.1 Mar 10, 2024
@geeksville
Copy link
Contributor Author

@PartyWumpus ok - changed to 6.0 I guess I must have run something that implicitly upgraded it. Once in the testing store I can ping the person who originally requested the new feature in this build to test and report per your document. woot!

@geeksville
Copy link
Contributor Author

dear reviewers if anyone can bless for "testing_env needs approval to start deploying changes" so that this ends up in the testing store I can find a user to go and test it and report back with what they find.

@TrainDoctor
Copy link
Member

@SteamDeckHomebrew/decky-testers please give this a whirl when possible.

@geeksville
Copy link
Contributor Author

FWIW I've heard from a few steamback users who downloaded this version from the testing store and they are pretty happy with it.

@geeksville geeksville removed their assignment Apr 30, 2024
@geeksville
Copy link
Contributor Author

Not trying to be a pest but if someone could test it (officially) that would be great. I asked a few steamback users to try it (after switching to the testing store) and they were happy. IMO it is much better than the old 1.0 version in the stable store.

Copy link
Member

@AAGaming00 AAGaming00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes since last review LGTM, @SteamDeckHomebrew/decky-testers please give this a try

@TrainDoctor
Copy link
Member

@geeksville, looking for confirmation from you that this is working on latest SteamOS Stable, once you can confirm that I can mark the plugin as ready for testing and will then try to summon testers as best I can. Thanks.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 1, 2024

Hi @TrainDoctor, still works great on Stable and steam OS beta. I use it often and occasionally get notes from reddit users saying they are still happy (I've been pointing them at the testing store).

@TrainDoctor
Copy link
Member

TrainDoctor commented Aug 1, 2024

Hi @TrainDoctor, still works great on Stable and steam OS beta. I use it often and occasionally get notes from reddit users saying they are still happy (I've been pointing them at the testing store).

Well go ahead and tell them that if they don't submit a testing report the plugin will likely be pulled (not your fault I know)!

I'm working to wrangle some testers for you rn.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 1, 2024 via email

@TrainDoctor TrainDoctor requested a review from a team August 1, 2024 04:24
@geeksville
Copy link
Contributor Author

If the plugin needs to be pulled thats fine also. alas my health is kinda crummy so I need to be choosy in how I spend my dev time.

@TrainDoctor
Copy link
Member

If the plugin needs to be pulled thats fine also. alas my health is kinda crummy so I need to be choosy in how I spend my dev time.

Unfortunate but it makes sense. I'm sure someone would be interested enough and could take over the plugin etc.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 1, 2024

I'm sure someone would be interested enough and could take over the plugin etc.

I'm okay with developing it - alas I've had bad luck wrangling folks to come in and be testers for this project. If anyone wants to develop it and find testers thats fine with me also. As far as I'm concerned the plugin is 'mature' and doesn't need further development unless some breakage happens.

@TrainDoctor
Copy link
Member

I'm sure someone would be interested enough and could take over the plugin etc.

I'm okay with developing it - alas I've had bad luck wrangling folks to come in and be testers for this project. If anyone wants to develop it and find testers thats fine with me also. As far as I'm concerned the plugin is 'mature' and doesn't need further development unless some breakage happens.

With global DFL a lot of the usual maintenance has been reduced so if this plugin doesn't already use Global DFL (aka Decky Frontend Library provided by Loader rather than being bundled by the plugin itself) then I would recommend updating the plugin to use that and we can get that tested and approved so it's maintenance will be minimal from there I imagine.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 6, 2024 via email

@TrainDoctor
Copy link
Member

Sounds good. I think I'm already using the global DFL, I updated to 3.24.5 a while back (which I think was after the client library had been updated to use that?). Do you happen to know if I should update the glue lib to something newer?

All should be good then. If you have a recommended game and configuration for me to try out I'll conduct testing for you but in future you'll want to get one of you users to do testing as I can't promise I'll be available in future.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 6, 2024 via email

@TrainDoctor
Copy link
Member

Most any single player game should work. I've used with with Valheim or others. You'll need to restart your steamdeck after installing because I don't think the python daemons are getting launched on install (or at least they weren't last time I looked). But then in the steamback settings it will list the games it found on your machine that it supports.

On Mon, Aug 5, 2024 at 7:53 PM TrainDoctor @.> wrote: Sounds good. I think I'm already using the global DFL, I updated to 3.24.5 a while back (which I think was after the client library had been updated to use that?). Do you happen to know if I should update the glue lib to something newer? All should be good then. If you have a recommended game and configuration for me to try out I'll conduct testing for you but in future you'll want to get one of you users to do testing as I can't promise I'll be available in future. — Reply to this email directly, view it on GitHub <#556 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABXB2KHEGGPCM4XVM7GJCLZQA3D5AVCNFSM6AAAAABEDN6Z3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGI3TQNBVGI . You are receiving this because you were assigned.Message ID: @.>

The plugin appears to be taking snapshots as it claims but reverting the snapshots doesn't actually seem to change anything. Example, I made a save in half-life 1, and then reverted to when I booted up the game and the save remained when I booted the game up.

@geeksville
Copy link
Contributor Author

Hi @TrainDoctor to confirm:

in half-life 1:

  1. you did some stuff, exited, then steamback did a backup.
  2. Then you launched the game and did some other stuff and a new snapshot was written when it exited.
  3. Then (while game was not running) you clicked to revert to the older save.
  4. Then launched game and rather than the smapshot 1 you asked it to revert to, the game was in the current state.
    ?

I think I actually own halflife1 and can check this if so.

@TrainDoctor
Copy link
Member

Hi @TrainDoctor to confirm:

in half-life 1:

1. you did some stuff, exited, then steamback did a backup.

2. Then you launched the game and did some other stuff and a new snapshot was written when it exited.

3. Then (while game was not running) you clicked to revert to the older save.

4. Then launched game and rather than the smapshot 1 you asked it to revert to, the game was in the current state.
   ?

I think I actually own halflife1 and can check this if so.

Yes, that's the correct order of operations.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 13, 2024 via email

@geeksville
Copy link
Contributor Author

hi @TrainDoctor ooh I see! This is an artifact of how HL1 does save games. Their load/save system is behind the scenes just a directory of save files (with no meta data file pointing to them). As you play the game (and steamback takes snapshots) it is copying that directory. When you restore to an old snapshot it is correctly copying in the contents of the old files (and replacing newer files as needed), but if you are looking to see the list of save-games inside of HL1 you'll also always see the new files also (because steamback never deletes files as part of rolling back).

I'm not sure if you'd consider this a fundamental problem with steamback or just HL1 falling in not the "nearly all" cloud enabled games.

@TrainDoctor
Copy link
Member

hi @TrainDoctor ooh I see! This is an artifact of how HL1 does save games. Their load/save system is behind the scenes just a directory of save files (with no meta data file pointing to them). As you play the game (and steamback takes snapshots) it is copying that directory. When you restore to an old snapshot it is correctly copying in the contents of the old files (and replacing newer files as needed), but if you are looking to see the list of save-games inside of HL1 you'll also always see the new files also (because steamback never deletes files as part of rolling back).

I'm not sure if you'd consider this a fundamental problem with steamback or just HL1 falling in not the "nearly all" cloud enabled games.

I did find the same thing with Descenders. I can give you a copy if you don't have one to test.

@geeksville
Copy link
Contributor Author

geeksville commented Aug 13, 2024 via email

@geeksville
Copy link
Contributor Author

@TrainDoctor thanks for sending that game - I'll investigate this weekend (forgot we are out of town thur/fri)!

@geeksville
Copy link
Contributor Author

geeksville commented Aug 18, 2024

Progress update: Tried Descender, seems like the game only writes to their savegame file (cloudsave.dat) when "offline mode" is enabled. Confirmed by also checking steam cloud for changes.

I assume when offline mode is off they are storing their save state on their servers.

I'm not a huge expert in the game but when I turned offline mode on, Steamback was properly snapshotting cloudsave.dat when the app exited. When reverting to an old save the old cloudsave was being copied into the app and the app seemed to use it (though I don't have fancy vehicle/player unlocks so hard to tell what the effect on the game was)

Though unrelated bad news: I notice that the "list of supported games" inside of the Steamback UI is now empty. I had to update my decky-loader to load with the latest OS/SteamClient beta so possibly that's related. Sometime during this week I'll reattach the various JS side debugging stuff so I can see why that list isn't populating (the python side seems to still be correct according to homebrew/logs).

@geeksville
Copy link
Contributor Author

@TrainDoctor hmm, when using my old DFL client library (3.24.5) the list of supported games wasn't popping up in the GUI (though I could see them getting queried from the python daemon). I updated to DFL client 3.25.0 (current version) and all was well again. I'll send in an update to this PR with only that change. Thanks for your help!

@geeksville geeksville changed the title Update Steamback to 1.1.1 Update Steamback to 1.1.2 Aug 23, 2024
@TrainDoctor
Copy link
Member

@geeksville just as a heads up, plugins without testing reports submitted have until the end of this month to collect testing reports so the plugin can be approved to go to the production store or it will be removed from testing and the PR closed.
A new PR or re-opening the PR can be submitted at any time at your convenience and the plugin is not blacklisted if you can ensure you have a tester to evaluate the plugin within 2 weeks of re-opening the PR. Thanks for your patience and understanding.

I believe I volunteered to conduct at testing report for you. Since that's the case I will be more flexible with the timeframe for you. Just the standard message everyone who submitted a PR before august is getting.

@geeksville
Copy link
Contributor Author

geeksville commented Sep 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

4 participants