Issue installing Nvidia 540M GPU driver on KLV (Revised)

Kennel Linux Void-based


Moderator: Forum moderators

Post Reply
User avatar
AlexOceanic
Posts: 41
Joined: Mon Feb 27, 2023 9:58 am
Has thanked: 16 times
Been thanked: 2 times

Issue installing Nvidia 540M GPU driver on KLV (Revised)

Post by AlexOceanic »

Hi All

Can anyone see any obvious blunders in the below attempt to install my Nvidia 540M driver in KLV RC12 please?

Happy to post this in Void or Arch forums if more appropriate :thumbup2:

These are the steps I've taken so far just in case anyone has any initial thoughts or could point me to anyone else who might have done this previously with a legacy Nvidia driver.

I've added some notes below this post to help beginners too.

Steps taken:

- Created a new Ventoy KLV USB for testing
- Successfully ran:
xbps-install nv-codec-headers-11.1.5.1_1 -Su (some ffmpeg header dependency I think)
xbps-install nvidia390-opencl-390.157_2 -Su
xbps-install nvidia390-390.157_2 -Su (which appeared to install the remaining Nvidia390 specific drivers listed in the screenshot below)
(Considering trying the Bumblebee package given I have the Optimus type of GPU on this laptop.)

Screenshot_2023-03-04_20-38-08.png
Screenshot_2023-03-04_20-38-08.png (191.85 KiB) Viewed 713 times

I think its getting close to installed though where nvidia-smi and lspci -k appear to give a positive output (below) where the nouveau entry is now updated to nvidia:

"root# nvidia-smi
Sun Mar 5 18:51:56 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 390.157 Driver Version: 390.157 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 540M Off | 00000000:01:00.0 N/A | N/A |
| N/A 53C P0 N/A / N/A | 0MiB / 964MiB | N/A Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 Not Supported |
+-----------------------------------------------------------------------------+
root# lspci -k
03:00.0 Class 0c03: 1033:0194 xhci_hcd
00:1f.2 Class 0106: 8086:1c03 ahci
00:1c.0 Class 0604: 8086:1c10 pcieport
09:00.0 Class 0200: 197b:0250 jme
00:1f.0 Class 0601: 8086:1c49 lpc_ich
00:01.0 Class 0604: 8086:0101 pcieport
08:00.0 Class 0280: 10ec:8176 rtl8192ce
00:16.0 Class 0780: 8086:1c3a mei_me
01:00.0 Class 0300: 10de:0df4 nvidia
00:1b.0 Class 0403: 8086:1c20 snd_hda_intel
00:1c.3 Class 0604: 8086:1c16 pcieport
09:00.3 Class 0880: 197b:2393 jmb38x_ms
00:1f.3 Class 0c05: 8086:1c22 i801_smbus
00:00.0 Class 0600: 8086:0104
00:1c.1 Class 0604: 8086:1c12 pcieport
09:00.1 Class 0880: 197b:2392 sdhci-pci
00:1a.0 Class 0c03: 8086:1c2d ehci-pci
00:1d.0 Class 0c03: 8086:1c26 ehci-pci
01:00.1 Class 0403: 10de:0bea snd_hda_intel
00:02.0 Class 0300: 8086:0116 i915
00:1c.2 Class 0604: 8086:1c14 pcieport
09:00.2 Class 0805: 197b:2391

root# nvidia-settings
ERROR: Error querying enabled displays on GPU 0 (Missing Extension).
ERROR: Error querying connected displays on GPU 0 (Missing Extension).
ERROR: nvidia-settings could not find the registry key file. This file should
have been installed along with this driver at
/usr/share/nvidia/nvidia-application-profiles-key-documentation. The
application profiles will continue to work, but values cannot be
prepopulated or validated, and will not be listed in the help text.
Please see the README for possible values and descriptions."

Note that /usr/share/nvidia/nvidia-application-profiles-key-documentation did actually exist alongside the expected "nvidia-application-profiles-390.157-rc" config file (containing lots of official Nvidia bug fixes by the look of it) but I didn't see a specific driver file unless it meant the .157-rc file and the application can't see it or wasn't instructed where it is during install?

