Can't switch user when use external display and the laptop lid closed, the login fields not show up

I’ve installed manjaro on my laptop, use Xorg GNOME as desktop environment, and connect with a 4k external screen. When I login the system, close the laptop lid, everything works normally on the external screen. But when I select Swtich User, the login screen showed up, but there’s no user name list, I can’t select user and can’t get in to the login fields. And when I use Ctrl + Alt + F2 switch back to previous login session, it’s on lock screen as default, and neither the keyboard nor the mouse has no response. Only when I open the lid again, everything back to normal.

I don’t know it’s a GNOME problem or manjaro problem. I’ve tried to switch off Suspend when laptop lid is closed, and edit /etc/systemd/logind.conf as

LidSwitchIgnoreInhibited=yes
HandleLidSwitch=ignore

or edit /etc/UPower/UPower.conf as

IgnoreLid=true

All above not solving my problem.

Looks like it’s a rare situation, so, how do I make the system works normally when the lid close all the time?

Maybe try to add the variables here:

/etc/systemd/logind.conf.d/custom-logind.conf

logind.conf

Sure you have to create it yourself.

I’ve add the config file and reboot, nothing change.
Maybe I should report it to the gdm developers, it looks like a bug only appears when use external monitor as the only display.

Perhaps laptop display is registered as primary display?

can you return

inxi -Fza 

I don’t know, because I’ve already set the external monitor as Single Display, and the xrandr output shows it is primary display. Maybe it behave different only on the login screen.

I’ve opened the TTY3 to monitor the gdm service status when switch to login screen and then switch back, command is sudo systemctl status gdm.service, got different output:

lid opened

● gdm.service - GNOME Display Manager
Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2022-04-09 19:23:50 CST; 16min ago
Main PID: 1211 (gdm)
Tasks: 4 (limit: 18764)
Memory: 6.5M
CPU: 106ms
CGroup: /system.slice/gdm.service
└─1211 /usr/bin/gdm
4月 09 19:40:35 think-mj gdm[1211]: Gdm: GdmSession: Handling new connection from outside
4月 09 19:40:35 think-mj gdm[1211]: Gdm: GdmManager: client with pid 13658 connected
4月 09 19:40:35 think-mj gdm[1211]: Gdm: GdmDisplay: Got timed login details for display: 0
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: received VT change event
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: VT changed from 1 to 3
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: VT of login window is 1
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: VT switched from login window
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: killing login window once its unused
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: display status changed: 3
4月 09 19:40:40 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: active VT is not initial VT, so ignoring

lid closed

