nning / protonutils

CLI tool providing utilities for Proton: List games by version, Download/update GE/Luxtorpeda, clean unused runtimes, clean unused compatdata, ...
MIT License
36 stars 0 forks source link

"ge clean" lists nonexistent versions #9

Closed L1Q closed 2 years ago

L1Q commented 2 years ago

My ~/.local/share/Steam/compatibilitytools.d/ only has Proton-6.21-GE-2 in it, yet

[l1q@l1q-mj ~]$ protonutils ge clean
Warning: Several Steam users available, using 69221152
All available users: 69221152, 82996121
Option "-u" can be used to specify user

Unused versions found:
  * Proton-6.12-GE-1
  * Proton-6.14-GE-2
  * Proton 4.11-13
  * Proton-6.21-GE-1
  * proton_316_beta
  * Proton-5.8-GE-2-MF
  * Proton-6.9-GE-1
  * Proton-6.5-GE-2
  * Proton-6.18-GE-2

Really delete? [y/N] ^C
[l1q@l1q-mj ~]$ protonutils ge clean
Warning: Several Steam users available, using 69221152
All available users: 69221152, 82996121
Option "-u" can be used to specify user

Unused versions found:
  * proton_experimental
  * Proton-6.16-GE-1
  * Proton-6.18-GE-2
  * Proton-tkg 6.8.r0.g0f00e37c.release
  * Proton-6.9-GE-1
  * proton_316_beta
  * Proton 4.2-9
  * Proton 5.13-6
  * Proton-4.5-GE-Beta-3

Really delete? [y/N]

Those are the Proton versions I used in the past. As you can see the list is not consistent across runs.

nning commented 2 years ago

This looks tricky... as far as I can tell, the code currently does not detect correctly that no game for that versions is installed and/or that the compat tool version directory does not exist.

A few questions to debug:

  1. Do you have games installed that use any of these versions? (protonutils list should list only installed games and may include games for some of these versions.)
  2. Would you test with the -u and -c options, please? (You should also be able to use your Steam login name instead of the SteamID3 with -u. -c disables the cache, because it is possible, versions for the wrong user got cached.)
  3. You're on Arch? Can you confirm that ~/.steam/root/compatibilitytools.d exists and points to your runtimes dir?

(Now that I think of it, the problem seems to be connected to 2. quite probably.)

Thanks for reporting & helping to debug!

L1Q commented 2 years ago
[l1q@l1q-mj ~]$ protonutils list -u 82996121 -c
Proton 6.3-8
        Assassin's Creed
        Assassin's Creed II
        FlatOut 2
        The Binding of Isaac: Rebirth

Proton 6.3-8 (Default)
        Everyday Shooter
        Grand Theft Auto III
        Grand Theft Auto: Vice City
        Nuclear Throne
        Quake III Arena
        Quake III: Team Arena
        Remnants of Naezith
        Sky Force Reloaded

Proton-6.21-GE-2
        A Glider's Journey
        Muck
        The Typing of The Dead: Overkill
        The Witness

[l1q@l1q-mj ~]$ protonutils ge clean -u 82996121 -c
Unused versions found:
  * Proton 5.13-6
  * Proton-6.21-GE-1
  * Proton-6.5-GE-1
  * Proton 4.11-13
  * Proton-5.9-GE-8-ST
  * proton_experimental
  * Proton-4.5-GE-Beta-3
  * Proton-tkg 6.8.r0.g0f00e37c.release
  * Proton-6.14-GE-2

Really delete? [y/N]
L1Q commented 2 years ago

~/.steam/root/compatibilitytools.d exists, not a link, only has Proton-6.21-GE-2 in there I'm on Manjaro KDE 21.2.0

nning commented 2 years ago

Would you retest (protonutils ge clean -u 82996121 -c) with the following binary and send the debug output, please: https://github.com/nning/protonutils/suites/4545964286/artifacts/121960903

(You can send it by mail, too, if you do not want to share the data publicly.)

L1Q commented 2 years ago
[l1q@l1q-mj 121960903]$ ./protonutils  ge clean -u 82996121 -c
Proton-6.4-GE-1 
 map[Kine Demo:{"appID":"1325240","isInstalled":false,"isShortcut":false}]
Proton-6.5-GE-2 
 map[Middle-earth™: Shadow of War™:{"appID":"356190","isInstalled":false,"isShortcut":false}]
Proton 4.11-13 
 map[Red Faction: Guerrilla Steam Edition:{"appID":"20500","isInstalled":false,"isShortcut":false} Source SDK:{"appID":"211","isInstalled":false,"isShortcut":false} The Room Three:{"appID":"456750","isInstalled":false,"isShortcut":false}]
Proton 6.3-8 (Default) 
 map[A Story About My Uncle:{"appID":"278360","isInstalled":false,"isShortcut":false} BRAIN / OUT:{"appID":"578310","isInstalled":false,"isShortcut":false} Black Mesa:{"appID":"362890","isInstalled":false,"isShortcut":false} Counter-Strike:{"appID":"10","isInstalled":false,"isShortcut":false} Counter-Strike: Global Offensive:{"appID":"730","isInstalled":false,"isShortcut":false} Counter-Strike: Source:{"appID":"240","isInstalled":false,"isShortcut":false} Deus Ex: Mankind Divided™:{"appID":"337000","isInstalled":false,"isShortcut":false} Doki Doki Literature Club:{"appID":"698780","isInstalled":false,"isShortcut":false} Everyday Shooter:{"appID":"16300","isInstalled":true,"isShortcut":false} Getting Over It with Bennett Foddy:{"appID":"240720","isInstalled":false,"isShortcut":false} Grand Theft Auto III:{"appID":"12100","isInstalled":true,"isShortcut":false} Grand Theft Auto: Vice City:{"appID":"12110","isInstalled":true,"isShortcut":false} Natural Selection 2:{"appID":"4920","isInstalled":false,"isShortcut":false} Nuclear Throne:{"appID":"242680","isInstalled":true,"isShortcut":false} Oxenfree:{"appID":"388880","isInstalled":false,"isShortcut":false} Quake III Arena:{"appID":"2200","isInstalled":true,"isShortcut":false} Quake III: Team Arena:{"appID":"2350","isInstalled":true,"isShortcut":false} Remnants of Naezith:{"appID":"590590","isInstalled":true,"isShortcut":false} Sky Force Reloaded:{"appID":"667600","isInstalled":true,"isShortcut":false}]
Proton-6.5-GE-1 
 map[Among Us:{"appID":"945360","isInstalled":false,"isShortcut":false}]
Proton-5.9-GE-6-ST 
 map[Ashes of the Singularity: Escalation:{"appID":"507490","isInstalled":false,"isShortcut":false} Party Animals Demo:{"appID":"1301350","isInstalled":false,"isShortcut":false}]
Proton-tkg 6.8.r0.g0f00e37c.release 
 map[Bayonetta:{"appID":"460790","isInstalled":false,"isShortcut":false}]
Proton-6.9-GE-1 
 map[Crazy Machines 3:{"appID":"351920","isInstalled":false,"isShortcut":false}]
