Obsidian-StudiosInc / entrance

General purpose Display Manager built on the Enlightenment Foundation Libraries (EFL)
GNU General Public License v3.0
25 stars 10 forks source link

plymouth should quit before to start entrance #44

Open Thanatermesis opened 4 years ago

Thanatermesis commented 4 years ago

plymouth can give issues booting the system, delaying entrance, etc...

ligthdm has an own plymouth library code to stop it before to start lightdm, I suggest to add to entrance a simple system call to run "plymouth quit" in order to stop it before to run the entrance daemon, which is much simpler than integrate the full lib of plymouth

CC: @triantares

Thanatermesis commented 4 years ago

Looking at the systemd documentation, it seems like it can be implemented correctly by adding an extra line of ExecStartPre like:

ExecStartPre=-/bin/sh -c 'plymouth quit 2>/dev/null'

Maybe this is the correct place to add this code since its more like a boot process control, and maybe entrance is never started if plymouth is not exited before (from the processes control first, so on this systemd .service file)

wltjr commented 4 years ago

Thank you for the report and your time looking into issue resolution. I have not tried to use Entrance with Plymouth, nor do I presently use Plymouth. Can you provide a link to the systemd documentation you mentioned and referenced?

I am curious if a service dependency might be another way to go. Like if the Entrance service depended on plymouth-quit.service and/or plymouth-quit-wait.service. I have no problem adding ExecStartPre to entrance.service file. I just wonder what would happen if Plymouth failed to actually stop. Why I think a service dependency might be a better way to go.

Thanatermesis commented 4 years ago

Can you provide a link to the systemd documentation you mentioned and referenced?

https://www.freedesktop.org/software/systemd/man/systemd.service.html

I am curious if a service dependency might be another way to go. Like if the Entrance service depended on plymouth-quit.service and/or plymouth-quit-wait.service. I have no problem adding ExecStartPre to entrance.service file. I just wonder what would happen if Plymouth failed to actually stop. Why I think a service dependency might be a better way to go.

Im not sure, there was some problems booting on it (stall, without not finishing to boot / not starting entrance), I re-used the code of lightdm but lightdm has a closing of plymouth (which I assume is equivalent to that ExecStartPre), and then, replaced the quit service because already quits it... of course entrance didnt do that and maybe was the cause, but in the end it was bugged (entrance never started, or sometimes), so after to play a bit with this I found this simple solution which worked

NOW: I think that by using that code, plymouth can exit sooner and then inmediately start entrance (in the other way, maybe the quit dependency order needs to wait longer, and this way will close it as soon entrance is available to start)

Thats all the information i can provide for now :) maybe you are right and plymouth needs to quit itself before to start entrance (maybe is a risk too, if lightdm replaces the quit it never quits if lightdm is not run because entrance is the selected login-manager?), and for the defense of this idea, only the "faster entrance startup" speculation comes to my head (or a more guaranteed closing of plymouth? some tests will be needed if plymouth needs to stay working for some reason, like asking a password or something)

Oh wait!

I talked too much, and now re-read your post, if im not wrong your concern is only about "what if fails to quit" (like if plymouth is not installed / command not found), thats not a problem because of the minus sign after the = value, its purpose is to ignore a failed exit status (so the service will work no matter what)