marissa999 / decky-recorder

Other
66 stars 7 forks source link

Donst work any more (>Deckyloader v2.10.3) #62

Closed Conan179 closed 1 year ago

Conan179 commented 1 year ago

Hello@all Since the latest (it could have been 2 or 3 updates) preview steam client update, the recorder no longer works for me. The "/tmp/decky-recorder.log" says the following: Decky Recorder: 2023-08-09 20:57:12,795 INFO Traceback (most recent call last): File "/home/deck/homebrew/plugins/decky-recorder/main.py", line 29, in import psutil File "/usr/lib/python3.10/site-packages/psutil/init.py", line 102, in from . import _pslinux as _psplatform File "/usr/lib/python3.10/site-packages/psutil/_pslinux.py", line 26, in from . import _psutil_linux as cext ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib/python3.10/site-packages/psutil/init.py)

Decky Recorder: 2023-08-09 20:57:12,796 INFO Loading config

Immediately after a restart, the switch for the replay mode is on, if I deactivate it, close the recorder and open it again, it is on again, the recording buttons are grayed out and cannot be selected. Starting a recording doesn't work either

Decky Recorder: 2023-08-09 21:13:02,717 INFO Is capturing? False Decky Recorder: 2023-08-09 21:13:02,731 INFO Is Rolling? False Decky Recorder: 2023-08-09 21:13:02,749 INFO Current mode: localFile Decky Recorder: 2023-08-09 21:13:02,770 INFO Current local filepath: /home/deck/Videos Decky Recorder: 2023-08-09 21:13:02,780 INFO Current local file format: mp4 Decky Recorder: 2023-08-09 21:15:22,217 INFO Disable rolling was called begin Decky Recorder: 2023-08-09 21:15:22,217 INFO Is capturing? False Decky Recorder: 2023-08-09 21:15:22,217 INFO Deleted all files in rolling buffer Decky Recorder: 2023-08-09 21:15:22,217 INFO Disable rolling was called end Decky Recorder: 2023-08-09 21:15:27,802 INFO Starting recording Decky Recorder: 2023-08-09 21:15:27,803 INFO Starting recording for mp4 with mux mp4mux Decky Recorder: 2023-08-09 21:15:27,803 INFO Is capturing? False Decky Recorder: 2023-08-09 21:15:27,803 INFO Stopping recording Decky Recorder: 2023-08-09 21:15:27,803 INFO Is capturing? False Decky Recorder: 2023-08-09 21:15:27,803 INFO Error: No recording process to stop Decky Recorder: 2023-08-09 21:15:27,803 INFO Traceback (most recent call last): File "/home/deck/homebrew/plugins/decky-recorder/main.py", line 77, in start_capturing await Plugin.clear_rogue_gst_processes(self) File "/home/deck/homebrew/plugins/decky-recorder/main.py", line 60, in clear_rogue_gst_processes gst_pids = find_gst_processes() ^^^^^^^^^^^^^^^^^^^^ File "/home/deck/homebrew/plugins/decky-recorder/main.py", line 37, in find_gst_processes for child in psutil.process_iter(): ^^^^^^ NameError: name 'psutil' is not defined

Decky Recorder: 2023-08-09 21:16:43,372 INFO Is capturing? False Decky Recorder: 2023-08-09 21:16:43,467 INFO Is Rolling? False Decky Recorder: 2023-08-09 21:16:43,490 INFO Current mode: localFile Decky Recorder: 2023-08-09 21:16:43,522 INFO Current local filepath: /home/deck/Videos Decky Recorder: 2023-08-09 21:16:43,532 INFO Current local file format: mp4

safijari commented 1 year ago

Looks like psutil is now included by default on the Deck. Try removing the following block from main.py

try:
    sys.path.append(str(DEPSPATH / "psutil"))
    import psutil

    logger.info("Successfully loaded psutil")
except Exception:
    logger.info(traceback.format_exc())
Conan179 commented 1 year ago

There's nothing in the log, but it still doesn't work.

safijari commented 1 year ago

Alright, so here's the deal. You can fix the issue by bringing back the above block and changing the sys.path line to sys.path = [str(DEPSPATH / "psutil")] + sys.path. Something in Valve's vendored psutil is broken but we can circumvent it by forcing it to use the package I supply.

However.

That will not fix things, because capturing on the preview build has been broken for a long time. Here's an issue I opened in the gamescope github about it. I currently do not know how to fix it or if Valve will fix it or not. I'm very sorry about this.

For now if you wanna use recorder then please do what I do and go back to stable or beta.

Conan179 commented 1 year ago

I added:

try: sys.path = [str(DEPSPATH / "psutil")] + sys.path import psutil logger.info("Successfully loaded psutil") except Exception: logger.info(traceback.format_exc())

nothing has changed since then, still the same behavior.

Conan179 commented 1 year ago

I'm back to stable now, but it doesn't work either, I always get this error message: Decky Recorder: 2023-08-14 10:14:05,085 INFO Traceback (most recent call last): File "/home/deck/homebrew/plugins/decky-recorder/main.py", line 29, in import psutil File "/usr/lib/python3.10/site-packages/psutil/init.py", line 102, in from . import _pslinux as _psplatform File "/usr/lib/python3.10/site-packages/psutil/_pslinux.py", line 26, in from . import _psutil_linux as cext ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib/python3.10/site-packages/psutil/init.py)

Decky Recorder: 2023-08-14 10:14:05,086 INFO Loading config

Conan179 commented 1 year ago

I changed the title because now it turned out that the Steamclient is not the culprit, but the Deckyloader! a downgrade to version v2.10.3 causes the deckyloader to work again. @safijari

padgriffin commented 1 year ago

I changed the title because now it turned out that the Steamclient is not the culprit, but the Deckyloader! a downgrade to version v2.10.3 causes the deckyloader to work again. @safijari

On decky-loader 2.10.3 (never updated to 2.10.4) and still experiencing the same symptoms on my Deck.

Conan179 commented 1 year ago

Here is a video with the latest steam client and decky loader v2.10.3 https://github.com/marissa999/decky-recorder/assets/1906242/e3bc3566-c678-4d02-a5e1-2a949c5d9409

safijari commented 1 year ago

Closing in favor of #65. Fix has been submitted to store.

Conan179 commented 1 year ago

@safijari no bug Just wanted to let you know, Decky Recorder works with the 3.4.9 beta without any problems