Closed sideralis closed 5 years ago
I am on thud. I just tested this by doing screen /dev/ttyS1 115200
and have no problem reconnecting.
Same when just doing screen
. Maybe the problem is sumo specific?
Thanks for testing. I will switch on Thud.
I switched to Thud, but the problem is also here. I think I was not clear in my problem description so here it is:
ssh 192.168.1.xx
screen
, then launch top
or htop
Ctrl A + D
exit
ssh 192.168.1.xx
screen -r
should reconnect you to your previous and you should see top
still displaying data.
Unfortunately, this does not work.
Never mind, I will investigate and come back if I found the issue.NB: Ochrin = Sideralis :)
@sideralis no you were perfectly clear. I just tried again following exactly your steps (pressing crtl D
instead of typing exit
) and it just works (htop
).
Looks like you found an interesting bug. The only real difference I see is I connect ssh root@edison.local
. Is is possible you created a user account, allowing you to connect ssh 192.168.1.xx
?
Yes, I created some user accounts.
And I confirm your try: if I 'ssh' to root account (ssh root@192.168.1.xx
) then screen session is not lost. If I 'ssh' to user account, screen session is lost.
I will try to investigate...
I can reproduce your case. Also:
No idea why.
@sideralis it's a systemd thingy. Read more here and here (Orphaned processes). Thanks @wdehoog!
What should work (but I didn't try): KillUserProcesses=no
in /etc/systemd/logind.conf
or
compile systemd
with --without-kill-user-processes
What certainly does work (I tested):
loginctl user-status
sudo loginctl enable-linger ferry
systemd-run --scope --user screen
So it seems to be intended behavior.
If you are looking for a recipe that drops a config fragment to modify logind.conf have a look at the pwr-button-handler after this commit: https://github.com/htot/meta-intel-edison/commit/e07328c33905d74a3ca4f1f271a50c6660d513ad
Thanks for these details.
I modified /etc/systemd/logind.conf
on the target and screen is working as expected.
I will have a look at your commit.
Thanks again.
You're welcome. Maybe we should add a topic to the documentation in combination with a patch to enable lingering? In the meanwhile I think we can close this issue?
Yes, we can close. I am not too familiar with Yocto but I will try to submit a patch for this issue (not right now but in a few weeks).
I have noticed that if I connect to an edison board through ssh, launch a screen session, type for example top and detach, then I can reattach. But if I exit ssh, reconnect through ssh, then there is no more screen sessions available (
screen -r
does not work andscreen -list
does not list any sessions). As the session were stored in /tmp, I tried to move them to /run by using SCREENDIR variable. But the problem still remain. I am using sumo version. If someone know how to solve this issue, I will be happy to read.