# Screen flickering with >nvidia-drivers-331.*

## Martux

Hi guys. I have a TV attached as second "monitor" on my machine (via HDMI).

All nvidia-drivers bigger than 331 give me an annoying flickering on that screen.

I have read something that this could be EDID related but didn't really get it.

Any suggestions? I really want the 331 driver series because it supports kernel >3.12...

----------

## aCOSwt

 *Martux wrote:*   

> I really want the 331 driver series because it supports kernel >3.12...

 

AFAIK, 331.38 is not made (by gentoo-devs) possible to emerge with kernel > 3.12

 *nvidia-drivers-331.38.ebuild wrote:*   

> if use kernel_linux && kernel_is ge 3 13 ; then... go away

 

I keep on suggesting 304.117 which supports < 3.13 kernels too.

----------

## Martux

The 304.117 works just fine. Thank you!

331 works well with 3.12, the screen flickering also occurs with some version of the 331 series under windows.

----------

## Martux

Shit, the flickering is back! 304.117 was removed from portage and I didn't recognized it immediately when I updated to nvidia-drivers-334.21. Problem is that I can't even downgrade to 304.119 because I run in a loop with emerge @preserved-rebuild regarding emul-linux-x86-gtklibs. It just keeps on searching for some ibs from the 334.21 drivers. If I unmerge and remerge, emerge fails and Firefox-bin and a lot of other things stop working.

Does anyone have any idea what I could do?

----------

## Sansavarous

Have you considered nouveau?

I have no idea if it will support HDMI out, don't see any reason it wouldn't.

http://wiki.gentoo.org/wiki/Nouveau_%26_nvidia-drivers_switching

----------

## Martux

Yeah, I guess I don't have many other options, right? The nvidia blob has become such a pita...

----------

## overkll

 *Martux wrote:*   

> Shit, the flickering is back! 304.117 was removed from portage and I didn't recognized it immediately when I updated to nvidia-drivers-334.21. Problem is that I can't even downgrade to 304.119 because I run in a loop with emerge @preserved-rebuild regarding emul-linux-x86-gtklibs. It just keeps on searching for some ibs from the 334.21 drivers. If I unmerge and remerge, emerge fails and Firefox-bin and a lot of other things stop working.
> 
> Does anyone have any idea what I could do?

 

Trying to downgrade from 334.21 will leave a file and a link to that file.  IIRC, it's /usr/lib/opengl/nvidia/libEGL.so or something similar - the @preserved warning should list it.  After you downgrade you can delete the *EGL* file and it's link.  After that @preserved-rebuild shouldn't need to be run.  It's a bug that 334.21 doesn't remove those two files, but I haven't filed one on it.

----------

## Martux

overkill, you are right, those were the files causing the troubles. Is there any possibiility to complile the 334.21 with gentoo-sources >3.13?

----------

## overkll

Peeking inside the ebuild reveals:

```

...

        if use kernel_linux && kernel_is ge 3 14 ; then

                ewarn "Gentoo supports kernels which are supported by NVIDIA"

                ewarn "which are limited to the following kernels:"

                ewarn "<sys-kernel/gentoo-sources-3.14"

                ewarn "<sys-kernel/vanilla-sources-3.14"

                ewarn ""

                ewarn "You are free to utilize epatch_user to provide whatever"

                ewarn "support you feel is appropriate, but will not receive"

                ewarn "support as a result of those changes."

                ewarn ""

                ewarn "Do not file a bug report about this."

        fi

...

```

According to the ebuild's warning message, I'd say the you should be able to install it against a 3.13 series kernel as long as it's gentoo or vanilla-sources, but not > 3.13.

Yesterday I read that nVidia released 335.23 for windows.  Maybe the linux version is coming soon.

----------

## Martux

Thanks. Yeah, impatiently waiting for the 335 then. Nouveau doesn't work good here... 334.21 is indeed compiling fine with gentoo-sources-3.13.6... But still having the flickering with the second HDMI of course.

----------

## overkll

I can't use > nvidia-drivers-319.49 on anything!  The screen isn't refreshed unless one moves the mouse!  Completely unusable terminal windows.  Type and wait - up to a 5 second delay.

I think it's a gnome-shell compositing issue.  IF I eselect openl to use xorg and reboot, I'll get a fallback mode.  Then the screen refresh is fine.

What are you using for your Desktop Environment?  Gnome-3.?Last edited by overkll on Thu Apr 10, 2014 3:01 pm; edited 1 time in total

----------

## Martux

No, I am on KDE here. System is fully ~amd64. Nvidia used to be the best manufacturer to use with linux some years back. I heard AMD/Radeon driver catched up massively?