The Nvidia X Server Settings can be launched from the OS application searcher but it gives an error window upon launching stating:

"You do not appear to be using the Nvidia X Driver. Please edit your X configuration file (just (DO NOT UNLESS YOU'RE SURE) run "nvidia-xconfig" as root) and restart your X Server."

I say "DO NOT UNLESS YOU'RE SURE" because each time I did that it caused KLV and the X Server (no screens found) to crash with all sorts of error messages and required a fresh KLV/Ventoy USB each time whereas, when I did not it seems to have left most of the drivers and kernel 6.1.14_1 installed and might just need some configuration or minor dependencies.
I can see the Xorg log and config files if they'd help?

Once you close the error window the application appears to function normally other than saying it was missing some default paths to some config files that it needs in root which I managed to create by making and saving a profile there (/root/.nv/nvidia-application-profiles-rc).
It's strange as the system indicates that the driver is installed as far as I can see.

Blender installs but fails to start now.

I as thinking of trying this Nvidia installer but guessing I'll need to remove the current nvidia drivers which seems to be mostly installed:
https://www.nvidia.com/download/driverR ... 213/en-us/
or try the "Install Local Package" feature of OctoXBPS to install the official drivers from NVidia perhaps.
Would you have any preference over using "xbps-remove" and/or "erase" to remove all nvidia packages and reverse any config changes?

Have also found a void packages repository online containing the Nvidia390 packages but think I need to compile these before installing - not sure I want to complicate matters further at this stage or if it is likely to improve any of the issues seen so far..

https://github.com/void-linux/void-pack ... *nvidia390*

Any thoughts welcome.

Many thanks

Alex

Beginners tips and learning along the way:

A quick word of warning to other beginners that if you run "sudo xbps-install void-nonfree" then you might struggle to restore the original directory it searches for packages in - even when using commands such as the following in my experience (a fresh install resolves this if need be):

sudo xbps-remove void-nonfree -R
sudo xbps-install Su" (to update the packages)
sudo xbps-remove -o
sudo xbps-remove -O (flush cache)

Other than that - you might find this XBPS beginners video handy:

https://www.youtube.com/watch?v=fwUYMoXyRvI

Another quick tip for beginners who find themselves booted into an OS where the desktop doesn't load but you can open a Terminal is "touch testfile.txt" and then "xdg-open test.txt" so you can save any error text etc in the Terminal to another USB with "Save as" - plus you'll probably find you can open Thunar from "my applications" in root to eject the USB etc.

Oh and a final learning that if you have access to a cls of some kind like Grub then you can use "Halt" to actually shut down the pc and allow you to remove a USB and reboot from HDD (my Ventoy local boot isn't working currently so its handy) without changing your BIOS boot order etc.

Attachments
Screenshot_2023-03-04_20-57-46.png
Screenshot_2023-03-04_20-57-46.png (75.95 KiB) Viewed 710 times
Last edited by AlexOceanic on Tue Mar 07, 2023 5:50 pm, edited 1 time in total.

A lie is always a lie and the truth is always the truth,
No matter who says it...

User avatar
AlexOceanic
Posts: 41
Joined: Mon Feb 27, 2023 9:58 am
Has thanked: 16 times
Been thanked: 2 times

Re: (Revised) Issue installing Nvidia 540M GPU driver on KLV

Post by AlexOceanic »

These guides might be helpful to some users:

A hack to run Optimus with nvidia-xrun on Void based systems:
https://ubh.sh/posts/optimus-void/

Bumblebee method:
https://github.com/Bumblebee-Project/Bumblebee/wiki/

Ironhide method (Ubuntu only branch from original creator of Bumblebee):
https://github.com/MrMEEE/ironhide

Four methods to run Optimus on Arch/Ubuntu based systems:
https://www.reddit.com/r/linux_gaming/c ... a_optimus/

A lie is always a lie and the truth is always the truth,
No matter who says it...

Post Reply

Return to “KLV-Airedale”