GNOME desktop does not suspend on lid close with HDMI TV connected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-settings-daemon (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Ubuntu 20.04 with all current updates, GNOME/Wayland desktop, Dell Latitude E5450 notebook.
I have external TV connected via HDMI and I want notebook to suspend when I close lid even if TV is connected. This does not work. Even though logind is configured to suspend in this case:
$ cat /etc/systemd/
[Login]
HandleLidSwitch
$
gnome-settings-
WHO UID USER PID COMM WHAT WHY MODE
bor 1001 bor 96600 gsd-power handle-lid-switch External monitor attached or configuration changed recently block
so sytemd-logind does not initiate suspend, but there is also no code in gnome-settings-
Ubuntu package includes patch ubuntu-
$ gsettings list-recursively org.gnome.
org.gnome.
org.gnome.
org.gnome.
$
This most trivial (untested) patch to use this settings seems to be:
diff --git a/plugins/
index c7a16e8d..9b7a99b5 100644
--- a/plugins/
+++ b/plugins/
@@ -1196,7 +1196,7 @@ upower_kbd_toggle (GsdPowerManager *manager,
static gboolean
suspend_
{
- return !external_
+ return g_settings_
}
static gboolean
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gnome-settings-
ProcVersionSign
Uname: Linux 5.8.0-25-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: ubuntu:GNOME
Date: Wed Nov 4 18:43:56 2020
DistributionCha
# This is a distribution channel descriptor
# For more information see http://
canonical-
InstallationDate: Installed on 2015-07-02 (1952 days ago)
InstallationMedia: Ubuntu 14.04 "Trusty" - Build amd64 LIVE Binary 20140620-04:25
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
XDG_RUNTIME_
LANG=ru_RU.UTF-8
SHELL=/bin/bash
SourcePackage: gnome-settings-
UpgradeStatus: Upgraded to focal on 2020-10-03 (32 days ago)
> This most trivial (untested) patch
I now built package with this test and it correctly suspends with external monitor connected.