Display freezes on 2nd+subsequent logins

Bug #1612895 reported by Nathan Dorfman
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

First boot after a fresh install of 16.04 from the 16.04.1 amd64 desktop ISO, with 'download updates' enabled. This is alongside an existing 14.04 installation, which continues to work flawlessly. In particular, this issue cannot be reproduced there. (I've installed the -lts-xenial kernel package there, so it's version 4.4.0.34.24, but NOT the xorg ones.)

The first login on the new system worked fine. After simply logging out and in again, the display freezes just after drawing my user's desktop. (This first time, everything was drawn, but on subsequent attempts the background was black and the top Unity panel was empty.) The mouse cursor is movable, but no button or key presses are recognized.

Eventually, I press Ctrl+Alt+F1. The mouse cursor disappears immediately; the display stays frozen and otherwise unchanged. After another two minutes or so of waiting, I am finally dumped to the virtual tty, which works fine. At this point a couple of kernel stack traces appear in dmesg (see below), with timestamps corresponding to "just now," i.e. when the vty switch finally occurred.

Switching back to the X vty via Alt+F7 brings me back to the still-frozen display, at which point all I can do is Ctrl+Alt+F1 and wait ~2 minutes again. Stopping, then starting the lightdm service brings me back to a working login screen, but logging in just freezes right back again. Finally, rebooting the system allows me to login to a working desktop exactly once -- logging out and in again reproduces this problem reliably.

The full dmesg is attached, but the short version is that stack traces appear in pairs, summarized by the following lines on the first occurrence:

[ 242.116429] WARNING: CPU: 2 PID: 2539 at /build/linux-dcxD3m/linux-4.4.0/drivers/gpu/drm/drm_irq.c:1326 drm_wait_one_vblank+0x1b5/0x1c0 [drm]()
[ 242.116498] CPU: 2 PID: 2539 Comm: Xorg Not tainted 4.4.0-31-generic #50-Ubuntu

and by the following, slightly different ones, on the second and beyond:

[ 380.232443] WARNING: CPU: 1 PID: 4173 at /build/linux-dcxD3m/linux-4.4.0/drivers/gpu/drm/i915/intel_display.c:3963 intel_crtc_wait_for_pending_flips+0x1e2/0x240 [i915]()
[ 380.232563] CPU: 1 PID: 4173 Comm: Xorg Tainted: G W 4.4.0-31-generic #50-Ubuntu

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-31-generic 4.4.0-31.50 [modified: boot/vmlinuz-4.4.0-31-generic]
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: who 3445 F.... pulseaudio
CurrentDesktop: Unity
Date: Fri Aug 12 19:51:28 2016
HibernationDevice: RESUME=UUID=2065ee3e-d689-4432-a805-4a7822b06d0e
InstallationDate: Installed on 2016-08-13 (0 days ago)
InstallationMedia: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
MachineType: LENOVO 4236AR5
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-31-generic root=UUID=093a7652-dfb2-4f9e-9ceb-23761b18c8ef ro quiet splash
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-31-generic N/A
 linux-backports-modules-4.4.0-31-generic N/A
 linux-firmware 1.157.2
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 10/31/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 83ET66WW (1.36 )
dmi.board.asset.tag: Not Available
dmi.board.name: 4236AR5
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr83ET66WW(1.36):bd10/31/2011:svnLENOVO:pn4236AR5:pvrThinkPadT420:rvnLENOVO:rn4236AR5:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4236AR5
dmi.product.version: ThinkPad T420
dmi.sys.vendor: LENOVO

Revision history for this message
Nathan Dorfman (ndorf) wrote :
Revision history for this message
Nathan Dorfman (ndorf) wrote :

I also took an ubuntu-bug --save of xorg. Trying to update this report with it didn't work (apport-cli -u tells me I must use apport-collect, which has no option to use an existing save file), but it is attached in its raw form.

Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.8 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.8-rc2/

Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Nathan Dorfman (ndorf) wrote :

Thanks for the suggestion. Unfortunately, it's at least as bad with the new kernel; maybe worse.

So first of all, "2nd login" doesn't reproduce the issue 100% reliably after all. I tested one last time with kernel 4.4.0-31, and the same exact problem occurred again, but on the 3rd, not 2nd login. I then rebooted into the new kernel 4.8.0-040800rc2, and was able to reproduce it, but it was after the 3rd *logout.* The machine froze on the black console screen that normally appears just momentarily after the desktop goes away but before the lightdm login screen reappears.

After eventually regaining control, I logged in again and the display froze shortly before the desktop was completely drawn, more or less as expected. Unfortunately, this time Ctrl+Alt+F1 had no effect after any length of time. Having neglected to first install sshd, I had to hard reset the machine after 30 minutes or so of waiting. I haven't had that happen with the old kernel, but that could also just be luck.

By the way, is it possible this bug should be against Xorg instead? The kernel version on my 14.04 installation is 4.4.0-34, or pretty close to the 4.4.0-31 kernel I'm having issues with.

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Nathan Dorfman (ndorf) wrote :

Forgot to mention: in the kern.log attached above, there are some new messages with the 4.8.0-rc2 kernel that weren't present with 4.4.0-31:

Aug 15 18:47:06 panzer kernel: [ 310.233191] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:26:pipe A] flip_done timed out

These appear numerous times, in addition to the 'vblank timed out' messages and associated stack trace, which also appeared as before.

Revision history for this message
penalvch (penalvch) wrote :

Nathan Dorfman, to keep this relevant to upstream, one would want to test the latest mainline kernel (now 4.8-rc4) as it is released.

Could you please advise?

tags: added: bios-outdated-1.48
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Nathan Dorfman (ndorf) wrote : Re: [Bug 1612895] Re: Display freezes on 2nd+subsequent logins
Download full text (5.2 KiB)

I'm traveling at the moment but I'll do that as soon as I can and report
back...

What to think about the fact that the 4.4 kernel works fine with trusty,
though? I am afraid to install the newer xorg there, in case it's the true
cause of the issue.

Is it worth doing a new trusty install and then upgrading X (as well as the
kernel)?

On Thu, Sep 1, 2016, 11:41 Christopher M. Penalver <
<email address hidden>> wrote:

> Nathan Dorfman, to keep this relevant to upstream, one would want to
> test the latest mainline kernel (now 4.8-rc4) as it is released.
>
> Could you please advise?
>
> ** Tags added: bios-outdated-1.48
>
> ** Changed in: linux (Ubuntu)
> Status: Confirmed => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1612895
>
> Title:
> Display freezes on 2nd+subsequent logins
>
> Status in linux package in Ubuntu:
> Incomplete
>
> Bug description:
> First boot after a fresh install of 16.04 from the 16.04.1 amd64
> desktop ISO, with 'download updates' enabled. This is alongside an
> existing 14.04 installation, which continues to work flawlessly. In
> particular, this issue cannot be reproduced there. (I've installed the
> -lts-xenial kernel package there, so it's version 4.4.0.34.24, but NOT
> the xorg ones.)
>
> The first login on the new system worked fine. After simply logging
> out and in again, the display freezes just after drawing my user's
> desktop. (This first time, everything was drawn, but on subsequent
> attempts the background was black and the top Unity panel was empty.)
> The mouse cursor is movable, but no button or key presses are
> recognized.
>
> Eventually, I press Ctrl+Alt+F1. The mouse cursor disappears
> immediately; the display stays frozen and otherwise unchanged. After
> another two minutes or so of waiting, I am finally dumped to the
> virtual tty, which works fine. At this point a couple of kernel stack
> traces appear in dmesg (see below), with timestamps corresponding to
> "just now," i.e. when the vty switch finally occurred.
>
> Switching back to the X vty via Alt+F7 brings me back to the still-
> frozen display, at which point all I can do is Ctrl+Alt+F1 and wait ~2
> minutes again. Stopping, then starting the lightdm service brings me
> back to a working login screen, but logging in just freezes right back
> again. Finally, rebooting the system allows me to login to a working
> desktop exactly once -- logging out and in again reproduces this
> problem reliably.
>
> The full dmesg is attached, but the short version is that stack traces
> appear in pairs, summarized by the following lines on the first
> occurrence:
>
> [ 242.116429] WARNING: CPU: 2 PID: 2539 at
> /build/linux-dcxD3m/linux-4.4.0/drivers/gpu/drm/drm_irq.c:1326
> drm_wait_one_vblank+0x1b5/0x1c0 [drm]()
> [ 242.116498] CPU: 2 PID: 2539 Comm: Xorg Not tainted 4.4.0-31-generic
> #50-Ubuntu
>
> and by the following, slightly different ones, on the second and
> beyond:
>
> [ 380.232443] WARNING: CPU: 1 PID: 4173 at
> /build/linux-dcxD3m/linux-4.4.0/drivers/gpu/drm/i91...

Read more...

Revision history for this message
Nathan Dorfman (ndorf) wrote :

Sorry for the delay. I've just installed the apparent latest kernel, which is v4.9-rc1. So far, I haven't been able to reproduce the problem with it, unlike previous kernels 4.8-rc2 and 4.4.0-{31,34,43}. Looks like it might be fixed!

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Nathan Dorfman (ndorf)
tags: added: kernel-fixed-upstream
Revision history for this message
penalvch (penalvch) wrote :

Nathan Dorfman, the next step is to fully reverse commit bisect from kernel 4.8-rc2 to 4.9-rc1 in order to identify the last bad commit, followed immediately by the first good one. Once this good commit has been identified, it may be reviewed for backporting. Could you please do this following https://wiki.ubuntu.com/Kernel/KernelBisection#How_do_I_reverse_bisect_the_upstream_kernel.3F ?

Please note, finding adjacent kernel versions is not fully commit bisecting.

Also, the kernel release names are irrelevant for the purposes of bisecting.

It is most helpful that after the fix commit (not kernel version) has been identified, you then mark this report Status Confirmed.

Thank you for your help.

tags: added: kernel-fixed-upstream-4.9-rc1 needs-reverse-bisect
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Maja (maaajaaa) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
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.