Skip to content

Nvidia driver seems to run out of memory and crash the X server long before I'm actually out of memory

I already posted this, but it seems like people stopped replying to it, so I'll post it again.

Memory related info: 8GB RAM (don't tell me to buy more, my mobo and CPU don't support it), 16GB swap on LVM on LUKS, swappiness is 1, vfs cache pressure is 100.

GPU related info: Nvidia Quadro FX 1800M with 1GB VRAM (not set to be used as swap) on version 340.108 of the proprietary driver. (No, I can't update it any further. Newer drivers don't support it, and nouveau is too unstable to use.)

The observable symptoms are that my system runs perfectly smoothly with no noticeable problems, until my X server dies. This seems to always happen when there is swapping, such as launching a new process, switching between browser tabs and application windows, or loading the lightdm greeter when I wake up the laptop from suspend. It also always happens when there's at least about 7GB of stuff in RAM and about 8GB in swap. In the most recent case (which just happened and made me annoyed enough to post this), it happened at about 7.5GB in RAM and 12GB in swap.

In my troubleshooting, I could not find any references to the OOM killer or processes being killed for any reason in dmesg. However, in /var/log/Xorg.0.log.old, I found something of interest:

[376027.994] (II) NVIDIA(0): Setting mode "DP-3: nvidia-auto-select @1920x1080 +0+900 {ViewPortIn=1920x1080, ViewPortOut=1920x1080+0+0}, VGA-0: 1440x900_75 @1440x900 +240+0 {ViewPortIn=1440x900, ViewPortOut=1440x900+0+0}"
[376029.199] (EE) NVIDIA(0): Failed to allocate primary buffer: out of memory.
[376029.229] (EE) NVIDIA(0):  *** Aborting ***
[376029.232] (II) NVIDIA(0): ACPI: failed to connect to the ACPI event daemon; the daemon
[376029.232] (II) NVIDIA(0):     may not be running or the "AcpidSocketPath" X
[376029.232] (II) NVIDIA(0):     configuration option may not be set correctly.  When the
[376029.232] (II) NVIDIA(0):     ACPI event daemon is available, the NVIDIA X driver will
[376029.232] (II) NVIDIA(0):     try to use it to receive ACPI event notifications.  For
[376029.232] (II) NVIDIA(0):     details, please see the "ConnectToAcpid" and
[376029.232] (II) NVIDIA(0):     "AcpidSocketPath" X configuration options in Appendix B: X
[376029.232] (II) NVIDIA(0):     Config Options in the README.
[376029.335] (II) NVIDIA(GPU-0): Display (Samsung SyncMaster (CRT-0)) does not support NVIDIA
[376029.335] (II) NVIDIA(GPU-0):     3D Vision stereo.
[376029.340] (EE)
[376029.340] (EE) Backtrace:
[376029.503] (EE) 0: /usr/lib/Xorg (xorg_backtrace+0x4d) [0x5629421e378d]
[376029.503] (EE) 1: /usr/lib/Xorg (0x562942130000+0xa9cf8) [0x5629421d9cf8]
[376029.503] (EE) 2: /usr/lib/libc.so.6 (0x7f28f497c000+0x3bd70) [0x7f28f49b7d70]
[376029.504] (EE) 3: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f28ef009000+0x9347d) [0x7f28ef09c47d]
[376029.504] (EE) 4: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f28ef009000+0x6c1c89) [0x7f28ef6cac89]
[376029.504] (EE) 5: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f28ef009000+0x6c63e4) [0x7f28ef6cf3e4]
[376029.504] (EE) 6: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f28ef009000+0x6d5f02) [0x7f28ef6def02]
[376029.504] (EE) 7: /usr/lib/xorg/modules/drivers/nvidia_drv.so (0x7f28ef009000+0x6cd8d1) [0x7f28ef6d68d1]
[376029.504] (EE) 8: /usr/lib/Xorg (xf86VTEnter+0x106) [0x5629421c0c36]
[376029.505] (EE) 9: /usr/lib/Xorg (WakeupHandler+0xac) [0x56294229f06c]
[376029.505] (EE) 10: /usr/lib/Xorg (WaitForSomething+0x22e) [0x5629421e594e]
[376029.505] (EE) 11: /usr/lib/Xorg (0x562942130000+0x38966) [0x562942168966]
[376029.505] (EE) 12: /usr/lib/libc.so.6 (__libc_start_main+0xf3) [0x7f28f49a3023]
[376029.505] (EE) 13: /usr/lib/Xorg (_start+0x2e) [0x5629421693be]
[376029.506] (EE)
[376029.507] (EE) Segmentation fault at address 0x30
[376029.507] (EE)
Fatal server error:
[376029.507] (EE) Caught signal 11 (Segmentation fault). Server aborting
[376029.507] (EE)
[376029.507] (EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
[376029.508] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[376029.508] (EE)
[376030.549] (EE) Server terminated with error (1). Closing log file.

It seems to me like the nvidia driver thought that it ran out of memory so it decided to kill itself, causing whatever channel it was using to communicate with Xorg to cease to exist and Xorg to segfault when it tried to use it.

  1. Is this error referring to processor memory or graphics memory? The fact that it only happens when I'm using a lot of processor memory seems to suggest that it's processor memory related, but the fact that there's still a lot of processor memory is left when it happens seems to suggest that it's not processor memory and most likely graphics memory because it's GPU related.

  2. If it's processor memory that this error is related to, why is the process killing itself long before OOM, and is there a way to stop it from doing that?

  3. If it's graphics memory, how do I monitor the usage of that?

In the previous thread, I was told to run memtest86+. After going for 12 hours, it found no errors. Because of that, and because this issue is way too predictable, I really don't think I have faulty memory.

0 points2 comments
Open on Reddit
About this post
Posted
Archived
Score
0 · 50% up
Kind
Text
ID
gdnb7g

Author

21
posts
141
comments
2
media
View profile

2 comments

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.