Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] [SOLVED] Nvidia graphics, xorg memory leak since kernel 4.19.2  (Read 5959 times)

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
[EN] Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #15 on: 2018/12/01, 16:37:38 »
I have now installed the new kernel and its headers package, purged everything nvidia, booted the new kernel and installed all the listed nvidia packages including the 396.54.2 driver and its friends from experimental. Then I went to /usr/lib/nvidia/current and found libglx.so as a link to libglx.so.396.54.  So I made a directory /usr/lib/nvidia/current/modules, per towo's post, and I copied the libglx.so.396.54 file there, and made the new link for libglx.so in the same directory.

However, after a reboot, inxi -G gives me the identical output:

Code: [Select]
Graphics:
  Device-1: NVIDIA GP106 [GeForce GTX 1060 6GB] driver: nvidia v: 396.54
  Display: x11 server: X.Org 1.20.3 driver: nvidia
  resolution: 1920x1200~60Hz, 1920x1080~60Hz
  OpenGL: renderer: llvmpipe (LLVM 7.0 256 bits) v: 3.3 Mesa 18.3.0-rc5

so I think towo is still going to see a problem.

Upon first booting the system and logging in to X, xorg is using about 1% of memory, as shown by top.  I will watch and see if it grows.

@piper, can you tell me where the libglx.so link is found on your system, please and thank you?
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #16 on: 2018/12/01, 17:02:11 »
I would try running

Code: [Select]
update-glx --config glx

To see if that fixes it

Code: [Select]
locate libglx.so
Code: [Select]
/usr/lib/xorg/modules/extensions/libglx.so
==============================================

