Faulty behavior when resuming from suspend

Bug #1452318 reported by David Abergel
238
This bug affects 46 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Waking from suspend, everything seems normal, except the graphical elements and text on my desktop are not drawn properly. Sometimes, moving the mouse over icons can cause them to be redrawn, sometimes not. It appears not to matter how I initiate the suspend (e.g. by closing laptop lid, or by calling pm-suspend explicitly) and it appears not to matter whether I am using an external display or the laptop's own screen.

All other hardware appears to be working, and I can restart the laptop by clicking where the icons ought to be. The only symptom seems to be that the drawing does not happen correctly.

I'm not sure what additional information I should provide to help diagnose the problem, so please advise me.

Also, if this is more likely to be a xfce issue, then please change the package on the bug report.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: pm-utils 1.4.1-15
ProcVersionSignature: Ubuntu 3.19.0-16.16-generic 3.19.3
Uname: Linux 3.19.0-16-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
Date: Wed May 6 17:17:51 2015
InstallationDate: Installed on 2015-05-04 (1 days ago)
InstallationMedia: Xubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422.1)
PackageArchitecture: all
SourcePackage: pm-utils
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
David Abergel (davelargeuk) wrote :
Revision history for this message
David Abergel (davelargeuk) wrote :

I have managed to find some sort of work-around for this. It turns out the problem is in the xorg intel driver, not pm-utils. Switching the 2D accelleration mode from "SNA" to "UXA" as detailed here:
https://wiki.archlinux.org/index.php/Intel_graphics#SNA_issues
and here:
https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/1432194
removes the problems with resume from suspend.

However, it does substantially impair the performance of my laptop, especially when I run a virtual machine with Windows as the guest OS. I have to do this quite a lot, so I guess I have to choose the lesser of two evils.

This is not really satisfactory, so if there is anything else that anyone can suggest, I would love the hint.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pm-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Moritz Heiber (mheiber) wrote :

This affects me as well: https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/1432194/comments/106

However, this bug just might be a duplicate of the xservver-xorg-video-intel bug the comment is attached to.

Revision history for this message
David Abergel (davelargeuk) wrote :

Initial assessment of source of issue appears to be wrong. xorg intel driver seems a much more likely place.

