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

Don't require gstd-check-user-xenv.sh for systemd service #251

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jameshilliard
Copy link
Contributor

The gstd-check-user-xenv.sh script does not appear to be required for running the gstd service so we shouldn't require it for the service to start.

Note that the non-systemd init script already does not require this.

@michaelgruner michaelgruner self-assigned this Sep 15, 2021
@jameshilliard jameshilliard force-pushed the optional-gstd-check-user-xenv branch from 05ae523 to fd3b6d6 Compare September 24, 2021 15:49
@jameshilliard
Copy link
Contributor Author

rebased

@michaelgruner
Copy link
Contributor

@jcaballeros do you mind taking a look at this? I recall there was a reasoning behind this.

@jameshilliard jameshilliard force-pushed the optional-gstd-check-user-xenv branch from fd3b6d6 to 27c4aab Compare September 25, 2021 03:47
@jameshilliard jameshilliard force-pushed the optional-gstd-check-user-xenv branch from 27c4aab to 7a7671a Compare October 3, 2021 21:55
@jameshilliard jameshilliard force-pushed the optional-gstd-check-user-xenv branch from 7a7671a to 50a963a Compare March 14, 2022 18:02
@jameshilliard jameshilliard force-pushed the optional-gstd-check-user-xenv branch 2 times, most recently from 6befcbf to 8584efb Compare June 15, 2022 23:50
@michaelgruner
Copy link
Contributor

@jcaballeros may I have your input on this one?

The gstd-check-user-xenv.sh script does not appear to be required
for running the gstd service so we shouldn't require it for the
service to start.

Note that the non-systemd init script already does not require this.

Signed-off-by: James Hilliard <[email protected]>
@jameshilliard jameshilliard force-pushed the optional-gstd-check-user-xenv branch from 8584efb to 41c1183 Compare June 16, 2022 04:57
@jcaballeros
Copy link
Contributor

That script requirement was added because when the service is enabled to autostart, gstd starts before the x environment variables are defined and can't display things, though the pipelines run. I tried adding the dependency to the UI target (After in the unit file) instead, but it didn't work appropriately for Jetson at the time, so I enforced it with this script.

@jameshilliard
Copy link
Contributor Author

That script requirement was added because when the service is enabled to autostart, gstd starts before the x environment variables are defined and can't display things, though the pipelines run.

So making it optional like I did should be ok though right? For example if one isn't using x11 and is instead using wayland or a headless system this will cause the gstd service startup to fail entirely.

I tried adding the dependency to the UI target (After in the unit file) instead, but it didn't work appropriately for Jetson at the time, so I enforced it with this script.

Hmm, looks like it's expected that x11 should execute this script to set things up. Maybe jetson's systemd doesn't include that script or there's some dependency issue there? I don't use x11 myself so I'm not very familiar with it in general(I use wayland with the weston compositor).

@jcaballeros jcaballeros self-assigned this Jul 13, 2022
@michaelgruner
Copy link
Contributor

@jcaballeros can we have a follow up here?

@jcaballeros
Copy link
Contributor

Making the xenv script optional will cause issues in PC/Jetson cases where GstD is used to display. This script does not define the x environment variables, instead, it prevents GstD to start successfully until these variables are defined, so making it optional would cause its failure to be ignored and GstD would start successfully but unable to display video. I agree that we need to remove the dependency on headless systems, maybe we can check if the UI target works well on the latest Jetpack versions and avoid the use of the script.

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

Successfully merging this pull request may close these issues.

3 participants