PDA

View Full Version : BUG: Interleaved black lines when playing video at full screen


Pages : [1] 2 3 4

puterguy
01-11-03, 05:11 PM
suspect that the following problem is an nVidia driver problem and would like to get other people's inputs here.

I have been using mplayer to play back avi clips and dvds.

Mplayer displays videos perfectly sharp when playing AVI files or DVDs at normal size.

When I try to play at double-screen size or full-screen size
(1280x1024), the picture doesn't seem to scale properly. Looking
closely at the screen, it seems that instead of properly scaling the
picture, 1 pixel thin horizontal black lines are interleaved between
every few original image lines in a regular pattern. It looks
somewhat like this (where even between the closest-spaced black lines, there are perhap 5 or 6 normal image lines):

------------------------------------
------------------------------------
------------------------------------
------------------------------------



------------------------------------
------------------------------------
------------------------------------
------------------------------------



------------------------------------
------------------------------------
------------------------------------
------------------------------------

etc.


The effect is worse at full-screen than at double-screen. The result
is that the picture looks very jagged and blurry and thus is almost
impossible to view.

I have tried playing with some of the options on the gmplayer menu
e.g. turning on/off interleaving, adjusting cache size, turning on/off
direct rendering, adjusting postprocessing...

I am running RH8.0/Linux2.4.20 on a P4 2.53GHz with 1Gig PC2700 DRAM
and a Leadtek Ultra A250 GF4 (nvidia 4600) graphics card running the
latest nvidia drivers (NVIDIA_GLX-1.0-4191.i386.rpm
NVIDIA_kernel-1.0-4191.src.rpm)

I am using the following packages downloaded from psyche.freshrpms.net
mplayer-0.90-fr0rc2.1.i386.rpm
aalib-1.4rc5-fr1.i386.rpm
libdvdread-0.9.3-fr2cvs.i386.rpm
divx4linux-4.0-fr3.20011025.i386.rpm
lirc-0.6.5-fr3.i386.rpm
lame-3.92-fr5.i386.rpm
libdv-0.98-fr2.i386.rpm
libdvdcss-1.2.4-fr1.i386.rpm

I suspect that this is more of a driver than an mplayer problem.
Any thoughts on what might be going on here???

puterguy
01-16-03, 11:10 PM
Anybody out there have the same problem?

Wolfman [TWP]
01-17-03, 06:12 AM
Nope, I haven't seen that problem. I'm using RH8.0 with their latest kernel, the Nvidia 4191 drivers. I run Xine, and it displays DVD's FULL screen, crystal .. I'm running pretty much the same packages as you, but using Xine. That's goes the same for AVI's, MPEG's and well as VCD's, all show up great at full screen.

I forgot to mention, and at the same 1280x1024 resolution..

I would check your XF86Config file to see that there isn't something that shouldn't be there, or that there maybe something missing...

puterguy
01-17-03, 07:18 AM
Interesting, because I get the same problem in both ogle and mplayer (I can't seem to get xine to work at all but I'm sure it would have the same problem :( )

One other interesting element of my problem is that when I enlarge the window manually, the picture scales properly until the picture gets to be about 2/3 of the full-screen and then it suddenly starts getting the stray lines. I am really stumped by this problem.

My XF86Config file is basically unmodified. Here is my device stanza.

Section "Device"
# no known options
#BusID
# Driver "vesa"
Driver "nvidia"
Identifier "NVIDIA GeForce 4 (generic)"
VendorName "NVIDIA GeForce 4 (generic)"
BoardName "NVIDIA GeForce 4 (generic)"
VideoRam 131072
# Option "renderAccel" "true"
EndSection

Any suggestions?

bwkaz
01-17-03, 07:58 AM
I don't have a DVD drive, but my mplayer plays AVIs just fine in both fullscreen and 2x mode. Then again, I'm still using 3123, too...

Which input codec library does your version of mplayer use for AVI files? When I installed it (from CVS checkout from their servers, BTW), there was an option to get a better version of libavcodec, that (according to mplayer docs) supported the vast majority of its formats a good deal better than anything else -- but that libavcodec had a separate CVS repository somewhere else. So if the people that built your version of mplayer didn't use that libavcodec, it's possible that that could cause it. Maybe.

Of course, if you're seeing it in Ogle too, then maybe not. Does changing to 3123 help?

Wolfman [TWP]
01-17-03, 08:06 AM
My XF86Config file is not that much different.

Identifier "NVIDIA GeForce 4 (generic)"
Driver "nvidia"
VendorName "NVIDIA GeForce 4 (generic)"
BoardName "NVIDIA GeForce 4 (generic)"
VideoRam 131072
Option "NvAGP" "1"
Option "DigitalVibrance" "2"
Option "CursorShadow" "1"
Option "RenderAccel" "true"

I can't understand why Xine doesn't work for you. As I've installed it on three (3) different systems without a problem.. All files from psyche.freshrpms.net too. :confused:

puterguy
01-17-03, 09:19 AM
BWKAZ:

Interesting. I suspect that everything worked ok in 3123 since I recall watching at least one DVD at fullscreen and I am sure I would have noticed the degradation.

I tried downgrading back to 3123, but couldn't manage to get X to start up right.

I don't think it is a codec or player issue since the problem occurred both with DVDs and with avifiles and both with mplayer and with ogle.

Also, I assume it is not a direct hardware problem, since DVDs play just fine under M$ XP.

This leaves me with the suspicion that it is either a driver or a configuration problem. Since my XF86Config is pretty vanilla and since I have a standard RH8.0 X11 installation, I suspect it is a driver issue with scaling.

I guess I should try one more time to downgrade back to 3123 to test the hypothesis.

puterguy
01-17-03, 09:22 AM
I am not sure what is going on with Xine either!

I grabbed all the relevant rpms off of psyche.freshrpms.net too.
I will post a more detailed description of the error messages over the weekend when I get back to my machine.

Demian
01-24-03, 01:37 AM
I have the same problem and it is driving me insane. I am running an inspiron8k with geforce2go 32mb. I am running debian sid. This problem is just as you explained. I fixed the problem by downgrading to 3123 and compiling from source, however the lastest update of deian's xsever-xf86 package recreated the problem and Im pissed off! I have found one solution. Start a different movie in mplayer and go to fullscreen and you should have the black lines. Now open the video you want and it should work in fullscreen no prob. This doesnt make since to me as the problem doesnt seem to be repeatable. If you cycle between fullscreen and normal about 15 it will eventually work - go figure...
I hope someone has a better solution since with the latest xserver upgrade 3123 is no longer working.

Demian
01-24-03, 02:48 AM
I have downgraded my xserver-common packages and I still have the problem. Lets try to narrow it down. I am 99% sure its an xv scaler problem, since i can view videos in vesa and aalib with no lines. I had the problem fixed for a while when I downgraded to 3123, but as I said before when I upgraded xserver-common the problem came back.
Possibilities:
1. The upgrade changed my XF86Config-4, so there may be some obscure setting there that fixes it.
2. I had also recompiled my kernel, because my old kernel was compiled with an older gcc, now im using 3.2.2. When fullscreen was working without lines I was using linux 2.4.20 compiled with i think gcc 2.9.6 and the 3123 drivers which worked were also compiled with that version. So it may be a build problem?
3. problem with something in xv scaler in the xserver package that wasnt erased when i downgraded?

Thats all i can think of at the moment. Again, the weird weird weird thing is that if i open up 2 movies the scaler will work on the 2nd and it will scale fine with no lines. As long as xv is already running it seems the scaler works, but not on the first try :rolleyes:

I have also tried 4 other sets of older nvidia drivers and all of them have the scaling problem. The problem appears in ogle, mplayer, xine, aviplay etc. so its definately a driver and/or xv scaler problem.

Demian
01-24-03, 03:50 AM
Well after about 5 hours, I tried adding
Option "NvAgp" "0"
to my device section and....NO MORE LINES in fullscreen.
However, i don't have agp now - is that a problem? I don't play games right now so do I really need it?

Demian
01-24-03, 04:04 AM
The problem is with AgpArt being compiled into the kernel. I realized that when I didn't have a problem with lines was when I had agpart compiled as a module. So you can recompile and make agpart a module or set "NvAgp" to "1" which uses the nvidia driver agp rather than the kernel. That worked for me, so I have agp and no lines. Let me know if this helps - I'm very happy to have finally fixed this annoying problem that has been bothering me for months!

puterguy
01-24-03, 09:03 AM
Demian -- this is *very* interesting and helpful.

I have tried a couple of your suggestions and have found the following:

1. Running another small video first (I just use a small avi) does work as long as I start the video I want while the other dummy one is still running.

The clear screen persists even after the original video finishes and even if I continue to shuttle back and forth between normal and full-screen.

1. Setting: Option "NvAgp" "0" (or "1")
doesn't seem to make a difference for me.

I added the above line to my XF86Config, restarted the X-server (with ctl-alt-backspace) and tried again. I looked in the XF86 log and confirmed that AGP was indeed disabled.

3. I am not sure which specific kernel modules you are referring to by AgpArt.

My kernel configuration (adapted from the RH8.0 one and recompiled for 2.4.20) contains the following AGP references:
CONFIG_AGP=m
CONFIG_AGP_INTEL=y
CONFIG_AGP_I810=y
CONFIG_AGP_VIA=y
CONFIG_AGP_AMD=y
# CONFIG_AGP_AMD_8151 is not set
CONFIG_AGP_SIS=y
CONFIG_AGP_ALI=y
CONFIG_AGP_SWORKS=y

AGP support does seem to be compiled as a module though.
Do you mean something different by AgpArt??
---

Great work though!!!!
To me it is still not clear whether the problem is in XF86, the AgpArt kernel driver, or the nVidea driver
Hopefully we can continue to narrow down the problem and get it fixed the right way!

puterguy
01-24-03, 09:20 AM
OK this is really weird.
I tried changing cycling through the X11 screen resolution as I ran a movie at full screen.

(Note the picture size itself remains 1280x1024, just the screen resolution changes meaning that more of the image goes off screen)

Here are the results:
1280x1024: jaggies
1280x960: no jaggies
1152x864: no jaggies
1024x768: jaggies
800x600: jaggies
640x480: jaggies

I am using the following stanza in my XF86 config:

Section "Screen"
Identifier "Screen0"
Device "NVIDIA GeForce 4 (generic)"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x48\
0"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x48\
0"
EndSubSection
EndSection


----
It might be interesting to check what happens if you *start* at a resolution other than 1280x1024 or if you change the pixel depth.

I also should repeat my other observation, that when I manually resize the frame it stays ok until I get to about 2/3 of the full 1280x1024 screen size when the jaggies suddenly appear. Seems like a very binary type of thing.

This is all so weird!!!

I am also curious that you and I both have the problem despite having very different machines, graphic cards, and linux distros, while at the same time *nobody* else either on these boards or via googling has reported the problem.

I also wonder whether the reason that playing another video first works is that perhaps the first video uses hardware acceleration whereas the 2nd video uses software emulation. (???)

Demian
01-24-03, 11:26 AM
Sorry about the confusion on agpart, it was late:)

The module is CONFIG_AGP under character devices. Check the info about NvAgp in the nvidia drivers readme line 1286, I have mine set to "1" which the readme says uses the NVAGP rather than AGPART. Also try removing your agp module before starting X.
I am running at 1600x1200 24bit, I will check the other resolution after I finish recompiling garnome:)
Yes it is very weird that no one else has this problem. I firt noticed it back in November and I have searched the web backwards and forwards and haven't found any other posts about it.
One other idea - have you tried downgrading to 3123 and testing Option "NvAgp" "1" under device?
Interesting point about hardware vs. software emulation - I will check if mplayer tells you which it is using - you can force software scaling by using mplayer -vop scale -zoom ----check man mplayer line 1826 or so.
Thats all for now, Im curious as to whether you can get it fix and its weird that changing NvAgp worked for me and not you:confused:

puterguy
01-24-03, 01:07 PM
Interesting.

Still not sure why I am having problems with AGP then since I
CONFIG_AGP=m.

I will also see if removing the module before starting the x-server helps with AGP 0/1.

Any sense on where the ultimate bug lies and hence where we should be looking to submit a bug report?

puterguy
01-25-03, 05:32 PM
I just re-tried using: Option "NvAgp"
This time I exited X, then manually removed the agpgpart module and then restarted X.

Unfortunately, this still did not fix the black line problems.

Interestingly, I got the following output in my log files:
TRIAL 1: NvAgp=1
(**) NVIDIA(0): Option "NvAGP" "1"
(**) NVIDIA(0): Use of NVIDIA internal AGP requested
....
(WW) NVIDIA(0): Failed to initialize AGP
(II) NVIDIA(0): Setting mode "1280x1024"
(II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture

TRIAL 2: NvAgp=0
(**) NVIDIA(0): Option "NvAGP" "0"
(**) NVIDIA(0): Use of AGP disabled per request

Interestingly, when I leave out the NvAgp option, I still get:
(WW) NVIDIA(0): Failed to initialize AGP

I'm not sure whether that has anything to do with the fact that I remove the agpgart module before, but I still get the same message even when I manually re-install the module.

The net result is that no matter what I do, it seems that AGP is never working (even when I don't set it). I had never realized this and am not sure whether this has anything to do with the " black lines" problem.

puterguy
01-25-03, 06:04 PM
OOOPS... Disregard my previous message. I just re-read the nVidia README and it seems that you need to *reboot* between changing drivers.

So, first of all when I don't include the NvAgp option, I get the standard built-in AGP driver to work properly
(II) NVIDIA(0): AGP 4X successfully initialized

...and when I set Option "NvAgp" "1", I get
(**) NVIDIA(0): Option "NvAGP" "1"
(**) NVIDIA(0): Use of NVIDIA internal AGP requested
(II) NVIDIA(0): AGP 4X successfully initialized

...and when I set Option "NvAgp" "0", I get
(**) NVIDIA(0): Option "NvAGP" "0"
(**) NVIDIA(0): Use of AGP disabled per request

Unfortunately, though in all 3 cases I still get the same black lines unless I do the kluge of starting another video first...

So, I am still not sure why you are seeing that NvAgp=0 or 1, solves your problems.

Perhaps it is a difference with XFree versions (or it could be due to hardware differences)

I am running the stock RH8.0 updated with a Linux 2.4.20 kernel.
and XFree86 4.2.0.

Demian
01-25-03, 09:21 PM
I now know where the problem comes from and how to fix it. Puterguy, I'm guessing you are using an lcd monitor?
I realized that when I changed the NvAgp option I was using a backup XF86Config-4 where I had changed the vertrefresh.
So- I have to have VertRefresh set to 60 or I get lines. I just verified it several times, if i pute a range like 50-70 for vertrefresh I get lines. So far 60 is the only value that doesn't give my lines and I'm sticking with it. So the problem is with the VertRefresh. Test it with 60, or see if other people have posted specs for your particular screen and try those. Let me know!

puterguy
01-26-03, 08:14 PM
You are right about VertRefresh (and about my having an LCD as my profile shows :)
Setting it to 60 Hz does resolve the black line question.

But... I still have a couple of questions:
1. Can I assume now that different values of NvAgp has nothing to do with the problem or solution and that that was all a red herring?

2. I'm still not sure why starting another video first also "solves" the problem, since this should not effect the refresh rate. What is going on?

3. Won't setting refresh to 60Hz (rather than the 75Hz max of my LCD) adversely affect fast moving action like games?

4. We still don't know what the root cause is of this problem and therefore don't know how to fix it or even whom to submit a bug report to, right???

Any other thoughts on next steps?

Jeff

puterguy
01-30-03, 09:24 PM
I have submitted the following summary bug report to: linux-bugs@nvidia.com:

I have a GF4 4600 (Leadtek Ultra A250 GF4 4600 128MB with VIVO/TVO) running under RedHat 8.0 with kernel 2.4.20. I am using the 4191 Linux driver.

When I play a video (of any format) at full-screen, the scaling
suffers from a pattern of interleaved black lines that ruin the
picture, making it look distorted with jagged edges and blurry.

Specifically, looking closely at the screen, it seems that instead of
properly scaling the picture, 1 pixel thin horizontal black lines are
interleaved between every few original image lines in a regular
pattern. It looks somewhat like this (where even between the
closest-spaced black lines, there are perhap 5 or 6 normal image
lines):

------------------------------------
------------------------------------
------------------------------------
------------------------------------



------------------------------------
------------------------------------
------------------------------------
------------------------------------



------------------------------------
------------------------------------
------------------------------------
------------------------------------

etc.

The effect is worse at full-screen than at double-screen. The result
is that the picture looks very jagged and blurry and thus is almost
impossible to view.

I have initiated a thread on this on the nVidia bulletin board
(http://www.nvnews.net/vbulletin/showthread.php?s=&threadid=6177), which has led to the following interesting observations.

1. The problem is independent of type of video or of video player
(this suggests that it is likely an X-server/driver problem)

2. If you begin with a normal size frame and gradually stretch the
picture, the black line effect suddenly appears when the picture gets to be about 3/4 the size of my 1280x1024 screen

3. The problem only occurs at some resolutions. In fact if you switch the X-server resolutions while the video is running
(ctl-alt-backspace) the "jaggie" effect comes and goes depending on the resolution. Specifically,
1280x1024: jaggies
1280x960: no jaggies
1152x864: no jaggies
1024x768: jaggies
800x600: jaggies
640x480: jaggies

4. INTERESTINGLY, if you start another video first and then start a
second video while the first one is still playing, then you can go to
full-screen without any jaggies. The picture remains good even after the first video completes. (Is it possible that the first video uses haredware scaling while the second uses software scaling???)

5. The problem resolves if I fix the vertical resolution at 60 Hz
(i.e., VertRefresh 60.0), but persists if I use the monitor
specifications of: VertRefresh 50.0 - 75.0 (this suggests maybe a
synchronization problem with the video frame rate???) [Note I have a digital LCD monitor]

6. Using different values for NvAGP has no effect

7. Using x11 vs. xv drivers has no effect

8. I have not had any other problems with the nVidia driver under RH Linux, including with games such as Quake

9. I think (but am not sure) that it worked ok under the 3123
driver. I have however not been able to downgrade to check it again.

So, in summary it seems to be something wrong with scaling that causes the problem that somehow is dependent on the screen resolution, vertical refresh rate, and whether or not another video is already running.

Any suggestions on what might be going on here?
I am stumped and frustrated?

Note that I am not satisfied with keeping the VertRefresh at 60, since I want to get the full 75Hz refresh performance of my monitor

Other details of my configuration include:
RH8.0/Linux 2.4.20
nVidea driver: 1.0-4191
Asus P4PE motherboard
Intel P4 2.53GHz
2 x 512 MB PC2700 DDR Kingston
Leadtek Ultra A250 GF4 4600 128MB with VIVO/TVO
Viewsonic VG171 17" Flat Panel
Antec 400W PS

XF86Config file includes the following excerpts
...
Identifier "NVIDIA GeForce 4 (generic)"
Driver "nvidia"
VendorName "NVIDIA GeForce 4 (generic)"
BoardName "NVIDIA GeForce 4 (generic)"
VideoRam 131072
Option "NvAGP" "1"
Option "DigitalVibrance" "2"
Option "CursorShadow" "1"
Option "RenderAccel" "true"
...
Section "Screen"
Identifier "Screen0"
Device "NVIDIA GeForce 4 (generic)"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 16
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1280x960" "1152x864" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

fi_chince
02-17-03, 06:04 PM
Hello,

I've been experiencing the same problem with my LCD monitor (Samsung 152T). I've tried the suggestion of starting another video first and that seems to work. BUT, the suggestion about changing my VertRefresh to 60 did not work.

I do have some additional information that might be helpful:

1. My monitor has dual input (DVI and analog). This problem only occurs when I use the DVI connector. Using the analog VGA works perfectly fine.

2. puterguy said in his last post that using x11 vs. xv drivers has no effect. For me, though, this is not the case. If I run mplayer with x11 output, eg.

mplayer -vo x11 -zoom -dvd 1

and then switch the fullscreen, I do not get the "jaggies".

My config is almost identical to puterguy's.

Hope this information will be useful to somebody.

foft
02-22-03, 04:58 AM
I have exactly the same problem with my Samsung 191T monitor and Geforce Ti4600 connected via DVI. I only see the problem with a DVI connection. Does everyone with this problem have a Samsung TFT?

As a workaround I tried setting the VertRefresh to 60. This did not improve matters until I also set the HorizSync to 64. Now it looks as it should (albeit at 60Hz... Of course still no flicker though being a TFT!).

Who_cares
05-09-03, 02:33 PM
This is wierd as I also have a GeForce 4 Ti 4200 and Samsung 171P (LCD). I wonder whats the cause of this. THanks for the solution though :)

Ba bye

puterguy
05-09-03, 03:45 PM
Well, it now seems that many folks are having this jaggie problem when using a dvi input.

I am a bit frustrated that the nvidia folks have yet to respond.
Would any of you brave souls mind adding your voices to send bug reports to the nvidia linux people so that maybe we can get some more of their attention!