[OT] udev / systemd help needed

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[OT] udev / systemd help needed

Achim Gratz

I have set up a GPS module as the primary reference clock on my main
box, running Tumbleweed.  I need to configure the (USB) serial
interface, then activate a PPS device via ldattach.  The first part is
working, although I'm sure it could be more polished (notz using a fixed
device name for starters).  The second part requires me to involve
systemd as I cannot start an ldattach process from an udev trigger.
I've written a systemd unit for that and it works when started by hand,
but doesn't on boot.

I am looking for some forum where I can ask some questions about how I
can make it work correctly and put a few finishing touches on w.r.t. the
startup of ntpd and the handling of loss of clock (interface goes away
or PPS stops).  Pointers to more comprehensive documentation of systemd
and its interactions with udev are welcome as well.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [OT] udev / systemd help needed

Knurpht-openSUSE
Op vrijdag 2 februari 2018 20:29:41 CET schreef Achim Gratz:

> I have set up a GPS module as the primary reference clock on my main
> box, running Tumbleweed.  I need to configure the (USB) serial
> interface, then activate a PPS device via ldattach.  The first part is
> working, although I'm sure it could be more polished (notz using a fixed
> device name for starters).  The second part requires me to involve
> systemd as I cannot start an ldattach process from an udev trigger.
> I've written a systemd unit for that and it works when started by hand,
> but doesn't on boot.
>
> I am looking for some forum where I can ask some questions about how I
> can make it work correctly and put a few finishing touches on w.r.t. the
> startup of ntpd and the handling of loss of clock (interface goes away
> or PPS stops).  Pointers to more comprehensive documentation of systemd
> and its interactions with udev are welcome as well.
>
>
> Regards,
> Achim.
You do not only need to start the new unit, bu also to enable it

--
Gertjan Lettink, a.k.a. Knurpht

openSUSE Board Member
openSUSE Forums Team


--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [OT] udev / systemd help needed

Achim Gratz
Knurpht - Gertjan Lettink writes:
> You do not only need to start the new unit, bu also to enable it

Well, there was a reason I've thrown up my hands and asked for help…

--8<---------------cut here---------------start------------->8---
# systemctl enable pps0.service
The unit files have no installation config (WantedBy, RequiredBy, Also, Alias
settings in the [Install] section, and DefaultInstance for template units).
This means they are not meant to be enabled using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).
4) In case of template units, the unit is meant to be enabled with some
   instance name specified.
--8<---------------cut here---------------end--------------->8---

So no, there must be something else; the udev rule has
$ENV{SYSTEMD_WANTS}="pps0.service" as per a blog post I found so 3)
should be applicable.  I know that the udev rule has triggered, but not
what, if anything, systemd did.  How to debug this?


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [OT] udev / systemd help needed

Andrei Borzenkov
In reply to this post by Achim Gratz
02.02.2018 22:29, Achim Gratz пишет:
>
> I have set up a GPS module as the primary reference clock on my main
> box, running Tumbleweed.  I need to configure the (USB) serial
> interface, then activate a PPS device via ldattach.  The first part is
> working, although I'm sure it could be more polished (notz using a fixed
> device name for starters).  The second part requires me to involve
> systemd as I cannot start an ldattach process from an udev trigger.

Why?

> I've written a systemd unit for that and it works when started by hand,
> but doesn't on boot.
>
> I am looking for some forum where I can ask some questions about how I
> can make it work correctly and put a few finishing touches on w.r.t. the
> startup of ntpd and the handling of loss of clock (interface goes away
> or PPS stops).  Pointers to more comprehensive documentation of systemd
> and its interactions with udev are welcome as well.
>

You could start with showing your udev rule and unit definition.
--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [OT] udev / systemd help needed

Achim Gratz
Andrei Borzenkov writes:
> The second part requires me to involve
>> systemd as I cannot start an ldattach process from an udev trigger.
>
> Why?

Because all processes started by udev triggers get killed after the
event has expired.

> You could start with showing your udev rule and unit definition.

Again, I am asking for the right forum to do so as this list is unlikely
to be appropriate, even though I expect that some people here would know
the odd thing ot two about these things.  It may become on-topic when
I've maybe figured it out an can offer something for inclusion into
openSUSE.


Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [OT] udev / systemd help needed

Andrei Borzenkov
03.02.2018 11:33, Achim Gratz пишет:
>
> Again, I am asking for the right forum to do so as this list is unlikely
> to be appropriate,

https://lists.freedesktop.org/mailman/listinfo/systemd-devel

--
To unsubscribe, e-mail: [hidden email]
To contact the owner, e-mail: [hidden email]