You are not logged in.

#1 2012-07-16 20:47:55

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Why does kdm restart on tty8?

Note: I've tried searching for this as I suspect it is a common question but I think I must not be picking the right terms as I either get very few irrelevant results or many results with at least the first few pages irrelevant...

Today, I had a problem in X/KDE. I suspect that the issue was that kwin crashed and was not, for some reason, restarted as it usually is. At least, I couldn't find kwin in the list of processes and I had no apparent windows, panels etc. even though applications appeared still to be running windowlessly.

I used

sudo /etc/rc.d/kdm restart

and everything restarted just fine. However, I now have a black screen with a flashing white line at top left on tty7 and KDE/X running on tty8 rather than tty7.

I'd like to understand what exactly this means is happening on tty7 and why X was restarted on tty8. Could somebody give me a pointer to something relevant in the wiki or elsewhere? I keep finding documents asking or explaining how to start X on tty8 (possibly in addition to tty7) but I want to know why that just happened regardless!


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#2 2012-07-16 20:52:36

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Why does kdm restart on tty8?

It's because consolekit is still running. You could try it doing this on tty1

rc.d stop kdm
killall ck-launch-session
rc.d start kdm

(hope this is right, I can't test it here, because I don't have consolekit and kdm on my system)

Now X should run on tty7 again.

Last edited by Army (2012-07-16 20:52:57)

Offline

#3 2012-07-16 21:31:25

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Why does kdm restart on tty8?

I'm not sure:

ps ax | grep ck-launch-session

returns no results. Shouldn't it list it if running?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#4 2012-07-16 22:21:13

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Why does kdm restart on tty8?

I trust you have read this:

https://wiki.archlinux.org/index.php/KDE#Starting_KDE


Post your /etc/inittab and ~/.xinitrc.

And remove any mention of "kdm" from rc.conf.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#5 2012-07-16 22:47:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Why does kdm restart on tty8?

#
# /etc/inittab
#

#  Runlevels:
#    0    Halt
#    1(S)       Single-user
#    2    Not used
#    3    Multi-user
#    4    Not used
#    5    X11
#    6    Reboot

## Only one of the following two lines can be uncommented!
# Boot to console
#id:3:initdefault:
# Boot to X11
id:5:initdefault:

rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p

# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 -s 38400 tty1 linux
c2:2345:respawn:/sbin/agetty -8 -s 38400 tty2 linux
c3:2345:respawn:/sbin/agetty -8 -s 38400 tty3 linux
c4:2345:respawn:/sbin/agetty -8 -s 38400 tty4 linux
c5:2345:respawn:/sbin/agetty -8 -s 38400 tty5 linux
c6:2345:respawn:/sbin/agetty -8 -s 38400 tty6 linux

# Serial Virtual Console for KVM and others VMs
#s0:2345:respawn:/sbin/agetty -8 -s 9600 ttyS0 linux

# Hypervisor Virtual Console for Xen and KVM
#h0:2345:respawn:/sbin/agetty -8 -s 38400 hvc0 linux

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

# Example lines for starting a login manager
#x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/bin/xdm -nodaemon -config /etc/X11/xdm/archlinux/xdm-config
#x:5:respawn:/usr/sbin/gdm -nodaemon
x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >/dev/null 2>&1

# End of file
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# Uncomment this if not using a DE
# ref.: https://wiki.archlinux.org/index.php/X_resources
#[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources


# ref.:https://wiki.archlinux.org/index.php/Font#Installation
# acroread-fonts-systemwide does not enable fonts for use in X
# note that you need to run mkfontscale and mkfontdir on 
# /usr/share/fonts/adobe for this to work (I think)
if [ -d /usr/share/fonts/adobe ]; then
        xset +fp /usr/share/fonts/adobe
        xset fp rehash
fi

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

No kdm in rc.conf. (I've always used the inittab method because the wiki recommended this. The bit DSpider linked to, actually.)

EDIT: Note that X *normally* runs on tty7. It is just running on tty8 following /etc/rc.d/kdm restart. But I'm pretty sure it usually runs on tty7 then as well. (E.g. after disconnecting VGA - a very common reason to restart kdm, X etc. As far as I recall, this is the only time I've issued this command when VGA-disconnection has *not* been involved, in fact.)

Last edited by cfr (2012-07-16 22:50:52)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#6 2012-07-17 07:05:14

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Why does kdm restart on tty8?

https://wiki.archlinux.org/index.php/KDE#Starting_KDE

Read it again. The xinitrc part.

Because I don't see any "exec ck-launch-session startkde" in there.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2012-07-17 21:42:02

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: Why does kdm restart on tty8?

Read it again. The xinitrc part.

Because I don't see any "exec ck-launch-session startkde" in there.

That's because I'm using the "Using KDM (KDE Display Manager)" method and not the "Using xinitrc" alternative. More specifically, I'm using "Starting KDM through /etc/inittab [recommended]". As the wiki says:

Basically there are two ways of starting KDE. Using KDM or xinitrc.

These are alternatives. I'm using KDM through inittab (see above). So I'm not meant to have an exec line in ~/.xinitrc.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB