Add decky-spy plugin
Decky Spy
Decky Spy is a plugin to monitor memory and processes on your Steam Deck. It depends on DeckyLoader.
Features
- Monitor CPU usage, network information.
- Monitor memory usage of processes, and warn when the memory usage is high.
- Monitor battery level, and warn when the battery is low.
- Monitor current session playtime, and remind you to take a break when you play games for a long time.
Checklist:
Developer Checklist
- [x] I am the original author or an authorized maintainer of this plugin.
- [x] I have abided by the licenses of the libraries I am utilizing, including attaching license notices where appropriate.
Plugin Checklist
- [x] I have verified that my plugin works properly on the Stable and Beta update channels of SteamOS.
- [x] 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.
Any update about this PR?
@Seraphli apologies, I suspect the workflow failed and then the PR was passed over due to having to prioritize PRs without failed builds. It looks like the workflow worked this go around and the plugin should now be on the testing store.
Thanks. BTW, can anyone fix the installer? https://github.com/SteamDeckHomebrew/decky-installer/issues/16
@TrainDoctor I test the plugin in test store, but I find the plugin is not built properly. May I ask how the plugin is built? So I can fix the process. When I build the plugin, I use my modified task to build a python module in a docker environment, which avoids install python requirements on Steam Desk. https://github.com/Seraphli/decky-spy/blob/1063de3e9b4b5cbd56341f215420d89033a8de9c/.vscode/tasks.json#L79-L112 But this module is not present in the store version.
@TrainDoctor I test the plugin in test store, but I find the plugin is not built properly. May I ask how the plugin is built? So I can fix the process. When I build the plugin, I use my modified task to build a python module in a docker environment, which avoids install python requirements on Steam Desk. https://github.com/Seraphli/decky-spy/blob/1063de3e9b4b5cbd56341f215420d89033a8de9c/.vscode/tasks.json#L79-L112 But this module is not present in the store version.
All python requirements must be bundled into the defaults folder in order to work properly. Use the CLI builder to see what the plugin will build as on the store.
@Seraphli your recent commit bundles our CLI binary into your defaults folder which will not accomplish anything other than shipping an unnecessary binary with a broken plugin. You need to take any python libraries into a py_modules folder and place that folder in the defaults folder where the plugin can grab the libraries directly from py_modules etc. Please look towards other plugins that use python libraries for examples of how to do this properly.
I have moved the python libraries into py_modules
I have moved the python libraries into py_modules
Please understand that these will not be deployed with your plugin unless you move py_modules into the defaults folder.
I follow this repo, https://github.com/steam3d/MagicPodsDecky This repo didn't move py_modules into default And I tested the package locally, the plugin works.
I follow this repo, https://github.com/steam3d/MagicPodsDecky This repo didn't move py_modules into default And I tested the package locally, the plugin works.
Ah, I think I missed a change in our CI/CD at some point. Just checked the built plugin and it seems to be layed out correctly. All good for testing. @SteamDeckHomebrew/decky-testers
I update the plugin using test-store. The plugin works fine on Steam family beta and decky loader beta.
I update the plugin using test-store. The plugin works fine on Steam family beta and decky loader beta.
A user other than the plugin developer needs to submit a testing report for the plugin to go to production. Thanks.
A user other than the plugin developer needs to submit a testing report for the plugin to go to production. Thanks.
Yeah I get it. I just report my test result.
I update the plugin using test-store. The plugin works fine on Steam family beta and decky loader beta.
Testing on Stable Decky/SteamOS/Client; get error: [ERROR]: Failed to start DeckySpy! 2024-08-04 23.49.47.log
I update the plugin using test-store. The plugin works fine on Steam family beta and decky loader beta.
Testing on Stable Decky/SteamOS/Client; get error: [ERROR]: Failed to start DeckySpy! 2024-08-04 23.49.47.log
@aaburri Could you make another test? Swtich to desktop mode and then open a terminal. run python and then import psutil.
And then print(psutil.__version__)
I just notice there already have psutil installed in the system python library. But I don't know whether this psutil on my steam deck is installed by myself or come with SteamOS. And the log shows the error seems to be related with importing module from system's psutil.
I update the plugin using test-store. The plugin works fine on Steam family beta and decky loader beta.
Testing on Stable Decky/SteamOS/Client; get error: [ERROR]: Failed to start DeckySpy! 2024-08-04 23.49.47.log
@aaburri Could you make another test? Swtich to desktop mode and then open a terminal. run
pythonand thenimport psutil. And thenprint(psutil.__version__)I just notice there already have
psutilinstalled in the system python library. But I don't know whether this psutil on my steam deck is installed by myself or come with SteamOS. And the log shows the error seems to be related with importing module from system'spsutil.
(deck@steamdeck ~)$ python
Python 3.11.3 (main, Jun 5 2023, 09:32:32) [GCC 13.1.1 20230429] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> print(psutil.__version__)
5.9.5
>>>
@TrainDoctor I have made an update. Still waiting for building the plugin.
@aaburri I have done a test on my SteamDeck. Could you please do another test about the new version? Thanks. @TrainDoctor Is there a docker image that can help testing the plugin? I don't know where to find a clean test environment.
Not sure if this is supported but thought maybe I should report this
On decky v3 stable , bazzite, steam game session, desktop pc
the plugin seems to kill the decky process
See: https://github.com/SteamDeckHomebrew/decky-loader/issues/662#issuecomment-2350781843
Uninstalling the decky spy plugin fixes those issues.
I reinstalled it and the issues came back
Left all settings at default values except the addition timer i set it to 2 hours and enabled it
Not sure if this is supported but thought maybe I should report this
On decky v3 stable , bazzite, steam game session, desktop pc
the plugin seems to kill the decky process
See: SteamDeckHomebrew/decky-loader#662 (comment)
Uninstalling the decky spy plugin fixes those issues.
I reinstalled it and the issues came back
Left all settings at default values except the addition timer i set it to 2 hours and enabled it
@zany130 Thanks for reporting. I don't have anyissue on SteamOS 3.5.19 and DeckyLoader v3.0.0. I will try to update OS and test again. I switched to stable channel and my SteamDeck still stays at SteamOS 3.5.19. I don't have this issue. Maybe I can modify the button to disable refreshing process info later. So this psutils issue don't happen.
Idk if this is maybe because of something in fedora( vs the arch base of steamos) which bazzite is based on maybe systemd's oom thing?
Idk if this is maybe because of something in fedora( vs the arch base of steamos) which bazzite is based on maybe systemd's oom thing?
From your log, it shows psutils library crash with some problem. This plugin current is using psutils that already in the system, since SteamOS seems have psutils installed. So there might be some problems with your system psutils. Maybe reinstall it (which may re-compile it) will solve this issue.
I don't think bazzite has psutils at least I don't find it the path
also you cant really "install or reinstall "packages on bazzite on the system level since its immutable just like steam os (technically you can overlay rpm packages but its recommended you don't)
EDIT: NVM bazzite does seems to pre install python3-psutil from fedora https://packages.fedoraproject.org/pkgs/python-psutil/python3-psutil/
EDIT2: it looks like the package has been updated since I last tried decky-spy. I will try it again after making sure I am fully up to date. otherwise I guess I should open a bug report on the package since steam-os psutil seems fine?
It could be an issue with psutil, or it might be due to a misalignment between some underlying C++ dynamic library on your system and the version it was compiled with. It could also be caused by Python, because from the log you provided last time, psutil actually ran for a while before indicating a memory issue related to C.
Sep 13 20:41:01 bazzite PluginLoader[6070]: Fatal Python error: none_dealloc: deallocating None: bug likely caused by a refcount error in a C extension
Sep 13 20:41:01 bazzite PluginLoader[6070]: Python runtime state: initialized
You can check if your version differs from the one mentioned above. From my experience, the Python version and the psutil version mentioned above don't have any issues.
Still happens on a update bazzite system so it's probably an issue with psutils or Python like you said from fedora (bazzite doesn't change this from fedora)
Need testers for this. Giving until the end of the month for this plugin to receive a proper testing report or the PR will be closed.
Does this mean I need to find a tester for testing?
Does this mean I need to find a tester for testing?
Yes, just like any other plugin update/submission.
Decky 3.0.1, SteamOS 3.5.19 A) No major blocking issues B) No minor issues C) A list of currently installed plugins
- To Moon - 0.2.5
- DeckySpy - 0.6.7-96d61e6
D) Yay