----------

## overkll

flgrx has gotten better, but I still prefer nVidia, especially for HTPC.  AMD/ATI latest version also has a refresh issue with terminal windows.

I just bought an MSI GTX 750 (Maxwell) and I can't even use it!  LOL

----------

## Martux

Wow, that's bad. I also hate the fact that I have to dual-boot into Windows just to watch a movie.

----------

## slize12

Actually, I don't want to hijack this thread, but I think that the problem I am going to describe exactly relates to the things overkll described.

Since the last bigger update I suffer from a refresh issue. Several applications do not properly refresh parts of their interface while their is new content. The most annoying example is thunderbird or any terminal application. In the former case you open another eMail and nothing happens. Either I need to re-position the thunderbird window to have a refresh or adjust the font-size of the eMail, generally anything that causes a redraw. Another scenario is a terminal application. Once I am in a screen and I leave it, the informtion shown does not change apart from the very first line (being the original terminal session). This is pretty annoying and time-consuming. 

I don't know where actually to search for this bug. Thus, I post my set up as far as I think is relevant:

[I] media-video/nvidia-settings - 331.20

[I] x11-drivers/nvidia-drivers  - 334.21-r3

My PC is featured with a "NVIDIA Corporation GF119M [NVS 4200M] (rev a1)"

Linux ... 3.12.13-gentoo ... x86_64 Intel(R) Core(TM) ...

I am using xfce (4.10) and compiz (0.8.8-r3)

Does anybody have an idea how to solve that issue? Do I have to wait for new driver versions of Nvidia?

Thanks in advance.

----------

## slize12

One more hint I can provide is that the unintended behavior does not start directly after booting. I takes a couple of seconds or a minute. Additionally, some days ago I found another related gentoo forums thread. One information provided there is, that clutter the relevant source of unintended behavior. Still the solution presented there seems to be specific for gnome-terminal. It did not work for me.

----------

## Jaglover

If it is EDID issue there may be a way around it. I remember once I had similar issue, a nvidia upgrade installed a driver version which couldn't read EDID from my rather old card any more. I downgraded the driver, read EDID from my TV and saved it as a file, then I configured the driver to read it from this file instead of trying to pull it from display.

Inspect your Xorg log, see if there is EDID read failure.

----------

## slize12

I searched the Xorg log for EDID entries and just found this:

```
[    19.549] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display

[    19.549] (**) NVIDIA(0):     device Seiko/Epson (DFP-0) (Using EDID frequencies has

[    19.549] (**) NVIDIA(0):     been enabled on all display devices.)

[    19.549] (**) NVIDIA(0): Using HorizSync/VertRefresh ranges from the EDID for display

[    19.549] (**) NVIDIA(0):     device DELL U3011 (DFP-4) (Using EDID frequencies has been

[    19.549] (**) NVIDIA(0):     enabled on all display devices.)

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "720x480" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid HorizSync range (29.000-113.000 kHz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's HorizSync (15.7 kHz); ignoring HorizSync check

[    19.550] (WW) NVIDIA(GPU-0):     for mode "720x480".

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "720x576" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid HorizSync range (29.000-113.000 kHz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's HorizSync (15.6 kHz); ignoring HorizSync check

[    19.550] (WW) NVIDIA(GPU-0):     for mode "720x576".

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "720x480" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid HorizSync range (29.000-113.000 kHz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's HorizSync (15.7 kHz); ignoring HorizSync check

[    19.550] (WW) NVIDIA(GPU-0):     for mode "720x480".

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "720x576" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid HorizSync range (29.000-113.000 kHz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's HorizSync (15.6 kHz); ignoring HorizSync check

[    19.550] (WW) NVIDIA(GPU-0):     for mode "720x576".

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "1920x1080" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid HorizSync range (29.000-113.000 kHz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's HorizSync (28.1 kHz); ignoring HorizSync check

[    19.550] (WW) NVIDIA(GPU-0):     for mode "1920x1080".

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "1920x1080" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid HorizSync range (29.000-113.000 kHz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's HorizSync (27.0 kHz); ignoring HorizSync check

[    19.550] (WW) NVIDIA(GPU-0):     for mode "1920x1080".

[    19.550] (WW) NVIDIA(GPU-0): The EDID for DELL U3011 (DFP-4) contradicts itself: mode

[    19.550] (WW) NVIDIA(GPU-0):     "1920x1080" is specified in the EDID; however, the EDID's

[    19.550] (WW) NVIDIA(GPU-0):     valid VertRefresh range (49.000-86.000 Hz) would exclude

[    19.550] (WW) NVIDIA(GPU-0):     this mode's VertRefresh (24.0 Hz); ignoring VertRefresh

[    19.550] (WW) NVIDIA(GPU-0):     check for mode "1920x1080".

```

So my guess is, it is not determined by the EDID issue. Im using my notebook in combination various screens (home, office, tv, friends). The issue is everywhere the same while the screens are different.

----------

## Martux

Hey guys. I took the time to play around with some options of the nvidia-drivers--337.12.

I was using the edid I extracted with the "aquire edid" option in nvidia-settings of the working 304.121 driver and used it in xorg.conf:

Option "CustomEDID" "DFP-1:/etc/X11/edid.bin"

Didn't work. 

Also Option "IgnoreEDID" and Option "UseEdidFreqs" didn't have any effect.

In the xorg.log there are absolutely no error mesages regarding edid.

I am back on the 304.121 version now, seems like forever  :Sad: 

----------

## Martux

Just to let you know: x11-drivers/nvidia-drivers-337.25 finally fixed it!

----------

## gentoorockerfr

No fix here with this -> driverx11-drivers/nvidia-drivers-337.25

still screen tearing...

----------

## TomWij

Have you set up `eselect opengl list` and picked the NVIDIA related option? Which X.org server are you using? (1.16.99 and newer are unsupported)

 *aCOSwt wrote:*   

>  *Martux wrote:*   I really want the 331 driver series because it supports kernel >3.12... 
> 
> AFAIK, 331.38 is not made (by gentoo-devs) possible to emerge with kernel > 3.12
> 
>  *nvidia-drivers-331.38.ebuild wrote:*   if use kernel_linux && kernel_is ge 3 13 ; then... go away 

 

It is NVIDIA that does not support it, therefore a a warning is provided (which does not mean "go away", but rather resounds "lose support from NVIDIA at your own risk") and continue the emerge with support for user patches; it is therefore possible to emerge it whilst losing support, solely by placing an unsupported patch in the /etc/portage/x11-drivers/nvidia-drivers/ directory.

----------

## Martux

There's also x11-drivers/nvidia-drivers-340.17 in portage now. That works for me as well.

The only thing I could really do about that was waiting for a driver that fixed it. All the EDID related stuff didn't work for me.

----------

## gentoorockerfr

yes i have nvidia to opengl,

also 1.15 version of xorg-server

ps kernel 3.15 and nvidia-driver 340.17 

terrible screen-video flickering/tearing...

why...?

i will try to use 304 driver version....

----------

## Holysword

 *Martux wrote:*   

> There's also x11-drivers/nvidia-drivers-340.17 in portage now. That works for me as well.
> 
> The only thing I could really do about that was waiting for a driver that fixed it. All the EDID related stuff didn't work for me.

 

Oh well, I have an nVidia GT 740M, and I am having horrible problems with screen tearing ever since I bought an external monitor for my laptop. I don't experience any problem when I'm using just the builtin screen. Upgrading to 340.24 driver won't help.

Couldn't it be the size of the video buffer? (if there is even any way to manually change that...)

----------

## mephist0

 *gentoorockerfr wrote:*   

> yes i have nvidia to opengl,
> 
> also 1.15 version of xorg-server
> 
> ps kernel 3.15 and nvidia-driver 340.17 
> ...

 

Which Desktop environment are you using?

I had the same problem with my HTPC and xbmc. I used Gnome for a while now. I read in the xbmc forums disabling composite would solve the tearing.

So I disabled the composite extension in xorg.conf and changed the XSession in lightdm to xbmc. TADA! Tearing is gone  :Smile: 

But Gnome, I think, requires the composite extension.

I am currently getting rid of Gnome on my desktop PC. I will switch to xfce, which doesn't require the composite extension. I had also tearing on the desktop PC on Gnome with mplayer.

----------

## gentoorockerfr

the problem exists in 346 driver...

a simple workaround is to set vsync to none and  back to when is poor in kwin desktop effects...but this is not really a solution..

i am running 3.18 kernel kde gentoo64

----------

## Holysword

 *gentoorockerfr wrote:*   

> the problem exists in 346 driver...
> 
> a simple workaround is to set vsync to none and  back to when is poor in kwin desktop effects...but this is not really a solution..
> 
> i am running 3.18 kernel kde gentoo64

 

I can confirm that the problem persists on nvidia-drivers-346.35, but its not the ***only problem***:

https://bugs.gentoo.org/attachment.cgi?id=397514&action=edit

So be careful with the updates meanwhile. Meanwhile I cannot test test much as I'm using xorg-x11 opengl as a workaround to bug#541372.

----------

