You are not logged in.

#1 2014-06-21 14:25:42

mfaridi
Member
Registered: 2010-12-15
Posts: 192

KDM and GDM can not start sometimes

I use Arch Linux , one week ago my GDM can not start and I can not login to system and use it , but after two or three reboot , GDM work and I can login and can use Gnome3  , when GDM can not load , I press Alt+F2 and I can login  with command line and I can use system , but I do not have Desktop env . I think  this problem is happen by GDM nad I think GDM has problem . So I migrate to KDE and KDM , when I install KDE and KDM and start KDM by systemctl  , after first reboot KDM , can not start , but after next reboot KDM start  and I can use KDE  , but  in next reboot KDE can not start again , KDE sometimes start and sometimes can not start .
why GDM and KDM sometimes start and sometimes ca not start  ?
Is this problem happen by KDM or GDM or other packages ?
DO I need check other packages ?

Offline

#2 2014-06-21 15:05:11

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: KDM and GDM can not start sometimes

mfaridi wrote:

I use Arch Linux , one week ago my GDM can not start and I can not login to system and use it , but after two or three reboot , GDM work and I can login and can use Gnome3

When something like that happened, the first thing to do is to look into the logs to try to determine what problem is reported.
Only you has access to your log files... Nobody can guess what is in them.

I think  this problem is happen by GDM nad I think GDM has problem . So I migrate to KDE and KDM

I don't think this is the best approach to solve the initial problem, because gnome and kde are very different environments.
Do you really want to switch to KDE? If this is not the case, why install it?

when I install KDE and KDM and start KDM by systemctl  , after first reboot KDM , can not start , but after next reboot KDM start  and I can use KDE

Maybe this is related to this thread https://bbs.archlinux.org/viewtopic.php?id=182376 where systemd-timers trigger kdm xserver launching timeout.
But this may be the same cause of gdm not starting or not. This is why I suggest that you stay in the environment you really want to use, and search a solution there.

why GDM and KDM sometimes start and sometimes ca not start  ?

Maybe there are two different problems, or not...
Try to change the Oncalendar value of the man-db.timer and of the updatedb.timer as explained in the thread above.
And see if this solve your problem.
But you'd better choose a DE and stick with it, rather than switching at the first problem.

Offline

#3 2014-06-22 12:53:51

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: KDM and GDM can not start sometimes

I think this problem is happen by systemd , because when I run these commands and reboot system KDM start and I can use KDE

 systemctl start kdm.service && systemctl enable kdm.service 

everything is OK
but after 16 hours that problem happen and KDM do not start and I have to repeat that command again
So I run this command

 systemctl list-dependencies 

and I see this

[mostafa@mfaridi ~]$ systemctl list-dependencies'
> ^C
[mostafa@mfaridi ~]$ systemctl list-dependencies 
default.target
* |-kdm.service
* |-systemd-readahead-collect.service
* |-systemd-readahead-replay.service
* `-multi-user.target
*   |-connman.service
*   |-dbus.service
*   |-dhcpcd@enp0s10.service
*   |-dhcpd4.service
*   |-dkms.service
*   |-hostapd.service
*   |-iptables.service
*   |-logrotate.timer
*   |-man-db.timer
*   |-mysqld.service
*   |-nginx.service
*   |-php-fpm.service
*   |-shadow.timer
*   |-systemd-ask-password-wall.path
*   |-systemd-logind.service
*   |-systemd-user-sessions.service
*   |-tor.service
*   |-vnstat.service
*   |-basic.target
*   | |-paths.target
*   | |-slices.target
*   | | |--.slice
*   | | `-system.slice
*   | |-sockets.target
*   | | |-dbus.socket
*   | | |-dm-event.socket
*   | | |-systemd-initctl.socket
*   | | |-systemd-journald.socket
*   | | |-systemd-shutdownd.socket
*   | | |-systemd-udevd-control.socket
*   | | `-systemd-udevd-kernel.socket
*   | |-sysinit.target
*   | | |-dev-hugepages.mount                                                                                                                                                                                                                
*   | | |-dev-mqueue.mount                                                                                                                                                                                                                   
*   | | |-kmod-static-nodes.service                                                                                                                                                                                                          
*   | | |-lvm2-lvmetad.socket                                                                                                                                                                                                                
*   | | |-proc-sys-fs-binfmt_misc.automount                                                                                                                                                                                                  
*   | | |-sys-fs-fuse-connections.mount                                                                                                                                                                                                      
*   | | |-sys-kernel-config.mount                                                                                                                                                                                                            
*   | | |-sys-kernel-debug.mount                                                                                                                                                                                                             
*   | | |-systemd-ask-password-console.path                                                                                                                                                                                                  
*   | | |-systemd-binfmt.service                                                                                                                                                                                                             
*   | | |-systemd-journal-flush.service                                                                                                                                                                                                      
*   | | |-systemd-journald.service                                                                                                                                                                                                           
*   | | |-systemd-modules-load.service                                                                                                                                                                                                       
*   | | |-systemd-random-seed.service                                                                                                                                                                                                        
*   | | |-systemd-sysctl.service                                                                                                                                                                                                             
*   | | |-systemd-tmpfiles-setup-dev.service                                                                                                                                                                                                 
*   | | |-systemd-tmpfiles-setup.service                                                                                                                                                                                                     
*   | | |-systemd-udev-trigger.service                                                                                                                                                                                                       
*   | | |-systemd-udevd.service                                                                                                                                                                                                              
*   | | |-systemd-update-utmp.service                                                                                                                                                                                                        
*   | | |-systemd-vconsole-setup.service                                                                                                                                                                                                     
*   | | |-cryptsetup.target                                                                                                                                                                                                                  
*   | | |-local-fs.target                                                                                                                                                                                                                    
*   | | | |--.mount                                                                                                                                                                                                                          
*   | | | |-home.mount
*   | | | |-systemd-remount-fs.service
*   | | | `-tmp.mount
*   | | `-swap.target
*   | |   |-dev-disk-by\x2did-ata\x2dMaxtor_6Y080M0_Y20LQX5C\x2dpart5.swap
*   | |   |-dev-disk-by\x2duuid-2103a6ae\x2d1079\x2d4149\x2d9e14\x2df98258866fd5.swap
*   | |   |-dev-sdb5.swap
*   | |   `-dev-sdb5.swap
*   | `-timers.target
*   |   `-systemd-tmpfiles-clean.timer
*   |-getty.target
*   | `-getty@tty1.service
*   `-remote-fs.target

everything is oK and   (*) are in green color but these objects are not green and I see (*) Red before them

*   |-dhcpd4.service
*   |-hostapd.service
*   | | |-systemd-journal-flush.service
*   | | |-systemd-modules-load.service

I think these services has problem

Last edited by mfaridi (2014-06-22 13:50:41)

Offline

#4 2014-06-22 12:54:56

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: KDM and GDM can not start sometimes

*   |-dhcpd4.service
*   |-hostapd.service
*   | | |-systemd-journal-flush.service
*   | | |-systemd-modules-load.service

how can I solve this problem ?

Last edited by mfaridi (2014-06-22 13:51:58)

Offline

#5 2014-06-22 16:05:04

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: KDM and GDM can not start sometimes

I take from your post that you chose to switch to KDE/kdm, rather than to solve the problem with Gnome/gdm; so be it.

mfaridi wrote:

but after 16 hours that problem happen and KDM do not start and I have to repeat that command again

You don't need to enable kdm.service several times; if it fails to start, you just need to use 'systemctl start kdm.service'; but before that, you should look at the problem in the output of 'systemctl status kdm', ie before re-starting it.

everything is oK and   (*) are in green color but these objects are not green and I see (*) Red before them

The red stars do not denote a problem but an inactive service; this is not a problem for services which run once and go to an inactive state after that;
to list services with a problem, it is the command 'systemctl --failed'.
Are you sure of the 'dhcpd4.service' name?

To clarify, could you, after a boot with a failed kdm.service, post the output of
systemctl status kdm

before starting it again, please.

I am pretty sure kdm fails because of xserver launching timeout.

Offline

#6 2014-06-23 11:53:29

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: KDM and GDM can not start sometimes

berbae wrote:

I take from your post that you chose to switch to KDE/kdm, rather than to solve the problem with Gnome/gdm; so be it.

mfaridi wrote:

but after 16 hours that problem happen and KDM do not start and I have to repeat that command again

You don't need to enable kdm.service several times; if it fails to start, you just need to use 'systemctl start kdm.service'; but before that, you should look at the problem in the output of 'systemctl status kdm', ie before re-starting it.

everything is oK and   (*) are in green color but these objects are not green and I see (*) Red before them

The red stars do not denote a problem but an inactive service; this is not a problem for services which run once and go to an inactive state after that;
to list services with a problem, it is the command 'systemctl --failed'.
Are you sure of the 'dhcpd4.service' name?

To clarify, could you, after a boot with a failed kdm.service, post the output of
systemctl status kdm

before starting it again, please.

I am pretty sure kdm fails because of xserver launching timeout.

Thanks guys
that problem happen again and when I run this command

systemctl status kdem 

I see this

[root@mfaridi ~]# cat kdm2.txt 
* kdm.service - K Display Manager
   Loaded: loaded (/usr/lib/systemd/system/kdm.service; enabled)
   Active: active (running) since Mon 2014-06-23 09:32:01 IRDT; 9min ago
 Main PID: 431 (kdm)
   CGroup: /system.slice/kdm.service
           `-431 /usr/bin/kdm -nodaemon

Jun 23 09:32:49 mfaridi kdm[431]: X server startup timeout, terminating
Jun 23 09:32:01 mfaridi systemd[1]: Starting K Display Manager...
Jun 23 09:32:01 mfaridi systemd[1]: Started K Display Manager.
Jun 23 09:32:51 mfaridi kdm[431]: X server for display :0 cannot be started, session disabled

this problem is  depend on X  server
how I can fix  this ?

Offline

#7 2014-06-24 08:04:32

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: KDM and GDM can not start sometimes

See the thread I posted in #2 above.
A simple workaround is to edit the '/usr/share/config/kdm/kdmrc' file:

# Core config for local displays
[X-:*-Core]
# How often to try to run the X-server. Running includes executing it and
# waiting for it to come up.
# Default is 1
#ServerAttempts=1
# How long to wait for a local X-server to come up.
# Default is 30
#ServerTimeout=30

and put a longer timeout value (for example 120) and more than one attempts.

Another less easy way is to change the OnCalendar value of the man-db.timer and of the updatedb.timer.

Cheers.

Offline

#8 2014-06-25 13:26:43

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: KDM and GDM can not start sometimes

berbae wrote:

See the thread I posted in #2 above.
A simple workaround is to edit the '/usr/share/config/kdm/kdmrc' file:

# Core config for local displays
[X-:*-Core]
# How often to try to run the X-server. Running includes executing it and
# waiting for it to come up.
# Default is 1
#ServerAttempts=1
# How long to wait for a local X-server to come up.
# Default is 30
#ServerTimeout=30

and put a longer timeout value (for example 120) and more than one attempts.

Another less easy way is to change the OnCalendar value of the man-db.timer and of the updatedb.timer.

Cheers.

Thanks
Thanks
Your guide solve my problem and I edit kdmrc file and everything is OK right now and KDM start normail
But what I must do when I want comeback to Gnome and GDM ,before I have this problem and I think GDM has problem and go to KDE and KDE
which file I must conf to GDM start normal and fast ??

Offline

#9 2014-06-30 14:15:16

mfaridi
Member
Registered: 2010-12-15
Posts: 192

Re: KDM and GDM can not start sometimes

what I must do when I want come back to Gnome and GDM , which file I must config ?

Offline

#10 2014-06-30 20:54:15

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: KDM and GDM can not start sometimes

If you wanted to stay with Gnome/gdm, you shouldn't have switched to KDE/kdm.
It can be the same problem with Xserver starting timeout, or another problem entirely.

To determine if the systemd timers are causing the issue, you can try to disable them temporarily, and see after a reboot, 24 hours later, if Gnome/gdm starts correctly:
# systemctl disable man-db.timer updatedb.timer

Last edited by berbae (2014-06-30 20:56:15)

Offline

Board footer

Powered by FluxBB