GDM session crashes after returning from a screen-off.

Bug #2064037 reported by Jon Crall

This bug report will be marked for expiration in 49 days if no further activity occurs. (find out why)

10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
Incomplete
Undecided
Unassigned

Bug Description

I've written an AskUbuntu question about this: https://askubuntu.com/questions/1511958/screen-lock-keeps-occuring-on-24-04-even-though-i-believe-ive-disabled-it/1512075#1512075

Originally I thought it was gnome not respecting my setting to prevent locking the screen after idling, but after discussing the issue on matrix (https://matrix.to/#/!EJhpCQHHqqcNicfiql:xentonix.net/$kPbn-fqDZgoG4s6PyQfki8tcSKJUpGH9QrXZSSV_vKY?via=decred.org&via=matrix.org&via=ubuntu.com) I think it is actually just a gdm or gnome-shell crash that happens when the PC idles, the screen turns off, and then I wake it.

To summarize the symptom. I have the PC set to disable the screen after being idle for 5 minutes. I also set it such that it should not lock the session when this happens. (I want to turn on the screen and get right back to where I was without password overhead). What I've observed is that when I give the idle PC keyboard input, it wakes to a login screen, and when I login my windows from the previous session are completely gone (although tmux sessions are still alive).

I've attached a relevant section of `journalctl --user` from around the time when I last tried to interact with the idle PC. I believe the "wake" event happens at `Apr 28 13:42:43` at which point we start seeing whoopsie messages:

```
Apr 28 13:42:44 toothbrush systemd[1]: Started whoopsie.service - crash report submission.
```

And then what looks like logs indicating that I was logged out and the previous session was ended:

```
Apr 28 13:42:56 toothbrush systemd[1]: run-user-1000-gvfs.mount: Deactivated successfully.
Apr 28 13:42:57 toothbrush gdm-password][60731]: pam_unix(gdm-password:session): session closed for user joncrall
Apr 28 13:42:57 toothbrush systemd[1]: session-61.scope: Deactivated successfully.
Apr 28 13:42:57 toothbrush systemd[1]: session-61.scope: Consumed 12min 9.467s CPU time.
Apr 28 13:42:57 toothbrush systemd-logind[1790]: Session 61 logged out. Waiting for processes to exit.
Apr 28 13:42:57 toothbrush systemd-logind[1790]: Removed session 61.
```

The time from `13:42:44` to `13:43:07` where I get:

```
Apr 28 13:43:07 toothbrush systemd-logind[1790]: New session 221 of user joncrall.
Apr 28 13:43:07 toothbrush systemd[1]: Started session-221.scope - Session 221 of User joncrall.
```

seems about right, because it takes a few seconds to go from de-idling the machine to seeing any sort of display.

System Information:

No LSB modules are available.
Description: Ubuntu 24.04 LTS
Release: 24.04

# System Details Report
---

## Report details
- **Date generated:** 2024-04-28 15:17:36

## Hardware Information:
- **Hardware Model:** ASUS ROG STRIX Z590-E GAMING WIFI
- **Memory:** 128.0 GiB
- **Processor:** 11th Gen Intel® Core™ i9-11900K × 16
- **Graphics:** NVIDIA GeForce RTX™ 3090
- **Graphics 1:** NVIDIA GeForce RTX™ 3090
- **Disk Capacity:** 45.0 TB

## Software Information:
- **Firmware Version:** 0232
- **OS Name:** Ubuntu 24.04 LTS
- **OS Build:** (null)
- **OS Type:** 64-bit
- **GNOME Version:** 46
- **Windowing System:** X11
- **Kernel Version:** Linux 6.8.0-31-generic

Nvidia versions:

NVIDIA-SMI 535.171.04 Driver Version: 535.171.04 CUDA Version: 12.2

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: gdm3 46.0-2ubuntu1
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia zfs
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 28 15:04:13 2024
InstallationDate: Installed on 2024-04-25 (3 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
SourcePackage: gdm3
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.gdm3.custom.conf: 2024-04-25T18:50:53.891514

Revision history for this message
Jon Crall (erotemic) wrote :
Revision history for this message
Jon Crall (erotemic) wrote :

I'm also experiencing intermittent crashes of the window manager - either gnome-shell or gdm3, not 100% sure. What I am sure of is that I'm getting forcibly logged out.

I just experienced a crash when discussion this issue in matrix chat. There were a few things going on at the time. I did have steam and starcraft 2 open (running through steam's experimental proton). But that was in the background. In the foreground I was just moving a gvim window that had journalctl logs in it that I was going to copy into my chrome browser.

I'm attaching the journalctl logs from that crash here as well, as perhaps these issues are related.

Revision history for this message
Jon Crall (erotemic) wrote :

Also attaching the results of `sudo journalctl --dmesg --priority warning > journalctl_dmsg_warnings.log` it does seem to have some nvidia errors and tracebacks. It doesn't mean much to me, but perhaps it has useful information in it.

Revision history for this message
Jon Crall (erotemic) wrote :

On the matrix chat Nils mentioned that "im on nvidia 550 atm and on wayland. i had some X11 crashes in the past and wayland does a much better job so far"

So, I changed my session type to Wayland by logging out and using the gear by my username to select wayland. Doing that seems to have an issue with "Settings", clicking the setting gear or running `gnome-control-center` resulted in a segfault. I did some googling, and saw that this might be a nvidia driver issue, so I upgraded my drivers from `nvidia-driver-350` to `nvidia-driver-550`.

After a reboot the segfault in `gnome-control-center` went away, and the logout crash also seems to be gone as well. I tested it by letting the screen dim, waiting 10 minutes, and then pressing a few keys. Instead of crashing it went right back to my session.

Of course it would be nice if crashes didn't occur in the out-of-the-box Ubuntu 24.04 install, but in this case there seems to be a simple solution: Use Wayland and 550 drivers.

Revision history for this message
Jon Crall (erotemic) wrote :

I did have another "random" crash in the middle of a session. I was moving a window around. So it's not rela.ted to the main reason for this bug report, but I figure its relevant enough to attach the journalctl logs

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The only crash-like problem I can see in those logs is:

  simple-framebuffer simple-framebuffer.0: drm_WARN_ON(map->is_iomem)

which seems to be non-fatal for the Xorg process that triggered it. The cause of that issue is also bug 2060268, but that too is not a crash. So please follow these steps:

1. Look in /var/crash for crash files and if found run:
    ubuntu-bug YOURFILE.crash
Then tell us the ID of the newly-created bug.

2. If step 1 failed then look at https://errors.ubuntu.com/user/ID where ID is the content of file /var/lib/whoopsie/whoopsie-id on the machine. Do you find any links to recent problems on that page? If so then please send the links to us.

Please take care to avoid attaching .crash files to bugs as we are unable to process them as file attachments. It would also be a security risk for yourself.

affects: gdm3 (Ubuntu) → ubuntu
Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Jon Crall (erotemic) wrote :

Is there a resource you could point me to where I can learn what the security risks of public .crash files are? I'm interested to know what sensitive information could be contained in them.

Interesting that the whoopsie-id seems to persist across OS installs, or maybe it's tied to my Ubuntu One account? I see crash reports on here going back to 2021.

Recent crash reports on the 24.04 machine are:

_usr_bin_gnome-shell.1000.crash - https://errors.ubuntu.com/oops/235257f3-0630-11ef-8b1f-fa163ec8ca8c
_usr_bin_nautilus.1000.crash - https://errors.ubuntu.com/oops/1a6e3dfa-0409-11ef-9dc8-fa163ec44ecd
_usr_bin_gnome-control-center.1000.crash - https://errors.ubuntu.com/oops/19d7ad54-0599-11ef-8b1c-fa163ec8ca8c
_opt_google_chrome_chrome.1000.crash - https://errors.ubuntu.com/oops/13ddfcd0-0587-11ef-9dca-fa163ec44ecd

I believe the gnome-shell is the relevant one.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

> Is there a resource you could point me to where I can learn what the security risks of public .crash files are?

Not that I know of. It's just that crash files contain core dumps, and core dumps contain the memory contents of that program which may include sensitive personal information depending on the program.

> _usr_bin_gnome-shell.1000.crash - https://errors.ubuntu.com/oops/235257f3-0630-11ef-8b1f-fa163ec8ca8c

Unfortunately retracing failed so please send us more links next time it happens.

Revision history for this message
Jon Crall (erotemic) wrote :

Update: I don't know what changed, (I did do an apt upgrade), but now the crash is happening for Wayland too whenever the screen powers off. It's very frustrating.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There are no new crash reports from your machine since https://errors.ubuntu.com/oops/235257f3-0630-11ef-8b1f-fa163ec8ca8c

Please check /var/crash for new crash files per comment #6.

If you can't find any new crash files then next time it happens:

1. Reboot.

2. Run:

   journalctl -b-1 > prevboot.txt

3. Attach the resulting text file here.

Revision history for this message
Jon Crall (erotemic) wrote :

Here is prevboot.txt

Is my whoopsie-id something that should be kept private? I do have files in /var/crash that have timestamps from yesterday and today, but they do not seem to appear under https://errors.ubuntu.com/user/<ID> even after I ran `ubuntu-bug <report-file>`

Revision history for this message
Jon Crall (erotemic) wrote :

I made an interesting observation. If I unplug all bug one monitor (I have been using 3 in tests up until now), the crash does not occur in X11. I have not tried wayland yet.

I'm going to plug in a second monitor to check if it happens with 2, and then verify that it still occurs with 3.

Revision history for this message
Jon Crall (erotemic) wrote :

Oh boy, so I've spent the past two days recording observations on this issue, and I see no clear patterns at all. I've created a zipfile with a text document called update.txt which contains my actions and observations.

The basic pattern is: I do stuff, wait for the screen blank, un-blank and see if it crashes. Sometimes the crash happens and sometimes it does not. It also contains observations that detail what may be a separate issue (enabling / disabling screens had weird behavior, and I think I found a minor but fixable bug in the screenshot tool). I have 2 journalctl logs in there. After a few entries I realized I should start adding timestamps and normalize the observation format, so it goes from prose to a time / action / result / notes format after a point. In a few places I reference screenshots (which demonstrate the screenshot and monitor bug), those are included in the zipfile.

Things that should be noted: At this point I've installed a fair bit of
external software on the machine. I've included a list of it in apt_list.txt in
the zipfile. I also have a development .pyenv in my home directory and my
.bashrc will default to a specified virtualenv.

So far I'm the only person who has reported this behavior. I'm wondering if its an issue with my hardware?

I really like 24.04 so far, but this is a major issue for me. I may try a fresh install to make more observations with less uncontrolled variables.

Revision history for this message
TJ (tj) wrote :

Before going any further please upgrade the Motherboard firmware to the latest release and re-test. By my count there have been 13 upgrades since:

DMI: ASUS System Product Name/ROG STRIX Z590-E GAMING WIFI, BIOS 0232 01/06/2021

with the latest being 2203 2024/04/17 according to

https://rog.asus.com/motherboards/rog-strix/rog-strix-z590-e-gaming-wifi-model/helpdesk_bios/

Revision history for this message
Jon Crall (erotemic) wrote :

I've updated my bios, but the issue seems to persist. It's still inconsistent. Sometimes it un-blanks without issue, sometimes I get the gray-screen-of-death, and sometimes it unblanks directly to the login page without a GSOD.

I'll try any other debugging suggestions, including a OS-reinstall. The alternative is that I disable screen-blanking (which seems like a waste of power) or I revert to 22.04.

Revision history for this message
Jon Crall (erotemic) wrote :

I've reinstalled a fresh copy of 24.04 with extras enabled and recommended proprietary software installed, and I recorded a set of observations on a fresh system. I recorded journal logs and other stats in a similar format.

I think I may have identified a culprit. The crash appears to only occur when screen lock is disabled. Maybe someone could try to reproduce?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.