Problems with installing nvidia 340xx

Please, could you help me. I’m absolute newbie. I came into Linux due to its support for older machines to get my Asus UL80VT G210M working. I can’t upgrade it, nor throw it away. And I need working descrete card. No other distro users seemed to be able to launch nvidia340 or cared trying, not to mention Manjaro’s great community.
I installed Manjaro GNOME 21.2rc1, disabled Wayland to get past black screen, installed 5.4 kernel and removed 5.15. Then I followed these instructions:

and got white screen with an error.
Then I tried sudo nvidia-xconfig and was able to get into the text mode. My /etc/modprobe.d/ was empty and /etc/modules-load.d/ did not contain nvidia.conf. So i created them manually and also added the said commands to the modules.cong in /etc/modprobe.d/ with no visible effect.
Then i found a thread and added Option “IgnoreABI” to Section “ServerFlags” to generated xorg.conf and my keyboard or a text mode stopped working.

Hello @lotussuitekoln and welcome :wink:

I moved your post to a new topic, since your request was not related to the How-To content itself, but rather a support request.

Please share also your xorg.log, which should show what is going wrong.

Here a simple script which collects almost everything what could be needed (maybe more newbie friendly this way):

curl -s "" | sh

It is very big. Please upload it like that and share the link here:

curl -s | sh -s -- upload

Wow! I didn’t expect someone would address my question that fast :slightly_smiling_face: Thank you!

With every attempt I do clean reinstall. This time I installed kernel 5.10, followed the instructions and generated xorg.conf. Didn’t reboot so I could stay in a graphical mode.

Log contents:


You a have Hybrid-GPU and currently you use the open source drivers for both:

  Device-1: Intel Mobile 4 Series Integrated Graphics vendor: ASUSTeK
    driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:2a42 class-ID: 0300
  Device-2: NVIDIA GT218M [GeForce G210M] vendor: ASUSTeK driver: nouveau
    v: kernel alternate: nvidia bus-ID: 01:00.0 chip-ID: 10de:0a74
    class-ID: 0300

So, actually, both are working. The iGPU Intel is there as Main and the dGPU as Sink.

Both are working KMS:

[    40.950] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    40.950] (II) modeset(0): using drv /dev/dri/card0
[    40.951] (II) modeset(G0): using drv /dev/dri/card1

GLX should be switchable with:

glxinfo | grep "OpenGL renderer"
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

If your really need this driver then…

  1. install the driver again like described…
  2. Add the config to blacklist the nouveau driver for the nvidia card:

File: /etc/modprobe.d/blacklist.conf

blacklist nouveau
blacklist ttm
blacklist drm_kms_helper
blacklist drm

One line command:

sudo echo -e "blacklist nouveau\nblacklist ttm\nblacklist drm_kms_helper\nblacklist drm" > /etc/modprobe.d/blacklist.conf
  1. Add the config to load the nvidia driver:

File: /etc/modules-load.d/nvidia.conf


One line command:

sudo echo -e "nvidia\nnvidia-drm" > /etc/modules-load.d/nvida.conf
  1. Reboot now. It should load the driver on the next boot.
    :warning: Before rebooting, keep sure there is no xorg config set for nvidia like this here:
sudo rm -f /etc/X11/xorg.conf

It would try to load the nvidia driver, but could possibly crash.

  1. So now the driver should be loaded. You should see now nvidia as driver instead of nouveau in inxi. Check it with:
inxi -Gazy
  1. I am not sure, but I guess 340xx also should be able to offload GLX to the nvidia gpu with:
glxinfo | grep "OpenGL renderer"
prime-run glxinfo | grep "OpenGL renderer"

(install it, if not done: pamac install nvidia-prime mesa-utils )

:notebook: To enable the GPU output for a second screen, a special xorg config is needed for the nvidia driver. But don’t know what you expect. So GPU offloading should be working this way, without a xorg config.

1 Like

Well, I groundlessly beleived this driver would help me run certain applications. I’m in a text mode again. Probably I should give up on nvidia after days of trying. Thank you for your help.

Did you remove the xorg.conf ?

Also: Stay on Kernel 5.4 for this driver… but possibly the nvidia driver does not support the X-Server at this Version. Idk :man_shrugging: Thats the reason, why I said to skip the xorg.conf of nvidia and stay with the intel opensource driver as main. So no xorg configs.

You will need the Ignore ABI trick for this old unsupported driver because of xorg update.

Section "ServerFlags"
  Option "IgnoreABI" "1"
1 Like

I removed /etc/X11/xorg.conf
but where to should I add these lines

to /etc/X11/mhwd.d/nvidia.conf ?
If there is no such file should I create it?
Should it be the only contents of this file?
Should the value be “1” or “true”?

Sorry for that many questions.

Try to create /etc/X11/xorg.conf.d/30-nvidia-ignoreabi.conf

Failed to start GNOME.
No luck so far.

Just a silly question, Have you uninstalled nouveau before installing nvidia driver or rebooting ??

Hello. No, how do I do that?

You could try with mhwd

 mhwd -li -d  # to list basic information of all the drivers currently installed on your system

sudo mhwd -r [pci or usb] [name of driver]  # to remove an installed driver

Example sudo mhwd -r pci video-nvidia to remove nvidia driver.

Or if its not problem to you, you could reinstall the system and we can start from beginning. I found an old tutorial that might help you, not sure though :man_shrugging:

1 Like

I have my GT9400 working with nvidia-340xx-dkms. Here my inxi:

~ >>> inxi -Fz                                                                 
  Kernel: 5.10.84-1-MANJARO x86_64 bits: 64 Desktop: MATE 1.26.0
    Distro: Manjaro Linux
  Type: Laptop System: Apple product: MacBookPro5,4 v: 1.0
    serial: <superuser required>
  Mobo: Apple model: Mac-F22587A1 v: MacBookPro5,4
    serial: <superuser required> UEFI: Apple v: MBP53.88Z.00AC.B03.0906151647
    date: 06/15/09
  ID-1: BAT0 charge: 78.1 Wh (99.9%) condition: 78.2/77.8 Wh (100.5%)
  Info: dual core model: Intel Core2 Duo P8700 bits: 64 type: MCP cache:
    L2: 3 MiB
  Speed (MHz): avg: 1190 min/max: 798/2527 cores: 1: 1468 2: 913
  Device-1: NVIDIA C79 [GeForce 9400M] driver: nvidia v: 340.108
  Device-2: Apple Built-in iSight type: USB driver: uvcvideo
  Display: x11 server: X.Org driver: loaded: nvidia
    resolution: 1440x900~60Hz
  Message: Unable to show advanced data. Required tool glxinfo missing.
  Device-1: NVIDIA MCP79 High Definition Audio driver: snd_hda_intel
  Sound Server-1: ALSA v: k5.10.84-1-MANJARO running: yes
  Sound Server-2: PipeWire v: 0.3.40 running: yes
  Device-1: NVIDIA MCP79 Ethernet driver: forcedeth
  IF: enp0s10 state: down mac: <filter>
  Device-2: Broadcom BCM4322 802.11a/b/g/n Wireless LAN
    driver: b43-pci-bridge
  IF-ID-1: wlan0 state: up mac: <filter>
  Device-1: Apple Bluetooth Host Controller type: USB driver: btusb
  Report: bt-adapter ID: hci0 rfk-id: 1 state: down
    bt-service: enabled,running rfk-block: hardware: no software: no
    address: <filter>
  Local Storage: total: 111.79 GiB used: 64.66 GiB (57.8%)
  ID-1: /dev/sda vendor: Crucial model: CT120M500SSD3 size: 111.79 GiB
  ID-1: / size: 85.92 GiB used: 64.65 GiB (75.2%) fs: ext4 dev: /dev/sda3
  ID-2: /boot/efi size: 511 MiB used: 3.7 MiB (0.7%) fs: vfat
    dev: /dev/sda1
  ID-1: swap-1 type: partition size: 3.95 GiB used: 0 KiB (0.0%)
    dev: /dev/sda5
  System Temperatures: cpu: 60.0 C mobo: N/A gpu: nvidia temp: 62 C
  Fan Speeds (RPM): N/A
  Processes: 178 Uptime: 1d 8h 47m Memory: 3.59 GiB used: 2.09 GiB (58.2%)
  Shell: Zsh inxi: 3.3.11

To build the driver use pamac GUI. Hit ‘edit build files’ clear the PKGBUILD from the AUR and replace with:

and change line 9 pkgrel=1 to the appropriate version, currently 26.
Whenever there is a big update check if nvidia-340xx-dkms is part of it and do that first, then do the rest (with possible kernel updates) with pamac upgrade -a.

Stay on Kernel 5.4 for this driver