affects: pm-utils (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
David Abergel (davelargeuk) wrote :

Moritz, did you try the UXA fix? If this makes your machine work well then this may help to confirm that we are experiencing the same issue.

Changed in xserver-xorg-video-intel (Ubuntu):
importance: Undecided → High
Revision history for this message
Moritz Heiber (mheiber) wrote :

David, I can confirm the above workaround "fixes" the issue for me, however, it's hardly an alternative since rendering performance takes a huge hit, some of my applications are hardly usable and even terminals are "lagging".

I would concur with the SNA approach, it seems to be a driver related issue.

Revision history for this message
David Abergel (davelargeuk) wrote :

In case it's worth anything, the following may help to diagnose the problem.

When I resume from suspend and lose desktop icons, panel icons, and random bits of text, I find that starting google chrome (or even just changing tab in an already open browser) will allow the screen to redraw when I move the mouse over the affected areas. I presume this is because chrome is using the acceleration.

Anyway, if someone who knows about this kind of stuff could take a look at it, I'd be very grateful.

Revision history for this message
David Abergel (davelargeuk) wrote :

I noticed there was an update to the intel driver earlier this week for my xubuntu system. It fixed one other problem I'd been having (slightly buggy playback of video in VLC) but doesn't seem to have helped the issues in this bug.

Any of the gurus fancy taking a crack at it?

Revision history for this message
Sebastian Gebhard (sege) wrote :

This bug is affecting me too. I can confirm that the SNA approach is working as a workaround, but as said before, performance is heavily impacted.

My system has a Intel Broadwell processor with integrated Intel Graphics (5xxx-series). I did not have the problems on my Haswell system with Intel Graphics 4xxx-series.

Also an interesting thing: The bug only occurs when using XFCE. I could not reproduce it using gnome-shell!

Revision history for this message
David Abergel (davelargeuk) wrote :

Interesting. I tried openbox and the bug is there with that window manager.

Does gnome-shell use hardware acceleration? If so, then that might be the common thread which links to my observations about google-chrome above.

Revision history for this message
David (abbasi-david) wrote :

The same here. Resume after suspend used to work well until a software update:

Start-Date: 2015-07-01 01:24:16
Commandline: aptdaemon role='role-commit-packages' sender=':1.83'
Upgrade: xserver-xorg-video-intel-lts-utopic:amd64
(2.99.914-1~exp1ubuntu4.2~trusty1, 2.99.914-1~exp1ubuntu4.3~trusty1),
unattended-upgrades:amd64 (0.82.1ubuntu2.2, 0.82.1ubuntu2.3)
End-Date: 2015-07-01 01:24:19

Since then, resume after suspend does not work well and the windows are not drawn properly.

The details of the laptop are:
ThinkPad T550
i5-5200U
Ubuntu 14.04
Gnome-fallback (I think is the same as Gnome-shell?) . Metacity in any case.

I tried to use lightgdm and gdm, but do not solve the problem. Using the proposed 2:2.99.914-1~exp1ubuntu4.5~trusty1 update do not fix the problem either. ( #134 of the bug #1432194 https://bugs.launchpad.net/xserver-xorg-video-intel/+bug/1432194 ). For the moment the only workaround is to switch from SNA to UXA ( comment #28 of the bug #1432194 ), with a lack of performance.

Revision history for this message
julien (jrmlhermitte) wrote :

It affects me too. This happens after resuming a suspend. In FVWM, the bug renders my screen incomprehensible and is quite reproducible.

See image attached.

Revision history for this message
David Abergel (davelargeuk) wrote :

Is there any way to revert the xorg driver to an old version that does work?

Revision history for this message
rachetfoot (x-jason-p) wrote :

I've had this issue on my T450s with 15.04 MATE since March. I've also had the issue where the screen is completely black after resume and I need to change screens (Alt-Ctrl-F2, Alt-Ctrl-F7) to get the window manager back. This happens on external screens (Ultradock) and on the built-in screen. I will try UXA to see if that solves things.

Revision history for this message
julien (jrmlhermitte) wrote :

the UXA fix never worked for me by the way. who is working on this bug? Does it look relatively easy to fix? Are there version that have worked in the past and if yes, could they be temporarily implemented for this version of ubuntu?

Revision history for this message
David Abergel (davelargeuk) wrote :

I am not aware that anyone is working on it. I suspect that if it's a driver issue then it would require the xorg people to fix it, not xubuntu.

Revision history for this message
David (abbasi-david) wrote :

The funny thing is that it used to work properly up to some update. David, did you found the way to downgrade to that previous version? I read somewhere that it is not a very safe stuff, because something can became unstable, but in any case have you already tried it?

Revision history for this message
julien (jrmlhermitte) wrote :

What does your xrandr give? I get that the maximum is 32767 or something, although my resolution is not that. Is that normal?
Perhaps the resolution changes after suspend? My xrandr is the same before and after I just checked, but the maximum value I find a little strange.

Should be be posting this elsewhere, by xorg, do you mean the xorg group or the xorg division of ubuntu?

Revision history for this message
Joris (joris-vandyck) wrote :

I confirm this problem with xserver-xorg-video-intel version 2:2.99.917 (the latest version at time of writing).
When I run in SNA mode, everything works perfectly until the machine resumes from suspend. After this everything becomes unbearably sluggish and it seems hardware acceleration no longer works (slow scrolling, video playback doesn't work, etc). Also once in a while I get the artifacts other people describe (distorted fonts, weird window titles, etc). This doesn't always happen though.

This bug also seems to occur even without suspending, when using it for sufficiently long time, probably triggered by something (at this point not sure what).

I tried to change to UXA mode which only partly solves the problem. Here I don't get the weird artifacts, but the hardware acceleration doesn't seem to work at all (no video acceleration, weird scroll even in file manager, etc).

Revision history for this message
Bob McChesney (bmcchesney) wrote :

Hello,

I think I'm experiencing similar issues, although a lot more intermittent. The graphical glitches I get do not happen every suspend, only sometimes, and they are quire minor (https://i.imgur.com/AZCIzpG.png). I have definitely experienced the graphics performance issues (e.g. playing high resolution videos being cripplingly slow) until restart also.

I'm running Ubuntu 15.10, Linux BOB2 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and my xserver-xorg-video-intel version is 2:2.99.917-1~exp1ubuntu2.2.

Anything I can provide to help isolate the problem?

Regards,
Bob

Revision history for this message
Alberto Taiuti (alberto-taiuti) wrote :

Hi,

I am having similar issues; when I suspend my laptop, the UI doesn't render properly anymore.

My specs are:
Dell Latitude E5450
Intel HD 5500 dGPU
NVidia GT840M GPU

I'm running Debian 8 Jessie.

Anything I can help with? I can paste info regarding my system if needed.

Thanks,
Alberto

Revision history for this message
julien (jrmlhermitte) wrote :

Here is some more insight, output from my /var/log/Xorg.0.log. When I close and re-open my laptop lid, I get the following (I tried it twice in this case):

[ 1594.192] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 1806.732] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 1806.736] (II) intel(0): switch to mode 1920x1080@60.0 on eDP1 using pipe 0, position (0, 0), rotation normal, reflection none
[ 1806.797] (--) synaptics: DLL0665:01 06CB:76AD UNKNOWN: touchpad found
[ 1809.696] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 1812.650] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 1812.650] (II) intel(0): switch to mode 1920x1080@60.0 on eDP1 using pipe 0, position (0, 0), rotation normal, reflection none
[ 1812.717] (--) synaptics: DLL0665:01 06CB:76AD UNKNOWN: touchpad found
[ 1821.640] (II) AIGLX: Suspending AIGLX clients for VT switch

Note the line "[ 1806.736] (II) intel(0): switch to mode 1920x1080@60.0 on eDP1 using pipe 0, position (0, 0), rotation normal, reflection none", it seems to be playing around with the resolution.

Revision history for this message
Caleb Mingle (g-mb-y) wrote :

This bug is also affecting me.

3.19.0-25-generic
Ubuntu 14.04.3
Lenovo Thinkpad T450s
i3wm window manager

Revision history for this message
Bob McChesney (bmcchesney) wrote :

Hi Caleb,

Have you ticket the "This bug also effects you" at the top of the page?

Cheers.

Revision history for this message
julien (jrmlhermitte) wrote :

As a heads up, the issue is FIXED for me with the latest kernel!!!! :-) :-)
Here is the second bug report:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1486036

I am waiting on a reply from the developer to see what to do next. For those impatient, you could try the instructions he gave at your own risk. I thought I'd share this light at the end of the tunnel! :-)

(And I'll share more information as it comes along)

Revision history for this message
Sebastian Gebhard (sege) wrote :

Hi Julien,

thanks for your effort you put into this issue.

The latest kernel fixes the issue for me as well.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

try latest kernel from vivid-proposed

Changed in xserver-xorg-video-intel (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Gregor Kastner (gregor-kastner) wrote :

Awesome, latest kernel from vivid-proposed (3.19.0-30-generic) fixes the issue for me.

Many thanks!

Revision history for this message
David Abergel (davelargeuk) wrote :

Wahoo!! The vivid-proposed kernel seems to fix the issues for me too. Thanks to all who worked on this: Much appreciated.

Just out of interest, is it any clearer yet what the problem was?

Thanks again.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I tried to bisect it, but that went nowhere.. too many changes between 3.19..4.0 to identify backportable fixes just by looking at it.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

hm, making this the master bug of this issue, duping others here

affects: xserver-xorg-video-intel (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
julien (jrmlhermitte) wrote :

Thanks Timo Aaltonen. I will try it tonight and confirm if it works.

I did not know what -proposed signified so I had to google it. Here is info for others just in case:
https://wiki.ubuntu.com/Testing/EnableProposed

Revision history for this message
uszatan (belniak) wrote :
Download full text (4.4 KiB)

Hi,
i updated linux kernel :
Linux piotrek-laptop 3.19.0-30-generic #33-Ubuntu SMP Mon Sep 21 20:58:04 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

but issue still occures - here is sample log:

[ 4834.946203] ------------[ cut here ]------------
[ 4834.946214] WARNING: CPU: 0 PID: 878 at /build/linux-aY9Y6L/linux-3.19.0/ubuntu/i915/intel_display.c:12326 check_crtc_state+0x317/0x4c0 [i915_bpo]()
[ 4834.946215] pipe state doesn't match!
[ 4834.946229] Modules linked in: btrfs xor raid6_pq ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c ctr ccm vmnet(OE) parport_pc vmw_vsock_vmci_transport vsock vmw_vmci vmmon(OE) bbswitch(OE) binfmt_misc rfcomm bnep nls_iso8859_1 arc4 snd_hda_codec_hdmi intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel asus_nb_wmi kvm asus_wmi sparse_keymap mxm_wmi crct10dif_pclmul crc32_pclmul iwlmvm ghash_clmulni_intel nvidia(POE) mac80211 aesni_intel uvcvideo aes_x86_64 lrw snd_soc_rt5640 gf128mul videobuf2_vmalloc glue_helper snd_soc_rl6231 videobuf2_memops ablk_helper snd_soc_core cryptd serio_raw snd_compress snd_pcm_dmaengine videobuf2_core iwlwifi snd_seq_midi cdc_ether v4l2_common snd_seq_midi_event videodev usbnet btusb r8152 media i915_bpo joydev snd_hda_codec_conexant
[ 4834.946245] snd_hda_codec_generic mii snd_rawmidi bluetooth cfg80211 snd_hda_intel snd_hda_controller lpc_ich snd_hda_codec intel_ips snd_hwdep mei_me drm_kms_helper snd_seq mei snd_pcm snd_seq_device shpchp snd_timer snd drm i2c_hid i2c_designware_platform wmi i2c_algo_bit i2c_designware_core soundcore dw_dmac int3402_thermal snd_soc_sst_acpi dw_dmac_core 8250_dw spi_pxa2xx_platform int3400_thermal mac_hid processor_thermal_device acpi_thermal_rel acpi_pad ppdev lp parport autofs4 hid_generic usbhid hid ahci psmouse(OE) libahci sdhci_acpi video sdhci [last unloaded: parport_pc]
[ 4834.946247] CPU: 0 PID: 878 Comm: Xorg Tainted: P W OE 3.19.0-30-generic #33-Ubuntu
[ 4834.946247] Hardware name: ASUSTeK COMPUTER INC. UX303LNB/UX303LNB, BIOS UX303LNB.206 01/22/2015
[ 4834.946249] ffffffffc0946138 ffff88031f5b3538 ffffffff817c4d4f 00000000a51aa51a
[ 4834.946250] ffff88031f5b3588 ffff88031f5b3578 ffffffff81076a8a ffff88031f5b3550
[ 4834.946251] ffff88031f38a800 ffff88031f5b3618 ffff88031f38ab58 ffff88031f38ab60
[ 4834.946251] Call Trace:
[ 4834.946256] [<ffffffff817c4d4f>] dump_stack+0x45/0x57
[ 4834.946258] [<ffffffff81076a8a>] warn_slowpath_common+0x8a/0xc0
[ 4834.946259] [<ffffffff81076b06>] warn_slowpath_fmt+0x46/0x50
[ 4834.946271] [<ffffffffc08d6647>] check_crtc_state+0x317/0x4c0 [i915_bpo]
[ 4834.946284] [<ffffffffc08eb539>] intel_modeset_check_state+0x239/0x720 [i915_bpo]
[ 4834.946295] [<ffffffffc08ec812>] intel_crtc_set_config+0x572/0x5d0 [i915_bpo]
[ 4834.946308] [<ffffffffc04f6b26>] drm_mode_set_config_internal+0x66/0x100 [drm]
[ 4834.946314] [<ffffffffc0613b48>] restore_fbdev_mode+0xc8/0xf0 [drm_kms_helper]
[ 4834.946319] [<ffffffffc0615bb9>] drm_fb_helper_restore_fbdev_mode_unlocked+0x29/0x80 [drm_kms_helper]
[ 4834.946324] [<ffffffffc0615c32>] drm_fb_helper_set_par+0x22/0x50 [drm_kms_helper]
[ 4834.946336] [<ffffffffc08f9cda>] intel_fbdev_set_par+0x1a/0x60 [i915_bpo]
[ 4834.946338] ...

Read more...

Revision history for this message
julien (jrmlhermitte) wrote :

Hi,

   I tried 3.19.0-30-generic from vivid-proposed but the issue is worse for me. I encounter graphics glitches right at startup, without having to suspend.

However, this glitch seems different from the previous glitch. When I took a screen capture, the image actually looked fine. I had to take an actual photo with my camera to capture this one. Here is the photo attached.

I looked at dmesg and /var/log/Xorg.0.log and there seems to be nothing flagging in particular. Perhaps this is an independent issue?

Revision history for this message
Sebastian Gebhard (sege) wrote :

I could not test 3.19.0-30 or 3.19.0-29, because my machine would not boot properly.

I guess there are still some other problems in these versions. In my case:
- I cannot boot, because I cannot unlock my luks-root-partition during regular startup
- In recovery mode, I can unlock my luks-root and boot.

In both cases, I can't use a video mode other than 640x480 (during initrd and in the booted system).

Revision history for this message
julien (jrmlhermitte) wrote :

Just to add a note, I did notice that the GLX failure did not occur with this new kernel (but it does occur in my dmesg for a slightly earlier kernel).
This new kernel may have possibly fixed the main issue but it seems to have introduced an extra instability.

Revision history for this message
Brian Mastenbrook (bmastenbrook) wrote :

This issue is fixed in 3.19.0-30 for me.

Revision history for this message
Torbjörn Moa (moa-physto) wrote :

I have been running 3.19.0-30 since five days, with the UXA fix removed, and never seen any problem at all since then. I suspend my laptop many times per day. Thanks to all who contributed to fix this, it was really annoying.

Revision history for this message
Sudhanshu (s7dhansh) wrote :

I am seeing this issue in 16.10 - Dell XPS 9343 - Intel Broadwell i5200. Kernel 4.8.0-27. Any ideas?

Revision history for this message
Bib (bybeu) wrote :

I still have this bug raising up after 10~20 suspend/resume same session (16.04.6 XPS13-L322X) since Trusty.

Revision history for this message
y0b8k (y0b8k) wrote :

I still have this issue on Ubuntu 20.04, Kernel 5.4.0-66-generic.

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.