Skip to content

GNOME/Wayland, disconnecting external monitor when lid closed goes unnoticed

I've had this problem for a very long time now but it would be great to fix this.

When I have my laptop and an external monitor connected, it gets recognized and works fine. Disconnecting the external monitor works fine. Closing the lid of the laptop works in that the external monitor now becomes the sole monitor. Opening the lid and I'm back. Locking GNOME (Super+L) and then disconnecting the external monitor also works. All seems to work so far. But now, when I lock GNOME, close the lid of the laptop, unplug the external monitor, open the lid, GNOME thinks the second monitor is still plugged in! From then on, the laptop won't go to sleep as it thinks there's a second monitor attached. In GNOME displays there are two displays listed, but only the native laptop display is really connected! Many of my windows are now off-screen that I can get back using Super+Shift+Arrow.

I'm using GNOME, Wayland and I have an Intel iGPU. What are relevant logs, config files and commands I can use to investigate this? It seems most information online is about X and using xrandr.

5 points1 comments
Open on Reddit
About this post
Posted
Archived
Score
5 · 100% up
Kind
Text
ID
ezsc4e

Author

12
posts
22
comments
0
media
View profile

1 comment

I would just report this as a bug against mutter. It's not obvious which logs would be useful, though just showing the whole systems log with journalctl during the disconnect might be useful.

I have a similar bug - i put my laptop to sleep via the menu, then unplug the external monitor. When I open my laptop to wake it up, there is dead space where the external monitor was, and wibdows might be out in the dead space and not visible. I can fix it with an alt-f2 r to restart gnome shell.

My bug has already been reported a long time ago, though I can't find the report atm.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.