LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-06-2008, 01:00 AM   #1
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
Problems with session switching


I'm having problems switching between sessions.

Back when I used PCLinuxOS on this machine, all the function keys from F1 to F6 (with Ctrl and Alt held down, obviously) gave me access to terminal sessions. I found them quite useful for running stuff that I wanted to keep on going even if I had to shut down my X (KDE/GNOME) session. I also used the F7 and F8 keys to switch between X sessions.

I've just dumped PCLinuxOS for Ubuntu Gutsy, and spent some time installing lots of software and configuring it just the way I like it.

But then I some point I must have installed something weird or somehow altered some configuration file, because session switching doesn't work. I'm 99% sure that it worked on the fresh Ubuntu installation. It's almost certainly something I've done. Perhaps it was to do with trying out GDM, KDM, XDM and WDM.

If I try to switch to tty1 (say), I get an unresponsive black screen with a blinking cursor. Sometimes it's not possible to get back to the X session. When that happens, I get a screen which is blank apart from the mouse pointer, which I can move. At that point, only a hard reset will get me out of it.

-------

I would appreciate it very much if someone could help me solve this for myself. It would be great if you could point me towards some clear documentation explaining what processes and configuration files govern the spawning of sessions and the switching between them. Thanks.
 
Old 01-06-2008, 07:19 PM   #2
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Question

Quote:
...Perhaps it was to do with trying out GDM, KDM, XDM and WDM...
Yep.

What *dm are you running now?
 
Old 01-07-2008, 04:18 AM   #3
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kzutter View Post
Yep.

What *dm are you running now?
I've gone back to the default GDM. Would I be right in thinking that it's the *DM that manages tty sessions? Or is it getty or something like that?
 
Old 01-07-2008, 06:42 PM   #4
hex1a4
Member
 
Registered: Dec 2007
Location: ON CA
Distribution: Xubuntu 8.04; Xubuntu 6.06.2
Posts: 64

Rep: Reputation: 15
Quote:
Originally Posted by ChameleonDave View Post

<snip>

If I try to switch to tty1 (say), I get an unresponsive black screen with a blinking cursor.
Did you change kernel options in your /boot/grub/menu.list to something saaay vga=791. If so, for some reason Gutsy has the VESA frame buffer disabled by default so you have to enable it.

Quote:
Sometimes it's not possible to get back to the X session. When that happens, I get a screen which is blank apart from the mouse pointer, which I can move. At that point, only a hard reset will get me out of it.
I had the same problem after upgrading from Feisty and to get my desktop back I had to refresh the screen (F5) sometime more than once, and if that didn't help I switched workspaces (Ctrl+Alt+arrow) or started an application like the run dialog (Alt+F2). Eventually I did a clean install and things are working fine.

Quote:
I would appreciate it very much if someone could help me solve this for myself. It would be great if you could point me towards some clear documentation explaining what processes and configuration files govern the spawning of sessions and the switching between them. Thanks.
Gettys are spawned in /etc/event.d/tty#
X sessions are started in /etc/gdm/gdm.conf-custom

For example:

To have four consoles (F1-F4) and three X sessions (F5-F7) at startup you have to remove /etc/event.d/tty5 and /etc/event.d/tty6 and then in /etc/gdm/gdm.conf-custom under the [daemon] section set

FirstVT=5

then under the [servers] section tell GDM what servers to run on which display

[servers]
0=Standard
1=Standard
2=Standard

This will run 3 Standard servers beginning with F5 (ie Ctrl+Alt+F5 will open display 0, Ctrl+Alt+F6 display, 1 etc)

