Avoid sleep after closing lid with external monitor

Asked by Federico Poli

After a recent upgrade, closing my laptop lid while an external monitor is attached via HDMI makes the laptop goes to sleep. This was not the case until a few days ago. Any suggestion regarding how to debug/fix this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Federico Poli
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Does the system have a make and model? What is the output of:

sudo dmidecode -t 1; lsb_release -a; uname -a

Thanks

Revision history for this message
Federico Poli (fpoli) said :
#2

# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x000C, DMI type 1, 27 bytes
System Information
 Manufacturer: LENOVO
 Product Name: 20J7S00P00
 Version: ThinkPad T470p
 Serial Number: PF0XRTMJ
 UUID: 1e79aa4c-2a34-11b2-a85c-dad4617c7056
 Wake-up Type: Power Switch
 SKU Number: LENOVO_MT_20J7_BU_Think_FM_ThinkPad T470p
 Family: ThinkPad T470p

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
Linux fpoli-thinkpad 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3
Revision history for this message
Federico Poli (fpoli) said (last edit ):
#4

Thank you for looking into this. I concluded that it was most likely a hardware problem with the external monitor, which after one more day stopped working at all. With other external monitors the laptop works fine, and does not go to sleep when closing the lid while the external monitor is attached.