-
Notifications
You must be signed in to change notification settings - Fork 58
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
PMS Service Blocking WSL, Plex Post Processing #73
Comments
Unsure, but maybe wsl needs a GUI? |
Not thinking WSL does (though I may be wrong!), but perhaps PMS is not running "the same"? I did check the processes ... it seems to be running as the same user, and still 64 bit, but no tray icon (for PMS). Hmm. |
Does your script try to access files on a mapped drive? |
I run a batch file (no mapped drives), that calls a script in WSL - that WSL script does call mapped drives. You suspect something? 😉 Thanks! |
Yep, that'll be it. |
OK, oddly enough - it even breaks if I just try to run Thanks! |
What are the mounts? |
Yes, that makes sense - just want to make sure we're talking the same thing ... LOL. I have no (Windows) mapped drives in use, rather only mounts inside WSL. Hmmm ... so I then tried a second distribution, with no mounts inside WSL - same issue, even just for |
Ok, services in windows run in session 0, which is not a user session. There is no explorer instance, so no task bar etc. Many applications require things like the taskbar, mapped drives etc so can't run in session 0. Perhaps wsl falls into this category. |
I think you hit the nail on the head - thanks! Found this, Hmmm. Not sure how to get around it though. Dang it! |
Digging, but ... is there no way to spawn / launch a shell in another session? I can see from Task Manager, that when I manually run PMS, it is in Session ID 2. Thanks! |
Thanks! Will do some digging in PsExec. Seems to let me set / change Session ID, just need to figure out how to set the value correctly 😆. And not sure if I need to change user or not. Appreciate it! |
@arrmo can I ask, what is it you're actually trying to do with this action? Maybe there is another way to achieve this without using wsl. |
Sure, NP! And yes, open to suggestions - for sure. I'm trying to run my (Plex) Post Processing script - transcode from incoming high bit rate MPEG2VIDEO (from my cable company), to lower bit rate HEVC => save storage space ... don't need to save video at ~ 18-20 Mbps on my HDD 😆. Plex allows me to do this - it (automatically) calls a Post Processing script before adding the newly recorded item to the library. So just trying to (re) use the script I have running on Linux - and it does work in WSL, no issues at all. Clear as mud? |
PsExec works! I just have to force / set the session id, so for example ... |
I suppose you just need to be careful to ensure you kill everything, not sure what the implications of kicking off multiple user sessions, at some point you might reach a performance problem. Surely you can do this in windows natively. |
Ya, trying to find a better way around this 😞. Still digging! |
Arrgh. You would think so. Not having any luck though, even with |
OK, this one is going to sound screwy, but I re-checked it today 😆.
I have been pulling my hair out for about a week, as my Plex Post Processing script (post DVR recording) would not properly call WSL (to run my script). Tried all sorts of things, and thing funny as it is, I did a Plex Server update - and that "hung" PmsService (other thread there). I stopped it, temporarily ran PMS manually ... and all of a sudden my post processing was working again! So I did this in a more controlled fashion ... and it turns out, running PMS via the PmsService is the underlying cause. If I run PMS "manually" (the application), then my WSL script is fine. But if PMS is started and controlled by PmsService, my script fails, with the following error when trying to call WSL,
Make any sense?
Thanks!
The text was updated successfully, but these errors were encountered: