Bug 29801

Summary: Boot freezes after switch to GDM
Product: Mageia Reporter: Franz Holzinger <flink>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal CC: davidwhodgins, fri, gnome, lewyssmith
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: CVE:
Status comment:
Attachments: journalctl -b -2 --no-hostname
cp /var/log/Xorg.0.log.old ~/
GDM lines from the full journal

Description Franz Holzinger 2021-12-22 10:19:25 CET
The boot freezes in the Mageia screen.

I have installed Mageia 8 Live Xfce DVD and upgraded to Cauldron. After several restarts I installed the GNOME display manager and activated it.
Comment 1 Franz Holzinger 2021-12-22 12:02:06 CET
After I have started in the Mageia Emergency mode I could with the help of drakedm switch the boot manager to XDM. After a restart it surprisingly boots GNOME without any problems.
Comment 2 Lewis Smith 2021-12-22 20:23:11 CET
Thank you for the report, although it is not clear.

The title "Boot freezes after switch to GNOME" suggests after changing from one desktop to Gnome.
Yet comment 0 "I installed the GNOME display manager and activated it" suggests that the freeze happened after installing just GDM.
Yet again, comment 1 "After a restart it surprisingly boots GNOME without any problems" suggests that you did indeed install the Gnome desktop, and that is what you wanted. (If this is the case, why did you not start from the Mageia 8 Gnome Live DVD?)

So please re-state the sequence of events, starting with "installed Mageia 8 Live Xfce DVD and upgraded to Cauldron".
What display manager did you have at that point? Did it boot Xfce OK?
Did you then add the Gnome desktop?
And/or, did you specifically install & activate GDM?
Does the freeze happen only with GDM trying to boot Gnome?
Does GDM boot Xfce OK?
Does the original display manager boot Gnome OK? (apparently yes: "switch the boot manager to XDM. After a restart it surprisingly boots GNOME without any problems").

So clarification, please.

CC: (none) => lewyssmith

Comment 3 Franz Holzinger 2021-12-22 20:58:21 CET
The freeze happens during the boot process, as the title should suggest.
Installing GDM without activation does no harm.

Yes, I wanted to install the GNOME desktop. Otherwise I would have stayed with Xfce.
Why I did not start from Mageia 8 GNOME Live DVD?
I did try it before the current installation and with the same freeze.


Yes I did boot Xfce. Otherwise I would not have been able to do anything more.
Yes, as I wrote, I did activate the GDM later.

I do not know how I could switch to GDM and then boot with Xfce.

What does this mean?: "Does the original display manager boot Gnome OK?".

I did not write down how the configuration has been after the first installation of the Xfce Live DVD. Is it with XDM or GDM.
I just changed the boot option to start with GNOME in the MCC. Then I could not boot again with the display manager GDM for GNOME. But after using the emergency boot shell I was able to change it into XDM and boot with it.
Comment 4 Lewis Smith 2021-12-23 20:15:48 CET
Let us get some basic information.

You have Display Managers XDM and GDM, at least.
[To be sure, log in as root on a terminal or virtual console, and do:
 # drakdm
which lists your display managers, and allows to choose which one to use at next re-boot]
You have Xfce and Gnome Desktops.
If you choose GDM display manager, the system freezes on boot.
If you choose XDM display manager, it boots Gnome.

When you talk about using MCC to "changed the boot option to start with GNOME", do you mean change the *display manager* to GDM - from whatever it was before?
   MCC-Startup-Setup the Display Manager

I do not know what display manager gets installed with the Xfce Live ISO; it could be XDM. I have just tried this, and saw no way of choosing which desktop gets started. It just presents a username/password login dialogue on an otherwise bare screen; and landed me in Plasma, which is not the previous desktop I was using.

All the other display managers, GDM included, allow you to select which desktop you want. Because GDM is freezing your system, better to install and invoke say LightDM.
Please do this anyway. Once this is done, you can easily confirm that
- LightDM (or whichever you choose) starts OK and enables you to choose between the two desktops.
- GDM freezes the system on boot. I think this the actual problem.
Comment 5 Franz Holzinger 2021-12-23 20:48:47 CET
#drakdm

  GDM
  LightDM
* XDM

Yes, I have changed the boot option in MCC to start the GDM Display Manager. This lead to the boot freeze.

So I will switch with MCC to LightDM now, restart and report again.
Comment 6 Franz Holzinger 2021-12-23 20:56:58 CET
I have now booted successfully under LightDM. And while on the login screen I switched from Xfce to GNOME desktop.
Franz Holzinger 2021-12-23 20:57:48 CET

Summary: Boot freezes after switch to GNOME => Boot freezes after switch to GDM

Comment 7 Lewis Smith 2021-12-26 20:31:23 CET
Thank you for the tests.

To tell us about your system, please post the output of:
 $ inxi -MSGxx

In the following notes, 'anyfilename.txt' can be any filename you choose. The idea is to get the system journal & Xorg log for the freezing boot. 

Change the system to use GDM. When you next boot (into GDM), and the system freezes, note the time - to check that journal/log files correspond.
Are you able to access a virtual console with Ctrl/Alt/Fn ? If you can, please login there as root and do:
 # journalctl -b --no-hostname > anyfilename.txt
 # chmod a+r anyfilename.txt
 # mv anyfilename.txt /home/<your_username>/
which will put the journal into your normal home directory to access later.

also do:
 # cp /var/log/Xorg.0.log /home/<your_username>/
which will save the Xorg log of the failed startup.

If you cannot get to a virtual console in the frozen system, you will have to (as you did initially) re-boot into emergency mode, and do:
 # drakdm
to put back lightDM for the next normal boot. Re-boot.
Once back into a working system, do as your normal user:
 $ su
 # journalctl -b -2 --no-hostname > anyfilename.txt
The -2 should reference the failed boot. Check the timestamps that it is.
 # chmod a+r anyfilename.txt
 # exit
 $ cp /var/log/Xorg.0.log.old  ~/

Compress the journal file:
 $ xz anyfilename.txt
and attach the result anyfilename.txt.xz to this bug.
If you were able to copy the Xorg log file from the failed session, please attach that also to this bug; otherwise the copied Xorg.0.log.old.
Comment 8 Franz Holzinger 2021-12-27 17:51:48 CET
[franz@localhost ~]$ inxi -MSGxx
System:
  Host: localhost Kernel: 5.15.11-desktop-2.mga9 x86_64 bits: 64 compiler: gcc 
  v: 11.2.1 Desktop: GNOME 40.7 tk: GTK 3.24.31 wm: gnome-shell dm: LightDM 
  Distro: Mageia 9 mga9 
Machine:
  Type: Laptop System: Hewlett-Packard product: HP EliteBook 6930p v: F.20 
  serial: <superuser required> Chassis: type: 10 serial: <superuser required> 
  Mobo: Hewlett-Packard model: 30DB v: KBC Version 87.2B 
  serial: <superuser required> BIOS: Hewlett-Packard v: 68PCU Ver. F.20 
  date: 12/08/2011 
Graphics:
  Device-1: Intel Mobile 4 Series Integrated Graphics vendor: Hewlett-Packard 
  driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:2a42 
  Display: x11 server: Mageia X.org 1.21.1.2 compositor: gnome-shell driver: 
  loaded: intel unloaded: fbdev,modesetting,vesa resolution: 1440x900~60Hz 
  s-dpi: 96 
  OpenGL: renderer: Mesa Mobile Intel GM45 Express (CTG) v: 2.1 Mesa 21.3.2 
  direct render: Yes