Look in /etc/gdm/gdm.conf for details (but don't edit it, edit gdm.conf-custom)
 
Old 01-08-2008, 03:36 AM   #5
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hex1a4 View Post
Did you change kernel options in your /boot/grub/menu.list to something saaay vga=791. If so, for some reason Gutsy has the VESA frame buffer disabled by default so you have to enable it.
Not manually, but I may have changed some an option through a wizard.

Looking at that file right now, I can see that the vga number is specified in Ubuntu's "automagic" section, which I don't really understand because PCLinuxOS's menu.lst was much more straightforward. Here's the file:

Code:
# Splashimage line added by kubuntu-grub-splashimages package
splashimage=(hd1,4)/boot/grub/splashimages/fiesta.xpm.gz

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.


default         0
timeout         5

# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color light-gray/blue blink-red/cyan

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret


### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=3abe0171-4f3c-443e-ad0f-515f3f234032 ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,4)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=splash vga=792

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=true

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=true

## ## End Default Options ##

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd1,4)
kernel          /boot/vmlinuz-2.6.22-14-generic root=UUID=3abe0171-4f3c-443e-ad0f-515f3f234032 ro splash vga=792
initrd          /boot/initrd.img-2.6.22-14-generic
quiet
savedefault

title           Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root            (hd1,4)
kernel          /boot/vmlinuz-2.6.22-14-generic root=UUID=3abe0171-4f3c-443e-ad0f-515f3f234032 ro single
initrd          /boot/initrd.img-2.6.22-14-generic

title           Ubuntu 7.10, memtest86+
root            (hd1,4)
kernel          /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# XP on /dev/sda2
title           Microsoft Windows XP Professional
root            (hd0,1)
savedefault
makeactive
chainloader     +1
Edit: looking at the same file in a version of Gusty that I have in a virtual machine, I can see that it is essentially identical.

Quote:
Originally Posted by hex1a4 View Post
Eventually I did a clean install and things are working fine.
Yeah, I'm very used to that method of trouble-shooting from my Windows days, and I have to admit that I've done it a couple of times with Linux, but I really want to learn to properly resolve these problems.

Last edited by ChameleonDave; 01-08-2008 at 03:43 AM. Reason: extra info
 
Old 01-08-2008, 05:41 AM   #6
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hex1a4 View Post
Gettys are spawned in /etc/event.d/tty#
X sessions are started in /etc/gdm/gdm.conf-custom
I've compared those files in my normal installation and my virtual installation, and they are identical, except for trivial differences in /etc/gdm/gdm.conf-custom.
 
Old 01-08-2008, 08:27 AM   #7
hex1a4
Member
 
Registered: Dec 2007
Location: ON CA
Distribution: Xubuntu 8.04; Xubuntu 6.06.2
Posts: 64

Rep: Reputation: 15
The vga=792 kernel option in your /boot/grub/menu.lst is why you aren't seeing the consoles. Refer to my HOWTO on how to fix it.
 
Old 01-08-2008, 12:17 PM   #8
premnarayan
LQ Newbie
 
Registered: Jan 2008
Location: noida
Distribution: archlinux, slackware
Posts: 21

Rep: Reputation: 15
I don't know much about Ubuntu, but some distros disable console ttys when running on graphical runlevel(mostly 4 or 5). Try to change the default runlevel to 3 in /etc/inittab and you should be able to log in to terminal console after reboot. Or fireup a terminal and log in as root and run telinit 3 to go to level 3. You should get terminals up. That wont solve your issue of having consoles 1-6 open while running X , but atleast you will know if something is wrong with your ttys.

Last edited by premnarayan; 01-08-2008 at 12:19 PM.
 
Old 01-08-2008, 06:59 PM   #9
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hex1a4 View Post
The vga=792 kernel option in your /boot/grub/menu.lst is why you aren't seeing the consoles. Refer to my HOWTO on how to fix it.
Ah, I see that it's in there twice.

I've just tried changing the second occurrence of it (out of the automagic section), and all it did was change the size of the boot splash. Everything was the same as before by the time it got to GDM.

I also implemented everything in the how-to, and all it did was turn the black screen with a blinking cursor into a messed-up screen with many coloured horizontal lines.
 
Old 01-08-2008, 07:12 PM   #10
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by premnarayan View Post
I don't know much about Ubuntu, but some distros disable console ttys when running on graphical runlevel(mostly 4 or 5). Try to change the default runlevel to 3 in /etc/inittab and you should be able to log in to terminal console after reboot. Or fireup a terminal and log in as root and run telinit 3 to go to level 3. You should get terminals up. That wont solve your issue of having consoles 1-6 open while running X , but atleast you will know if something is wrong with your ttys.
/etc/inittab doesn't exist on Ubuntu.

