Obsidian-StudiosInc / entrance

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

When i use entrance to launch lxqt, entrance doesn't die and allow openbox or whatever WM to replace it #20

Closed SolarAquarion closed 6 years ago

SolarAquarion commented 6 years ago

or simply become a locker in the background or whatever

wltjr commented 6 years ago

Does entrance_client keep running? There should be a entrance daemon/server process. Only the client should have any UI and take over a from a WM. Something else maybe going wrong.

SolarAquarion commented 6 years ago

entrance.log

wltjr commented 6 years ago

Thank you for the log. What version of EFL? git? If your using git may try 1.20.7.

Once again it seems something is going horribly wrong. This line immediately after starting the client looks suspicious. I think something is happening and its getting stuck causing issues for lxqt.

ERR<944>:entrance_client ../src/daemon/entrance.c:155 _entrance_client_error() ERR<7768>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7e1f (Elm.Hoversel) not registered in manager 0x4000000107c0

I also see that same thing just after sending themes, normal end of client startup. Where it waits for user to select user, enter password, etc.

INF<944>:entrance_client ../src/daemon/entrance.c:104 _entrance_client_data() ../src/bin/entrance_connect.c:108 Themes received

ERR<944>:entrance_client ../src/daemon/entrance.c:155 _entrance_client_error() ERR<7768>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7e1f (Elm.Hoversel) not registered in manager 0x4000000107c0

Seems a fair amount of issues related to focus. I believe there is a known EFL issue in git regarding focus. Thus it maybe a git issue, if your using that. If not then its something else....

More entrance fun... :)

SolarAquarion commented 6 years ago

I am using the stable version of erl

On Mon, Apr 30, 2018, 11:36 AM William L Thomson Jr < notifications@github.com> wrote:

Thank you for the log. What version of EFL? git? If your using git may try 1.20.7.

Once again it seems something is going horribly wrong. This line immediately after starting the client looks suspicious. I think something is happening and its getting stuck causing issues for lxqt.

ERR<944>:entrance_client ../src/daemon/entrance.c:155 _entrance_client_error() ERR<7768>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7e1f (Elm.Hoversel) not registered in manager 0x4000000107c0

I also see that same thing just after sending themes, normal end of client startup. Where it waits for user to select user, enter password, etc.

INF<944>:entrance_client ../src/daemon/entrance.c:104 _entrance_client_data() ../src/bin/entrance_connect.c:108 Themes received

ERR<944>:entrance_client ../src/daemon/entrance.c:155 _entrance_client_error() ERR<7768>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7e1f (Elm.Hoversel) not registered in manager 0x4000000107c0

Seems a fair amount of issues related to focus. I believe there is a known EFL issue in git regarding focus. Thus it maybe a git issue, if your using that. If not then its something else....

More entrance fun... :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/20#issuecomment-385436785, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iO95Qf5zkCKZaG98rjfKI4eg6r-Vks5tty-IgaJpZM4Tr9iZ .

SolarAquarion commented 6 years ago

*efl

On Mon, Apr 30, 2018, 11:36 AM William L Thomson Jr < notifications@github.com> wrote:

Thank you for the log. What version of EFL? git? If your using git may try 1.20.7.

Once again it seems something is going horribly wrong. This line immediately after starting the client looks suspicious. I think something is happening and its getting stuck causing issues for lxqt.

ERR<944>:entrance_client ../src/daemon/entrance.c:155 _entrance_client_error() ERR<7768>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7e1f (Elm.Hoversel) not registered in manager 0x4000000107c0

I also see that same thing just after sending themes, normal end of client startup. Where it waits for user to select user, enter password, etc.

INF<944>:entrance_client ../src/daemon/entrance.c:104 _entrance_client_data() ../src/bin/entrance_connect.c:108 Themes received

ERR<944>:entrance_client ../src/daemon/entrance.c:155 _entrance_client_error() ERR<7768>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7e1f (Elm.Hoversel) not registered in manager 0x4000000107c0

Seems a fair amount of issues related to focus. I believe there is a known EFL issue in git regarding focus. Thus it maybe a git issue, if your using that. If not then its something else....

More entrance fun... :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/20#issuecomment-385436785, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iO95Qf5zkCKZaG98rjfKI4eg6r-Vks5tty-IgaJpZM4Tr9iZ .

wltjr commented 6 years ago

Well that sucks, there goes hoping it was related to that. I do not think there are focus issues in 1.20.7, maybe more an E thing not sure. Seems there maybe a bunch of extra noise in the log from other attempts. Looking at the end I see

INF<944>:entrance_client ../src/daemon/entrance.c:104 _entrance_client_data() ../src/bin/entrance_connect.c:70 Auth granted :)
../src/bin/entrance_connect.c:197 auth handler remove

INF<9084>:entrance ../src/daemon/entrance_session.c:51 _entrance_session_cookie_add() write auth on display :0.0 with file /home/solaraquarion/.Xauthority
INF<9084>:entrance ../src/daemon/entrance_session.c:190 _entrance_session_run() Executing: /usr/bin/zsh --login -c /etc/entrance/Xsession startlxqt > /home/solaraquarion/.entrance_session.log 2>&1 
INF<944>:entrance ../src/daemon/entrance.c:350 _signal_cb() signal 15 received
INF<944>:entrance ../src/daemon/entrance.c:354 _signal_cb() terminate client
INF<944>:entrance ../src/daemon/entrance.c:350 _signal_cb() signal 1 received
INF<944>:entrance ../src/daemon/entrance.c:354 _signal_cb() terminate client

I assume that is from when you logged into lxqt and had the WM issue. Which then you went to stop entrance. Maybe worth taking a look at _.entrancesession.log in your users home directory.

Maybe something zsh related, only tested myself using bash. I think Travis also uses bash vs Ubuntu's dash default. Or maybe something is happening with lxqt.

What that should look like is this

INF<3083>:entrance ../entrance-9999/src/daemon/entrance_session.c:199 _entrance_session_run() Executing: /bin/bash --login -c ck-launch-session /etc/entrance/Xsession  /usr/bin/enlightenment_start > /home/wlt/.entrance_session.log 2>&1
INF<2932>:entrance_client ../entrance-9999/src/daemon/entrance.c:105 _entrance_client_data() ../entrance-9999/src/bin/entrance_gui.c:856 screen managed
../entrance-9999/src/bin/entrance_client.c:94 connect shutdown
../entrance-9999/src/bin/entrance_client.c:96 gui shutdown
../entrance-9999/src/bin/entrance_gui.c:234 Gui shutdown

INF<2932>:entrance_client ../entrance-9999/src/daemon/entrance.c:105 _entrance_client_data() ../entrance-9999/src/bin/entrance_client.c:98 login shutdown
../entrance-9999/src/bin/entrance_client.c:100 elm shutdown

INF<2932>:entrance_client ../entrance-9999/src/daemon/entrance.c:105 _entrance_client_data() ../entrance-9999/src/bin/entrance_client.c:102 ecore x shutdown

INF<2932>:entrance ../entrance-9999/src/daemon/entrance_server.c:61 _entrance_server_del() server client disconnected
INF<2932>:entrance_client ../entrance-9999/src/daemon/entrance.c:105 _entrance_client_data() ../entrance-9999/src/bin/entrance_client.c:104 ecore shutdown

INF<2932>:entrance_client ../entrance-9999/src/daemon/entrance.c:105 _entrance_client_data() ../entrance-9999/src/bin/entrance_client.c:106 eina shutdown

INF<2932>:entrance_client ../entrance-9999/src/daemon/entrance.c:105 _entrance_client_data() ../entrance-9999/src/bin/entrance_client.c:108 exit

INF<2932>:entrance ../entrance-9999/src/daemon/entrance.c:117 _entrance_client_del() client terminated
INF<2932>:entrance ../entrance-9999/src/daemon/entrance.c:161 _entrance_session_wait() session running pid 3083, waiting...

Though I am getting some errors in after elm shutdown and eina. Maybe something else going on I need to address. Not sure if that is causing this issue for you. But it does not even seem to try to stop entrance_client on its own.

The client shutting should be the first thing after _entrance_session_run(). Which in your case seems to be hanging and the client not stopping.

SolarAquarion commented 6 years ago

entrance_session.log

wltjr commented 6 years ago

I forgot to ask, is this just lxqt? I think you have a bunch of environments available. Do they all hang after log in or just lxqt? Does E hang for you as well, or any others? Thanks!

SolarAquarion commented 6 years ago

i have not tried E, only lxqt, and LXDE.

wltjr commented 6 years ago

Do both lxqt and LXDE hang or just lxqt? I am not seeing anything in the session log that is standing out as an issue. A few interesting things, but nothing that seems related to the issue at hand.

What are you seeing on screen? Does the screen change or just go blank, or missing stuff?

I did recode how the client exits and session handling, etc. Very likely I broke something there. I had it all working, but auto login is not working for me now and causing something really funky. But I have not seen issues when not using auto login. But I suspect some of what you are experiencing maybe related to my recent changes.

SolarAquarion commented 6 years ago

Both LXQT session and Entrance launches together, so i see entrance on the screen

wltjr commented 6 years ago

Ok so it sounds like entrance_client is hanging, and its not shutting down after you successfully log in. Need to see if I can replicate to debug. Can you try logging into E to see if that hangs as well.

Thank you very much for testing and reporting issues with Entrance. Definitely covering bases here I did not with your different environment. I think between Gentoo, Travis/Ubuntu, and you on BSD, can really help to debug problems with Entrance and get it pretty rock solid. Someday... :)

wltjr commented 6 years ago

Wait, what do you mean they both launch?

You start entrance, then log into LXQT/DE. At which time Entrance remains, and a LXQT/DE session starts?

Or do you mean, when you start LXQT it is starting Entrance?

SolarAquarion commented 6 years ago

yes

wltjr commented 6 years ago

If entrance remains after log in, something is happening and the client is not getting shutdown. Or it is trying to shutdown and not able. Which causes something with X, that LXQT/LXDE does not like. Probably prevents it from becoming the X client since entrance_client is still the X client.

I bet you still have a entrance_client process. If you kill that, I assume it will finish the log in process and allow you a normal session. You may try that, killall entrance_client. If you have to use -9 that will only confirm something is hanging X.

SolarAquarion commented 6 years ago

I already switched back to lightdm and using lxqt perfectly

SolarAquarion commented 6 years ago

oh

wltjr commented 6 years ago

Not blaming lxqt, likely something off in Entrance. Just trying to figure out the cause of the issues.

SolarAquarion commented 6 years ago

The terminal stays on the screen as I kill sessions

SolarAquarion commented 6 years ago

screengrab-2018-04-30-19-32-10

SolarAquarion commented 6 years ago

This is what happens as i leave and re-enter sessions

SolarAquarion commented 6 years ago

X session prepare complete, now launching wm /usr/bin/openbox-session xdg-launch: E: xdg-launch.c +10271 : main() : could not find file for spec 'OPENBOX'

entrance.log

wltjr commented 6 years ago

Have you updated your config file? entrance.conf? Your missing a new -p option for the port. I should have caught that sooner.

This

entrance_client -d :1.0 -t default -g 99 -u 99

Should be

entrance_client -d :1.0 -t default -g 99 -u 99 -p 43

43 for Xephyr or 42 for local entrance. The provided utils/entrance_xephyr.sh will change to 43 in conf via sed.

wltjr commented 6 years ago

Or if you run more instances, each need its own port for client/server communication. It can be any number, not sure were 42 came from. If using TCP that would be a actual port, otherwise its a local system socket. Not sure about switching from sytem, to user, to TCP via config. For now its hard coded as system socket. Before the port was also hard coded. If you have entrance installed and running on system and then in xephyr. I think a Xephyr client was talking to the system entrance daemon vs the local one for xephyr. I changed it so a test entrance in Xephyr would talk to a test daemon and not the system one. Or any instance combos would not talk to other instances, all using their own port.

SolarAquarion commented 6 years ago

I mostly just use the entrance.conf as given by default

wltjr commented 6 years ago

Checkout the stuff in utils folder. You likely want a modified version of those. You can use the defaults if you do not have entrance installed in system, and running as your login manager. I use entrance to login, and thus need any testing version to have different settings. Thus I modified the local_build.sh in utils to make such changes. They copy config files to the local build directory and sed change the display and port numbers. Then when you run xephyr via entrance_xephyr.sh, uses the modified config file in the build directory.

Either way, need to update your entrance.conf, and maybe your install. The port number comes from config, but the command is hard coded. Your command is missing the -p option. Which a portion is expecting. Something is off there. May need to make sure your using the latest alpha3 tag or git. Then can check entrance.log, and when you see entrance_client has a -p. I think that may resolve your issue.

SolarAquarion commented 6 years ago

https://github.com/Obsidian-StudiosInc/entrance/blob/master/data/entrance.conf.in

Its -p 42 in the main entrance.conf

On Mon, Apr 30, 2018, 8:24 PM William L Thomson Jr notifications@github.com wrote:

Checkout the stuff in utils folder https://github.com/Obsidian-StudiosInc/entrance/tree/master/utils. You likely want a modified version of those. You can use the defaults if you do not have entrance installed in system, and running as your login manager. I use entrance to login, and thus need any testing version to have different settings. Thus I modified the local_build.sh https://github.com/Obsidian-StudiosInc/entrance/blob/master/utils/local_build.sh#L23 in utils to make such changes. They copy config files to the local build directory and sed change the display and port numbers. Then when you run xephyr via entrance_xephyr.sh https://github.com/Obsidian-StudiosInc/entrance/blob/master/utils/entrance_xephyr.sh, uses the modified config file in the build directory.

Either way, need to update your entrance.conf, and maybe your install. The port number comes from config, but the command is hard coded. Your command is missing the -p option. Which a portion is expecting. Something is off there. May need to make sure your using the latest alpha3 tag or git. Then can check entrance.log, and when you see entrance_client has a -p. I think that may resolve your issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/20#issuecomment-385567678, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iFXomYvEkfPjPQ2wbUxqKhgXYvj9ks5tt6skgaJpZM4Tr9iZ .

wltjr commented 6 years ago

Yes I know. If you have more than one entrance that needs to be different. My system installed entrance I use to log in is under 42. The one I use for testing via xephyr locally is 43. So they do not conflict.

Either way in your case, if you look at your log. Your entrance_client does not have -p 42 or -p 43. See the code, the format for that command has a -p option now.

snprintf(buf, sizeof(buf),
                "export HOME=%s; export USER=%s;"
                "export LD_LIBRARY_PATH="PACKAGE_LIB_DIR";%s "
                PACKAGE_BIN_DIR"/entrance_client -d %s -t %s -g %d -u %d -p %d",
                home_path, entrance_user, entrance_config->command.session_login,
                entrance_display, entrance_config->theme,
                entrance_gid,entrance_uid, entrance_config->port);
PT("Exec entrance_client: %s", buf);

Till you see that in your log, you will likely have issues.

SolarAquarion commented 6 years ago

ahah

On Mon, Apr 30, 2018, 8:43 PM William L Thomson Jr notifications@github.com wrote:

Yes I know. If you have more than one entrance that needs to be different. My system installed entrance I use to log in is under 42. The one I use for testing via xephyr locally is 43. So they do not conflict.

Either way in your case, if you look at your log. Your entrance_client does not have -p 42 or -p 43. See the code, the format for that command https://github.com/Obsidian-StudiosInc/entrance/blob/master/src/daemon/entrance.c#L213 has a -p option now.

snprintf(buf, sizeof(buf), "export HOME=%s; export USER=%s;" "export LD_LIBRARY_PATH="PACKAGE_LIB_DIR";%s " PACKAGE_BIN_DIR"/entrance_client -d %s -t %s -g %d -u %d -p %d", home_path, entrance_user, entrance_config->command.session_login, entrance_display, entrance_config->theme, entrance_gid,entrance_uid, entrance_config->port);PT("Exec entrance_client: %s", buf);

Till you see that in your log, you will likely have issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Obsidian-StudiosInc/entrance/issues/20#issuecomment-385570620, or mute the thread https://github.com/notifications/unsubscribe-auth/AFD6iGhqQXh3VySSX6-SeijWp817zmVNks5tt6-bgaJpZM4Tr9iZ .

wltjr commented 6 years ago

This stuff was all hard coded before. I am moving it to config where it makes sense.

wltjr commented 6 years ago

I left the type of connection hard coded for now. Its using a system connection, a socket file in /tmp. Which that port number is part of the path. So if you had more than one running it would conflict.

If you see the docs on ecore connections. There are different types. I am using ECORE_CON_LOCAL_SYSTEM. I dont think ECORE_CON_LOCAL_USER can be used. Though maybe could use ECORE_CON_TCP or ECORE_CON_UDP. If using a remote client/server for like legacy X client/server. Which most no one uses anymore. Thus the client and server on the same system and talk via a socket file in temp with a port number.

wltjr commented 6 years ago

The whole client connecting to server is like the Achilles heal of Entrance. It really needs much better error handling there when it fails to connect and things go wrong. It limps along and gives the impression things are working to many times when things are not. Thus issue #17

wltjr commented 6 years ago

Were you able to log into lxqt or lxde? After making sure your using the latest entrance and the -p42 argument is showing. I think that is likely the cause of your issues. Since that is what connects client to server. Which if not connected, client likely will not shut down properly and cause the issues for lxqt/lxde.

