Bug 26800 - Nouveau TV-out incorrectly detecting load
Summary: Nouveau TV-out incorrectly detecting load
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: 7.5 (2009.10)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-28 11:00 UTC by Andy Rink
Modified: 2013-08-18 18:09 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Nouveau dmesg log (11.80 KB, text/plain)
2010-02-28 11:00 UTC, Andy Rink
no flags Details
nv67_tvdac_load.patch (1.88 KB, patch)
2010-03-11 03:17 UTC, Francisco Jerez
no flags Details | Splinter Review
nv67_tvdac_load_2.patch (935 bytes, patch)
2010-03-12 10:21 UTC, Francisco Jerez
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Rink 2010-02-28 11:00:46 UTC
Created attachment 33647 [details]
Nouveau dmesg log

Nouveau is detecting and enabling TV-out, even though nothing is plugged in to it.

This causes KMS and X to default to lower, non-native resolutions.

Possibly causes v-sync issues? I'll file another report on that...

My PC is an Acer 5520-5155 Laptop. lspci refers to the display as:

00:12.0 VGA compatible controller: nVidia Corporation C67 [GeForce 7000M / nForce 610M] (rev a2)

I'm currently running Kubuntu Lucid Lynx, w/ 2.6.33 kernel.

Dmesg output is attached.

-Andy Rink
Comment 1 Andy Rink 2010-02-28 11:14:54 UTC
I might try recompiling the kernel without TV-out support for nouveau, see if that makes a difference... I'll keep this kernel package handy though in case someone wants me to try something.

-Andy Rink
Comment 2 Francisco Jerez 2010-02-28 17:29:54 UTC
An mmiotrace would help here (see [1] and the docs in the kernel tree), preferably with something plugged in the TV connector and LVDS disabled. Do you have access to a TV?

[1] http://nouveau.freedesktop.org/wiki/MmioTrace
Comment 3 Andy Rink 2010-03-06 09:43:07 UTC
(In reply to comment #2)
> An mmiotrace would help here (see [1] and the docs in the kernel tree),
> preferably with something plugged in the TV connector and LVDS disabled. Do you
> have access to a TV?
> 
> [1] http://nouveau.freedesktop.org/wiki/MmioTrace
> 

I do have access to a TV. Do you know how or where I might look to disable the LVDS? I'm assuming I can ssh in to the laptop to do this if the the TV-out doesn't work and the LVDS is disabled.

I'm reading up on mmiotrace to familiarize myself with the process.

Thanks for the work you guys do! I have several generations of nvidia cards, including the original GeForce DDR, 6600, 6800, and 8800GTS. I'll report any issues I run in to as I migrate them over to nouveau.

-Andy
Comment 4 Francisco Jerez 2010-03-06 10:37:21 UTC
(In reply to comment #3)
> I do have access to a TV. Do you know how or where I might look to disable the
> LVDS? I'm assuming I can ssh in to the laptop to do this if the the TV-out
> doesn't work and the LVDS is disabled.

'Option "UseDisplayDevice" "TV"' in 'Section "Device"' should do it.
Comment 5 Andy Rink 2010-03-07 10:24:32 UTC
(In reply to comment #4)
> 
> 'Option "UseDisplayDevice" "TV"' in 'Section "Device"' should do it.
> 

If I understand the mmiotrace thing correctly, I will need to:

1.) stop X

2.) unload the nouveau modules

3.) plug in the TV

4.) start the trace

5.) load the nouveau modules

6.) end the trace, compress the results and send them to "mmio dot dumps at gmail dot com"

So correct me if I'm wrong, but xorg.conf shouldn't really come in to play here?

The problem does exhibit itself without even loading X.

-Andy
Comment 6 Francisco Jerez 2010-03-07 10:40:07 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > 
> > 'Option "UseDisplayDevice" "TV"' in 'Section "Device"' should do it.
> > 
> 
> If I understand the mmiotrace thing correctly, I will need to:
> 
> 1.) stop X
> 
> 2.) unload the nouveau modules
> 
> 3.) plug in the TV
> 
> 4.) start the trace
> 
> 5.) load the nouveau modules
> 
I forgot to mention that we need an mmiotrace from the blob (AKA the nvidia proprietary driver), so it would actually be:

