IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.43k stars 4.8k forks source link

R200 does not work well with Skylake #223

Closed robertxchen66 closed 7 years ago

robertxchen66 commented 7 years ago
Required Info
Camera Model R200
Firmware Version 1.0.72.06
Operating System & Version Ubuntu 14.04.3
Kernel Version (Linux Only) 4.4.0-040400
Build System Makefile

Hardware: NUC6i5SYB, 16GB

After doing proper uvcvideo driver patch, I can run the sample programs such as cpp-capture and cpp-alignimages. However, the videos are jittery. And after a while, the system crashs and go to the desktop login screen. Check the dmesg, here is what I got: [ 196.817156] [drm] stuck on render ring [ 196.817621] [drm] GPU HANG: ecode 9:0:0x85dfbfff, in compiz [2117], reason: Ring hung, action: reset [ 196.817626] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace. [ 196.817629] [drm] Please file a new bug report on bugs.freedesktop.org against DRI -> DRM/Intel [ 196.817632] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue. [ 196.817635] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it. [ 196.817638] [drm] GPU crash dump saved to /sys/class/drm/card0/error [ 196.817699] ------------[ cut here ]------------ [ 196.817779] WARNING: CPU: 0 PID: 623 at /home/kernel/COD/linux/drivers/gpu/drm/i915/intel_display.c:11289 intel_mmio_flip_work_func+0x38e/0x3d0 [i915]() [ 196.817786] WARN_ON(i915_wait_request(mmio_flip->req, mmio_flip->crtc->reset_counter, false, NULL, &mmio_flip->i915->rps.mmioflips)) [ 196.817789] Modules linked in: drbg ansi_cprng ctr ccm snd_hda_codec_hdmi cmac snd_hda_codec_realtek snd_hda_codec_generic snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_core snd_compress arc4 ac97_bus snd_pcm_dmaengine dw_dmac_core snd_hda_intel snd_hda_codec snd_hda_core input_leds intel_rapl snd_hwdep x86_pkg_temp_thermal intel_powerclamp coretemp snd_pcm kvm_intel kvm snd_seq_midi hid_generic 8250_dw snd_seq_midi_event iwlmvm irqbypass mac80211 snd_rawmidi snd_seq crct10dif_pclmul crc32_pclmul iwlwifi uvcvideo(OE) aesni_intel snd_seq_device snd_timer aes_x86_64 lrw gf128mul glue_helper i915 ablk_helper cryptd cfg80211 videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 ir_xmp_decoder videobuf2_core v4l2_common ir_lirc_codec drm_kms_helper videodev lirc_dev media ir_mce_kbd_decoder ir_sharp_decoder btusb ir_sanyo_decoder hci_uart drm usbhid btrtl ir_sony_decoder i2c_algo_bit snd btbcm btqca ir_jvc_decoder ir_rc6_decoder soundcore btintel rfcomm ir_rc5_decoder bnep fb_sys_fops shpchp syscopyarea sysfillrect idma64 sysimgblt virt_dma mei_me mei bluetooth intel_lpss_pci ir_nec_decoder rc_rc6_mce ite_cir rc_core video intel_lpss_acpi pinctrl_sunrisepoint pinctrl_intel intel_lpss i2c_hid binfmt_misc hid mac_hid acpi_als acpi_pad kfifo_buf industrialio parport_pc ppdev nls_iso8859_1 lp parport e1000e sdhci_pci sdhci ptp ahci pps_core libahci fjes [ 196.818153] CPU: 0 PID: 623 Comm: kworker/0:3 Tainted: G OE 4.4.0-040400-generic #201601101930 [ 196.818197] Hardware name: /NUC6i5SYB, BIOS SYSKLi35.86A.0042.2016.0409.1246 04/09/2016 [ 196.818298] Workqueue: events intel_mmio_flip_work_func [i915] [ 196.818343] 0000000000000000 0000000062159465 ffff88048a9bbd20 ffffffff813c8d94 [ 196.818358] ffff88048a9bbd68 ffff88048a9bbd58 ffffffff8107dba2 ffff880465ae4c00 [ 196.818370] ffff88049ec162c0 ffff88049ec1aa00 0000000000000000 ffff880465ae4c00 [ 196.818383] Call Trace: [ 196.818401] [] dump_stack+0x44/0x60 [ 196.818415] [] warn_slowpath_common+0x82/0xc0 [ 196.818428] [] warn_slowpath_fmt+0x5c/0x80 [ 196.818442] [] ? switch_to+0x420/0x5a0 [ 196.818528] [] intel_mmio_flip_work_func+0x38e/0x3d0 [i915] [ 196.818543] [] process_one_work+0x1aa/0x440 [ 196.818554] [] worker_thread+0x4b/0x4c0 [ 196.818567] [] ? process_one_work+0x440/0x440 [ 196.818578] [] ? process_one_work+0x440/0x440 [ 196.818592] [] kthread+0xd8/0xf0 [ 196.818607] [] ? kthread_create_on_node+0x1a0/0x1a0 [ 196.818621] [] ret_from_fork+0x3f/0x70 [ 196.818635] [] ? kthread_create_on_node+0x1a0/0x1a0 [ 196.818645] ---[ end trace 598d39931ce79f9a ]--- [ 196.820460] drm/i915: Resetting chip after gpu hang [ 198.793282] [drm] RC6 on [ 202.817406] [drm] stuck on render ring [ 202.817914] [drm] GPU HANG: ecode 9:0:0x85dfffff, in compiz [2117], reason: Ring hung, action: reset [ 202.817997] ------------[ cut here ]------------ [ 202.818116] WARNING: CPU: 2 PID: 89 at /home/kernel/COD/linux/drivers/gpu/drm/i915/intel_display.c:11289 intel_mmio_flip_work_func+0x38e/0x3d0 [i915]() [ 202.818126] WARN_ON(i915_wait_request(mmio_flip->req, mmio_flip->crtc->reset_counter, false, NULL, &mmio_flip->i915->rps.mmioflips)) [ 202.818132] Modules linked in: drbg ansi_cprng ctr ccm snd_hda_codec_hdmi cmac snd_hda_codec_realtek snd_hda_codec_generic snd_soc_skl snd_soc_skl_ipc snd_hda_ext_core snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_core snd_compress arc4 ac97_bus snd_pcm_dmaengine dw_dmac_core snd_hda_intel snd_hda_codec snd_hda_core input_leds intel_rapl snd_hwdep x86_pkg_temp_thermal intel_powerclamp coretemp snd_pcm kvm_intel kvm snd_seq_midi hid_generic 8250_dw snd_seq_midi_event iwlmvm irqbypass mac80211 snd_rawmidi snd_seq crct10dif_pclmul crc32_pclmul iwlwifi uvcvideo(OE) aesni_intel snd_seq_device snd_timer aes_x86_64 lrw gf128mul glue_helper i915 ablk_helper cryptd cfg80211 videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 ir_xmp_decoder videobuf2_core v4l2_common ir_lirc_codec drm_kms_helper videodev lirc_dev media ir_mce_kbd_decoder ir_sharp_decoder btusb ir_sanyo_decoder hci_uart drm usbhid btrtl ir_sony_decoder i2c_algo_bit snd btbcm btqca ir_jvc_decoder ir_rc6_decoder soundcore btintel rfcomm ir_rc5_decoder bnep fb_sys_fops shpchp syscopyarea sysfillrect idma64 sysimgblt virt_dma mei_me mei bluetooth intel_lpss_pci ir_nec_decoder rc_rc6_mce ite_cir rc_core video intel_lpss_acpi pinctrl_sunrisepoint pinctrl_intel intel_lpss i2c_hid binfmt_misc hid mac_hid acpi_als acpi_pad kfifo_buf industrialio parport_pc ppdev nls_iso8859_1 lp parport e1000e sdhci_pci sdhci ptp ahci pps_core libahci fjes [ 202.818440] CPU: 2 PID: 89 Comm: kworker/2:1 Tainted: G W OE 4.4.0-040400-generic #201601101930 [ 202.818446] Hardware name: /NUC6i5SYB, BIOS SYSKLi35.86A.0042.2016.0409.1246 04/09/2016 [ 202.818527] Workqueue: events intel_mmio_flip_work_func [i915] [ 202.818536] 0000000000000000 000000008e95132c ffff880488f93d20 ffffffff813c8d94 [ 202.818548] ffff880488f93d68 ffff880488f93d58 ffffffff8107dba2 ffff880458cddc00 [ 202.818557] ffff88049ed162c0 ffff88049ed1aa00 0000000000000080 ffff880458cddc00 [ 202.818566] Call Trace: [ 202.818580] [] dump_stack+0x44/0x60 [ 202.818591] [] warn_slowpath_common+0x82/0xc0 [ 202.818599] [] warn_slowpath_fmt+0x5c/0x80 [ 202.818609] [] ? switch_to+0x420/0x5a0 [ 202.818675] [] intel_mmio_flip_work_func+0x38e/0x3d0 [i915] [ 202.818686] [] process_one_work+0x1aa/0x440 [ 202.818694] [] worker_thread+0x4b/0x4c0 [ 202.818704] [] ? process_one_work+0x440/0x440 [ 202.818715] [] kthread+0xd8/0xf0 [ 202.818726] [] ? kthread_create_on_node+0x1a0/0x1a0 [ 202.818737] [] ret_from_fork+0x3f/0x70 [ 202.818748] [] ? kthread_create_on_node+0x1a0/0x1a0 [ 202.818754] ---[ end trace 598d39931ce79f9b ]--- [ 202.820381] drm/i915: Resetting chip after gpu hang [ 202.978752] compiz[2346]: segfault at 8 ip 00007fe1d7ff15bc sp 00007ffda88a66e0 error 4 in libstartup-notification-1.so.0.0.0[7fe1d7fec000+8000] [ 204.817707] [drm] RC6 on

I looked online. Seem very little related to Realsesense and Skylake. But there are mentions that Skylake Linux graphic acceleration drivers have some bugs. The work around right now is to disable the HW acceleration. The drivers wont be fixed until kernel 4.6. However, I tested VLC which uses acceleration, it works fine, even at 4K.

Can someone look into this?

ddiakopoulos commented 7 years ago

Unless I am mistaken, this issue isn't related to librealsense or RealSense per-say, but something having to do with the graphics driver on your SKL system when it opens a GL context. Unfortunately I don't think there's any actionable details on this issue for us.

robertxchen66 commented 7 years ago

I just turned of RC6 and it works fine now. So is there conflicts with RC6? The OS turns on RC6 by default with SKL. I have not test older processor with RC6 on. Just like to know if they are related.