Nvidia NVML Driver/library version mismatch: dkms, modules, drivers and modinfo versions - nvidia

I have the Nvidia NVML Driver/library version mismatch error, for which I recommend reading the following answers:
https://stackoverflow.com/a/67105064/1782553
https://stackoverflow.com/a/71672261/1782553
However, after purging and re-installing the nvidia packages (necessary because of the issue described here), I still get the error. A reboot resolved the issue but I'd like to understand why?
Also, I'm not sure I understand the meaning of the 4 following commands and the Nvidia version they display.
Before reboot
$ cat /sys/module/nvidia/version
515.65.01
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.01 Wed Jul 20 14:00:58 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
$ dkms status
nvidia, 515.65.07, 5.4.0-131-generic, x86_64: installed
$ modinfo nvidia | grep ^version
version: 515.65.07
After reboot
$ cat /sys/module/nvidia/version
515.65.07
$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 515.65.07 Thu Sep 22 00:22:12 UTC 2022
GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
$ dkms status
nvidia, 515.65.07, 5.4.0-131-generic, x86_64: installed
$ modinfo nvidia | grep ^version
version: 515.65.07
I understand there's a difference between the loaded driver version and the driver version that will be loaded after next reboot, but I would have guessed that the modinfo version would match the cat /proc/... version, or that the dkms version would match the cat /sys/... version, but they don't…
Could someone make a brief summary of what each command is reading?

Related

troubleshooting to upgrade Homebrew

any suggestion to resolve that trouble?
brew upgrade
==> Upgrading 1 outdated package:
patchelf 0.10 -> 0.11
==> Upgrading patchelf 0.10 -> 0.11
==> Downloading http://timelessname.com/elfbin/helloworld.tar.gz
Already downloaded: /home/felipe/.cache/Homebrew/downloads/e8943dd8577098994c9cc5eb1dc934bb5e93f97834dd65be5ea969e1d144deec--helloworld.tar.gz
==> Downloading https://github.com/NixOS/patchelf/archive/0.11.tar.gz
Already downloaded: /home/felipe/.cache/Homebrew/downloads/bbcd82d38c35bbbe19f8fc9c11c1a6a9294473a0c235cd5d295718d3108dd349--patchelf-0.11.tar.gz
==> ./configure --prefix=/home/linuxbrew/.linuxbrew/Cellar/patchelf/0.11 CXXFLAGS=-static-libgcc -static-libstdc++
Last 15 lines from /home/felipe/.cache/Homebrew/Logs/patchelf/01.configure:
2020-08-29 21:18:19 -0400
./configure
--prefix=/home/linuxbrew/.linuxbrew/Cellar/patchelf/0.11
CXXFLAGS=-static-libgcc -static-libstdc++
--disable-debug
--disable-dependency-tracking
--disable-silent-rules
READ THIS: https://docs.brew.sh/Troubleshooting
These open issues may also help:
patchelf 0.12 https://github.com/Homebrew/linuxbrew-core/pull/21032
i'm trying to upgrade a brew but it's happening something wrong.
can you help me to fix it?
brew config
HOMEBREW_VERSION: 2.4.14
ORIGIN: https://github.com/Homebrew/brew
HEAD: fa39db0192c3641ed18abf93371c31e3a220348f
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/linuxbrew-core
Core tap HEAD: a394692bb5092789dd8cf49561bf52cf61a1d228
Core tap last commit: 17 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: :1
HOMEBREW_MAKE_JOBS: 12
CPU: dodeca-core 64-bit skylake
Homebrew Ruby: 2.6.3 => /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
Clang: N/A
Git: 2.20.1 => /bin/git
Curl: 7.64.0 => /usr/bin/curl
Kernel: Linux 4.19.0-8-amd64 x86_64 GNU/Linux
OS: Debian GNU/Linux 10 (buster) (buster)
Host glibc: 2.28
/usr/bin/gcc: 8.3.0
glibc: N/A
gcc: N/A
xorg: N/A
brew doctor
brew doctor
Your system is ready to brew.

I can't find configuration file of Wireshark on Centos7

