Screen restarts and logs out when disconnecting HDMI cable

Bug #2068904 reported by Anne Chew Yii Huei

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

8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-shell (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Replication steps:

1. Start up Ubuntu desktop as usual with HDMI cable connected to external monitor in extended desktop mode.
2. Log in to Ubuntu desktop.
3. Launch a few applications (e.g. browser, terminal, etc).
4. Disconnect HDMI cable.

Expected behaviour:

Desktop session should still be available on laptop screen after disconnecting HDMI cable.

Current behaviour:

Laptop screen goes black and shows the login screen. Logging in again shows a fresh desktop session (no open application windows).

Other information:

This is a dual-OS machine, with home directory encryption enabled for Ubuntu.
Installed from Mantic originally, and upgraded to Noble via command line.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: ubuntu-desktop 1.539
ProcVersionSignature: Ubuntu 6.5.0-35.35-generic 6.5.13
Uname: Linux 6.5.0-35-generic x86_64
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Mon Jun 10 21:51:29 2024
EcryptfsInUse: Yes
InstallationDate: Installed on 2024-03-14 (88 days ago)
InstallationMedia: Ubuntu Legacy 23.10 "Mantic Minotaur" - Release amd64 (20231010)
SourcePackage: ubuntu-meta
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Anne Chew Yii Huei (annecyh) wrote :
Revision history for this message
AceLan Kao (acelankao) wrote :

Looks like the X or Wayland crashes when HDMI cable is unplugged.

We may need below logs
1. dmesg with drm.debug=0x1e
2. sudo lspci -vvnn

Revision history for this message
Anne Chew Yii Huei (annecyh) wrote :

dmesg output with drm.debug=0x1e

Revision history for this message
Anne Chew Yii Huei (annecyh) wrote :

output for "sudo lspci -vvnn" after reproducing the issue and logging back in.

Revision history for this message
AceLan Kao (acelankao) wrote :

It's the gnome-shell crashes.

[86941.402557] gnome-shell[77896]: segfault at 140 ip 00007e53082487f6 sp 00007e52b37eafe0 error 4 in libc.so.6[7e5308228000+188000] likely on CPU 4 (core 8, socket 0)
[86941.402574] Code: 84 ed 74 60 e8 2b fd fd ff 49 8b 1c 24 49 89 c7 48 85 db 75 15 eb 36 0f 1f 44 00 00 49 8b 5c 24 08 49 83 c4 08 48 85 db 74 23 <44> 3a 2b 75 ed 4c 89 fa 48 89 de 4c 89 f7 e8 f7 fd fd ff 85 c0 75

Could you add "drm.debug=0x1e" to /etc/default/grub change the below line
   GRUB_CMDLINE_LINUX=""
to
   GRUB_CMDLINE_LINUX="log_buf_len=16M drm.debug=0x1e"
Then run
   sudo update-grub
and reboot to capture the dmesg log again after unplug the HDMI.

Revision history for this message
Anne Chew Yii Huei (annecyh) wrote :

Hi Acelan,

I've updated the grub file and saved the latest dmesg log.
Hope the log contains the info you expect.

Thanks!

affects: ubuntu-meta (Ubuntu) → gnome-shell (Ubuntu)
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

A segfault is unexpected, otherwise I would have just assumed this was bug 2050865...

To help us find the cause of the crash please follow these steps:

1. Run these commands:
    journalctl -b0 > journal.txt
    journalctl -b-1 > prevjournal.txt
and attach the resulting text files here.

2. 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.

3. If step 2 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.

Changed in gnome-shell (Ubuntu):
status: New → Incomplete
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Maybe this is still bug 2050865, and the segfault in the log isn't from disconnecting HDMI.

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

If the HDMI port is connected to a secondary GPU then it might be bug 2069565.

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.