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

Decky Loader plugins have mixed compatability #203

Open
DylanRJohnston-FZ opened this issue Nov 4, 2023 · 8 comments
Open

Decky Loader plugins have mixed compatability #203

DylanRJohnston-FZ opened this issue Nov 4, 2023 · 8 comments

Comments

@DylanRJohnston-FZ
Copy link

DylanRJohnston-FZ commented Nov 4, 2023

Any decky loader plugin functionality backed by a python script doesn't appear to work at all, with the only hint of errors in the deck-loader service at startup.

Nov 04 16:39:36 nixos systemd[1]: Starting Steam Deck Plugin Loader...
Nov 04 16:39:36 nixos systemd[1]: Started Steam Deck Plugin Loader.
Nov 04 16:39:36 nixos decky-loader[929]: [helpers][WARNING]: Failed to execute get_system_pythonpaths(): [Errno 2] No such file or directory: 'python3'
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: plugin_path: /var/lib/decky-loader/plugins
Nov 04 16:39:36 nixos decky-loader[929]: [base_events][ERROR]: Task exception was never retrieved
Nov 04 16:39:36 nixos decky-loader[929]: future: <Task finished name='Task-5' coro=<service_start() done, defined at /nix/store/frvbs0a50i2vn9wym9w9y4n91n9l053v-decky-loader-2.10.5/lib/d>
Nov 04 16:39:36 nixos decky-loader[929]: Traceback (most recent call last):
Nov 04 16:39:36 nixos decky-loader[929]:   File "/nix/store/frvbs0a50i2vn9wym9w9y4n91n9l053v-decky-loader-2.10.5/lib/decky-loader/localplatformlinux.py", line 138, in service_start
Nov 04 16:39:36 nixos decky-loader[929]:     res = run(cmd, stdout=PIPE, stderr=STDOUT)
Nov 04 16:39:36 nixos decky-loader[929]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 04 16:39:36 nixos decky-loader[929]:   File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/subprocess.py", line 548, in run
Nov 04 16:39:36 nixos decky-loader[929]:     with Popen(*popenargs, **kwargs) as process:
Nov 04 16:39:36 nixos decky-loader[929]:          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nov 04 16:39:36 nixos decky-loader[929]:   File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/subprocess.py", line 1026, in __init__
Nov 04 16:39:36 nixos decky-loader[929]:     self._execute_child(args, executable, preexec_fn, close_fds,
Nov 04 16:39:36 nixos decky-loader[929]:   File "/nix/store/ffll6glz3gwx342z0ch8wx30p5cnqz1z-python3-3.11.5/lib/python3.11/subprocess.py", line 1950, in _execute_child
Nov 04 16:39:36 nixos decky-loader[929]:     raise child_exception_type(errno_num, err_msg, err_filename)
Nov 04 16:39:36 nixos decky-loader[929]: FileNotFoundError: [Errno 2] No such file or directory: 'systemctl'
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: import plugins from /var/lib/decky-loader/plugins
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: ControllerTools
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded Controller Tools
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: vibrantDeck
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded vibrantDeck
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: moondeck
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded MoonDeck
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: hltb-for-deck
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Plugin HLTB for Deck is passive
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded HLTB for Deck
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: sharedeck-y
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded DeckSettings
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: decky-storage-cleaner
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded Storage Cleaner
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: Bluetooth
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded Bluetooth
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: found plugin: protondb-decky
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Plugin ProtonDB Badges is passive
Nov 04 16:39:36 nixos decky-loader[929]: [loader][INFO]: Loaded ProtonDB Badges
Nov 04 16:39:46 nixos decky-loader[929]: [loader][INFO]: Hot reload enabled
Nov 04 16:39:52 nixos decky-loader[929]: [main][INFO]: Loading Decky frontend!
Nov 04 16:40:08 nixos decky-loader[929]: [updater][INFO]: Updated remote version information

In particular this line

Nov 04 16:39:36 nixos decky-loader[929]: [helpers][WARNING]: Failed to execute get_system_pythonpaths(): [Errno 2] No such file or directory: 'python3'
@DylanRJohnston-FZ
Copy link
Author

Decky loader plugins that don't have python backends like HLTB work just fine.

@DylanRJohnston-FZ
Copy link
Author

The CEF console within Decky-Loader's developer tools is full of errors about being unable to connect to a websocket which appears to be the main way Decky-Loader's front-end communicates with its backend https://github.com/SteamDeckHomebrew/decky-loader/blob/44e6f03b0655a9f1e87530141ad907b9553744cc/backend/src/plugin.py#L163.

@DylanRJohnston-FZ
Copy link
Author

DylanRJohnston-FZ commented Nov 4, 2023

So I did a bit more digging. Decky loader didn't appear to have any detailed logging so I forked it and added the fork as an overlay.

This let me discover that it isn't a global problem, but a series of problems with different plugins.

Storage Control

It tries to report the size of steam files here. It uses environ["HOME"] which is set up by decky-loader here. Based on this, you can fix it by changing the decky-loader user to your username e.g. dylanj.

Vibrant Deck

Vibrant Deck fails with errors, being unable to find xprop, I've tried adding xorg.xprop to the extraPackages option in the decky-loader module, and while this does get correctly written to the service definition in /etc/systemd/system/decky-loader.service, for some reason it's not in the PATH when I look via htop. Something in-between must be modifying the PATH of the process.

Should I start putting some documentation together on which plugins work and what the workarounds are if any?

@DylanRJohnston-FZ DylanRJohnston-FZ changed the title Decky Loader plugins with python backends don't work Decky Loader plugins have mixed compatability Nov 4, 2023
@DylanRJohnston-FZ
Copy link
Author

I also wonder if decky-loader upstream would welcome a DEBUG logging mode to help make tracking down these problems a lot easier.

@pongo1231
Copy link
Contributor

Does appending the bin path of xorg.xprop to the PATH in the decky-loader script work?

@K900
Copy link
Contributor

K900 commented Nov 5, 2023

VibrantDeck is fundamentally a hack and should not be used, use Steam's native color management which is more correct.

@DylanRJohnston-FZ
Copy link
Author

DylanRJohnston-FZ commented Nov 6, 2023

Hey K900, while that may be true, I was more proposing putting together a document detailing what decky-loader plugins work, and what, if any work-arounds are required for them. The entry for vibrant deck could be "Don't use it, use the native colour management instead" and would save people time trying to get it to work.

Further more it appears that injecting new packages into PATH via the extraPackages configuration option is not functioning correctly as something else is setting the PATH for the systemd service.

@Cloudef
Copy link

Cloudef commented Jan 2, 2024

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

No branches or pull requests

4 participants