● gdm.service - GNOME Display Manager
Loaded: loaded (/usr/lib/systemd/system/gdm.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2022-04-09 19:23:50 CST; 18min ago
Main PID: 1211 (gdm)
Tasks: 3 (limit: 18764)
Memory: 6.5M
CPU: 126ms
CGroup: /system.slice/gdm.service
└─1211 /usr/bin/gdm
4月 09 19:42:28 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: x11 login display for seat seat0 requested
4月 09 19:42:28 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: display status changed: 2
4月 09 19:42:28 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: session 11 found, activating.
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: received VT change event
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: VT changed from 1 to 3
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: VT of login window is 1
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: VT switched from login window
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: killing login window once its unused
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: display status changed: 3
4月 09 19:42:32 think-mj gdm[1211]: Gdm: GdmLocalDisplayFactory: active VT is not initial VT, so ignoring

Here it is

inxi -Fza

System:
Kernel: 5.16.14-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/boot/vmlinuz-5.16-x86_64
root=UUID=9229c595-5ca2-40e5-80b8-81d26e84c423 rw quiet
udev.log_priority=3 efi=runtime
Desktop: GNOME v: 41.4 tk: GTK v: 3.24.33 wm: gnome-shell dm: GDM v: 41.3
Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 20UAA1ADCD v: ThinkPad X1 Carbon Gen 8
serial: Chassis: type: 10 serial:
Mobo: LENOVO model: 20UAA1ADCD v: SDK0L77769 WIN
serial: UEFI: LENOVO v: N2WET30W (1.20 )
date: 08/26/2021
Battery:
ID-1: BAT0 charge: 51.3 Wh (99.2%) condition: 51.7/51.0 Wh (101.4%)
volts: 17.4 min: 15.4 model: Celxpert 5B10W13932 type: Li-poly
serial: status: full cycles: 2
Device-1: hidpp_battery_1
model: Logitech G304 Lightspeed Wireless Gaming Mouse serial:
charge: 100% (should be ignored) rechargeable: yes status: discharging
CPU:
Info: model: Intel Core i7-10510U bits: 64 type: MT MCP
arch: Comet/Whiskey Lake note: check family: 6 model-id: 0x8E (142)
stepping: 0xC (12) microcode: 0xEC
Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
L3: 8 MiB desc: 1x8 MiB
Speed (MHz): avg: 4763 high: 4861 min/max: 400/4900 scaling:
driver: intel_pstate governor: performance cores: 1: 4841 2: 4798 3: 4800
4: 4799 5: 4861 6: 4564 7: 4801 8: 4646 bogomips: 36812
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 status: Vulnerable: eIBRS with unprivileged eBPF
Type: srbds mitigation: TSX disabled
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel CometLake-U GT2 [UHD Graphics] vendor: Lenovo driver: i915
v: kernel ports: active: DP-2 off: eDP-1 empty: DP-1,HDMI-A-1
bus-ID: 00:02.0 chip-ID: 8086:9b41 class-ID: 0300
Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
bus-ID: 1-8:3 chip-ID: 04f2:b6cb class-ID: fe01 serial:
Display: x11 server: X.org v: 1.21.1.3 compositor: gnome-shell driver: X:
loaded: modesetting alternate: fbdev,vesa gpu: i915 display-ID: :1
screens: 1
Screen-1: 0 s-res: 3840x2160 s-size: <missing: xdpyinfo>
Monitor-1: DP-2 pos: primary model: Dell U3219Q serial:
built: 2021 res: 3840x2160 hz: 60 dpi: 140 gamma: 1.2
size: 697x392mm (27.44x15.43") diag: 800mm (31.5") ratio: 16:9 modes:
max: 3840x2160 min: 720x400
Monitor-2: eDP-1 note: disabled model-id: CSO 0x1400 built: 2019
res: 3840x2160 dpi: 316 gamma: 1.2 size: 309x174mm (12.17x6.85")
diag: 355mm (14") ratio: 16:9 modes: 3840x2160
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 21.3.7
direct render: Yes
Audio:
Device-1: Intel Comet Lake PCH-LP cAVS vendor: Lenovo
driver: sof-audio-pci-intel-cnl
alternate: snd_hda_intel,snd_soc_skl,snd_sof_pci_intel_cnl
bus-ID: 00:1f.3 chip-ID: 8086:02c8 class-ID: 0403
Sound Server-1: ALSA v: k5.16.14-1-MANJARO running: yes
Sound Server-2: JACK v: 1.9.20 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Intel Comet Lake PCH-LP CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:02f0 class-ID: 0280
IF: wlp0s20f3 state: up mac:
Device-2: Intel Ethernet I219-V vendor: Lenovo driver: e1000e v: kernel
port: N/A bus-ID: 00:1f.6 chip-ID: 8086:0d4f class-ID: 0200
IF: enp0s31f6 state: down mac:
IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac:
IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac:
Bluetooth:
Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-10:7 chip-ID: 8087:0026 class-ID: e001
Report: rfkill ID: hci0 rfk-id: 2 state: up address: see --recommends
Drives:
Local Storage: total: 953.87 GiB used: 111.16 GiB (11.7%)
SMART Message: Required tool smartctl not installed. Check --recommends
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: SK Hynix model: HFS001TDE9X081N
size: 953.87 GiB block-size: physical: 512 B logical: 512 B
speed: 31.6 Gb/s lanes: 4 type: SSD serial: rev: 41720C20
temp: 49.9 C scheme: GPT
Partition:
ID-1: / raw-size: 500 GiB size: 491.08 GiB (98.22%)
used: 111.14 GiB (22.6%) fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4
ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
used: 29.3 MiB (11.4%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
Swap:
Alert: No swap data was found.
Sensors:
System Temperatures: cpu: 62.0 C pch: 63.0 C mobo: N/A
Fan Speeds (RPM): fan-1: 3877
Info:
Processes: 274 Uptime: 34m wakeups: 28 Memory: 15.29 GiB
used: 2.74 GiB (18.0%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 1328 lib: 338 flatpak: 0
Shell: Zsh v: 5.8.1 running-in: gnome-terminal inxi: 3.3.14