Displays don't turn off with external monitor connected
I have Gnome configured so the display turns off after some time, but the computer doesn't go to sleep. This works fine unless I have an external monitor connected. The displays then turn off at first, but immediately turn back on again, showing the lock screen. The external monitor even goes into standby, just to immediately turn back on again. sudo journalctl -f
during that happening gives me this:
Okt 22 09:51:12 knarrevik gnome-shell[3415]: Source ID 3907986 was not found when attempting to remove it
Okt 22 09:51:12 knarrevik gnome-shell[3415]: Source ID 3907993 was not found when attempting to remove it
Okt 22 09:51:12 knarrevik kernel: leds system76_acpi::kbd_backlight: Setting an LED's brightness failed (-1)
Okt 22 09:51:13 knarrevik gnome-shell[3415]: Cursor update failed: drmModeAtomicCommit: Invalid argument
Okt 22 09:51:21 knarrevik gnome-shell[3415]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Okt 22 09:51:21 knarrevik gnome-shell[3415]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Okt 22 09:51:21 knarrevik gnome-shell[3415]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Okt 22 09:51:21 knarrevik gnome-shell[3415]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Okt 22 09:51:21 knarrevik gnome-shell[3415]: meta_monitor_manager_get_logical_monitor_from_number: assertion '(unsigned int) number < g_list_length (manager->logical_monitors)' failed
Okt 22 09:51:21 knarrevik gnome-shell[3415]: meta_workspace_get_work_area_for_monitor: assertion 'logical_monitor != NULL' failed
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe612bf0f40 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe639bb1600 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe5b66a4c80 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe5a427b2c0 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe53a9d9ae0 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.130][8c40][default][client/src/platformscreens.cpp:34][info] Updating screens due to notification
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe612bf0f40 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe639bb1600 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe5b66a4c80 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe5a427b2c0 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik firefox[1303392]: Couldn't map window 0x7fe53a9d9ae0 as subsurface because its parent is not mapped.
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/platformscreens.cpp:46][info] Screens changed from ( 2 ):
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/platformscreens.cpp:42][info] - 0 QRect(0,0 1920x1080) QRect(0,32 1920x1048) (primary)
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/platformscreens.cpp:42][info] - 1 QRect(1920,0 1680x1050) QRect(1920,32 1680x1018)
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/platformscreens.cpp:48][info] to ( 1 ):
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/platformscreens.cpp:42][info] - 0 QRect(0,0 1920x1080) QRect(0,32 1920x1048) (primary)
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/workspacechange.cpp:16][info] Workspace changed
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/workspacechange.cpp:16][info] Workspace changed
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/workspacechange.cpp:16][info] Workspace changed
Okt 22 09:51:21 knarrevik pia-client.desktop[3684]: [2023-10-22 07:51:21.133][8c40][default][client/src/workspacechange.cpp:16][info] Workspace changed
Okt 22 09:51:21 knarrevik kernel: leds system76_acpi::kbd_backlight: Setting an LED's brightness failed (-1)
I checked that it's not the lock screen notifications triggering this, as this seems to happen for some people on the internets:
$ dconf read /org/gnome/desktop/notifications/show-in-lock-screen
false
I found this comment, which seems to match the logs and behavior, but no solution.
I'm currently using gdm version 45.0.1 with Wayland on Arch Linux with an Intel graphics card, but I have this issue for some time now.
Let me know if I'm in the wrong project with this!