You are not logged in.
I'm using arch with Gnome Shell under my Lenovo T470s laptop.
When I try to logon to a standard GNOME session from GDM, most of times I get a Xorg session instead of a Wayland session.
Sometimes, after a reboot, I can get a Wayland session, but this happens randomly.
I extracted a journalctl -ab to extract a boot log of a non working wayland session:
ago 29 14:00:07 pgt470s gnome-shell[377]: Can't initialize KMS backend: could not find drm kms device
and then
ago 29 14:00:08 pgt470s kernel: i915 0000:00:02.0: enabling device (0006 -> 0007)
ago 29 14:00:08 pgt470s kernel: [drm] Memory usable by graphics device = 4096M
ago 29 14:00:08 pgt470s kernel: checking generic (a0000000 300000) vs hw (a0000000 10000000)
ago 29 14:00:08 pgt470s kernel: fb: switching to inteldrmfb from EFI VGA
ago 29 14:00:08 pgt470s kernel: Console: switching to colour dummy device 80x25
ago 29 14:00:08 pgt470s kernel: [drm] Replacing VGA console driver
ago 29 14:00:08 pgt470s NetworkManager[214]: <info> [1504008008.3660] device (wlp58s0): set-hw-addr: set MAC address to CE:CF:64:1E:ED:7D (scanning)
ago 29 14:00:08 pgt470s kernel: iwlwifi 0000:3a:00.0: L1 Enabled - LTR Enabled
ago 29 14:00:08 pgt470s kernel: iwlwifi 0000:3a:00.0: L1 Enabled - LTR Enabled
ago 29 14:00:08 pgt470s kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
ago 29 14:00:08 pgt470s kernel: [drm] Driver supports precise vblank timestamp query.
ago 29 14:00:08 pgt470s kernel: i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=mem
ago 29 14:00:08 pgt470s gnome-shell[609]: Can't initialize KMS backend: could not find drm kms device
ago 29 14:00:08 pgt470s kernel: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_01.bin (v1.1)
ago 29 14:00:08 pgt470s gnome-session[602]: gnome-session-binary[602]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
ago 29 14:00:08 pgt470s gnome-session-binary[602]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1
ago 29 14:00:08 pgt470s gnome-session-binary[602]: Unrecoverable failure in required component org.gnome.Shell.desktop
ago 29 14:00:08 pgt470s gdm[223]: GdmDisplay: display lasted 0,118677 seconds
ago 29 14:00:08 pgt470s kernel: [drm] Initialized i915 1.6.0 20170403 for 0000:00:02.0 on minor 0
ago 29 14:00:08 pgt470s kernel: ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
ago 29 14:00:08 pgt470s kernel: input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input8
So, it seems that the i915 driver is loaded after an attempt to start gnome-shell. And when gnome-shell starts, it cannot find KMS backend.
Am I right ?
How can I solve it ?
Thank you
Last edited by giox069 (2017-08-29 12:59:04)
Offline
I am not sure of the issue. How do you boot? Maybe the graphic card needs some time to initialize itself and gnome shell tries to start too early. What if you add the i915 modules to the module section of mkinitcpio.conf; so that this module is loaded as soon as possible. Could you also when you are at the gdm display, switch to a console and see if this module is correctly loaded and examine dmesg.
Offline
Is this by any chance a hybrid graphics setup? ("lspci")
Is gdm configured to use Xorg?
Does a manual session start from the multi-user.target work? See https://wiki.archlinux.org/index.php/GN … d_sessions
Offline
@seth: no, no external GPU.
I followed @olive advice: I added i915 in /etc/mkinitcpio.conf inside the MODULES string, and then "mkinitcpio -p linux".
Now 9 boots out of 10 are with wayland, a great improvement, thank you.
But I still had a boot (one of 10) in which gnome-shell failed to start wayland with the same error "Can't initialize KMS backend: ", despite i915 is loaded before it. 1 of 10 is acceptable, but not perfect
Last edited by giox069 (2017-08-31 07:11:13)
Offline
Most probably the card needs to initialize itself or load a firmware. Even if you load the module early, gdm might be launched too early; before the card is properly initialized. You need to find a way to delay the graphical startup. I am not an expert of systemd but an ugly hack that I have used in the past for a similar problem with a radeon card (although not with wayland) was to add:
ExecStartPre=/bin/sleep 3
to the [Service] section of the lightdm.service (I use lightdm). You could try the same with gdm.service
Last edited by olive (2017-08-31 08:57:43)
Offline