I've typed "telinit 3" into Konsole as root, and nothing at all happened.

According to http://en.wikipedia.org/wiki/Runlevel, Debian-based systems don't have the same runlevels as other distros, and Ubuntu in particular is very different.
 
Old 01-09-2008, 05:34 PM   #11
hex1a4
Member
 
Registered: Dec 2007
Location: ON CA
Distribution: Xubuntu 8.04; Xubuntu 6.06.2
Posts: 64

Rep: Reputation: 15
Quote:
Originally Posted by ChameleonDave View Post
Ah, I see that it's in there twice.
That wasn't the problem. Without vesafb enabled Ubuntu supports video modes that look something like this: vga=0F001

Quote:
I've just tried changing the second occurrence of it (out of the automagic section), and all it did was change the size of the boot splash. Everything was the same as before by the time it got to GDM.

I also implemented everything in the how-to, and all it did was turn the black screen with a blinking cursor into a messed-up screen with many coloured horizontal lines.
Did you change ALL the files correctly? Did you run update-initramfs -u?

If so, than you should change to a less demanding video mode. Perhaps a 16 or 15-bit mode.

If that doesn't work, reboot, and at the GRUB menu edit the entry you want to boot, and replace vga=whatever with vga=ask and boot. This will give you a menu with available video modes to choose from. It's a good idea to select 'scan' instead of the video modes and the system will scan for supported modes and give you a menu to choose a video mode. Once you found a mode you like edit GRUB's menu.lst with the video mode you have chosen.

BTW do you use a custom /etc/issue file?

Last edited by hex1a4; 01-09-2008 at 05:41 PM.
 
Old 01-09-2008, 07:19 PM   #12
ChameleonDave
LQ Newbie
 
Registered: Jan 2008
Location: Melbourne
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Solved

Quote:
Originally Posted by hex1a4 View Post
Did you change ALL the files correctly? Did you run update-initramfs -u?
Of course. It didn't work, so I've put it back how it was before.

Quote:
Originally Posted by hex1a4 View Post
If so, than you should change to a less demanding video mode. Perhaps a 16 or 15-bit mode.

If that doesn't work, reboot, and at the GRUB menu edit the entry you want to boot, and replace vga=whatever with vga=ask and boot. This will give you a menu with available video modes to choose from. It's a good idea to select 'scan' instead of the video modes and the system will scan for supported modes and give you a menu to choose a video mode. Once you found a mode you like edit GRUB's menu.lst with the video mode you have chosen.
OK, I've decided to get rid of the massive /boot/grub/menu.lst file that comes with Ubuntu, and edit it down to essentials. Here it is:

Code:
splashimage=(hd1,4)/boot/grub/splashimages/fiesta.xpm.gz
default         0
timeout         5

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd1,4)
kernel          /boot/vmlinuz-2.6.22-14-generic root=UUID=3abe0171-4f3c-443e-ad0f-515f3f234032 ro splash vga=ask
initrd          /boot/initrd.img-2.6.22-14-generic
quiet
savedefault

title           Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root            (hd1,4)
kernel          /boot/vmlinuz-2.6.22-14-generic root=UUID=3abe0171-4f3c-443e-ad0f-515f3f234032 ro single vga=ask
initrd          /boot/initrd.img-2.6.22-14-generic

title           Ubuntu 7.10, memtest86+
root            (hd1,4)
kernel          /boot/memtest86+.bin
quiet

title           Microsoft Windows XP Professional
root            (hd0,1)
savedefault
makeactive
chainloader     +1
It works!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user session switching problem dissident_goodchild SUSE / openSUSE 4 02-10-2008 12:09 PM
Switching to Slackware and problems toasty_ghosty Slackware 6 08-29-2007 02:12 PM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 02:45 PM
webserver session problems Josh328 Linux - Software 4 07-04-2005 11:39 AM
Since Switching To 9.3 I've Got Nothing But Problems zhuangshi SUSE / openSUSE 7 05-06-2005 09:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 05:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration