You are not logged in.

#1 2018-06-15 00:15:26

Vityou
Member
Registered: 2016-07-15
Posts: 8

Why do display managers take so long compared to startx?

I've tried a few display managers like lightdm, lxdm, and sddm.  They all take about 5 seconds to start up, and 10 seconds to load my desktop once I log in.  Startx takes about half a second to do all of this.  Is there any reason why they are so slow?  The log files say:

session c10 is already active

right before the 10 second loading time.

Offline

#2 2018-06-15 01:02:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 25,061
Website

Re: Why do display managers take so long compared to startx?

Bloat is slow.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#3 2018-06-15 02:35:18

Vityou
Member
Registered: 2016-07-15
Posts: 8

Re: Why do display managers take so long compared to startx?

So is there any reason to use one?  The reason I was experimenting with them was because I heard that startx was a bad idea.  Is this true at all?

Offline

#4 2018-06-15 02:46:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 25,061
Website

Re: Why do display managers take so long compared to startx?

Vityou wrote:

So is there any reason to use one?  The reason I was experimenting with them was because I heard that startx was a bad idea.  Is this true at all?

Good lord. Where on earth would you have heard that? If you are running X, this is the most efficient way to start it.


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#5 2018-06-15 02:51:58

Vityou
Member
Registered: 2016-07-15
Posts: 8

Re: Why do display managers take so long compared to startx?

I couldn't run startx on the kmscon console and the creator said that you should be using a display manager anyway.

https://github.com/dvdhrm/kmscon/issues/103

Offline

#6 2018-06-15 02:58:08

circleface
Member
Registered: 2012-05-26
Posts: 508

Re: Why do display managers take so long compared to startx?

That creator needs to do some more research.  startx and xinit are not at all deprecated and work just fine.  Back before Wayland, I was happily using startx for about 18 years with no trouble.

Edit: On the other hand, notice how many posts there are on these forums asking for help getting a DM or login manager to work compared to startx.

Last edited by circleface (2018-06-15 02:59:18)

Offline

#7 2018-06-15 03:48:58

Eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 1,961

Re: Why do display managers take so long compared to startx?

jasonwryan wrote:
Vityou wrote:

So is there any reason to use one?  The reason I was experimenting with them was because I heard that startx was a bad idea.  Is this true at all?

Good lord. Where on earth would you have heard that? If you are running X, this is the most efficient way to start it.

Hardly efficient, startx/xinit are full of useless bloat.

Use https://github.com/Earnestly/sx instead, it's available in [community].

Offline

#8 2018-06-15 03:51:09

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 25,061
Website

Re: Why do display managers take so long compared to startx?

Eschwartz wrote:
jasonwryan wrote:
Vityou wrote:

So is there any reason to use one?  The reason I was experimenting with them was because I heard that startx was a bad idea.  Is this true at all?

Good lord. Where on earth would you have heard that? If you are running X, this is the most efficient way to start it.

Hardly efficient, startx/xinit are full of useless bloat.

I was comparing it to a DM...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#9 2018-06-15 03:57:01

Eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 1,961

Re: Why do display managers take so long compared to startx?

jasonwryan wrote:
Eschwartz wrote:

Hardly efficient, startx/xinit are full of useless bloat.

I was comparing it to a DM...

big_smile big_smile

I find it humorous to be the guy who, when other people complain that DMs are bloaty and startx is superior, comes back with "even startx is too much bloat".

Offline

#10 2018-06-15 04:07:09

Vityou
Member
Registered: 2016-07-15
Posts: 8

Re: Why do display managers take so long compared to startx?

So should I be able to copy my .xinitrc over to the sx config?  Or can I just do something like exec openbox-session?  I don't really know what the default stuff in my .xinitrc does, but using sx with only exec openbox-session seems to work.

Last edited by Vityou (2018-06-15 04:07:47)

Offline

#11 2018-06-15 04:28:08

Eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 1,961

Re: Why do display managers take so long compared to startx?

I'd argue you should not use the default .xinitrc stuff until you know what it does. tongue

Generally, your xinitrc should be sourcing any drop-ins from /etc/X11/xinit/xinitrc.d/ and then doing whatever custom things you yourself wish to run on Xorg startup, before finally exec'ing openbox-session or whatever else you use.

And that's exactly what sxrc does too, except that sxrc must be an executable file.

When I switched, I just cp'd the former to the latter then used chmod u+x. Nothing else needed.

...

And of course, sx is 200% savings when it comes to launching the command name on the CLI, and has proper XDG_CONFIG_HOME support to reduce ~ dotfiles bloat.

Last edited by Eschwartz (2018-06-15 04:30:58)

Offline

#12 2018-06-15 08:03:28

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 3,924

Re: Why do display managers take so long compared to startx?

The DM used shouldn't really affect that start time of whatever you are using in the session by much, you might want to try to investigate why it does so.


Evil #archlinux@freenode channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#13 2018-06-15 10:54:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,335
Website

Re: Why do display managers take so long compared to startx?

I agree with Mr.E's first point, but the second half may not be necessary.

There is no reason a DM should perform that badly.  So it does beg the question, what is going wrong.  If you like solving mysteries for their own sake, then by all means, track that down.  But the fact is DMs are prone to have things go wrong (arguably due to user error of being misconfigured, but just the same, they seem easy to use incorrectly).  If there is no need for a DM, there is no point in debuging something that serves no purpose but to create problems for you to solve.

I also agree with ESchwartz that xinit code is a mess (and startx more so).  I was inspired by 'sx' to make my own version that's even arguably a bit simpler (but more limited, to just what I need it to do) in pure C.  It's all I use now on all my systems that run X.

That said, if you don't like to tinker and learn about the source code of everything you are running, but just want a smoothly running machine, use xinit/startx.  For all their wartz, they are - and have a long history of being - the standard.  The code is a horrific mess, they use a bit more ram than necessary (but this is completely trivial to any other process that you'd have running), but their end results are thoroughly tested and completely reliable.

As for the actual issue which kind of got burried in this thread, there is a troubleshooting blurb about switching between kmscon and xorg right on the wiki page:
https://wiki.archlinux.org/index.php/KM … leshooting

Although it sounds like you are trying to run xinit/startx from *within* kmscon, right?  I'm not sure if that is possible.  Just start X from another tty where you don't run kmscon.

Last edited by Trilby (2018-06-15 11:03:49)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2018-06-15 13:55:19

verndog
Member
Registered: 2007-09-21
Posts: 44

Re: Why do display managers take so long compared to startx?

Trilby wrote:

....  I was inspired by 'sx' to make my own version that's even arguably a bit simpler (but more limited, to just what I need it to do) in pure C.  It's all I use now on all my systems that run X.

....

Have you shared your version somewhere?

Offline

#15 2018-06-15 14:08:40

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,335
Website

Re: Why do display managers take so long compared to startx?

It's here.  The licensing information will be added back shortly.  As of this posting, you can consider it under the ISC license.

Note, however, that I share it primarily for educational purposes.  If you do not wish to look through the code and understand what it does, you might not be well served by using it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#16 2018-06-15 14:46:57

verndog
Member
Registered: 2007-09-21
Posts: 44

Re: Why do display managers take so long compared to startx?

Trilby wrote:

It's here.  The licensing information will be added back shortly.  As of this posting, you can consider it under the ISC license.

Note, however, that I share it primarily for educational purposes.  If you do not wish to look through the code and understand what it does, you might not be well served by using it.

Thanks. The code is straight forward enough, but without a history I would be in the dark. Was there ever a discussion on the subject.

Offline

#17 2018-06-15 15:10:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 19,335
Website

Re: Why do display managers take so long compared to startx?

In the dark about what?  Or discussion on what subject?  If you want to know how to use it line 76 should be the only thing you'd need to know: the first parameter should be a WM, script, or other executable to run (an executable xinitrc with a shebang would suffice) otherwise it starts a single xterm.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB