Bug 22593 - After classical installation, running "systemctl set-default graphical.target" is needed to get a login screen on boot.
Summary: After classical installation, running "systemctl set-default graphical.target...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker critical
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
: 23101 23713 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-14 15:14 CET by Bit Twister
Modified: 2018-11-05 09:57 CET (History)
11 users (show)

See Also:
Source RPM: drakx-installer-stage2, systemd
CVE:
Status comment:


Attachments
journal (79.50 KB, text/plain)
2018-02-14 15:15 CET, Bit Twister
Details
report.bug.xz (295.27 KB, text/plain)
2018-02-14 15:17 CET, Bit Twister
Details

Description Bit Twister 2018-02-14 15:14:15 CET
Description of problem: 7 dev0

No gui greeter login screen XFCE only install.


Version-Release number of selected component (if applicable):


How reproducible: Always


Steps to Reproduce:
1. clean Mageia-Cauldron-netinstall-nonfree-x86_64.iso, all group packages and xfce only de with tainted and nonfree enabled.
Note: no login screen

Workaround:
Hit ALt+f2
log into user account
$ startx startxfce4
Comment 1 Bit Twister 2018-02-14 15:15:38 CET
Created attachment 9986 [details]
journal
Comment 2 Bit Twister 2018-02-14 15:17:44 CET
Created attachment 9987 [details]
report.bug.xz
Bit Twister 2018-02-14 15:18:21 CET

Severity: normal => major

Comment 3 Marja Van Waes 2018-02-14 18:19:23 CET
Weird, starting lightdm is not even attempted, but afaics you have the right packages installed:

lightdm-gtk-greeter-common-2.0.3-2.mga7
lightdm-gtk-greeter-settings-1.2.2-1.mga7
lib64lightdm-gobject1_0-1.25.1-5.mga7
lightdm-gtk3-greeter-2.0.3-2.mga7
lightdm-1.25.1-5.mga7

please verify that you do have them, maybe I misread your install logs

What do you see when you run:

    ls -al /etc/systemd/system/display-manager.service

and do you have the file  /usr/lib/systemd/system/lightdm.service

Source RPM: (none) => systemd ? lightdm ?
CC: (none) => basesystem, jani.valimaa, marja11
Keywords: (none) => NEEDINFO

Comment 4 Bit Twister 2018-02-14 20:56:47 CET
/net_ins is the network install partition.
units.list and rpm.list were generated when /net_ins was boot/running.


# systemctl list-units > units.list

$ grep -i light  units.list
$ grep -i display  units.list
$

Well, the above would seem to point to systemd not even knowing about the display service.  :(

# ls -al /net_ins/etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 39 Feb 14 06:29 /net_ins/etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/lightdm.service

# ls -al /net_ins/usr/lib/systemd/system/lightdm.service
-rw-r--r-- 1 root root 327 Oct 19  2012 /net_ins/usr/lib/systemd/system/lightdm.service

# ls -al /net_ins/usr/lib/systemd/system/lightdm.service
-rw-r--r-- 1 root root 327 Oct 19  2012 /net_ins/usr/lib/systemd/system/lightdm.service

# rpm -ql --last > rpm.list
$ grep lightd rpm.list | sort
lib64lightdm-gobject1_0-1.25.1-5.mga7.x86_64  Wed 14 Feb 2018 06:29:57 AM CST
lightdm-1.25.1-5.mga7.x86_64                  Wed 14 Feb 2018 06:29:58 AM CST
lightdm-gtk3-greeter-2.0.3-2.mga7.x86_64      Wed 14 Feb 2018 06:29:59 AM CST
lightdm-gtk-greeter-common-2.0.3-2.mga7.noarch Wed 14 Feb 2018 06:29:57 AM CST
lightdm-gtk-greeter-settings-1.2.2-1.mga7.noarch Wed 14 Feb 2018 06:37:00 AM CST

Keywords: NEEDINFO => (none)

Saint Doux 2018-02-14 22:49:08 CET

Flags: (none) => in_errata7+
CC: (none) => saintdoux95

Marja Van Waes 2018-02-16 15:46:21 CET

Flags: in_errata7+ => (none)

Comment 5 Marja Van Waes 2018-02-16 15:48:32 CET
Assigning to the basesystem maintainers, even if I'm not sure systemd is the culprit

CC: saintdoux95 => ngompa13
Assignee: bugsquad => basesystem

Comment 6 Jani Välimaa 2018-02-16 16:02:58 CET
What does 'systemctl status display-manager' show after first boot?
Comment 7 Bit Twister 2018-02-16 19:23:50 CET
(In reply to Jani Välimaa from comment #6)
> What does 'systemctl status display-manager' show after first boot?

commands are executed/shown via ssh.

# systemctl status display-manager
● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:lightdm(1)


# systemctl status lightdm.service 
● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:lightdm(1)

lightdm will run
# systemctl start lightdm.service
# systemctl status lightdm.service
● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-02-16 12:14:22 CST; 4s ago
     Docs: man:lightdm(1)
 Main PID: 1540 (lightdm)
   CGroup: /system.slice/lightdm.service
           ├─1540 /usr/sbin/lightdm
           └─1545 /usr/libexec/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt1 -novtswitch

Feb 16 12:14:22 tb.home.test systemd[1]: Starting Light Display Manager...
Feb 16 12:14:22 tb.home.test systemd[1]: Started Light Display Manager.
Feb 16 12:14:25 tb.home.test lightdm[1540]: /usr/share/mga/backgrounds/default.jpg is a 1280x1024 8 bit deep RGB PNG image with an alpha chan
Feb 16 12:14:25 tb.home.test lightdm[1540]: Modification time: 2016/8/11 08:20:26  Default gamma for ITRUE image is  1.00
Feb 16 12:14:25 tb.home.test lightdm[1540]:   Clipping image......done
Feb 16 12:14:25 tb.home.test lightdm[1540]:   Building XImage...done
Feb 16 12:14:25 tb.home.test lightdm[1540]:   Have adjusted image from 1.00 to display gamma of 2.20

Re-booted. No greater, but

# systemctl start display-manager
# systemctl status  display-manager
● lightdm.service - Light Display Manager
   Loaded: loaded (/usr/lib/systemd/system/lightdm.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-02-16 12:17:27 CST; 10s ago
     Docs: man:lightdm(1)
 Main PID: 1537 (lightdm)
   CGroup: /system.slice/lightdm.service
           ├─1537 /usr/sbin/lightdm
           ├─1542 /usr/libexec/Xorg :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt1 -novtswitch
           └─1617 lightdm --session-child 12 19

and can login via greater screen
Comment 8 Jani Välimaa 2018-02-17 10:28:41 CET
And 'systemctl get-default'?
Comment 9 Bit Twister 2018-02-17 14:36:31 CET
# systemctl get-default
multi-user.target
Comment 10 Bit Twister 2018-02-17 15:16:04 CET
(In reply to Jani Välimaa from comment #8)
> And 'systemctl get-default'?

Ah HA. That is the run time problem.

Workaround:   systemctl set-default graphical.target

Guessing this problem gets moved to stage2 ??
Comment 11 Frank Griffin 2018-04-11 18:04:22 CEST
I notice that running XFdrake and selecting "start X at boot" fails quietly (if you exit and rerun XFdrake it is turned off again), and that 
   systemctl enable graphical.target
fails with a message saying that "The unit files have no installation config"

CC: (none) => ftg

Marja Van Waes 2018-06-04 20:23:50 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=23101

Comment 12 Marja Van Waes 2018-06-04 20:29:54 CEST
(In reply to Frank Griffin from comment #11)
> I notice that running XFdrake and selecting "start X at boot" fails quietly
> (if you exit and rerun XFdrake it is turned off again), and that 
>    systemctl enable graphical.target   
> fails with a message saying that "The unit files have no installation config"

I doubt I got that message, when I tried that command last week, but I did get a message that made me think that command was invalid.

Are you sure you didn't try 
   
    systemctl set-default graphical.target

instead?

That worked fine here.
Comment 13 Marja Van Waes 2018-06-04 20:49:54 CEST
(In reply to Bit Twister from comment #10)
> (In reply to Jani Välimaa from comment #8)
> > And 'systemctl get-default'?
> 
> Ah HA. That is the run time problem.
> 
> Workaround:   systemctl set-default graphical.target
> 
> Guessing this problem gets moved to stage2 ??

Good idea, reassigning.

I can confirm I needed to run "systemctl set-default graphical.target" to get my display manager to start on boot, in a cauldron install on 13 May. It had also defaulted to 
mei 13 18:45:28 localhost systemd[1]: Reached target Multi-User System.

I have no idea how/where stage2 needs to be adjusted, I think this behaviour for new classical installs changed when Neal updated systemd.

Summary: No gui greeter login screen XFCE only install => After classical installation, running "systemctl set-default graphical.target" is needed to get a login screen on boot.
Source RPM: systemd ? lightdm ? => drakx-installer-stage2, systemd
Assignee: basesystem => mageiatools

Comment 14 Marja Van Waes 2018-06-04 21:15:21 CEST
Just in case it matters:
In bug #22620, comment #1 David Walser mentions initscripts as a potential culprit for a probably related problem (no longer getting a prompt in tty1 when starting in multi-user mode), which first popped up at the same time as this issue.
Comment 15 Marja Van Waes 2018-06-11 22:22:22 CEST
*** Bug 23101 has been marked as a duplicate of this bug. ***

CC: (none) => lamikr

Nicolas Lécureuil 2018-07-03 21:53:47 CEST

Severity: major => critical
Priority: Normal => release_blocker
CC: (none) => mageia

Comment 16 Nicolas Lécureuil 2018-07-03 21:55:32 CEST
@thierry: do you have an idea about this ?

CC: (none) => thierry.vignaud

Comment 17 Thomas Backlund 2018-07-03 22:08:18 CEST
This is because we dropped prefdm stuff, but no-one has worked on the installer bits for this so far...

CC: (none) => tmb

Comment 18 Marja Van Waes 2018-10-18 22:32:52 CEST
*** Bug 23713 has been marked as a duplicate of this bug. ***

CC: (none) => ezequiel_partida

Comment 19 Bit Twister 2018-10-19 01:17:55 CEST
Workaround:

If you have no terminal login prompt (runlevel3)
    https://bugs.mageia.org/show_bug.cgi?id=22620
Hit Alt+F2, login as root, and run
      systemctl enable getty@tty1.service

Terms:   DM Display Manager (sddm, gdm, lightdm, lxdm, xdm, ...)
         DE Desktop Environment (PLASMA, GNOME, Xfce, Mate....)

No gui login greeter,
    https://bugs.mageia.org/show_bug.cgi?id=22593
You need to set /etc/sysconfig/desktop DISPLAYMANAGER value, enable
desired DM service and set systemd default display service.

To get list of DISPLAYMANAGER and service DM names run
 grep -E "Name=|^Exec="  /usr/share/X11/dm.d/*

One example result
/usr/share/X11/dm.d/20gdm.conf:NAME=GNOME
/usr/share/X11/dm.d/20gdm.conf:EXEC=/usr/sbin/gdm


Put "Name value" in /etc/sysconfig/desktop. Desired result example:
 cat /etc/sysconfig/desktop
DISPLAYMANAGER=GNOME

Since DISPLAYMANAGER=GNOME, systemd DM.service name needs to be gdm
found by looking at the Exec= field.

For Plasma users, you want SDDM and sddm.

You would then do the following:

    _server=gdm

    systemctl disable display-manager.service
    systemctl enable $_server.service
    systemctl set-default graphical.target
    systemctl start $_server.service

At this point there should be a greeter/gui Login screen on next boot.

To get list of installed DMs systemd service names:
 grep -Ril "Alias=display-manager.service" /usr/lib/systemd/system/*.service

To get current DM
systemctl status display-manager.service 2> /dev/null | grep PID:
Comment 20 Martin Whitaker 2018-11-05 09:57:12 CET
Fixed. I've also fixed drakdm.

CC: (none) => mageia
Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.