Proton-6.21-GE-2 
 map[A Glider's Journey:{"appID":"1102500","isInstalled":true,"isShortcut":false} Killing Floor:{"appID":"1250","isInstalled":false,"isShortcut":false} Muck:{"appID":"1625450","isInstalled":true,"isShortcut":false} Neighbours from Hell:{"appID":"260750","isInstalled":false,"isShortcut":false} Neighbours from Hell 2:{"appID":"260770","isInstalled":false,"isShortcut":false} The Typing of The Dead: Overkill:{"appID":"246580","isInstalled":true,"isShortcut":false} The Witness:{"appID":"210970","isInstalled":true,"isShortcut":false}]
Proton 6.3-8 
 map[Absolver:{"appID":"473690","isInstalled":false,"isShortcut":false} Assassin's Creed:{"appID":"15100","isInstalled":true,"isShortcut":false} Assassin's Creed II:{"appID":"33230","isInstalled":true,"isShortcut":false} FlatOut 2:{"appID":"2990","isInstalled":true,"isShortcut":false} Grand Theft Auto IV: The Complete Edition:{"appID":"12210","isInstalled":false,"isShortcut":false} Prototype:{"appID":"10150","isInstalled":false,"isShortcut":false} Quake:{"appID":"2310","isInstalled":false,"isShortcut":false} The Binding of Isaac: Rebirth:{"appID":"250900","isInstalled":true,"isShortcut":false}]
Proton-6.16-GE-1 
 map[FlatOut: Ultimate Carnage:{"appID":"12360","isInstalled":false,"isShortcut":false} NieR:Automata™:{"appID":"524220","isInstalled":false,"isShortcut":false} The Elder Scrolls IV: Oblivion :{"appID":"22330","isInstalled":false,"isShortcut":false}]
Proton-5.8-GE-2-MF 
 map[Detroit: Become Human Demo:{"appID":"1224230","isInstalled":false,"isShortcut":false} Katamari Damacy REROLL:{"appID":"848350","isInstalled":false,"isShortcut":false} Redout: Enhanced Edition:{"appID":"517710","isInstalled":false,"isShortcut":false} ShareX:{"appID":"400040","isInstalled":false,"isShortcut":false}]
Proton-6.14-GE-2 
 map[BloodRayne:{"appID":"3810","isInstalled":false,"isShortcut":false} Hellblade: Senua's Sacrifice:{"appID":"414340","isInstalled":false,"isShortcut":false} Killing Floor 2:{"appID":"232090","isInstalled":false,"isShortcut":false} Noita:{"appID":"881100","isInstalled":false,"isShortcut":false} The Elder Scrolls III: Morrowind:{"appID":"22320","isInstalled":false,"isShortcut":false} Vanquish:{"appID":"460810","isInstalled":false,"isShortcut":false}]
Proton 4.2-9 
 map[Pyramaze The Game:{"appID":"697970","isInstalled":false,"isShortcut":false} Remember Me:{"appID":"228300","isInstalled":false,"isShortcut":false}]
Proton-6.18-GE-2 
 map[INSIDE:{"appID":"304430","isInstalled":false,"isShortcut":false}]
proton_experimental 
 map[s&box:{"appID":"590830","isInstalled":false,"isShortcut":false}]
Proton-6.12-GE-1 
 map[Deus Ex: Human Revolution - Director's Cut:{"appID":"238010","isInstalled":false,"isShortcut":false} NieR Replicant ver.1.22474487139...:{"appID":"1113560","isInstalled":false,"isShortcut":false} Syberia:{"appID":"46500","isInstalled":false,"isShortcut":false}]
Proton-4.5-GE-Beta-3 
 map[Ori and the Blind Forest: Definitive Edition:{"appID":"387290","isInstalled":false,"isShortcut":false} Warframe:{"appID":"230410","isInstalled":false,"isShortcut":false}]
proton_316_beta 
 map[Portal:{"appID":"400","isInstalled":false,"isShortcut":false} Skyrim Script Extender (SKSE):{"appID":"365720","isInstalled":false,"isShortcut":false} The Elder Scrolls V: Skyrim:{"appID":"72850","isInstalled":false,"isShortcut":false}]
Proton-6.14-GE-1 
 map[Syberia 3:{"appID":"464340","isInstalled":false,"isShortcut":false}]
Proton-6.21-GE-1 
 map[Micro Platformer:{"appID":"1283130","isInstalled":false,"isShortcut":false} Prince of Persia: The Sands of Time:{"appID":"13600","isInstalled":false,"isShortcut":false} Prince of Persia: Warrior Within:{"appID":"13500","isInstalled":false,"isShortcut":false}]
Proton 5.13-6 
 map[1 Screen Platformer:{"appID":"791180","isInstalled":false,"isShortcut":false} Alan Wake:{"appID":"108710","isInstalled":false,"isShortcut":false} Audiosurf:{"appID":"12900","isInstalled":false,"isShortcut":false} Ballex:{"appID":"1114430","isInstalled":false,"isShortcut":false} DOOM:{"appID":"379720","isInstalled":false,"isShortcut":false} Deus Ex: Human Revolution - The Missing Link:{"appID":"201280","isInstalled":false,"isShortcut":false} GRID 2:{"appID":"44350","isInstalled":false,"isShortcut":false} Galaxy on Fire 2™ Full HD:{"appID":"212010","isInstalled":false,"isShortcut":false} Gish:{"appID":"9500","isInstalled":false,"isShortcut":false} Gothic:{"appID":"65540","isInstalled":false,"isShortcut":false} Grand Theft Auto V:{"appID":"271590","isInstalled":false,"isShortcut":false} HAWKEN:{"appID":"271290","isInstalled":false,"isShortcut":false} Hard Reset:{"appID":"98400","isInstalled":false,"isShortcut":false} Hard Reset Redux:{"appID":"407810","isInstalled":false,"isShortcut":false} I Wanna Maker:{"appID":"1114940","isInstalled":false,"isShortcut":false} Jelly in the sky:{"appID":"593530","isInstalled":false,"isShortcut":false} Keyboard Killers:{"appID":"699240","isInstalled":false,"isShortcut":false} METAL GEAR RISING: REVENGEANCE:{"appID":"235460","isInstalled":false,"isShortcut":false} Midnight Club II:{"appID":"12160","isInstalled":false,"isShortcut":false} Red Faction Guerrilla Re-Mars-tered:{"appID":"667720","isInstalled":false,"isShortcut":false} Snake Pass:{"appID":"544330","isInstalled":false,"isShortcut":false} The Search:{"appID":"566190","isInstalled":false,"isShortcut":false} The Witcher 3: Wild Hunt:{"appID":"292030","isInstalled":false,"isShortcut":false} The Witcher: Enhanced Edition:{"appID":"20900","isInstalled":false,"isShortcut":false}]
Proton-5.9-GE-8-ST 
 map[GRID Autosport:{"appID":"255220","isInstalled":false,"isShortcut":false} We Were Here:{"appID":"582500","isInstalled":false,"isShortcut":false}]
Unused versions found:
  * Proton-6.5-GE-2
  * Proton-6.5-GE-1
  * Proton-tkg 6.8.r0.g0f00e37c.release
  * Proton-6.16-GE-1
  * Proton-6.14-GE-2
  * Proton-6.18-GE-2
  * Proton-6.12-GE-1
  * proton_316_beta
  * Proton-6.21-GE-1

Really delete? [y/N]

All Vast marojity of the games here are not currently installed on my system. It's nice they remember proton version I guess, but ge clean can't uninstall them anyway.

nning commented 2 years ago

I don't have a clue, yet, and added more debug output: https://github.com/nning/protonutils/suites/4618451336/artifacts/124921852

Would you please test again and attach debug.log to a comment?

DEBUG=1 protonutils ge clean &>debug.log
L1Q commented 2 years ago

debug.log

nning commented 2 years ago

I think I found the bug, thanks for reporting and helping to debug! (It was a logic error when collecting versions to delete that exist in compatibilitytools.d.)

Would you please test with a new binary containing the fix? https://github.com/nning/protonutils/suites/4626530846/artifacts/125248312

L1Q commented 2 years ago

It now says "No unused GE version found", however, I went ahead and downloaded older version of proton ge, restarted steam a couple times, but protonutils ge clean still reports no unused ge. Is this normal?

nning commented 2 years ago

It should show old unused versions for deletion. (A version should be recognized as unused if no installed game is configured to use it). If I run the following commands, it shows these versions ("foo" and 4.5 Beta 1) for deletion. Does this work for you simlilarily?

$ mkdir ~/.steam/root/compatibilitytools.d/foo
$ protonutils ge download 4.5-GE-Beta-1
$ protonutils ge clean
Unused versions found:
  * Proton-4.5-GE-Beta-1
  * foo

Really delete? [y/N] 
nning commented 2 years ago

OK, I just realized, the binary from the PR has the same problem for me :confused:

nning commented 2 years ago

I introduced a new problem by sloppily renaming variables. Should be fixed now: https://github.com/nning/protonutils/suites/4628022200/artifacts/125300210

L1Q commented 2 years ago

I introduced a new problem by sloppily renaming variables. Should be fixed now: https://github.com/nning/protonutils/suites/4628022200/artifacts/125300210

Ok now works as expected

nning commented 2 years ago

Perfect, thanks for your help!