Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 312017 - [gnome-overlay] new ebuild: >=gnome-base/gdm-2.30.0
Summary: [gnome-overlay] new ebuild: >=gnome-base/gdm-2.30.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://svn.xmw.de/websvn/gentoo-overl...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 288852
  Show dependency tree
 
Reported: 2010-03-30 00:58 UTC by Michael Weber (RETIRED)
Modified: 2010-11-16 12:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild, from 2.28.2/tree w/ changes (gdm-2.29.92.ebuild,5.53 KB, text/plain)
2010-03-30 01:00 UTC, Michael Weber (RETIRED)
Details
from 2.26.1 version (gdm-2.29.92-custom-session.patch,1.07 KB, patch)
2010-03-30 01:02 UTC, Michael Weber (RETIRED)
Details | Diff
from 2.26.1 version (gdm-2.29.92-fix-daemonize-regression.patch,3.85 KB, patch)
2010-03-30 01:03 UTC, Michael Weber (RETIRED)
Details | Diff
patch for gnome-overlay (0000-gnome-base-gdm-2.30.0-version-bump.patch,18.91 KB, patch)
2010-04-04 03:34 UTC, Michael Weber (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weber (RETIRED) gentoo-dev 2010-03-30 00:58:37 UTC
Hi, I've reviewed the patches in ${DISTFILES}gdm-2.26-gentoo-patches.tar.bz2 and changed to of them, which were rejected at first.

I've left out gdm-2.26.1-broken-VT-detection.patch because the explicit binding of Xorg to vt7 (every instance) kills the switch user functionality. my nvidia-card and ati notebook don't like two Xorg servers on one vt and get stuck.

I've uses 2.28.2 for some time and would be happy to see 2.29.92 somewhere official.

As usual, please see http://svn.xmw.de/gentoo-overlay/gnome-base/gdm/ or http://svn.xmw.de/websvn/gentoo-overlay/gnome-base/gdm/ for a working environment of this ebuild.
Comment 1 Michael Weber (RETIRED) gentoo-dev 2010-03-30 01:00:29 UTC
Created attachment 225759 [details]
ebuild, from 2.28.2/tree w/ changes
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-03-30 01:02:51 UTC
Created attachment 225761 [details, diff]
from 2.26.1 version

some bounding lines and numbers changed
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-03-30 01:03:08 UTC
Created attachment 225763 [details, diff]
from 2.26.1 version

some bounding lines and numbers changed
Comment 4 Michael Weber (RETIRED) gentoo-dev 2010-04-04 02:54:01 UTC
I'm currently working on the 2.30.0 version bump.
I've reviewed all dependencies, fix 2 QA issues.
The keyboard layout selection is missing (last seen at 2.28) and
a locked screen can't be unlocked. just flickering between login-background and black. looks like a 2 screensaver situation.

http://svn.xmw.de/websvn/gentoo-overlay/?op=revision&rev=219&peg=219
Comment 5 Michael Weber (RETIRED) gentoo-dev 2010-04-04 03:34:29 UTC
Created attachment 226511 [details, diff]
patch for gnome-overlay
Comment 6 Nirbheek Chauhan (RETIRED) gentoo-dev 2010-04-04 07:20:53 UTC
I really want to fix bug 288852 before adding this to overlay; even though it won't be a regression.
Comment 7 Michael Weber (RETIRED) gentoo-dev 2010-04-04 12:23:23 UTC
(In reply to comment #6)
> I really want to fix bug 288852 before adding this to overlay; even though it
> won't be a regression.

Come on, this bug is ridiculous. I've posted the situation more than tree times by now.

GDM per se does not keep track on which vt Xorg instanced run. It just tracks the DISPLAY values. FirstVT from gdm.conf no longer exists.

Curren tre ebuild include this gdm-2.26.1-broken-VT-detection.patch from distfiles/gdm-2.26-gentoo-patches.tar.bz2. It add a vt7 to __every__ Xorg invocation, which will force first Xorg/gdm to vt7 which would be fine. But if you use user switch, the second Xorg will be forced to vt7, too, killing my nvidia-drivers and xf86-video-intel cards, rendering even the first session unusable.

W/o this patch, and if you start xdm during runlevel 3 initialization, 
only vt1 is blocked by boot/openrc output, vt2 and so on is free. 
the agetty's get started after the last service (local) is initialized.
Therefore first Xorg instance is on vt2 (first free at this moment).
X comes up before the agettys and typically they "steal" the keybord from the server. In fact it's an underarchievement of init to just start agetty's on already used vts.

There were two solutions i see. 

First, use this funny/obscure thing from inittab and boot the system in a runlevel "a". xdm service doesn't start Xorg/gdm but requests a this runlevel a. runlevel 3 get's started, agetty's on vt1 to vt6 where initalized and then 
startDM is run from init for runlevel a, which - as always - leads to Xorg instance at the first free vt, which is vt7, due to agettys on vt1 to vt6.
Runlevel a then returns to runlevel 3.

See excerpt from inittab 
# Used by /etc/init.d/xdm to control DM startup.
# Read the comments in /etc/init.d/xdm for more
# info. Do NOT remove, as this will start nothing
# extra at boot if /etc/init.d/xdm is not added
# to the "default" runlevel.
#x:a:once:/etc/X11/startDM.sh

The Second solution - haven't tested it yet - is to drop this gdm-2.26.1-fix-daemonize-regression.patch patch and start gdm directly non-daemonizing like an agetty on 7:..., wich should leed to Xorg at vt7 because 1:... 6:... agettys where initialized first and were faster. 

I have only one agetty on vt1 and Xorg on first free vt, vt2. Dropped this startDM stuff.

System bootup isn't that complicated. I think second solution is the one intended by gnome people, removing daemonization from gdm.

I strongly discourage things like "let's patch FirstVT=7 support back into gdm", there were others. I strongly disagree with comment6 accordingly.

Michael Weber
Comment 8 Michael Weber (RETIRED) gentoo-dev 2010-04-04 12:26:40 UTC
was referring to

>=gnome-base/gdm-2.26.1 does not detect console correctly
http://bugs.gentoo.org/show_bug.cgi?id=288852#c11

gnome-base/gdm broken occupied VT detection and keyboard activation
http://bugs.gentoo.org/show_bug.cgi?id=261339#c19

x11-apps/xinit + gdm + baselayout-2 = dead keyboard
http://bugs.gentoo.org/show_bug.cgi?id=215628#c5
Comment 9 Michael Weber (RETIRED) gentoo-dev 2010-04-08 02:41:15 UTC
(In reply to comment #7)
> GDM per se does not keep track on which vt Xorg instanced run. It just tracks
> the DISPLAY values. FirstVT from gdm.conf no longer exists.
>
> ...
>
> I strongly discourage things like "let's patch FirstVT=7 support back into
> gdm", there were others. I strongly disagree with comment6 accordingly.

Nirbheek convinced me, that it would be better for the user to stick with the current gdm startup via xdm and to reintroduce a correct VT detection.

I've used the key retrieval code for daemon/VT from the patch attached to http://bugs.gentoo.org/show_bug.cgi?id=261339 but dropped the fixed vt parameter for the xorg-server, since this broke user switch on cards that can't share VT (intel, nvidia, every older).

The newly introduced config value daemon/MinimalVT in the /etc/gdm/custom.conf defaults to 7 and is used as the number of the leftmost/minimal virtual terminal, a Xorg instance will be run at. 

The int get_first_vt(int) inside daemon/vt_test.c starts at this given number and runs through proc to get the first /dev/tty<int> which isn't referenced as file handle in any process like other X servers, agetty, syslogd. and so on. 

The MinimalVT value offers the possibility to start gdm from xdm at runlevel 3 initialization, long before the agettys at tty1 to tty6 get spawned from inittab after runlevel 3 is reached.

The dynamic uncached search for a free VT, just before a new Xorg server gets started, assures a good chance that the xorg process will it find free. too.
All standard and non-standard cases of logoff/login, switch user, terminated Xorg instance, (login)programs from inittab and otherwise running programs like custom Xserver, loggers, screen -d -m should be detected and handled correctly without spoiling freed VTs.

Please see http://svn.xmw.de/websvn/gentoo-overlay/gnome-base/gdm/files/gdm-2.30.0-MinimalVT-detection.patch for the patch and http://svn.xmw.de/websvn/gentoo-overlay/gnome-base/gdm/ for the ebuild "environment".

Michael Weber

  


> 
> Michael Weber
> 

Comment 10 Gilles Dartiguelongue (RETIRED) gentoo-dev 2010-11-16 12:53:59 UTC
Commited 2.32 a while ago. Closing.