I'm sometimes getting "vblank wait timed out on crtc 0" when switching between X and console on my ThinkPad T420.
Steps to reproduce:
1. get a machine with sandybridge and optimus
2. boot it with some 4.4-rc kernel
3. power off nvidia using bbswitch (couldn't reproduce without this)
4. switch between X and console a few times
(while :; do chvt 10; sleep 2; chvt 1; sleep 2; done)
5. this happens:
I couldn't reproduce this on 4.3 so I bisected it and got:
43d59eda1f69631c267e06ab6b94ed3c14f1f6d1 is the first bad commit
commit 43d59eda1f69631c267e06ab6b94ed3c14f1f6d1
Author: Matt Roper <email address hidden>
Date: Thu Sep 24 15:53:07 2015 -0700
drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2)
Just pull the info out of the plane state structure rather than staging
it in an additional structure.
v2: Add 'visible' condition to sprites_scaled so that we don't limit the
WM level when the sprite isn't enabled. (Ville)
Signed-off-by: Matt Roper <email address hidden>
Reviewed-by(v1): Ander Conselvan de Oliveira <email address hidden>
Reviewed-by: Maarten Lankhorst <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
:040000 040000 b11db95f066a752dcccb0082490eabf21f62e8db 88bc02171246d693a868cd9ddb3144ee5d9b0ea8 M drivers
I also tried merging yesterday's drm-intel-next (7447a2b221cd4df3960e82478a4ee29312589611) to yesterday's master (a88164345b81292b55a8d4829fdd35c8d611cd7d) and couldn't reproduce it either. Bisecting gave me:
92826fcdfc147a7d16766e987c12a9dfe1860c3f is the first fix commit
commit 92826fcdfc147a7d16766e987c12a9dfe1860c3f
Author: Maarten Lankhorst <email address hidden>
Date: Thu Dec 3 13:49:13 2015 +0100
drm/i915: Calculate watermark related members in the crtc_state, v4.
This removes pre/post_wm_update from intel_crtc->atomic, and
creates atomic state for it in intel_crtc.
Changes since v1:
- Rebase on top of wm changes.
Changes since v2:
- Split disable_cxsr into a separate patch.
Changes since v3:
- Move some of the changes to intel_wm_need_update.
:040000 040000 b97b4b2338e1da2ee9e93791154b4deb2ecaf8b6 ae91735a668b6785e55122c646dbca93b54eb8c9 M drivers
I can confirm that cherry-picking just this 92826fcdf on top of master is enough to fix the issue for me and I intend to be running that for a while.
It is worth noting that I've had problems with this "vblank wait timed out on crtc 0" in the past and it's just this switching-between-X-and-console-repeatedly that I can't reproduce in 4.3. I need to keep this in xorg.conf:
Otherwise tearing and/or stuttering appears within a few days of X running (although I'm not sure if all that is needed with current kernels, I added this 4.1-ish). I do get tolerable visual artifacts regularly when playing youtube videos in chrome (playing them using mpv with hwdec off is fine), but that's a lot better than 5 fps and random X crashes.
I'm sometimes getting "vblank wait timed out on crtc 0" when switching between X and console on my ThinkPad T420.
Steps to reproduce:
1. get a machine with sandybridge and optimus
2. boot it with some 4.4-rc kernel
3. power off nvidia using bbswitch (couldn't reproduce without this)
4. switch between X and console a few times
(while :; do chvt 10; sleep 2; chvt 1; sleep 2; done)
5. this happens:
------------[ cut here ]------------ gpu/drm/ drm_irq. c:1216 drm_wait_ one_vblank+ 0x1b0/0x1c0( ) masquerade_ ipv4 videobuf2_vmalloc btrtl xt_addrtype videobuf2_memops videobuf2_v4l2 btbcm iptable_nat arc4 nf_conntrack_ipv4 btintel videobuf2_core iwldvm bluetooth nf_defrag_ipv4 nf_nat_ipv4 v4l2_common nf_nat videodev mac80211 iptable_filter ip_tables x_tables x86_pkg_ temp_thermal kvm_intel kvm iwlwifi snd_hda_ codec_conexant snd_hda_ codec_generic snd_hda_intel snd_hda_codec cfg80211 irqbypass crc32_pclmul snd_hwdep crc32c_intel sdhci_pci snd_hda_core sdhci snd_pcm_oss aesni_intel mmc_core aes_x86_64 lrw hdaps(O) thinkpad_ec(O) glue_helper psmouse ablk_helper snd_mixer_oss cryptd snd_pcm serio_raw e1000e thinkpad_acpi ehci_pci snd_timer nvram ehci_hcd wmi usbcore ptp snd pps_core tpm_rng tpm_tis tpm battery bbswitch(O) nf_conntrack_ netlink soundcore ac i2c_i801 usb_common nfnetlink evdev nf_conntrack_sip nf_conntrack_ proto_sctp nf_conntrack_pptp nf_conntrack_ proto_gre nf_conntrack_ netbios_ ns nf_conntrack_ broadcast nf_conntrack_h323 nf_conntrack_irc nf_conntrack_ftp nf_conntrack coretemp hwmon ecryptfs loop dm_crypt lis64-bisect+ #13 1fcc>] dump_stack+ 0x4e/0x82 a062>] warn_slowpath_ common+ 0x82/0xc0 a0fc>] warn_slowpath_ fmt+0x5c/ 0x80 3d0e>] ? _raw_spin_ unlock_ irqrestore+ 0xe/0x10 5765>] ? finish_ wait+0x55/ 0x70 7730>] drm_wait_ one_vblank+ 0x1b0/0x1c0 5bf0>] ? wake_atomic_ t_function+ 0x60/0x60 d302>] intel_atomic_ commit+ 0x732/0x1890 017e>] ? drm_atomic_ check_only+ 0x18e/0x590 ff27>] ? drm_atomic_ add_affected_ connectors+ 0x27/0xf0 05b7>] drm_atomic_ commit+ 0x37/0x60 d76f>] restore_ fbdev_mode+ 0x22f/0x260 fac3>] drm_fb_ helper_ restore_ fbdev_mode_ unlocked+ 0x33/0x80 fb3d>] drm_fb_ helper_ set_par+ 0x2d/0x50 45ca>] intel_fbdev_ set_par+ 0x1a/0x60 5ae1>] ? fb_set_ var+0x301/ 0x450 5a28>] fb_set_ var+0x248/ 0x450 822c>] ? update_ curr+0x5c/ 0x120 88bd>] ? check_preempt_ wakeup+ 0xdd/0x1c0 0343>] fbcon_blank+ 0x363/0x3b0 69e3>] do_unblank_ screen+ 0xc3/0x190 c9d9>] complete_ change_ console+ 0x59/0xe0 d170>] vt_ioctl+ 0x710/0x12e0 5719>] ? drm_ioctl+ 0x189/0x540 9a50>] ? drm_setmaster_ ioctl+0xa0/ 0xa0 df08>] vt_compat_ ioctl+0x188/ 0x3b0 e650>] ? __call_ rcu.constprop. 56+0x250/ 0x250 fc14>] tty_compat_ ioctl+0x54/ 0xc0 56bb>] compat_ SyS_ioctl+ 0xeb/0x11f0 a3c7>] ? percpu_ up_read+ 0x17/0x40 4291>] ? __sb_end_ write+0x21/ 0x30 1f35>] ? vfs_write+ 0x165/0x1a0 2c9a>] do_fast_ syscall_ 32+0x9a/ 0x150 64d2>] sysenter_ flags_fixed+ 0x8/0x12
WARNING: CPU: 0 PID: 1382 at drivers/
vblank wait timed out on crtc 0
Modules linked in: ccm br_netfilter bridge stp llc dm_thin_pool dm_persistent_data dm_bio_prison libcrc32c dm_bufio binfmt_misc tun bnep nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_raw ip6table_filter ip6_tables xt_multiport xt_conntrack iptable_raw uvcvideo xt_TCPMSS xt_tcpudp iptable_mangle btusb ipt_MASQUERADE nf_nat_
CPU: 0 PID: 1382 Comm: Xorg Tainted: G O 4.4.0-rc2-
Hardware name: LENOVO 4178A3G/4178A3G, BIOS 83ET76WW (1.46 ) 07/05/2013
0000000000000000 0000000061618deb ffff88041fc0b790 ffffffff8f301fcc
ffff88041fc0b7d8 ffff88041fc0b7c8 ffffffff8f05a062 ffff88042ad01000
0000000000000000 0000000000000000 0000000000000f58 ffff88042b485a08
Call Trace:
[<ffffffff8f30
[<ffffffff8f05
[<ffffffff8f05
[<ffffffff8f70
[<ffffffff8f09
[<ffffffff8f42
[<ffffffff8f09
[<ffffffff8f4b
[<ffffffff8f44
[<ffffffff8f43
[<ffffffff8f44
[<ffffffff8f41
[<ffffffff8f41
[<ffffffff8f41
[<ffffffff8f4d
[<ffffffff8f36
[<ffffffff8f36
[<ffffffff8f08
[<ffffffff8f08
[<ffffffff8f36
[<ffffffff8f3e
[<ffffffff8f3d
[<ffffffff8f3d
[<ffffffff8f42
[<ffffffff8f42
[<ffffffff8f3d
[<ffffffff8f0a
[<ffffffff8f3c
[<ffffffff8f1f
[<ffffffff8f09
[<ffffffff8f1a
[<ffffffff8f1a
[<ffffffff8f00
[<ffffffff8f70
---[ end trace 5d6ad91f242dc76e ]---
I couldn't reproduce this on 4.3 so I bisected it and got:
43d59eda1f69631 c267e06ab6b94ed 3c14f1f6d1 is the first bad commit c267e06ab6b94ed 3c14f1f6d1
commit 43d59eda1f69631
Author: Matt Roper <email address hidden>
Date: Thu Sep 24 15:53:07 2015 -0700
drm/i915: Eliminate usage of plane_wm_parameters from ILK-style WM code (v2)
Just pull the info out of the plane state structure rather than staging
it in an additional structure.
v2: Add 'visible' condition to sprites_scaled so that we don't limit the
WM level when the sprite isn't enabled. (Ville)
Signed-off-by: Matt Roper <email address hidden> by(v1): Ander Conselvan de Oliveira <email address hidden>
Reviewed-
Reviewed-by: Maarten Lankhorst <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
:040000 040000 b11db95f066a752 dcccb0082490eab f21f62e8db 88bc02171246d69 3a868cd9ddb3144 ee5d9b0ea8 M drivers
I also tried merging yesterday's drm-intel-next (7447a2b221cd4d f3960e82478a4ee 29312589611) to yesterday's master (a88164345b8129 2b55a8d4829fdd3 5c8d611cd7d) and couldn't reproduce it either. Bisecting gave me:
92826fcdfc147a7 d16766e987c12a9 dfe1860c3f is the first fix commit d16766e987c12a9 dfe1860c3f
commit 92826fcdfc147a7
Author: Maarten Lankhorst <email address hidden>
Date: Thu Dec 3 13:49:13 2015 +0100
drm/i915: Calculate watermark related members in the crtc_state, v4.
This removes pre/post_wm_update from intel_crtc->atomic, and
creates atomic state for it in intel_crtc.
Changes since v1: need_update.
- Rebase on top of wm changes.
Changes since v2:
- Split disable_cxsr into a separate patch.
Changes since v3:
- Move some of the changes to intel_wm_
Signed-off-by: Maarten Lankhorst <email address hidden>
Link: http://<email address hidden>
Reviewed-by: Daniel Vetter <email address hidden>
:040000 040000 b97b4b2338e1da2 ee9e93791154b4d eb2ecaf8b6 ae91735a668b678 5e55122c646dbca 93b54eb8c9 M drivers
I can confirm that cherry-picking just this 92826fcdf on top of master is enough to fix the issue for me and I intend to be running that for a while.
It is worth noting that I've had problems with this "vblank wait timed out on crtc 0" in the past and it's just this switching- between- X-and-console- repeatedly that I can't reproduce in 4.3. I need to keep this in xorg.conf:
Option "TearFree" "true"
Option "SwapbuffersWait" "false"
Option "VSync" "false"
Otherwise tearing and/or stuttering appears within a few days of X running (although I'm not sure if all that is needed with current kernels, I added this 4.1-ish). I do get tolerable visual artifacts regularly when playing youtube videos in chrome (playing them using mpv with hwdec off is fine), but that's a lot better than 5 fps and random X crashes.