gdm runs in vt7 and gnome-shell in vt2 after resuming

Bug #1509369 reported by Felipe Reyes on 2015-10-23
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
gdm (Ubuntu)
Undecided
Unassigned

Bug Description

I installed ubuntu-gnome 15.04, then upgraded to Wily. I started getting problems when pressing "Alt+<arrow>" it switches to another virtual terminal like if I was pressing Ctrl+Alt+F<n>, after some troubleshooting these are the steps to reproduce:

- Logged in a gnome session
- Suspend laptop
- Resume
- Unlock screen
- Press Alt+Arrow_Right, there you'll notice that gdm is running un VT7 and your user's gnome-shell is running in another VT, in my case VT2

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: gdm 3.16.2-0ubuntu2
ProcVersionSignature: Ubuntu 3.19.0-30.34-generic 3.19.8-ckt6
Uname: Linux 3.19.0-30-generic x86_64
ApportVersion: 2.19.1-0ubuntu3
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Oct 23 11:02:05 2015
InstallationDate: Installed on 2015-10-19 (3 days ago)
InstallationMedia: Ubuntu-GNOME 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: gdm
UpgradeStatus: Upgraded to wily on 2015-10-19 (3 days ago)

Felipe Reyes (freyes) wrote :
Felipe Reyes (freyes) wrote :

After some research, I think this is not strictly related to suspend/resume and more to how gdm selects the next VT available to spawn your session and how systemd manages VTs initialization (getty on demand). From http://0pointer.de/blog/projects/serial-console.html

"""
Traditionally, the init system on Linux machines was configured to spawn a fixed number login prompts at boot.[...]

In a systemd world we made this more dynamic: in order to make things more efficient login prompts are now started on demand only. As you switch to the VTs the getty service is instantiated to <email address hidden>, <email address hidden> and so on.
"""

I rebooted my machine and before logging in I cycled from VT1 until VT7(gdm), so systemd launched a getty in each VT, then I logged in gdm and gnome-shell was launched in VT8 and this problem went away.

So this is what I think is happening:

- the system boots
- a getty in launched in VT1 and gdm in VT7
- the user logs in
- gdm looks for the next available VT, as systemd didn't launch VT2...VT6, gdm uses VT2 and from that point Alt+<arrow> behave like if you were running virtual terminal console instead of an X session.

David Girault (dfgweb) wrote :

First, thanks for your detailled comment.
Now, did you found any way to force gdm to only use vt > 7 ?

On Wed, 02 Dec 2015 09:46:49 -0000
David Girault <email address hidden> wrote:

> First, thanks for your detailled comment.
> Now, did you found any way to force gdm to only use vt > 7 ?
>

No, I didn't. The workaround I found was to force the initialization
vt{2..6}, in a systemd world this is achieved running:

$ cd /etc/systemd/system/getty.target.wants/
$ for i in {2..6}; do sudo ln -s /lib/systemd/system/getty@.service getty@tty${i}.service;done
$ ls /etc/systemd/system/getty.target.wants/ -l
total 0
lrwxrwxrwx 1 root root 34 Oct 19 16:40 <email address hidden> -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 34 Oct 27 17:53 <email address hidden> -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 34 Oct 27 17:53 <email address hidden> -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 34 Oct 27 17:53 <email address hidden> -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 34 Oct 27 17:53 <email address hidden> -> /lib/systemd/system/getty@.service
lrwxrwxrwx 1 root root 34 Oct 27 17:53 <email address hidden> -> /lib/systemd/system/getty@.service

This made my problem go away, considering that VTs have a really small
footprint maybe is a good way to make this a default.

Łukasz G (lukasgrand) wrote :

After using workaround from coomment #4 now gdm starts two X session on vt7 and vt8 :-)

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gdm (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers