System goes to sleep with external monitor and lid closed after login

Bug #1805699 reported by Dario Menin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gdm3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is more or less a duplicate of https://bugs.launchpad.net/bugs/1716160 (i just copied the title), I'm opening a new bug as per comment https://bugs.launchpad.net/ubuntu/+source/gdm3/+bug/1716160/comments/31.

I'm experiencing the same thing in Ubuntu 18.04:
- Boot the laptop with external screen connected
- Close the lid
- The laptop continues to boot and reaches the login screen
- Insert password
- The laptop goes to sleep, i have to open and close the lid to make it wake up
- Then it works without problems when i close the lid again

This happens in the last days, maybe the bug appeared again with some update.

Let me know if something can be done to help to debug the issue.

lsb_release -rd:
Description: Ubuntu 18.04.1 LTS
Release: 18.04

apt-cache policy gdm3
gdm3:
  Installato: 3.28.3-0ubuntu18.04.3
  Candidato: 3.28.3-0ubuntu18.04.3
  Tabella versione:
 *** 3.28.3-0ubuntu18.04.3 500
        500 http://it.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     3.28.2-0ubuntu1.4 500
        500 http://it.archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     3.28.0-0ubuntu1 500
        500 http://it.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

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

Can you please run 'gnome-tweaks' and check that:

  General > Suspend when laptop lid is closed = OFF

?

tags: added: multimonitor
Changed in gdm3 (Ubuntu):
status: New → Incomplete
tags: added: bionic
Revision history for this message
Sebastien Bacher (seb128) wrote :

@Daniel, the setting shouldn't matter in that case, when there is an external display connected suspend should be inhibited on lid close.
Could you profive the output of "systemd-inhibit"?

Revision history for this message
Dario Menin (darioalessio-menin) wrote :

systemd-inhibit:

     Who: dario (UID 1000/dario, PID 5920/gsd-media-keys)
    What: sleep
     Why: GNOME handling keypresses
    Mode: delay

     Who: dario (UID 1000/dario, PID 5920/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: GNOME Shell (UID 1000/dario, PID 5530/gnome-shell)
    What: sleep
     Why: GNOME deve bloccare lo schermo
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2764/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: dario (UID 1000/dario, PID 5867/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: ModemManager (UID 0/root, PID 1494/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2755/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: dario (UID 1000/dario, PID 5867/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: NetworkManager (UID 0/root, PID 1496/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2755/gsd-media-keys)
    What: sleep
     Why: GNOME handling keypresses
    Mode: delay

     Who: UPower (UID 0/root, PID 2255/upowerd)
    What: sleep
     Why: Pause device polling
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2764/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

12 inhibitors listed.

A notice: the problem doesn't happen every time, it happened two times in a row in the past days, for example now i closed the lid during the boot process and it didn't suspend. Is there some boot log i can send if i see the problem.

My guess is that this is related to closing the lid at a specific time. For what i could see, the laptop goes to sleep in the moment when the screen goes black between the GDM login and the desktop start.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Right, in your log the lid is correctly inhibited

" What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block"

It would be interesting to have the same log when the system is buggy. Do you get the issue if you close the lid in the session or only in the transition between gdm and the session? It could be that there is a gap between the time the g-s-d from the greeter stops and the one from the session starts during which there is no active inhibitor

Changed in gdm3 (Ubuntu):
status: Incomplete → New
Revision history for this message
Dario Menin (darioalessio-menin) wrote :

Hi, sorry for the delay, I tried to trigger this behavior many times, but with no success.

Apparently the problem is gone, you can close the bug if you want, I'll post an update if the problem shows up again.

Cheers

Changed in gdm3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Dario Menin (darioalessio-menin) wrote :

I think that you can close this, the problem didn't show up anymore, probably it was something temporary.

Changed in gdm3 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Dario Menin (darioalessio-menin) wrote :

Hi, the problem happened again: i turned on the laptop and left it on the gdm login screen for a while, so the screen went black (all this with the lid closed, the laptop is connected to an external monitor and keyboard + mouse). I woke up the screen moving the mouse cursor and i typed in username and password, the login screen disappeared and the laptop went in suspend mode. I had to open the lid to continue using it.

systemd-inhibit (right after this):

     Who: dario (UID 1000/dario, PID 16535/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2865/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: UPower (UID 0/root, PID 2402/upowerd)
    What: sleep
     Why: Pause device polling
    Mode: delay

     Who: ModemManager (UID 0/root, PID 1491/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2862/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: GNOME Shell (UID 1000/dario, PID 16089/gnome-shell)
    What: sleep
     Why: GNOME deve bloccare lo schermo
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2862/gsd-media-keys)
    What: sleep
     Why: GNOME handling keypresses
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2865/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: dario (UID 1000/dario, PID 16535/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: Unattended Upgrades Shutdown (UID 0/root, PID 1943/unattended-upgr)
    What: shutdown
     Why: Stop ongoing upgrades or perform upgrades before shutdown
    Mode: delay

     Who: dario (UID 1000/dario, PID 16594/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: NetworkManager (UID 0/root, PID 1400/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

12 inhibitors listed.

Changed in gdm3 (Ubuntu):
status: Invalid → New
Revision history for this message
Dario Menin (darioalessio-menin) wrote :
Download full text (3.6 KiB)

Hi, as now i can reliably reproduce this by simply closing the lid before logging in. The laptop goes into suspend right after typing the password and pressing enter.

systemd-inhibit:

     Who: UPower (UID 0/root, PID 1902/upowerd)
    What: sleep
     Why: Pause device polling
    Mode: delay

     Who: ModemManager (UID 0/root, PID 1296/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2379/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: NetworkManager (UID 0/root, PID 1320/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: dario (UID 1000/dario, PID 5917/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: dario (UID 1000/dario, PID 5971/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: dario (UID 1000/dario, PID 5917/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: Unattended Upgrades Shutdown (UID 0/root, PID 1604/unattended-upgr)
    What: shutdown
     Why: Stop ongoing upgrades or perform upgrades before shutdown
    Mode: delay

     Who: GNOME Shell (UID 1000/dario, PID 5487/gnome-shell)
    What: sleep
     Why: GNOME deve bloccare lo schermo
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2372/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: gdm (UID 125/gdm, PID 2372/gsd-media-keys)
    What: sleep
     Why: GNOME handling keypresses
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2379/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

12 inhibitors listed.

sudo systemd-inhibit:

     Who: UPower (UID 0/root, PID 1902/upowerd)
    What: sleep
     Why: Pause device polling
    Mode: delay

     Who: ModemManager (UID 0/root, PID 1296/ModemManager)
    What: sleep
     Why: ModemManager needs to reset devices
    Mode: delay

     Who: gdm (UID 125/gdm, PID 2379/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: NetworkManager (UID 0/root, PID 1320/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: dario (UID 1000/dario, PID 5917/gsd-power)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: dario (UID 1000/dario, PID 5971/gsd-media-keys)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: dario (UID 1000/dario, PID 5917/gsd-power)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: Unattended Upgrades Shutdown (UID 0/root, PID 1604/unattended-upgr)
    What: shutdown
     Why: Stop ongoing upgrades or perform upgrades before shutdown
    Mode: delay

     Who: GNOME Shell (UID 1000/dario, PID 5487/gnome-shell)
    What: sleep
     Why: GNOME deve bloccare lo scherm...

Read more...

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.