[opensuse-factory] [OT] udev / systemd help needed
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: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
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: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 03/02/18 22:42, Andrei Borzenkov wrote:
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
When I had issues I also found there IRC channel to be quite helpful although that was a couple of years ago. -- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B
participants (4)
-
Achim Gratz
-
Andrei Borzenkov
-
Knurpht - Gertjan Lettink
-
Simon Lees