Code: [Select]
ls -la /etc/alternatives/*libglx.so*
Code: [Select]
lrwxrwxrwx 1 root root 25 Nov 22 09:18 /etc/alternatives/glx--linux-libglx.so -> /usr/lib/nvidia/libglx.so
lrwxrwxrwx 1 root root 33 Nov 22 09:18 /etc/alternatives/nvidia--libglx.so -> /usr/lib/nvidia/current/libglx.so

Code: [Select]
ls -la /etc/alternatives/*libGL.so*
Code: [Select]
lrwxrwxrwx 1 root root 48 Nov 22 09:18 /etc/alternatives/glx--libGL.so.1-i386-linux-gnu -> /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
lrwxrwxrwx 1 root root 50 Nov 22 09:18 /etc/alternatives/glx--libGL.so.1-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1
lrwxrwxrwx 1 root root 48 Oct 25 12:05 /etc/alternatives/glx--libGL.so-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so
lrwxrwxrwx 1 root root 22 Oct 25 12:05 /etc/alternatives/libGL.so-master -> /usr/lib/mesa-diverted

Code: [Select]
ls -la /etc/alternatives/*libGL*
Code: [Select]
lrwxrwxrwx 1 root root 55 Nov 22 09:18 /etc/alternatives/glx--libGLESv1_CM.so.1-i386-linux-gnu -> /usr/lib/mesa-diverted/i386-linux-gnu/libGLESv1_CM.so.1
lrwxrwxrwx 1 root root 57 Nov 22 09:18 /etc/alternatives/glx--libGLESv1_CM.so.1-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1
lrwxrwxrwx 1 root root 55 Oct 25 12:05 /etc/alternatives/glx--libGLESv1_CM.so-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so
lrwxrwxrwx 1 root root 52 Nov 22 09:18 /etc/alternatives/glx--libGLESv2.so.2-i386-linux-gnu -> /usr/lib/mesa-diverted/i386-linux-gnu/libGLESv2.so.2
lrwxrwxrwx 1 root root 54 Nov 22 09:18 /etc/alternatives/glx--libGLESv2.so.2-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2
lrwxrwxrwx 1 root root 52 Oct 25 12:05 /etc/alternatives/glx--libGLESv2.so-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so
lrwxrwxrwx 1 root root 48 Nov 22 09:18 /etc/alternatives/glx--libGL.so.1-i386-linux-gnu -> /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1
lrwxrwxrwx 1 root root 50 Nov 22 09:18 /etc/alternatives/glx--libGL.so.1-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1
lrwxrwxrwx 1 root root 48 Oct 25 12:05 /etc/alternatives/glx--libGL.so-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so
lrwxrwxrwx 1 root root 42 Nov 22 09:18 /etc/alternatives/glx--libGLX_indirect.so.0-i386-linux-gnu -> /usr/lib/i386-linux-gnu/libGLX_nvidia.so.0
lrwxrwxrwx 1 root root 44 Nov 22 09:18 /etc/alternatives/glx--libGLX_indirect.so.0-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0
lrwxrwxrwx 1 root root 22 Oct 25 12:05 /etc/alternatives/libGL.so-master -> /usr/lib/mesa-diverted
lrwxrwxrwx 1 root root 63 Nov 22 09:18 /etc/alternatives/nvidia--libGLESv1_CM_nvidia.so.1-i386-linux-gnu -> /usr/lib/i386-linux-gnu/nvidia/current/libGLESv1_CM_nvidia.so.1
lrwxrwxrwx 1 root root 65 Nov 22 09:18 /etc/alternatives/nvidia--libGLESv1_CM_nvidia.so.1-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/nvidia/current/libGLESv1_CM_nvidia.so.1
lrwxrwxrwx 1 root root 60 Nov 22 09:18 /etc/alternatives/nvidia--libGLESv2_nvidia.so.2-i386-linux-gnu -> /usr/lib/i386-linux-gnu/nvidia/current/libGLESv2_nvidia.so.2
lrwxrwxrwx 1 root root 62 Nov 22 09:18 /etc/alternatives/nvidia--libGLESv2_nvidia.so.2-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/nvidia/current/libGLESv2_nvidia.so.2
lrwxrwxrwx 1 root root 57 Nov 22 09:18 /etc/alternatives/nvidia--libGLX_nvidia.so.0-i386-linux-gnu -> /usr/lib/i386-linux-gnu/nvidia/current/libGLX_nvidia.so.0
lrwxrwxrwx 1 root root 59 Nov 22 09:18 /etc/alternatives/nvidia--libGLX_nvidia.so.0-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/nvidia/current/libGLX_nvidia.so.0

Code: [Select]
cd /usr/lib/xorg/modules/extensions
Code: [Select]
ls -la
Code: [Select]
drwxr-xr-x 2 root root   4096 Oct 26 07:53 .
drwxr-xr-x 6 root root   4096 Oct 26 07:53 ..
-rw-r--r-- 1 root root 289824 Oct 25 14:15 libglx.so
« Last Edit: 2018/12/01, 17:35:25 by piper »
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #17 on: 2018/12/01, 18:22:16 »
Thanks piper.

Ran
Code: [Select]
update-glx --config glx  (didn't know about this -- never needed it)

The first choice,
Code: [Select]
0  /usr/lib/nvidia   100  auto mode  was selected, and I left it selected and let the process run, which it did with no errors.

My output from
Code: [Select]
ls -la /etc/alternatives/*libglx.so* is a match to yours.

My output from
Code: [Select]
ls -la /etc/alternatives/*libGL.so* is a match to the second one of yours.

My output from
Code: [Select]
ls -la /etc/alternatives/*libGL* is seven lines that appear to match the non-i386 lines in your output, here they are:

Code: [Select]
lrwxrwxrwx 1 root root 57 Dec  1 10:07 /etc/alternatives/glx--libGLESv1_CM.so.1-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv1_CM.so.1
lrwxrwxrwx 1 root root 54 Dec  1 10:07 /etc/alternatives/glx--libGLESv2.so.2-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGLESv2.so.2
lrwxrwxrwx 1 root root 50 Dec  1 10:07 /etc/alternatives/glx--libGL.so.1-x86_64-linux-gnu -> /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1
lrwxrwxrwx 1 root root 44 Dec  1 10:07 /etc/alternatives/glx--libGLX_indirect.so.0-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0
lrwxrwxrwx 1 root root 65 Dec  1 10:07 /etc/alternatives/nvidia--libGLESv1_CM_nvidia.so.1-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/nvidia/current/libGLESv1_CM_nvidia.so.1
lrwxrwxrwx 1 root root 62 Dec  1 10:07 /etc/alternatives/nvidia--libGLESv2_nvidia.so.2-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/nvidia/current/libGLESv2_nvidia.so.2
lrwxrwxrwx 1 root root 59 Dec  1 10:07 /etc/alternatives/nvidia--libGLX_nvidia.so.0-x86_64-linux-gnu -> /usr/lib/x86_64-linux-gnu/nvidia/current/libGLX_nvidia.so.0

My libglx.so file in /usr/lib/xorg/modules/extensions is the same Oct 25 file that you have.

I've rebooted -- xorg starts out at about 1% memory usage.  I'll let it run and see if it grows.
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #18 on: 2018/12/01, 18:40:24 »
Hmm, 

Code: [Select]
renderer: llvmpipe (LLVM 7.0 256 bits) v: 3.3 Mesa 18.3.0-rc5

Is telling me you are still using open source noveau drivers

Do you have

Code: [Select]
libegl-mesa0
installled?


You can try

Code: [Select]
mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.bac

ln -s /usr/lib/nvidia-396/xorg/libglx.so /usr/lib/xorg/modules/extensions/libglx.so

Then reboot

Lets check

Code: [Select]
grep -Ri nouveau /etc/modprobe.d
and

Code: [Select]
glxinfo | grep OpenGL



This won't hurt

Code: [Select]
update-pciids

« Last Edit: 2018/12/01, 18:53:10 by piper »
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #19 on: 2018/12/01, 18:53:43 »
Code: [Select]
root@dibl-patience:/# apt policy xserver-xorg-video-nouveau libegl-mesa0
xserver-xorg-video-nouveau:
  Installed: (none)
  Candidate: 1:1.0.15-3
  Version table:
     1:1.0.15-3 500
        500 http://httpredir.debian.org/debian unstable/main amd64 Packages
libegl-mesa0:
  Installed: 18.2.6-1
  Candidate: 18.2.6-1
  Version table:
     18.3.0~rc5-1 1
          1 http://deb.debian.org/debian experimental/main amd64 Packages
 *** 18.2.6-1 500
        500 http://httpredir.debian.org/debian unstable/main amd64 Packages
        100 /var/lib/dpkg/status

Huh -- libegl-mesa0 has reverted back to the sid version while I wasn't looking -- fixable.

Did this:

Code: [Select]
mv /usr/lib/xorg/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so.bac
Hmmmm.  Looking for this:

Code: [Select]
ln -s /usr/lib/nvidia-396/xorg/libglx.so /usr/lib/xorg/modules/extensions/libglx.so
and I find no /usr/lib/nvidia-396/ directory on my system.  I have a /usr/lib/nvidia directory that looks like this

Code: [Select]
root@dibl-patience:/usr/lib/nvidia# ls -la
total 48
drwxr-xr-x   4 root root  4096 Dec  1 10:07 .
drwxr-xr-x 127 root root 20480 Dec  1 10:07 ..
-rw-r--r--   1 root root    57 Mar 29  2018 alternate-install-present
drwxr-xr-x   2 root root  4096 Sep  5 06:04 bumblebee
-rwxr-xr-x   1 root root  2125 Mar 29  2018 check-for-conflicting-opengl-libraries
-rwxr-xr-x   1 root root  1897 Mar 29  2018 check-for-mismatching-nvidia-module
drwxr-xr-x   3 root root  4096 Dec  1 10:16 current
lrwxrwxrwx   1 root root    35 Dec  1 10:07 libglx.so -> /etc/alternatives/nvidia--libglx.so
lrwxrwxrwx   1 root root    24 Dec  1 10:07 nvidia -> /etc/alternatives/nvidia
lrwxrwxrwx   1 root root    46 Dec  1 10:07 nvidia-bug-report.sh -> /etc/alternatives/nvidia--nvidia-bug-report.sh
lrwxrwxrwx   1 root root    39 Dec  1 10:07 nvidia_drv.so -> /etc/alternatives/nvidia--nvidia_drv.so
-rwxr-xr-x   1 root root   618 Mar 29  2018 pre-install

so I wonder what would explain this difference between our nvidia package installations?
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #20 on: 2018/12/01, 18:59:11 »
Well, huh -- @piper, one of those things worked! After a reboot, I have
 
Code: [Select]
Graphics:  Device-1: NVIDIA GP106 [GeForce GTX 1060 6GB] driver: nvidia v: 396.54
           Display: x11 server: X.Org 1.20.3 driver: nvidia resolution: 1920x1200~60Hz, 1920x1080~60Hz
           OpenGL: renderer: GeForce GTX 1060 6GB/PCIe/SSE2 v: 4.6.0 NVIDIA 396.54

Color me (a) confused but also (b) Happy.     ;D

Marking it SOLVED, and hoping no one ever has to follow it!    ::)
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Re: Nvidia graphics, xorg memory leak since kernel 4.19.2
« Reply #21 on: 2018/12/01, 19:03:26 »
dibl, disregard that shit, that is notes for my old redhat shit (usr/lib/nvidia-396), so sorry :(  has 2 notpads (pen & paper) here and read the wrong one

I see bumblebee  ????????

drwxr-xr-x   2 root root  4096 Sep  5 06:04 bumblebee


Edit: :) :) :)   glad you got it working


Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck

Offline dibl

  • siduction community member
  • Global Moderator
  • User
  • *****
  • Posts: 2.358
    • Land of the Buckeye
No problem -- I appreciate your help (again) piper.

I have no clue what that bumblebee directory is doing there -- apparently it's "just in case".  My Nvidia card is a big PCI bus card on an Asus mobo with no other graphics available.

I think it must have been disabling the libglx.so file in /usr/lib/xorg/modules/extensions that fixed it.  I could test that theory ....  but I think I'm done fiddling with it today. 

EDIT:  I tested it.  The problem IS the libglx.so file in /usr/lib/xorg/modules/extensions.  It has to be disabled for the current (sid and experimental) nvidia-driver packages to work correctly -- at least, it does on my hardware.
« Last Edit: 2018/12/01, 22:06:57 by dibl »
System76 Oryx Pro, Intel Core i7-11800H, SSD 970 EVO Plus;  Asus ROG STRIX X299-E, Core i7-7740X, Nvidia GTX-1060, dual monitors, SSD 860 EVO

Offline h2

  • User
  • Posts: 64
    • smxi.org
I have no idea how this happened, but clearly the glx stuff was running via vmware, yet there is no sign of the dibl install being in vmware, that was on the previous page, glxinfo OpenGL results. I'm mildly curious how a system running on a real machine could have been tricked into believing it was running in vmware, but that's where the problem came from obviously.

The "nvidia" driver comes from two places, lspci (for the individual device), and Xorg.0.log (for the xorg section). But how glxinfo came to believe it was running in vmware is beyond me, unless the install was actually transferred from a vmware install? That was the issue all along, by the way, as far as I can tell.

All the specific driver loaded/unloaded/failed issues were resolved a while ago as far as I know re inxi, so I tend to trust it now over what I believe to be the case.

Offline piper

  • User
  • Posts: 1.785
  • we are the priests ... of the temples of syrinx
Has nothing to do with vm

I still see this going on in a few places
Free speech isn't just fucking saying what you want to say, it's also hearing what you don't want to fucking hear

I either give too many fucks or no fucks at all, it's like I cannot find a middle ground for a moderate fuck distribution, it's like what the fuck