I installed the Wireshark on Centos7. But I can not find the configuration files. By default it should be in "/usr/local/share/Wireshark", but didn't it exist.
~[root#localhost share]# tshark -v
TShark 1.10.14 (Git Rev Unknown from unknown)
Copyright 1998-2015 Gerald Combs <gerald#wireshark.org> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled (64-bit) with GLib 2.54.2, with libpcap, with libz 1.2.7, with POSIX
capabilities (Linux), without libnl, with SMI 0.4.8, with c-ares 1.10.0, with
Lua 5.1, without Python, with GnuTLS 3.3.26, with Gcrypt 1.5.3, with MIT
Kerberos, without GeoIP.
Running on Linux 3.10.0-862.el7.x86_64, with locale en_US.UTF-8, with libpcap
version 1.5.3, with libz 1.2.7.
Intel(R) Core(TM) i7-6700HQ CPU # 2.60GHz
Built using gcc 4.8.5 20150623 (Red Hat 4.8.5-36).
[root#localhost ~]# cd /usr/local/share/
[root#localhost share]# ll
total 0
drwxr-xr-x. 2 root root 28 Mar 14 16:39 applications
drwxr-xr-x. 2 root root 6 Apr 11 2018 info
drwxr-xr-x. 21 root root 243 Feb 11 2019 man
[root#localhost ~]# ll /etc/ | grep wireshark
[root#localhost ~]#
To check where tshark config files are stored, use tshark -G folders. As an example, this is what I see on my system:
ubuntu$ tshark -G folders
Temp: /tmp
Personal configuration: /home/rj/.config/wireshark
Global configuration: /usr/share/wireshark
System: /etc
Program: /usr/bin
Personal Plugins: /home/rj/.local/lib/wireshark/plugins/2.6
Global Plugins: /usr/lib/x86_64-linux-gnu/wireshark/plugins/2.6
Personal Lua Plugins: /home/rj/.local/lib/wireshark/plugins
Global Lua Plugins: /usr/lib/x86_64-linux-gnu/wireshark/plugins
Extcap path: /usr/lib/x86_64-linux-gnu/wireshark/extcap
MaxMind database path: /usr/share/GeoIP
MaxMind database path: /var/lib/GeoIP
MaxMind database path: /usr/share/GeoIP
More information is available on using wireshark configuration files as well as official docs, which detail the types.

Cross Compile OpenCV for Rpi2 with Java bindings

What I try to do is to cross compile OpenCV from a x86 host machine to an ARM target machine (Raspberry Pi 2) with Java bindings.
All I've achieved is to compile OpenCV with Java bindings for x86 platform, or even OpenCV with NO Java bindings for ARM platform. However I cannot compile OpenCV with Java bindings for ARM platform.
I've kind of followed thousands of guides to do this. This is from OpenCV's official site, and seems to be very simple: http://docs.opencv.org/2.4/doc/tutorials/introduction/crosscompilation/arm_crosscompile_with_cmake.html
My host machine is the following:
$ uname -a:
Linux ubuntu 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 14:46:51 UTC 2015 i686 i686 i686 GNU/Linux
I've installed gcc and g++ cross compilation tools (gnueabi and gnueabihf):
$ sudo apt-get install gcc-arm-linux-gnueabi
$ sudo apt-get install g++-arm-linux-gnueabi
$ sudo apt-get install gcc-arm-linux-gnueabihf
$ sudo apt-get install g++-arm-linux-gnueabihf
$ which arm-linux-gnueabihf-gcc
/usr/bin/arm-linux-gnueabihf-gcc
$ which arm-linux-gnueabihf-g++
/usr/bin/arm-linux-gnueabihf-g++
Since I want to compile OpenCV with the Java bindings, I installed jdk and ant:
$ sudo apt-get install openjdk-7-jre
$ sudo apt-get install openjdk-7-jdk
$ sudo apt-get install ant
Then I add these lines to .bashrc file:
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
PATH=$JAVA_HOME/bin:$PATH
export PATH
Then I execute:
$ source $HOME/.bashrc
I've downloaded OpenCV's source code and moved to the platforms/linux folder as the official guide does:
$ cd ~/opencv/platforms/linux
$ mkdir -p build_hardfp
$ cd build_hardfp
Then in the "opencv/platforms/arm-gnueabi.toolchain.cmake" file, replaced these lines:
set(CMAKE_C_COMPILER arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-gcc-${GCC_COMPILER_VERSION})
set(CMAKE_CXX_COMPILER arm-linux-gnueabi${FLOAT_ABI_SUFFIX}-g++-${GCC_COMPILER_VERSION})
by these:
set(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
In order to use arm compiler instead of x86's.
Then I try to get cmake ready:
$ cmake -DBUILD_SHARED_LIBS=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../..
Cmake's output tells it will use arm cross compiler for ARM platform target, but it will not use Java bindings:
...
-- Platform:
-- Host: Linux 4.2.0-16-generic i686
-- Target: Linux 1 arm
-- CMake: 3.2.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
...
C++ Compiler: /usr/bin/arm-linux-gnueabihf-g++ (ver 5.2.1)
...
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java python viz
So, I try to set cmake compile variables by myself without using cmake's toolchain file:
$ export CMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc
$ export CMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabihf-g++
$ cmake -DBUILD_SHARED_LIBS=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO ../../..
Now cmake's output tells it will include Java support, but it won't use arm cross compiler:
...
-- Platform:
-- Host: Linux 4.2.0-16-generic i686
-- CMake: 3.2.2
-- CMake generator: Unix Makefiles
-- CMake build tool: /usr/bin/make
-- Configuration: Release
...
C++ Compiler: /usr/bin/c++ (ver 5.2.1)
...
-- OpenCV modules:
-- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java stitching superres ts videostab
-- Disabled: world
-- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda python viz
Of course, if I execute make command with this latest cmake configuration, this is the ".so" file I get:
$ readelf -h lib/libopencv_java249.so | grep Machine
Machine: Intel 80386
where it should tell:
Machine: ARM
So, once again: I can compile OpenCV with Java bindings for x86 platform, or either OpenCV with NO Java bindings for ARM platform, but not both.
How should I do this?
Thank you!
UPDATE 1:
#Notlikethat I forgot to tell I had already tried that (i.e. use ARM jdk instead of x86). I did not mention it because I though I should be using x86.
However, I have tried it again:
I've downloaded ARM's jdk, set JAVA_HOME and PATH variables properly to point this new jdk and tried cmake command.
The result is the same, it lets me compile for ARM without Java bingings, or for x86 with Java bindings.
UPDATE 2:
I've added the following variables to the "arm-gnueabi.toolchain.cmake" file:
set(JAVA_HOME /usr/lib/jvm/jdk1.7.0_60_ARM)
set(JAVA_AWT_LIBRARY $JAVA_HOME/include/jawt.h)
set(JAVA_JVM_LIBRARY $JAVA_HOME/jre/lib/arm/jvm.cfg)
set(JAVA_INCLUDE_PATH $JAVA_HOME/include/jni.h)
set(JAVA_INCLUDE_PATH2 $JAVA_HOME/include/linux/jni_md.h)
set(JAVA_AWT_INCLUDE_PATH $JAVA_HOME/include/jawt.h)
Now if I execute:
$ cmake -DBUILD_SHARED_LIBS=OFF -D BUILD_NEW_PYTHON_SUPPORT=NO -DCMAKE_TOOLCHAIN_FILE=../arm-gnueabi.toolchain.cmake ../../..
the output shows that java module is still unavailable, but at least, one of its key dependencies is ok (JNI):
...
-- Java:
-- ant: NO
-- JNI: $JAVA_HOME/include/jni.h $JAVA_HOME/include/linux/jni_md.h $JAVA_HOME/include/jawt.h
-- Java tests: NO
...
I'm pretty sure the problem here is the fact that ant is not found, which I can't understand.
Ant is installed:
$ echo $PATH:/usr/lib/jvm/jdk1.7.0_60_ARM/bin:/opt/apache/ant/apache-ant-1.9.6/bin:...
I've retried by adding the following variables to the "arm-gnueabi.toolchain.cmake" file, without success:
set(ANT_HOME /opt/apache/ant/apache-ant-1.9.6)
set(JAVA_ANT $ANT_HOME/bin/ant)

Error while trying to enter sleep mode in Beagle Bone Black

While trying to enter sleep mode on beaglebone black am getting an error
When i issue the command echo -n "mem" > /sys/power/state am getting
-sh: echo: write error: No such device
The kernel version and os version is as below
root#beaglebone:~# uname -a
Linux beaglebone 3.8.13 #1 SMP Wed Sep 4 09:09:32 CEST 2013 armv7l GNU/Linux
root#beaglebone:~# lsb_release -a
Distributor ID: Angstrom
Description: Angstrom GNU/Linux v2012.12 (Core edition)
Release: v2012.12
Codename: Core edition
I was just trying to do the same thing and got the same error. Looks like the 3.8.13 kernel doesn't support suspend/sleep mode. In the link below they mention only 3.12 or higher supports that feature. (Note if you upgrade beyond 3.8.13 all the capemgr stuff works completely differently than on 3.8.13. I tried 3.18.1 and couldn't get any capes to work.)
Bug report for sleep mode

How install ruby with rbenv install 1.9.3-p448 ubuntu 12.04 vagrant box?

can anybody help me how install ruby with rbenv install 1.9.3-p448 ubuntu 12.04 vagrant box
can not install it
error
Using username "vagrant".
Authenticating with public key "imported-openssh-key"
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)
* Documentation: https://help.ubuntu.com/
System information as of Thu Jul 18 03:52:48 MSK 2013
System load: 0.19 Processes: 65
Usage of /: 15.8% of 7.28GB Users logged in: 0
Memory usage: 30% IP address for eth0: 10.0.2.15
Swap usage: 0%
Graph this data and manage this system at https://landscape.canonical.com/
Last login: Thu Jul 18 03:45:19 2013 from 10.0.2.2
__rvm_add_to_path: command not found
vagrant#precise32:~$ rbenv install 1.9.3-p448
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /home/vagrant/.rbenv/versions/1.9.3-p448
Downloading ruby-1.9.3-p448.tar.gz...
-> http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.gz
BUILD FAILED
Inspect or clean up the working tree at /tmp/ruby-build.20130718035311.2292
Results logged to /tmp/ruby-build.20130718035311.2292.log
Last 10 log lines:
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/tmp/ruby-build.20130718035311.2292/yaml-0.1.4/win32'
make[1]: Leaving directory `/tmp/ruby-build.20130718035311.2292/yaml-0.1.4/win32'
/tmp/ruby-build.20130718035311.2292 ~
~
/tmp/ruby-build.20130718035311.2292 ~
checksum mismatch: ruby-1.9.3-p448.tar.gz (file is corrupt)
expected a893cff26bcf351b8975ebf2a63b1023, got fb82dd8806913041373242de9b2212ee
vagrant#precise32:~$
Download the ruby using your browser from ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2 and place it in ~/.rbenv/caches/ruby-1.9.3-p448.tar.bz2, then run rbenv install 1.9.3-p448
Explanation here

Resources