5.) Start X with the nvidia driver.

> 6.) end the trace, compress the results and send them to "mmio dot dumps at
> gmail dot com"
> 
> So correct me if I'm wrong, but xorg.conf shouldn't really come in to play
> here?
> 
> The problem does exhibit itself without even loading X.
> 
> -Andy
> 

Comment 7 Andy Rink 2010-03-08 11:13:39 UTC
Ok, there were some issues, could be normal, I've no idea.

Without mmiotrace running, the TV out displayed X properly. 

With mmiotrace running, it never quite initialized X over TV-out... Just a blank screen.

I tried several times and had the same results.

It seems to have dumped quite a bit of info (>40MB) so hopefully this will be of help.

I'll compress and send.

Thanks for your help and patience.

-Andy
Comment 8 Francisco Jerez 2010-03-11 03:17:18 UTC
Created attachment 33947 [details] [review]
nv67_tvdac_load.patch

Could you give this patch a try?
Comment 9 Andy Rink 2010-03-11 10:56:09 UTC
Excellent work my man. :)

Both KMS and X are defaulting to the correct resolution now, and I no longer get messages about a load being detected on the TV out.

As far as vsync goes, I've done some testing with smplayer:

Using "xv (2 - NV Video Blitter)" I get decent vsync, as I did before. Not perfect, but decent.

Using "xv (1 - NV40 high quality adapter)" I get decent vsync, which I did NOT get before.

However if I use default xv, which I believe uses "xv (0 - NV40 texture adapter)" I still experience vsync issues.

This is problematic, because any player besides smplayer doesn't allow me to choose between xv outputs, and defaults to the xv output with vsync issues.

If I recall correctly, my 8800GTS didn't exhibit any vsync issues, and had seemingly perfect vsync.

If you'd like, I could submit another bug report about that, let me know.

Also, I couldn't help but notice you have a riseup e-mail address. I actually run what I describe as "a modern, rationalist, humanist, libertarian-socialist anarchist" site: http://anarchismtoday.org/ Just thought you might be interested. :)

Thanks again for your help!

-Andy
Comment 10 Francisco Jerez 2010-03-11 12:21:33 UTC
(In reply to comment #9)
> Excellent work my man. :)
> 
> Both KMS and X are defaulting to the correct resolution now, and I no longer
> get messages about a load being detected on the TV out.
> 

Is the TV detected properly when it's plugged in? In particular 'xrandr --prop |grep subconnector' should tell you the right connector type after you've plugged it in (Composite I guess).

> As far as vsync goes, I've done some testing with smplayer:
> 
> Using "xv (2 - NV Video Blitter)" I get decent vsync, as I did before. Not
> perfect, but decent.
> 
> Using "xv (1 - NV40 high quality adapter)" I get decent vsync, which I did NOT
> get before.
> 
> However if I use default xv, which I believe uses "xv (0 - NV40 texture
> adapter)" I still experience vsync issues.
> 
> This is problematic, because any player besides smplayer doesn't allow me to
> choose between xv outputs, and defaults to the xv output with vsync issues.
> 
> If I recall correctly, my 8800GTS didn't exhibit any vsync issues, and had
> seemingly perfect vsync.
> 
> If you'd like, I could submit another bug report about that, let me know.
> 
Yeah, that one deserves its own bug.
 
> Also, I couldn't help but notice you have a riseup e-mail address. I actually
> run what I describe as "a modern, rationalist, humanist, libertarian-socialist
> anarchist" site: http://anarchismtoday.org/ Just thought you might be
> interested. :)
> 
Heh, I'll check it out :)

> Thanks again for your help!
> 
> -Andy
> 

Comment 11 Andy Rink 2010-03-11 14:03:53 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Excellent work my man. :)
> > 
> > Both KMS and X are defaulting to the correct resolution now, and I no longer
> > get messages about a load being detected on the TV out.
> > 
> 
> Is the TV detected properly when it's plugged in? In particular 'xrandr --prop
> |grep subconnector' should tell you the right connector type after you've
> plugged it in (Composite I guess).
> 

It looks like it. Booting with the TV hooked in, it chooses the lower default resolution it was using before your patch. The output from 'xrandr --prop | grep subconnector' was:

        subconnector:   SCART
        select subconnector:    Automatic

Without the grep line, I get the following:

Screen 0: minimum 320 x 200, current 1024 x 768, maximum 4096 x 4096
LVDS-1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
        EDID:
                00ffffffffffff0006af748100000000
                01100103802115780a1cf59758508e27
                27505400000001010101010101010101
                010101010101c71b00a0502017303020
                36004bcf100000180000000f00000000
                00000000000000000020000000fe0041
                554f0a202020202020202020000000fe
                004231353445573038205631200a0043
        dithering:      Off
                supported: Off          On          
        scaling mode:   Full
                supported: None         Full         Center       Full aspect 
   1280x800       60.0 +
   1024x768       59.9* 
   800x600        59.9  
   640x480        59.4  
   720x400        59.6  
   640x400        60.0  
   640x350        59.8  
VGA-1 disconnected (normal left inverted right x axis y axis)
TV-1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
        overscan: 50 (0x00000032)       range:  (0,100)
        hue: 0 (0x00000000)     range:  (0,100)
        saturation: 50 (0x00000032)     range:  (0,100)
        flicker reduction: 50 (0x00000032)      range:  (0,100)
        mode:   PAL
                supported: PAL          PAL-M        PAL-N        PAL-Nc      
                           NTSC-M       NTSC-J      
        subconnector:   SCART
                supported: Unknown      Composite    SVIDEO       Component   
                           SCART       
        select subconnector:    Automatic
                supported: Automatic    Composite    SVIDEO       Component   
                           SCART       
   720x576        50.0 +
   1024x768       50.0* 
   800x600        50.0  
   720x480        50.0  
   640x480        50.0  
   400x300       100.0  
   320x240       100.0  
   320x200       100.0  


The TV-out doesn't actually show anything, but I imagine that is to be expected according to the status matrix.

-Andy
Comment 12 Francisco Jerez 2010-03-12 10:21:48 UTC
Created attachment 34006 [details] [review]
nv67_tvdac_load_2.patch

(In reply to comment #11)
> (In reply to comment #10)
> > Is the TV detected properly when it's plugged in? In particular 'xrandr --prop
> > |grep subconnector' should tell you the right connector type after you've
> > plugged it in (Composite I guess).
> > 
> 
> It looks like it. Booting with the TV hooked in, it chooses the lower default
> resolution it was using before your patch. The output from 'xrandr --prop |
> grep subconnector' was:
> 
>         subconnector:   SCART
>         select subconnector:    Automatic
> 

Does the attached patch have the same effect?

>[...]
> 
> The TV-out doesn't actually show anything, but I imagine that is to be expected
> according to the status matrix.
> 

Actually it's a bit unexpected, TV-out is supposed to work on all the nv40-like cards, but I think you're the first one to try it on an nv6x. Sadly the mmiotrace you sent seems to be incomplete: Are you sure you waited long enough before giving up? X often takes quite a while to start up when you're mmiotracing, up to several minutes.

> -Andy
>
Comment 13 Andy Rink 2010-03-12 13:28:35 UTC
(In reply to comment #12)
> Created an attachment (id=34006) [details]
> nv67_tvdac_load_2.patch
> 
> 
> Does the attached patch have the same effect?
> 

Do I need to revert the previous patch to apply this one? 

> Actually it's a bit unexpected, TV-out is supposed to work on all the nv40-like
> cards, but I think you're the first one to try it on an nv6x. 

Hmmm ok. According to the status matrix, it is showing that it's the nv30 that is supposed to have functional TV-out, with NV40 cards marked as "mostly."

This is interesting, because I have a 6600 chip in my media machine, and I was unable to get TV out from that as well, which I think is an NV40 card. I didn't spend much time on that, so I'll do more testing.

> Sadly the
> mmiotrace you sent seems to be incomplete: Are you sure you waited long enough
> before giving up? X often takes quite a while to start up when you're
> mmiotracing, up to several minutes.

I did give it a few minutes, but perhaps not enough. I'll try it again and wait longer.
Comment 14 Francisco Jerez 2010-03-12 13:46:05 UTC
(In reply to comment #13)
> (In reply to comment #12)
> > Created an attachment (id=34006) [details] [details]
> > nv67_tvdac_load_2.patch
> > 
> > 
> > Does the attached patch have the same effect?
> > 
> 
> Do I need to revert the previous patch to apply this one? 
> 
Yes.

> > Actually it's a bit unexpected, TV-out is supposed to work on all the nv40-like
> > cards, but I think you're the first one to try it on an nv6x. 
> 
> Hmmm ok. According to the status matrix, it is showing that it's the nv30 that
> is supposed to have functional TV-out, with NV40 cards marked as "mostly."
> 
> This is interesting, because I have a 6600 chip in my media machine, and I was
> unable to get TV out from that as well, which I think is an NV40 card. I didn't
> spend much time on that, so I'll do more testing.
> 
That one was reported to work IIRC.
Comment 15 Andy Rink 2010-03-12 14:35:43 UTC
I tried to get a full mmiotrace with the blob again, and no luck. I let it attempt to boot X for about 20 minutes. The LVDS blinked once or twice, but that was it, nothing on the TV. The hard drive light wasn't blinking or anything. :/

I'll try out that other patch and post back.
Comment 16 Andy Rink 2010-03-12 15:27:59 UTC
With patch 2 I get:

        subconnector:   Composite
        select subconnector:    Automatic

Other than that, seems to work the same as patch 1.
Comment 17 Francisco Jerez 2010-03-13 12:30:21 UTC
(In reply to comment #16)
> With patch 2 I get:
> 
>         subconnector:   Composite
>         select subconnector:    Automatic
> 
> Other than that, seems to work the same as patch 1.
> 

I've uploaded several refinements [1][2][3] of the previous patches, it would be very helpful to know which ones still do the right thing.

[1] http://annarchy.freedesktop.org/~currojerez/nv67_tvdac_load_3.patch
[2] http://annarchy.freedesktop.org/~currojerez/nv67_tvdac_load_4.patch
[3] http://annarchy.freedesktop.org/~currojerez/nv67_tvdac_load_5.patch
Comment 18 Andy Rink 2010-03-13 16:42:24 UTC
Interesting... Some new plymouth packages came in to the lucid lynx repo, and I was unable to successfully boot through plymouth with your patches. (unless I remove splash from the kernel command line)

Reverting back to a prepatch package seems to have allowed me to boot through plymouth...

I'll do more testing tonight/tomorrow, including your new patches, because I'm pretty loaded. :b
Comment 19 Andy Rink 2010-03-13 16:48:15 UTC
Just to clarify, your first two patches caused the new plymouth (~-14) to hang.

I'll do more testing when I'm coherent. :b
Comment 20 Andy Rink 2010-03-13 18:30:20 UTC
Actually, scratch that bit about plymouth hanging... I'm getting the same behavior from my basement PC running the vanilla 2.6.33 w/ 8800gts.

So probably not related to your patch. Sorry.
Comment 21 Ilia Mirkin 2013-08-18 18:09:55 UTC
It appears that this bug report has laid dormant for quite a while. Sorry we haven't gotten to it. Since we fix bugs all the time, chances are pretty good that your issue has been fixed with the latest software. Please give it a shot. (Linux kernel 3.10.7, xf86-video-nouveau 1.0.9, mesa 9.1.6, or their git versions.) If upgrading to the latest isn't an option for you, your distro's bugzilla is probably the right destination for your bug report.

In an effort to clean up our bug list, we're pre-emptively closing all bugs that haven't seen updates since 2011. If the original issue remains, please make sure to provide fresh info, see http://nouveau.freedesktop.org/wiki/Bugs/ for what we need to see, and re-open this one.

Thanks,

The Nouveau Team


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.