(SOLVED) Ubuntu X Server Segfaults after installing Nvidia Drivers from Website

OK, been fighting with this for about a month or so now. Got a PNY GeForce 750ti to replace my outdated Quadro for gaming. I didn’t realize when I purchased it that the drivers from the Ubuntu repositories, version 319, don’t support the 750ti chipset. So, after a bit of work, I disabled the built in Noveau drivers, removed the Ubuntu proprietary driver packages, and installed the latest version of the drivers from the Nvidia website.

All good so far, system boots up, X runs, games work great. Now for the problem - when I perform certain specific actions in the GUI, the X crashes with a segfault. I have searched and searched the web for anything related, and eliminated several potential problems with the glamoregl package. I found several other issues with similar symptoms, but most involved random segfaults, or otherwise didn’t apply to my situation and system. At this point, the system is 100% stable as long as I avoid certain specific operations which always result in the segfault crash. I will also point out that the system was 100% stable with the previous drivers, I only updated to get support for the 750ti.

I will attach the xorg log file and the nvidia bug report to this post, so maybe someone who knows more about the drivers can figure out if I’m missing something, or this is an actual driver bug that needs fixed. At this point, I think the problem is most likely either a problem in the actual driver itself, or an issue with the card itself. I have tried all three versions of the driver from the Nvidia website that support that 750ti, 334.21, 337.25, and 340.24.

On to the specifics of the problem - the problem can be reproduced at will by clicking inside a window for Q4Wine, VLC media player, or running Windows installers through Winetricks. Note that all three worked fine with the 319 Ubuntu driver package and my old Quadro card. The programs can run, but as soon as a window opens for any of them and I click inside of it, X crashes immediately with a segfault. I assume this is due to whatever graphics API call is being made, but I’m not sure how to figure out which one is causing the problem, or why it only occurs in certain applications. Most other programs run fine, including programs that use the nvidia VDPAU, and that use OpenGL, such as games.

I have found several other threads in various places on the web with issues that seem similar to this one, and no one seems to have found a solution. It seems to me that the issue may be an ongoing issue with the driver, but I think it may only occur with certain card and driver combinations, since some people seem to have had luck with reverting to older drivers and getting rid of the problem. However, I do not have that option, since my card is only supported by the newest 3 driver releases.

Xorg.0.log (25.5 KB)
nvidia-bug-report.log.gz (138 KB)

To add more information to this problem, I tried reverting to an older kernel, no changes, errors still occur at exactly the same point.

I have not had time to try this yet due to work, but I am going to put my old card in and see if the same issue occurs with a different card, hopefully eliminating a problem with the card as a possible source of the problem.

I have had various errors come and go through trying various things to get this to work, however, the following is the errors from the X log file that occurs every time:

[212711.480] (EE) 
[212711.480] (EE) Backtrace:
[212711.480] (EE) 0: /usr/bin/X (xorg_backtrace+0x3d) [0x7f357a40102d]
[212711.480] (EE) 1: /usr/bin/X (0x7f357a25f000+0x1a5d99) [0x7f357a404d99]
[212711.480] (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f357935f000+0xfbb0) [0x7f357936ebb0]
[212711.480] (EE) 3: /usr/bin/X (doListFontsWithInfo+0x179) [0x7f357a2b4a59]
[212711.481] (EE) 4: /usr/bin/X (ProcessWorkQueue+0x21) [0x7f357a2b8521]
[212711.481] (EE) 5: /usr/bin/X (WaitForSomething+0x79) [0x7f357a3fe4c9]
[212711.481] (EE) 6: /usr/bin/X (0x7f357a25f000+0x54d61) [0x7f357a2b3d61]
[212711.481] (EE) 7: /usr/bin/X (0x7f357a25f000+0x4456a) [0x7f357a2a356a]
[212711.481] (EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xf5) [0x7f3577f9ade5]
[212711.481] (EE) 9: /usr/bin/X (0x7f357a25f000+0x448af) [0x7f357a2a38af]
[212711.481] (EE) 
[212711.481] (EE) Segmentation fault at address 0x7f6f1a7ab0f0
[212711.481] (EE) 
Fatal server error:
[212711.481] (EE) Caught signal 11 (Segmentation fault). Server aborting
[212711.481] (EE) 
[212711.481] (EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
[212711.481] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[212711.481] (EE) 
[212711.662] (EE) Server terminated with error (1). Closing log file.

I have tried searching the web for errors relating to libpthread and libc which are both part of the same Ubuntu package, but have not found anything relevant. The package is the stock version (2.17) that was installed with Ubuntu, has never been upgraded nor is the an update available for it at this time.

Finally got time to reinstall my old Quadra card in place of the GeForce 750 to try and determine if the card was the problem. The problem not only continued to occur, but continued even after I removed the driver and went back to either the Noveau drivers or the package from the Ubuntu repository!

So, assuming the problem was not specifically with the driver or the card, I researched the libpthread.so from the X segmentation fault. I ended up tracking it down to certain programs trying to read fonts from the X server, which apparently qt based programs do frequently, which was the common issue among the programs that would cause X to fail. At this point, I also determined I could cause the failure by opening a terminal and running the fontsel program or anything program that tried to read fonts.

Armed with this new information on the source of the problem, I was able to do some more focused research, and ended up tracking the problem down to being caused by a known issue with the xfs (X font server) package. However, I still wondered why this issue only showed up after installing the NVIDIA driver?

It turns out that while the xfs package was already installed, the following lines were added to xorg.conf sometime during the installation of the NVIDIA drivers, and caused the xfs problem to begin to occur:

Section "Files"
    FontPath        "unix/:7100"
EndSection

Not sure if these lines were added by the NVIDIA installer or something else I did during the install, however, during the troubleshooting of the problem I removed the xorg.conf completely and let the NVIDIA installer generate a complete new one, thinking the problem might be something left over from an old xorg.conf, and apparently the line was still put in at that point. This problem probably not not effect all distros, only ones with a broken xfs.

I commented the section out, and the problem immediately was fixed! After doing further research, the xfs package can be uninstalled without effecting anything I use, so I went ahead and removed it. I reinstalled the GeForce 750ti, the latest drivers, and everything is working fine!