Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

pcdm: autologin broke #1455

Closed
danboid opened this issue Jul 23, 2017 · 17 comments
Closed

pcdm: autologin broke #1455

danboid opened this issue Jul 23, 2017 · 17 comments

Comments

@danboid
Copy link

danboid commented Jul 23, 2017

pcdm autologin isn't working for me with both Lumina and MATE under both the latest STABLE and UNSTABLE versions with the timeout set to 0 seconds. I think it tries but fails and you end up having to login manually.

@RodMyers
Copy link

current laptop and previous BE, autologin worked here

@danboid
Copy link
Author

danboid commented Jul 23, 2017

Previous BE? You mean autologin worked for you before and after your last system update?

Are you running STABLE or UNSTABLE? What have you set timeout to?

@RodMyers
Copy link

virtualbox is broke upstream in FreeBSD at the moment, so previous BE, within virtualbox, UNSTABLE autologin worked.

Current UNSTABLE, autologin works for me.

never paid attention to time out, so whatever the default is

@q5sys
Copy link
Member

q5sys commented Jul 23, 2017

Its a race condition, and Ken has already fixed this: beanpole135/pcdm@de4d11d
I'm not sure what commit the shipped package is built from.

@danboid
Copy link
Author

danboid commented Jul 23, 2017

I thought I'd re-open this because its been over a month since Ken said he fixed it and I'm sure UNSTABLE has been rebuilt since then, right?

@RodMyers
Copy link

UNSTABLE

let me re-quantify my answer. on initial bootup on metal and virtualbox, autologin works.

on metal, loggin out and back in , autologin DOES NOT work

@q5sys
Copy link
Member

q5sys commented Jul 24, 2017

I'm not sure what Ken's thoughts are on the issue, but enabling auto-login when a user manually logs out seems to be opposite of the intention of 'logging out'. If you have more than one user on a system, there would be no way to EVER change users, because as soon as User A logs out they get logged back in, meaning User B can never log in.

@RodMyers
Copy link

i agree. but on my systems and in virtualbox. autologin works as advertised. was looking at outside the box approach to the "autologin" question.

i am unable to duplicate on any of my systems

@danboid
Copy link
Author

danboid commented Jul 24, 2017

I believe the default autologin timeout is 10 seconds, and as Rod says this does work (under UNSTABLE, at least) but setting the autologin timeout to either 0 or 1 seconds fails. I have not tried 2-9 but I want a 0 second (instant) timeout, ideally.

Some display managers, such as the Mint one, do offer an autorelogin timeout for when you have just logged out but I personally don't like nor do I understand the need for such a feature. I only want instant (0 second) autologin on initial boot to work.

@q5sys
Copy link
Member

q5sys commented Jul 24, 2017

Since the old code only allowed timeouts of >1 second... can you set it to 2 and see if that works for you? If it works when you set it to two seconds... I'm going to guess you're not running the latest code. My system is a complete mess right now, due to testing another patch so me testing it isn't the cleanest assessment.

There's a joke in there somewhere, about the state of how busy your life is... if an extra 2 seconds at login is a problem for your daily schedule... but i'm to tired to try and find it. lol

@danboid
Copy link
Author

danboid commented Jul 24, 2017

Yes, 2 second timeout does autologiin OK

Is there any reason we can't have a 0 second timeout?

@q5sys
Copy link
Member

q5sys commented Jul 24, 2017

If my understanding of the issue is correct... this is the scenario.
At a certain point PCDM loads and triggers the auto-login function. However, depending on other things that are loading at the time, PCDM may not be able to successfully launch the desktop... so instead it fails back and relaunches PCDM, which when it tries to trigger the auto-login function again... succeeds because whatever was going on during the boot process has finished.

It's a classic race condition. The 'timeout' you see and are presented with in lumina-config are just a way for the user to set a variable amount of time before logging in automatically.
This does not change the fact that you cannot launch the desktop before certain boot processes have settled. At the code level there is no '0 second' timeout. Certain things have to finish before the desktop will be able to launch. What is happening is that PCDM thinks things are settled in the boot process when in fact they are still working.
A delay has to be somewhere in PCDM so that the boot process can settle. You're getting hung up on a number in your GUI instead of understanding what's actually going on in your machine. PCDM cannot launch the desktop until certain things have finished. Right now, PCDM is attempting to and is failing as you see. The reason it works when you select 2 seconds for the timeout is that that period of time is enough for 'whatever' to finish and be settled so that PCDM can properly launch the desktop.
The solutions are:
A) Set the GUI to only allow you to select values greater than or equal to 2 seconds.
B) Put wait times in the PCDM code to offset the attempted launch of the desktop so that the boot process can settle. So a user thinks his entry of 0 actually does something.

Ken's patch did the latter. It inserted a wait method until things had settled. If you are on the latest PCDM code... we will have to extend that a little more.

No option will get you a faster login, because it's not possible to start the desktop until other processes have settled.

Would you mind running an MD5 hash on your PCDM binary? Just drop to a shell and run
md5 /usr/local/bin/PCDM-session
and let me know the hash it spits back.

@danboid
Copy link
Author

danboid commented Jul 24, 2017

62a25273a40370b7e6664e4fa4af601d

@q5sys
Copy link
Member

q5sys commented Jul 24, 2017

You're not on the latest version.
pcdm-session

@danboid
Copy link
Author

danboid commented Jul 24, 2017

OK, I think I might have another bug to report then. Why does the GUI update manager tell me I'm up-to-date?

@q5sys
Copy link
Member

q5sys commented Jul 24, 2017

probably because the version in github isn't the version we are shipping. We don't recompile our packages and push them to the repo every day. The version of PCDM you have 'should' have the fix, but I'll have to check to see if PCDM is an older package.
However considering the boot time you mentioned on the forum, I'm wondering if something on your system is the reason why this is failing, things are obviously taking a lot longer to start up and run than I would expect.

@beanpole135
Copy link
Member

Tested/verified that autologin with a delay of 0 seconds works fine with the version of PCDM from source.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants