Bug 56692

Summary: Xorg freezes with vblank enabled on nouveau nvc8
Product: xorg Reporter: Kelly Doran <kel.p.doran>
Component: Driver/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Kernel log
none
Xorg log
none
Xorg log
none
Kernel log before freeze
none
Kernel log after freeze none

Description Kelly Doran 2012-11-02 19:57:53 UTC
Created attachment 69458 [details]
Kernel log

I am using the latest nouveau git kernel sources on top of 3.7.0-rc3, xf86-video-nouveau 1.0.3, mesa 9.0, and xorg-server 1.13.0 and a gtx580.  The main issue is that X freezes when the GLXVBlank option is enabled.

The screen freezes up seemingly when any OpenGL stuff gets rendered.  Even running glxinfo can freeze it up, but just starting a basic twm session or i3wm will not freeze it.  Attempting to play movies via xvmc also freezes it, so I guess it it not purely OpenGL related.  It runs fine when vblank is disabled doing the previously mentioned things.  I tried using proprietary firmware as suggested in IRC but that did not help.

As for the freeze: the mouse starts slowing down and then freezes, and then it can be moved again but X is completely frozen.  I can switch to a different tty without using SysRq+R.  The tty only appears in a small box in the upper left hand corner and the rest of the screen is what it was when X froze.  The tty is all corrupted too... but you can see text changes when you type, and I can copy logs and reboot so the system is still mostly working, the graphics are just completely messed up.
Comment 1 Kelly Doran 2012-11-02 19:58:41 UTC
Created attachment 69459 [details]
Xorg log
Comment 2 Kelly Doran 2012-11-03 10:23:29 UTC
Created attachment 69478 [details]
Xorg log

Okay if I run X from the terminal and switch over and Ctrl+C it after the freeze some errors, show up, but not sure if they are useful or not.
Comment 3 Kelly Doran 2012-11-03 10:24:49 UTC
Created attachment 69479 [details]
Kernel log before freeze

I also increased the nouveau debug info level and captured the dmesg before and after the freeze.
Comment 4 Kelly Doran 2012-11-03 10:25:55 UTC
Created attachment 69481 [details]
Kernel log after freeze
Comment 5 Kelly Doran 2012-11-06 14:13:48 UTC
Well someone on IRC suggested there was an issue with the nv50_disp_intr_vblank function, so I replaced the contents of it with the nvd0_disp_intr_vblank function and it fixed the freeze!  Perhaps nvc8 cards should just use the nvd0 disp class instead?  Anyway I'll leave it to you guys to come up with an elegant solution, hopefully this helped.
Comment 6 Maarten Lankhorst 2012-11-06 14:24:49 UTC
Wow, good catch!

My original patch for nvc0 used 0x1718 as well. I'll submit a patch for it.
Comment 7 Martin Peres 2013-08-20 00:03:08 UTC
@Maarten: Has the patch been mainlined or not yet?
Comment 8 Kelly Doran 2013-08-21 02:09:53 UTC
This fix hit the kernel a while back.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.