Bug 255049 - x11/gdm doesn't show the login screen
Summary: x11/gdm doesn't show the login screen
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
Depends on:
Reported: 2021-04-14 11:38 UTC by Konstantin
Modified: 2022-06-04 10:21 UTC (History)
8 users (show)

See Also:
bpurgar: maintainer-feedback? (x11)

xorg with DRI2 enabled (2.23 KB, text/plain)
2021-04-29 07:38 UTC, Konstantin
no flags Details
log file, DRI2 enabled (42.61 KB, text/plain)
2021-04-29 07:38 UTC, Konstantin
no flags Details
gdm log 1 (159.03 KB, text/plain)
2022-06-04 10:15 UTC, ykla
no flags Details
gdm log 2 (158.99 KB, text/plain)
2022-06-04 10:15 UTC, ykla
no flags Details
gdm log 3 (159.20 KB, text/plain)
2022-06-04 10:15 UTC, ykla
no flags Details
gdm log 4 (158.99 KB, text/plain)
2022-06-04 10:16 UTC, ykla
no flags Details
messages (963.72 KB, text/plain)
2022-06-04 10:16 UTC, ykla
no flags Details
Xorg log 0 (23.68 KB, text/plain)
2022-06-04 10:16 UTC, ykla
no flags Details
xorg log old (24.78 KB, text/plain)
2022-06-04 10:17 UTC, ykla
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin 2021-04-14 11:38:51 UTC
I've upgraded my FreeBSD 12.2 to 13.0. After that I cannot log in to the system via GDM because it doesn't show the login screen. The screen is grey blank. I suspect that at some point GDM cannot proceed further. Although some elements of the layout appear for short time as I switch between TTYs and GDM.
I managed to log in via GDM after disabling radeonkms in /etc/rc.conf.
Comment 1 Alexander Vereeken 2021-04-19 21:30:55 UTC

this could be related to: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253746
Comment 2 Konstantin 2021-04-20 18:44:16 UTC
(In reply to Alexander Vereeken from comment #1)
Yeah, apparently the same kind of issue.
Comment 3 bpurgar 2021-04-28 13:37:47 UTC
(In reply to Konstantin from comment #0)

Can you try to disable DRI3 in /etc/X11/xorg.conf and use DRI 2 instead ?

        ##Option     "DRI3"    "1"           	
        Option     "DRI" "2"      

and then test gdm/gnome3 ..

Comment 4 Niclas Zeising freebsd_committer 2021-04-28 16:26:53 UTC
Why was x11@ asked for maintainer feedback?  gdm is a gnome port.
Comment 5 bpurgar 2021-04-28 16:31:31 UTC
it seams that this bug is identical to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253746 and there is problem with DRI3 on xf86-video-amdgpu .. same gnome version works OK on xf86-video-intel and DRI3 on.
Comment 6 Niclas Zeising freebsd_committer 2021-04-28 19:00:22 UTC
Have you remembered to update drm-kmod as well?  You need drm-fbsd13-kmod on FreeBSD 13.
Comment 7 bpurgar 2021-04-28 19:24:08 UTC
It is same problem on 13-release with drm-fbsd-13 and 14-current with drm-kmod-devel. gnome3 wont work (lags/freeze and only progress is seeing when switching beetwen consoles from vt9 to vt2 and back to vt9 for example and so on) when dri3 is enabled on amdgpu_drv. I have matebook with i5-7200u and no problems with intel_drv and dri3/gnome on FreeBSD 13/14.
Comment 8 Konstantin 2021-04-29 07:38:03 UTC
Created attachment 224517 [details]
xorg with DRI2 enabled

DRI2 enabled
Comment 9 Konstantin 2021-04-29 07:38:58 UTC
Created attachment 224518 [details]
log file, DRI2 enabled
Comment 10 Konstantin 2021-04-29 07:48:56 UTC
(In reply to bpurgar from comment #3)
I didn't have xorg.conf, so used Xorg -configure to create one. Also I put 'Option "DRI" "2"' in it. And enabled radeonkms. GNOME stopped at the same place. So it didn't work. I attached file of xorg.conf and Xorg.log with DRI2 enabled.
Comment 11 bpurgar 2021-04-29 07:59:30 UTC
Ok .. but still https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253746 have confirmed problem with dri3 and amdgpu and workaround is only to use dri2 .
Comment 12 Konstantin 2021-10-21 05:59:47 UTC
This bug is related to drm-kmod. GDM works as intended with VESA driver.
Comment 13 LI Leding 2021-12-01 15:57:36 UTC
I got a similar workaround by using OutputClass match

add /usr/local/share/X11/xorg.conf.d/50-force-dri2.conf

Section "OutputClass"
	Identifier "Card0"
	MatchDriver "modesetting"
	Driver "amdgpu"
	Option      "DRI" "2"
	Option      "DRI3" "false"

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "kmsdev"             	# <str>
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "DoubleShadow"       	# [<bool>]
        #Option     "Atomic"             	# [<bool>]
	Identifier  "Card0"
	Driver      "amdgpu"
	BusID       "PCI:35:0:0"
	Option      "DRI" "2"
	Option      "DRI3" "false"

Maybe it is a little better than static conf in /etc/X11
But we still have no DRI3, Vulkan and Wayland, sadly.
Comment 14 ykla 2022-06-04 10:15:00 UTC
Created attachment 234438 [details]
gdm log 1
Comment 15 ykla 2022-06-04 10:15:40 UTC
Created attachment 234439 [details]
gdm log 2
Comment 16 ykla 2022-06-04 10:15:55 UTC
Created attachment 234440 [details]
gdm log 3
Comment 17 ykla 2022-06-04 10:16:10 UTC
Created attachment 234441 [details]
gdm log 4
Comment 18 ykla 2022-06-04 10:16:36 UTC
Created attachment 234442 [details]
Comment 19 ykla 2022-06-04 10:16:58 UTC
Created attachment 234443 [details]
Xorg log 0
Comment 20 ykla 2022-06-04 10:17:19 UTC
Created attachment 234444 [details]
xorg log old
Comment 21 ykla 2022-06-04 10:21:45 UTC
A similar problem persists on FreeBSD 13.1-release.

Thinkpad X13 with AMD R7-4750U.

Both the lock screen and the rest screen result in being stuck in a screen where mouse clicks are ineffective.

# pkg install drm-510-kmod gpu-firmware-kmod xf86-video-amdgpu

root@mybsd:/home/freebsd # pkg query -x '%n %v'  'gdm'
gdm 42.0_2
root@mybsd:/home/freebsd # pkg query -x '%n %v'  'gnome'
chrome-gnome-shell 10.1
gnome-autoar 0.4.1
gnome-backgrounds 42.0
gnome-control-center 42.1
gnome-desktop 42.1
gnome-font-viewer 42.0
gnome-icon-theme-extras 3.12.0
gnome-icon-theme-symbolic 3.12.0
gnome-keyring 40.0_3
gnome-online-accounts 3.44.0
gnome-power-manager 3.32.0
gnome-screenshot 41.0
gnome-session 42.0
gnome-settings-daemon 42.1
gnome-shell 42.1
gnome-shell-extensions 42.1
gnome-system-monitor 42.0
gnome-terminal 3.44.0
gnome-themes-extra 3.28_3
gnome-tweaks 40.0_3
gnome-video-effects 0.5.0
gnome_subr 1.0
libgnomekbd 3.26.1
pinentry-gnome 1.2.0
polkit-gnome 0.105_1
root@mybsd:/home/freebsd # 
Writing Option "DRI" "2" into the configuration will cause the whole desktop to be very laggy and unavailable.