Comment 9 Franz Holzinger 2021-12-27 18:53:39 CET
could
Comment 10 Franz Holzinger 2021-12-27 18:55:36 CET
I could not switch to a login shell when the boot freeze happened.
So I had to restore the former Light DM and reboot.
Comment 11 Franz Holzinger 2021-12-27 18:57:33 CET
Created attachment 13068 [details]
journalctl -b -2 --no-hostname
Comment 12 Franz Holzinger 2021-12-27 18:58:40 CET
Created attachment 13069 [details]
cp /var/log/Xorg.0.log.old  ~/
Comment 13 Lewis Smith 2021-12-27 20:45:48 CET
Created attachment 13070 [details]
GDM lines from the full journal

All the grief seems to be re /var/lib/gdm/.config/* or /var/lib/gdm/.config/systemd/* permissions.
On my own system, I have just (no systemd sub-directory):

$ sudo ls -l /var/lib/gdm/.config/
drwx------ 2 gdm gdm 4096 Meh  25  2020 dconf
drwx------ 2 gdm gdm 4096 Meh  25  2020 gconf
drwx------ 3 gdm gdm 4096 Meh  25  2020 gnome-session
drwx------ 3 gdm gdm 4096 Meh  25  2020 ibus
drwx------ 2 gdm gdm 4096 Meh  25  2020 pulse

$ sudo tree /var/lib/gdm/.config/
/var/lib/gdm/.config/
├── dconf
│   └── user
├── gconf
├── gnome-session
│   └── saved-session
├── ibus
│   └── bus
│       └── 35e93e7d3c1848d59d666d2622a22c28-unix-wayland-0
└── pulse
    ├── 35e93e7d3c1848d59d666d2622a22c28-card-database.tdb
    ├── 35e93e7d3c1848d59d666d2622a22c28-default-sink
    ├── 35e93e7d3c1848d59d666d2622a22c28-default-source
    ├── 35e93e7d3c1848d59d666d2622a22c28-device-volumes.tdb
    ├── 35e93e7d3c1848d59d666d2622a22c28-stream-volumes.tdb
    └── cookie
Comment 14 Lewis Smith 2021-12-27 21:10:12 CET
Thank you for the system information & attachments; the journal looks promising. [Alas, the Xorg log says Fri Dec 24 13:35, the journal Dez 27 18:22; no matter, it does not look as if it would have helped].
Note the GDM summary from the full journal that I attached in the previous comment: it can be viewed directly in another browser tab.

Can you please do (I found I needed to be root) on your system:
 $ sudo ls -lR /var/lib/gdm/.config/
to see what files you have here, and their ownership. I have none of the files complained about in the journal.
Comment 15 Franz Holzinger 2021-12-27 21:21:03 CET
The file systems has a strange user without name: 485.
And a group 476.

[franz@localhost ~]$ sudo ls -lR /var/lib/gdm/.config/
/var/lib/gdm/.config/:
insgesamt 28
drwxr-x--T 2  485  476 4096 Jan  2  2018 dconf
drwx------ 2  485  476 4096 Nov  1  2015 gconf
drwxr-xr-x 3  485  476 4096 Nov  5  2014 gnome-session
drwxr-xr-x 2  485  476 4096 Nov  5  2014 goa-1.0
drwx------ 3 root root 4096 Nov  5  2014 ibus
drwxr-xr-x 2 root root 4096 Nov  5  2014 oxygen-gtk
drwx------ 2  485  476 4096 Nov  5  2014 pulse

/var/lib/gdm/.config/dconf:
insgesamt 4
-rw-r--r-- 1 485 476 481 Jan  2  2018 user

/var/lib/gdm/.config/gconf:
insgesamt 0

/var/lib/gdm/.config/gnome-session:
insgesamt 4
drwxr-xr-x 2 485 476 4096 Nov  5  2014 saved-session

/var/lib/gdm/.config/gnome-session/saved-session:
insgesamt 0

/var/lib/gdm/.config/goa-1.0:
insgesamt 0

/var/lib/gdm/.config/ibus:
insgesamt 4
drwx------ 2 root root 4096 Nov  5  2014 bus

/var/lib/gdm/.config/ibus/bus:
insgesamt 0

/var/lib/gdm/.config/oxygen-gtk:
insgesamt 4
-rw-r--r-- 1 root root 66 Nov  5  2014 argb-apps.conf

/var/lib/gdm/.config/pulse:
insgesamt 64
-rw-r--r-- 1 485 476 36864 Nov  5  2014 7d4bad5cfc2b4484a639f524d913bc27-card-database.tdb
-rw-r--r-- 1 485 476    43 Jan  2  2018 7d4bad5cfc2b4484a639f524d913bc27-default-sink
-rw-r--r-- 1 485 476    42 Jan  2  2018 7d4bad5cfc2b4484a639f524d913bc27-default-source
-rw-r--r-- 1 485 476 12288 Sep 11  2016 7d4bad5cfc2b4484a639f524d913bc27-device-volumes.tdb
-rw-r--r-- 1 485 476   696 Nov  5  2014 7d4bad5cfc2b4484a639f524d913bc27-stream-volumes.tdb
-rw------- 1 485 476   256 Nov  5  2014 cookie
Comment 16 Lewis Smith 2021-12-27 21:47:35 CET
Thank you for this further information.
We may be getting somewhere. CC'ing other people for ideas.

CC: (none) => davidwhodgins, fri, gnome

Comment 17 Dave Hodgins 2021-12-27 22:28:42 CET
Somehow, /etc/passwd is out of sync with what's on the rest of the system.
That is not from installing updates.

As it's a cauldron install, I would just do a clean re-install (formatting the
file systems).
Comment 18 Franz Holzinger 2021-12-28 07:18:31 CET
The / root partition has been formatted during the installation with the Mageia 8 Live Xfce DVD. Then I upgraded with the Cauldron debug packages and added the sudoer for the user. The wrong user and group uids seem to come from the installation DVD.
Comment 19 Franz Holzinger 2021-12-28 10:30:11 CET
After a new installation from the Mageia 8 GNOME Live DVD with formatting of the /var partition the boot process starts without any failure.

Resolution: (none) => WORKSFORME
Status: NEW => RESOLVED

Comment 20 Dave Hodgins 2021-12-28 20:11:09 CET
(In reply to Franz Holzinger from comment #18)
> The / root partition has been formatted during the installation with the
> Mageia 8 Live Xfce DVD. Then I upgraded with the Cauldron debug packages and
> added the sudoer for the user. The wrong user and group uids seem to come
> from the installation DVD.

The wrong user and group ids come from having files and directories from a
different install.

In any new install, the user and group id numbers are assigned based on the
order packages are installed. Change the order, or packages selected, and the
numbers will be different.

Changing status to resolved invalid, since this is not about a bug in the
Mageia packages or installer.

Resolution: WORKSFORME => INVALID

Comment 21 Dave Hodgins 2021-12-28 20:46:39 CET
Also, just fyi, the initial set of users with their uids and gids comes from
https://gitweb.mageia.org/software/setup/tree/passwd which has
root::0:0:root:/root:/bin/bash
bin:*:1:1:bin:/bin:/bin/sh
daemon:*:2:2:daemon:/sbin:/bin/sh
adm:*:3:4:adm:/var/adm:/bin/sh
lp:*:4:7:lp:/var/spool/lpd:/bin/sh
sync:*:5:0:sync:/sbin:/bin/sync
mail:*:8:12:mail:/var/spool/mail:/bin/sh
news:*:9:13:news:/var/spool/news:/bin/sh
uucp:*:10:14:uucp:/var/spool/uucp:/bin/sh
operator:*:11:0:operator:/var:/bin/sh
games:*:12:100:games:/usr/games:/bin/sh
nobody:*:65534:65534:Nobody:/:/bin/sh

So those users will have the same uid/gid on all Mageia installs.

All other ids are created by the packages being installed calling
/usr/share/rpm-helper/add-user which will use the settings from
/etc/default/useradd and the existing /etc/passwd to select a new uid
and if needed, gid.