As you can see around line 20 there are patches for 5.7 -5.10, so the 5.10 is probably the only kernel you should try this with (The original PKGBUILD differs by offering patches up to 5.15. As soon as I’m back from hols I’ll try to build the driver using this adapted version of philm’s file; if that works I’ll try installing 5.15, if not don’t laugh, I’m no coder but I like trying things out… :sweat_smile::

# Maintainer: Jerry Xiao <>
# Maintainer: graysky <graysky AT archlinux DOT us>
# Contributor: Giancarlo Razzolini <>
# Contributor: Eric Bélanger <>

pkgdesc="NVIDIA drivers for linux, 340xx legacy branch"
makedepends=("nvidia-340xx-utils=${pkgver}" 'linux>=5.4' 'linux-headers>=5.4')

prepare() {
  sh "${_pkg}.run" --extract-only

  cd "${_pkg}"
  patch -Np1 -i ../0001-kernel-5.7.patch
  patch -Np1 -i ../0002-kernel-5.8.patch
  patch -Np1 -i ../0003-kernel-5.9.patch
  patch -Np1 -i ../0004-kernel-5.10.patch
  patch -Np1 -i ../0005-kernel-5.11.patch   
  patch -Np1 -i ../0006-kernel-5.14.patch
  patch -Np1 -i ../0007-kernel-5.15.patch

  cp -a kernel kernel-dkms

package_nvidia-340xx-dkms() {
    pkgdesc="NVIDIA driver sources for linux, 340xx legacy branch"
    depends=('dkms' "nvidia-340xx-utils=$pkgver" 'libgl' 'linux>=5.4')
    optdepends=('linux-headers: Build the module for Manjaro kernel')

    cd "${_pkg}"

    install -dm 755 "${pkgdir}"/usr/src
    cp -dr --no-preserve='ownership' kernel-dkms "${pkgdir}/usr/src/nvidia-${pkgver}"
    cat "${pkgdir}"/usr/src/nvidia-${pkgver}/uvm/dkms.conf.fragment >> "${pkgdir}"/usr/src/nvidia-${pkgver}/dkms.conf

    echo "blacklist nouveau" |
        install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"

# vim:set ts=2 sw=2 et:

the nvidia driver does not support the X-Server at this Version.

As the inxi shows, the latest x11 server works with the nvidia-340xx-dkms driver.

Yes. Here is mine:

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 340.107  (buildmeister@swio-display-x64-rhel04-13)  Thu May 24 22:29:58 PDT 2018

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"

Section "Files"

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
	Option "NoLogo" "1"

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24

Section "Extensions"
    Option         "Composite" "Enable"

Section "InputClass"
    Identifier          "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option              "XkbOptions" "terminate:ctrl_alt_bksp"

Section "ServerFlags"
     Option "IgnoreABI" "1"

I know your hardware is different but if i can help with more info on this just ask.

I also would like to thank all the people who came up with this solution, you have saved a lot of perfectly working hardware from the ever growing electronics scrap heap (I live in Nairobi, 5km from: dandora dump electronic at DuckDuckGo ).

As an afterthought; I’d recon package maintainers who keep old hardware alive would be eligible for funding through one of the environmental grants that most ‘western’ governments increasingly offer, I wonder if someone has ever tried applying, I’m a photographer and happy to provide high impact images from Dandora dump site for an application.

1 Like

I’ve already reinstalled like dozens of times, so it’s not a problem :grinning:

Thank you.
So I did everything mentioned here

except for compiling packages, which I did as mentioned by you:
I found option to turn on AUR in a pamac manager preferences and to edit pkgbuild.
I built it on a 5.10 kernel.
Then I made some adjustments as was mentioned by @megavolt and you

but again I was only able to run Manjaro in a text mode

Ok, so start from scratch. Reinstall the system with free drivers option.

  1. Make sure you are on kernel 5.4 LTS or 5.10 LTS.
  2. Follow this tutorial.
    On step 1 of the tutorial uninstall the free drivers via mhwd DO NOT REBOOT!
    On step 2 install the nvidia drivers via
 git clone
 git clone
 git clone

 cd nvidia-340xx-utils && makepkg -si
 cd ../lib32-nvidia-340xx-utils && makepkg -si
 cd ../nvidia-340xx-dkms && makepkg -si

Or via pamac AUR if you wish to be on kernel 5.10 LTS.(You mentioned you know how to do that)
3. Follow the rest of the tutorial as it says.
On step 5 where it says For GDM you will do only that, not the others. Since you mentioned you are on GNOME.

If you finished the tutorial you will have this file /etc/X11/xorg.conf.d/optimus.conf
Open the file and add this at the bottom

Section "ServerFlags"
     Option "IgnoreABI" "1"

Now you can reboot… :crossed_fingers: hopefully it will work.

EDIT The tutorial is read and do.

It looks like it is possible to run Nvidia driver 340.108 with kernel 5.16.

Here’s what I did:

  1. Downloaded the Manjaro package nvidia-340xx-utils:
git clone
  1. Created a text file 30-nvidia-ignoreabi.conf in the nvidia-340xx-utils folder:
Section "ServerFlags"
	Option "IgnoreABI" "true"
  1. Patched PKGBUILD:
--- PKGBUILD	2022-01-04 13:27:57.211134866 +0100
+++ PKGBUILD	2022-01-03 19:40:08.142117341 +0100
@@ -10,12 +10,13 @@
-source=('mhwd-nvidia' 'nvidia-drm-outputclass.conf' 'nvidia-utils.sysusers')
+source=('mhwd-nvidia' 'nvidia-drm-outputclass.conf' 'nvidia-utils.sysusers' '30-nvidia-ignoreabi.conf')
-         '3d2894e71d81570bd00bce416d3e547d')
+         '3d2894e71d81570bd00bce416d3e547d'
+         '24f8ffd217e5f6f939f9113ff454c7c5')
@@ -82,6 +83,9 @@
+    # Exceedingly hacky workaround for Xorg 1.21 until Nvidia updates the driver
+    install -D -m644 30-nvidia-ignoreabi.conf "${pkgdir}/etc/X11/xorg.conf.d/30-nvidia-ignoreabi.conf"
     cd "${srcdir}/${_pkg}"
     # X driver
  1. Installed the package:
$ makepkg -si
  1. Then, I downloaded the Manjaro nvidia-340xx package:
git clone
  1. Next, I downloaded the kernel patches from AUR:
cd nvidia-340xx
wget -O 0001-kernel-5.7.patch
wget -O 0002-kernel-5.8.patch
wget -O 0003-kernel-5.9.patch
wget -O 0004-kernel-5.10.patch
wget -O 0005-kernel-5.11.patch
wget -O 0006-kernel-5.14.patch
wget -O 0007-kernel-5.15.patch
  1. The 0007-kernel-5.15.patch from the AUR package might throw an error due to incorrect (DOS) linebreaks used.
    To rectify, use the following command:
sed -i.bak 's/\r$//' 0007-kernel-5.15.patch 
  1. Edit PKGBUILD for the Manjaro nvidia-340xx package to look like this (the corrected patch is already considered):
# Based on the file created for Arch Linux by:
# Maintainer : Thomas Baechler <>

# Maintainer: Philip Müller <>
# Maintainer: Roland Singer <>

pkgdesc="NVIDIA drivers for linux."
arch=('i686' 'x86_64')
conflicts=('nvidia-96xx' 'nvidia-183xx' "$_linuxprefix-nvidia" "$_linuxprefix-nvidia-304xx")
options=(!strip !ccache)

[[ "$CARCH" = "i686" ]] && _pkg="NVIDIA-Linux-x86-${pkgver}"
[[ "$CARCH" = "x86_64" ]] && _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"

prepare() {
    # Remove previous builds
    [ -d "$_pkg" ] && rm -rf "$_pkg"
    sh "${_pkg}.run" --extract-only
    cd "${_pkg}"
    # patches here

    # Fix compile problem with 5.7
    echo "Patching for 5.7"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0001-kernel-5.7.patch)

    # Fix compile problem with 5.8
    echo "Patching for 5.8"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0002-kernel-5.8.patch)

    # Fix compile problem with 5.9
    echo "Patching for 5.9"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0003-kernel-5.9.patch)

    # Fix compile problem with 5.10
    echo "Patching for 5.10"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0004-kernel-5.10.patch)

    # Fix compile problem with 5.11
    echo "Patching for 5.11"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0005-kernel-5.11.patch)

    # Fix compile problem with 5.14
    echo "Patching for 5.14"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0006-kernel-5.14.patch)

    # Fix compile problem with 5.15
    echo "Patching for 5.15"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0007-kernel-5.15.patch)

    # Fix compile problem with 5.16
    echo "Patching for 5.16"
    (patch -p1 --no-backup-if-mismatch -i "$srcdir"/0008-kernel-5.16.patch)

    export DISTCC_DISABLE=1
    export CCACHE_DISABLE=1

build() {
    _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"

    cd "${_pkg}"/kernel
    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module

    cd uvm
    make SYSSRC=/usr/lib/modules/"${_kernver}/build" module

package() {
    install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
    install -D -m644 "${srcdir}/${_pkg}/kernel/uvm/nvidia-uvm.ko" \
    gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
    sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
  1. Now, in the nvidia-340xx folder, execute
$ makepkg -si

a last time, and afterwards, reboot.
10. You are done - running the 340.108 legacy Nvidia driver on kernel 5.16!