References to the issue:
- my bug report in Debian against systemd (I erroneously thought to be caused by some systemd mistreatment of steps during suspend/resume - I have not spotted the error) which points to logs and other system information: http://bugs.debian.org/945158
- found similar issue reported against ubuntu: Comment #9 : Bug #1791981 : Bugs : xorg-server package : Ubuntu
Problem summary:
if laptop lid is closed after suspend is initiated (via keyboard
shortcut), but before laptop actually is suspended, then upon resume multiple
things happen
-
(seems to be 100% reproducible): gdm crashes with Xorg.log.1 having “(EE) modeset(G0): failed to set mode: No space left on device”.
-
(50%): some fonts get screwed up (sorry - no screenshot)
Laptop suspends/resumes (and even hibernates to encrypted swap partition) just fine otherwise. I just need to fully suspend before closing the lid.
Details:
I have thinkpad P1 with Intel onboard and NVIDIA Quadro T2000, running Debian testing/sid with nvidia drivers (440.31) provided via debian experimental.
$> lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (Mobile) (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] (rev a1)
From what I have heard, external output (HDMI) is wired to Nvidia GPU and Nvidia drivers do not support screen offloading, so I just followed instructions to make Nvidia the GPU to be the GPU to do all the work:
$> cat /etc/X11/xorg.conf.d/nvidia.conf
# try to configure display output source provider via nvidia since
# otherwise cannot display to external HDMI
#
# https://download.nvidia.com/XFree86/Linux-x86/375.82/README/randr14.html
#
# ....
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "intel"
Device "intel"
EndSection
with those ad-hoc invocations for gdm and x-session to use it as the provider
$> cat /usr/local/bin/nvidia-hdmi
#!/bin/sh
set -eu
# Nvidia on lena madness
touch /tmp/log
echo "running" >> /tmp/log
xrandr --setprovideroutputsource modesetting NVIDIA-0 >> /tmp/log 2>&1
xrandr --auto >> /tmp/log 2>&1
So far it was good but I noted that the laptop heats up even when suspended, so I also followed Chapter 21. Configuring Power Management Support and configured power management.
http://www.onerussian.com/tmp/x-crash.20191120/ contains log dumps by journalctl. Excerpt of most notable diff between normal suspend (lid is not closed, would be marked with -) and problematic (closing before suspend finished, marked with +) is probably:
$> sedme() { sed -e 's,Nov 20 ..:..:.. ,<DATE> ,g' -e 's,\[[0-9].........\.....],[<TIME>],g' -e 's,\[[0-9]*\],[<PID>],g' -e 's,^> ,,g' "$1" }
$> diff -Naur <(sedme 0-1-journalctl.diff) <(sedme 1-2-journalctl.diff) | less
...
<DATE> lena acpid[<PID>]: 1 client rule loaded
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE) modeset(G0): failed to set mode: No space left on device
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE)
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: Fatal server error:
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE) EnterVT failed for gpu screen 0
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE)
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: Please consult the The X.Org Foundation support
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: at http://wiki.x.org
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: for help.
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE) Please also check the log file at "/var/log/Xorg.1.log" for additional information.
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE)
+<DATE> lena systemd[<PID>]: Starting Refresh fwupd metadata and update motd...
+<DATE> lena fwupdmgr[<PID>]: Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz
<DATE> lena systemd-logind[<PID>]: Operation 'sleep' finished.
...
<DATE> lena avahi-daemon[<PID>]: Leaving mDNS multicast group on interface wlp82s0.IPv4 with address 10.31.123.112.
-<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (II) event1 - Sleep Button: is tagged by udev as: Keyboard
-<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (II) event1 - Sleep Button: device is a keyboard
+<DATE> lena /usr/lib/gdm3/gdm-x-session[<PID>]: (EE) Server terminated with error (1). Closing log file.
Not sure how crash message about out of space is relevant since
$> grep Path /proc/driver/nvidia/params
TemporaryFilePath: "/var/tmp"
$> df -h /var/tmp
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p5 366G 30G 318G 9% /
and the only smallish partition is
$> df -h /run
Filesystem Size Used Avail Use% Mounted on
tmpfs 3.2G 2.2M 3.2G 1% /run
but I increased it to 8GB with no positive effect on the issue.
Please assist in digging out what could be causing this