Thinkpad P1 Gen2 HDMI doesn't work after log out or reboot

Bug #1886230 reported by Alex Cabal
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have a Thinkpad P1 Gen 2. This specific machine was customized to NOT have a discrete Nvidia GPU. It ONLY has an integrated Intel UHD 630 GPU.

This is not a hardware issue as Windows seems to handle things correctly.

With an external monitor connected via HDMI, boot proceeds OK with the external monitor displaying the boot process.

I log in to a Gnome session using X.

After login, I am able to open the display settings GUI and set mode to "single display" with the built-in LCD disabled and the external monitor enabled. This works correctly.

However, if I then reboot the machine with the external monitor connected:

1. Boot proceeds correctly with the boot process shown on the external monitor.

2. After login, the external monitor is powered off and the built-in LCD is enabled. The "display settings" GUI shows the external monitor as a connected "Unknown Display" with the wrong resolution of 1024x768. Attempting to use the GUI to set "single display" as above results in the external monitor still being powered off, and the built-in LCD also powered off. I have to press esc to cancel the display changes.

At this point, the relevant output of `xrandr` is:

````
DP1 connected 1024x768+3840+0 (normal left inverted right x axis y axis) 600mm x 340mm
   1024x768 60.00*
   800x600 60.32 56.25
   848x480 60.00
   640x480 59.94
````

DP1 is the HDMI output, and it is listed at the wrong resolutions.

If I disconnect the HDMI cable then run `xrandr` again, the output of `xrandr` is unchanged: it still lists DP1 as connected (!) even though the cable is disconnected.

This bug also occurs if instead of rebooting, I simply log out and log back in again.

The only solution appears to be to unplug the HDMI cable, shut down the machine (not reboot or log out), power on, log in, and at the desktop plug in the HDMI cable. At that point it works again.

Rebooting does not solve the issue. It seems that a complete shutdown is required.

I tested on Ubuntu 20.04's stock kernel 5.4.0 and also kernel 5.7.7 and the issue is present on both versions.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.4.0-40-generic 5.4.0-40.44
ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
Uname: Linux 5.4.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: alex 1888 F.... pulseaudio
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
Date: Fri Jul 3 16:00:55 2020
InstallationDate: Installed on 2020-07-03 (0 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
MachineType: LENOVO 20QTCTO1WW
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/usr/bin/zsh
ProcFB: 0 i915drmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-40-generic root=UUID=f8b7e5a7-d866-4a48-aef0-b430465ab66d ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-5.4.0-40-generic N/A
 linux-backports-modules-5.4.0-40-generic N/A
 linux-firmware 1.187.1
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/20/2020
dmi.bios.vendor: LENOVO
dmi.bios.version: N2OET42W (1.29 )
dmi.board.asset.tag: Not Available
dmi.board.name: 20QTCTO1WW
dmi.board.vendor: LENOVO
dmi.board.version: SDK0R32862 WIN
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: dmi:bvnLENOVO:bvrN2OET42W(1.29):bd01/20/2020:svnLENOVO:pn20QTCTO1WW:pvrThinkPadP1Gen2:rvnLENOVO:rn20QTCTO1WW:rvrSDK0R32862WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad P1 Gen 2
dmi.product.name: 20QTCTO1WW
dmi.product.sku: LENOVO_MT_20QT_BU_Think_FM_ThinkPad P1 Gen 2
dmi.product.version: ThinkPad P1 Gen 2
dmi.sys.vendor: LENOVO

Revision history for this message
Alex Cabal (acabal) wrote :
Revision history for this message
Alex Cabal (acabal) wrote :

xrandr output when HDMI is working correctly

Revision history for this message
Alex Cabal (acabal) wrote :

xrandr output after the bug occurs (i.e. HDMI is broken)

Revision history for this message
Alex Cabal (acabal) wrote :

dmesg output when HDMI is working

Revision history for this message
Alex Cabal (acabal) wrote :

dmesg output after reboot, and HDMI is broken

Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Alex Cabal (acabal) wrote :

Note, this occurs in both Wayland and X. Thus I think it's probably a kernel issue.

Revision history for this message
You-Sheng Yang (vicamo) wrote :

Hi, please test mainline builds: https://wiki.ubuntu.com/Kernel/MainlineBuilds

Revision history for this message
Alex Cabal (acabal) wrote :

Tested on stock Ubuntu kernel 5.4.0, then 5.7.7, then 5.8.0-rc3 with same results.

Revision history for this message
Alex Cabal (acabal) wrote :

Should I report this to upstream instead?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you please test this patch:
https://<email address hidden>/

Revision history for this message
Alex Cabal (acabal) wrote :

The patch did not fix the issue. However, during boot, some error text appeared that did not appear before:

[ 1.868916] [drm:drm_lspcon_set_mode [drm_kms_helper]] *ERROR* LSPCON mode change timed out
[ 1.868970] [drm:lspcon_change_mode.constprop.0 [i915]] *ERROR* LSPCON mode change failed
[ 1.868998] [drm:lspcon_resume [i915]] *ERROR* LSPCON mode change to PCON failed
[ 1.869024] [drm:lspcon_resume [i915]] *ERROR* Failed to probe lspcon
[ 1.869049] [drm:lspcon_resume [i915]] *ERROR* LSPCON init failed on port B

dmesg from patched kernel 5.8.0-rc3 attached.

Revision history for this message
Alex Cabal (acabal) wrote :

Re. the bug report in the email thread, they state that "if HDMI cable isn't plugged before boot, the HDMI port becomes useless and never responds to cable hotplugging"

However my situation seems to be the reverse: If the HDMI cable is plugged in before cold boot, then the port appears to work through boot, GDM, and desktop. But on log out to GDM or soft reboot, it breaks. The interesting thing is that the port breaks after log out to GDM, not just reboot.

Revision history for this message
Unmesh (unmeshjoshi) wrote :

I recently purchased Thinkpad P1 Gen2(Intel® Core™ i7-9850H CPU @ 2.60GHz × 12 with Mesa Intel® UHD Graphics 630 (CFL GT2))
I have latest Ubuntu 20.04 installed. (5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux)
I am seeing issues with an external monitor is connected to HDMI port while booting. The monitor is not detected. If I connect the monitor 'after' boot, it is detected, but same issues happens (blank screen) if the machine is suspends and tries to come back up.
I have attached dmesg output with lspcon errors.

Revision history for this message
Unmesh (unmeshjoshi) wrote :

Just to add to my previous comment, I see that if I remove HDMI cable and reconnect it again, I 'always' get lspcon error. If I need external monitor, I need to restart the machine.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

According to the lspcon chip datasheet, there's an optional reset pin that can reset the chip. I wonder if it's not being used under Linux.

Anyway, please file an upstream bug at Intel graphics upstream:
https://gitlab.freedesktop.org/drm/intel/wikis/How-to-file-i915-bugs

Revision history for this message
Alex Cabal (acabal) wrote :

OK, I've filed a bug at https://gitlab.freedesktop.org/drm/intel/-/issues/2145

I'll keep this bug report updated.

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.