SolarAquarion commented 6 years ago

it's working ALRIGHT

wltjr commented 6 years ago

Cool, that confirms that I definitely need to work on better error handling when client and server have issues connecting. Likely just have it fail and stop. That way log will reflect one failed to start. I think that is better than the stuff you have been experiencing; missing sessions, issues with lxqt/lxde, etc. I think you would rather have seen in logs server/client failed to connect. Then we don't waste time figuring out where the problem might come from and look directly to client/server connection related stuff.

Anyway thanks for testing it out, and sorry for those issues. I really have not added any new features. Just spent months fixing code and improving error handling, etc...

SolarAquarion commented 6 years ago

Error handling can always be improved, that's how you get good programs which don't have bugs

wltjr commented 6 years ago

I agree, thus issue #17 If you see other areas error handling can be improved let me know. I think that is the biggest one and causes most issues. Coding proper error handling can take considerably more time than the initial coding. Then comes the testing aspect. Its hard to replicate all tests conditions for error handling. That is something I face under SonarCloud for code cover. Every conditional needs all paths followed for proper coverage of code.

SolarAquarion commented 6 years ago

I Still have the issue, this time the panel stays active, like with cinnamon entrance.log

wltjr commented 6 years ago

Ok, seems like for some reason something is not fully shutting down. I believe I have seen this myself so I think I can replicate and debug. Something is going wrong during elm shutdown.

../src/bin/entrance_client.c:100 elm shutdown

ERR<966>:entrance_client ../src/daemon/entrance.c:150 _entrance_client_error() ERR<1239>:eet lib/eet/eet_lib.c:645 eet_shutdown() File '/usr/share/elementary/themes/default.edj' is still open 1 times 

Then it spits out a bunch of stuff, and resumes with ecore x shutdown etc. It should look like this

INF<9567>:entrance_client ../src/daemon/entrance.c:105 _entrance_client_data() ../src/bin/entrance_client.c:98 login shutdown
../src/bin/entrance_client.c:100 elm shutdown
INF<9567>:entrance_client ../src/daemon/entrance.c:105 _entrance_client_data() ../src/bin/entrance_client.c:102 ecore x shutdown

You are getting a lot of error output from elm shutdown before ecore x shutdown. That is likely related to your problem. Maybe a symptom vs the actual issue. Or maybe the issue itself. Though the rest of your log looks good and seems the client does terminate. I may need to check to see if it really did stop, or X did not hang. I bet you still have an entrance_client process or something. More fun!

wltjr commented 6 years ago

This maybe the cause of the issue I have not seen this before I do not believe.

INF<1808>:entrance ../src/daemon/entrance_session.c:199 _entrance_session_run() Executing: /usr/bin/zsh --login -c /etc/entrance/Xsession mate-session > /home/solaraquarion/.entrance_session.log 2>&1 
ERR<966>:entrance_client ../src/daemon/entrance.c:150 _entrance_client_error() ERR<1239>:elementary lib/elementary/efl_ui_focus_manager.c:153 node_get() Focusable 0x4000000a7d21 (Elm.Hoversel) not registered in manager 0x4000000106c2

Maybe some elementary widget that gets orphaned and prevents properly elm/elementary shutdown.

wltjr commented 6 years ago

@SolarAquarion can you see if this is still an issue for you with latest from git.

If it does still exist. Could you please try with auto login enabled. Change the boolean autologin value in entrance.conf, the userlogin value to your user, and also the session. Likely want something other than Enlightenment for the session. The session name is the same as the Name= value in any *.desktop file. Make sure to update your configuration file first, as it has a new value session. Otherwise it would auto log into the first session found... Default is of course Enlightement session.

If auto start works but the normal UI does not. Then something entrance_client is doing to not release things or something for other window managers. If auto login does not work, then maybe a larger EFL issue or something. But that would be strange since its not doing any UI stuff on auto login.

Thank you for testing and your time!

wltjr commented 6 years ago

If your using xephyr, please use the stuff in utils/ folder. The utils/local_build.sh, then you can run utils/entrance_xephyr.sh. For auto login, modify the default data/entrance.conf.in with your changes, enable autologin, change username, and session. Just makes that a bit easier. That is how I test things out locally. Aside from doing an actual install and testing that way as well.

SolarAquarion commented 6 years ago

I should end this bug and create a new one

wltjr commented 6 years ago

Ok