Giter Site home page Giter Site logo

Comments (27)

geolaw avatar geolaw commented on July 28, 2024 6

I'm using nodm on a mac mini without a keyboard/mouse. Nodm logs me in, .xinitrc startx i3 and synergy
It maybe dead but it does the job in my case.

This may not the best way to handle this but it works for me
I've added this to /usr/lib/systemd/system/nodm.service

ExecStop=killall -9 nodm

shuts down every time

from nodm.

slashblog avatar slashblog commented on July 28, 2024 5

I have created the following pull request: it works for me. The following describes the issue:

The issue is that shutdown_quit_notification blocks signals. In nodm_display_manager_wait function there is waitpid call. This returns -1 if signal was received before session (dm->session.pid) was closed by systemctl. This is the happy scenario.

However, if session gets closed before signal was sent to the process. The waitpid returns dm->session.pid and the call to shutdown_quit_notification blocks SIGTERM. Due to this, catch_signals is never called and nodm proceeds to restarting display manager.

I have removed function shutdown_quit_notification altogether, as I don't see any need for it, since IMO there is no need to block these signals.

from nodm.

r-darwish avatar r-darwish commented on July 28, 2024 2

@sunweaver can you please reopen the issue? It seems that it is still relevant

from nodm.

aario avatar aario commented on July 28, 2024 2

This bug is open since years ago! Almost two years! Seriously? I have to develop it myself?!

from nodm.

mkaito avatar mkaito commented on July 28, 2024 1

from nodm.

slashblog avatar slashblog commented on July 28, 2024 1

This fixes for me.

from nodm.

felixsanz avatar felixsanz commented on July 28, 2024 1

@aario you just better spend time with math subtracting. 2018 - 2016 = 2

from nodm.

eugene2k avatar eugene2k commented on July 28, 2024 1

@aario dgw's pull request fixes the bug, so you don't actually have to develop anything yourself. Just merge the pull request into your repo. Nodm seems unmaintained though.

from nodm.

daid avatar daid commented on July 28, 2024 1

See #8, seems it needs a new maintainer, or it will "die".

from nodm.

sagb avatar sagb commented on July 28, 2024 1

The bug is still here in Debian testing (bullseye)

from nodm.

ndchugn avatar ndchugn commented on July 28, 2024

same with me, sometime i have to press on power button to turnoff the laptop

from nodm.

sunweaver avatar sunweaver commented on July 28, 2024

This should be solved by ede6a3f.

Feel free to reopen, if not.

from nodm.

eugene2k avatar eugene2k commented on July 28, 2024

Doesn't look like it is.

from nodm.

PatrickNowak avatar PatrickNowak commented on July 28, 2024

Not fixed for me either with version 0.13-1.3.

from nodm.

mkaito avatar mkaito commented on July 28, 2024

As far as I can tell, not fixed.

from nodm.

sunweaver avatar sunweaver commented on July 28, 2024

@r-darwish: Ack. Reopened. Patches are welcome!

from nodm.

needs avatar needs commented on July 28, 2024

Could this line be what cause this issue? It seems like once the session lasted longer than NODM_MIN_SESSION_TIME, it shouldn't be restarted if it ends. Changing it to something like return E_SUCCESS; should do the trick.

Also, I tried and failed to get my build of nodm working on my computer to test this change. I don't want to submit a completely untested pull request.

from nodm.

MikeMitterer avatar MikeMitterer commented on July 28, 2024

I just found this old bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=531869
You think it's somehow related?

from nodm.

felixsanz avatar felixsanz commented on July 28, 2024

This is very annoying. Any idea whats going on? Anyone working on it? I think nodm is ignoring system run levels. It shouldn't restart itself when system is moving into restart/shutdown levels

from nodm.

mkaito avatar mkaito commented on July 28, 2024

from nodm.

rtandy avatar rtandy commented on July 28, 2024

This sounds pretty similar to my Debian bug report: https://bugs.debian.org/785592

from nodm.

barnacs avatar barnacs commented on July 28, 2024

I'm also experiencing this issue, though it doesn't seem to be deterministic, sometimes it shuts down cleanly. My guess based on the logs and a look at the code:

  • session is killed by systemd
  • nodm_display_manager_wait has E_SESSION_DIED
  • before shutdown_quit_notification is called nodm receives SIGTERM, interrupt sets quit_signal_caught
  • nodm_display_manager_wait returns E_SESSION_DIED
  • nodm_display_manager_wait_restart_loop restarts the session, loops around reentering nodm_display_manager_wait, which clears quit_signal_caught

Is there a reason the signal is not acted on immediately by exiting in the handler?

from nodm.

sunweaver avatar sunweaver commented on July 28, 2024

from nodm.

barnacs avatar barnacs commented on July 28, 2024

I wonder if there's any need for the custom signal handling at all in the parent process. My solution was to remove it all and let the kernel exit/clean up. It works for my use case but I'm probably missing something.

from nodm.

aario avatar aario commented on July 28, 2024

@aario you just better spend time with math subtracting. 2018 - 2016 = 2

Fixed my comment. (That was midnight! ;-) )

from nodm.

aario avatar aario commented on July 28, 2024

@aario dgw's pull request fixes the bug, so you don't actually have to develop anything yourself. Just merge the pull request into your repo. Nodm seems unmaintained though.

Thanks for pointing me to right direction.

from nodm.

luigifab avatar luigifab commented on July 28, 2024

For me, ExecStop=killall -9 nodm in /lib/systemd/system/nodm.service fix the bug in Debian testing.
Nodm doesn't restart my session when .xinitrc run systemctl poweroff.

Howewer, when I service nodm stop, the display doesn't back to "tty1".

from nodm.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.