Witko / nvidia-xrun

Utility to run separate X with discrete nvidia graphics with full performance
GNU General Public License v2.0
488 stars 69 forks source link

Failed to load module nvidia #106

Open borna-x86 opened 5 years ago

borna-x86 commented 5 years ago

This may be inappropriate here, however, nvidia-xrun won't work because the nvidia module can't be loaded, according to Xorg.1.log

I have Ubuntu 19.04 and the nvidia-driver-418 package. I modified the ModulePaths and the Screen section, here is the nvidia-xorg.conf file.


Section "Files"
  ModulePath "/usr/lib/nvidia"
  ModulePath "/usr/lib32/nvidia"
  ModulePath "/usr/lib32/nvidia/xorg/modules"
  ModulePath "/usr/lib32/xorg/modules"
  ModulePath "/usr/lib64/nvidia/xorg/modules"
  ModulePath "/usr/lib64/nvidia/xorg"
  ModulePath "/usr/lib64/xorg/modules"
  ModulePath "/usr/lib/xorg/modules"
  ModulePath "/usr/lib/nvidia/xorg/modules"
  ModulePath "/usr/lib/nvidia/xorg"

EndSection

Section "ServerLayout"
  Identifier "layout"
  Screen 1 "nvidia"
  Inactive "intel"
EndSection

Section "Device"
  Identifier "nvidia"
  Driver "nvidia"
  BusID "PCI:1:0:0"
EndSection

Section "Screen"
  Identifier "nvidia"
  Device "nvidia"
#  Option "AllowEmptyInitialConfiguration" "Yes"
#  Option "UseDisplayDevice" "none"
EndSection

Section "Device"
  Identifier "intel"
  Driver "modesetting"
  Option "AccelMethod" "none"
EndSection

Section "Screen"
  Identifier "intel"  
  Device "intel"
EndSection

Here is the Xorg log:

[    82.153] 
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
[    82.153] Build Operating System: Linux 4.4.0-143-generic x86_64 Ubuntu
[    82.153] Current Operating System: Linux borna-pc 5.0.0-13-generic #14-Ubuntu SMP Mon Apr 15 14:59:14 UTC 2019 x86_64
[    82.153] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.0.0-13-generic root=UUID=cf06857b-3bb6-45e8-a36b-2ce6278512b0 ro quiet splash vt.handoff=1
[    82.154] Build Date: 03 April 2019  09:03:57AM
[    82.154] xorg-server 2:1.20.4-1ubuntu3 (For technical support please see http://www.ubuntu.com/support) 
[    82.154] Current version of pixman: 0.36.0
[    82.154]    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    82.154] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    82.155] (==) Log file: "/home/borna/.local/share/xorg/Xorg.1.log", Time: Sat Apr 27 23:53:09 2019
[    82.155] (++) Using config file: "/etc/X11/nvidia-xorg.conf"
[    82.156] (++) Using config directory: "/etc/X11/nvidia-xorg.conf.d"
[    82.156] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[    82.157] (==) ServerLayout "layout"
[    82.157] (**) |-->Screen "nvidia" (1)
[    82.157] (**) |   |-->Monitor "<default monitor>"
[    82.158] (**) |   |-->Device "nvidia"
[    82.158] (==) No monitor specified for screen "nvidia".
    Using a default monitor configuration.
[    82.158] (**) |-->Inactive Device "intel"
[    82.158] (==) Automatically adding devices
[    82.158] (==) Automatically enabling devices
[    82.158] (==) Automatically adding GPU devices
[    82.158] (==) Automatically binding GPU devices
[    82.158] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    82.158] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[    82.158]    Entry deleted from font path.
[    82.158] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[    82.158]    Entry deleted from font path.
[    82.158] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[    82.158]    Entry deleted from font path.
[    82.158] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[    82.158]    Entry deleted from font path.
[    82.158] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[    82.158]    Entry deleted from font path.
[    82.158] (==) FontPath set to:
    /usr/share/fonts/X11/misc,
    /usr/share/fonts/X11/Type1,
    built-ins
[    82.158] (**) ModulePath set to "/usr/lib/nvidia,/usr/lib32/nvidia,/usr/lib32/nvidia/xorg/modules,/usr/lib32/xorg/modules,/usr/lib64/nvidia/xorg/modules,/usr/lib64/nvidia/xorg,/usr/lib64/xorg/modules,/usr/lib/xorg/modules,/usr/lib/nvidia/xorg/modules,/usr/lib/nvidia/xorg"
[    82.158] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    82.158] (II) Loader magic: 0x56359d01a020
[    82.158] (II) Module ABI versions:
[    82.158]    X.Org ANSI C Emulation: 0.4
[    82.158]    X.Org Video Driver: 24.0
[    82.158]    X.Org XInput driver : 24.1
[    82.158]    X.Org Server Extension : 10.0
[    82.160] (++) using VT number 3

[    82.160] (--) controlling tty is VT number 3, auto-enabling KeepTty
[    82.167] (II) systemd-logind: took control of session /org/freedesktop/login1/session/_33
[    82.169] (II) xfree86: Adding drm device (/dev/dri/card0)
[    82.170] (II) systemd-logind: got fd for /dev/dri/card0 226:0 fd 11 paused 0
[    82.173] (--) PCI:*(0@0:2:0) 8086:5917:1d72:1701 rev 7, Mem @ 0xb2000000/16777216, 0xc0000000/268435456, I/O @ 0x00004000/64, BIOS @ 0x????????/131072
[    82.173] (--) PCI: (1@0:0:0) 10de:1d12:1d72:1701 rev 161, Mem @ 0xb3000000/16777216, 0xa0000000/268435456, 0xb0000000/33554432, I/O @ 0x00003000/128
[    82.173] (II) LoadModule: "glx"
[    82.174] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[    82.175] (II) Module glx: vendor="X.Org Foundation"
[    82.175]    compiled for 1.20.4, module version = 1.0.0
[    82.175]    ABI class: X.Org Server Extension, version 10.0
[    82.175] (II) LoadModule: "nvidia"
[    82.175] (WW) Warning, couldn't open module nvidia
[    82.175] (EE) Failed to load module "nvidia" (module does not exist, 0)
[    82.175] (II) LoadModule: "modesetting"
[    82.175] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    82.175] (II) Module modesetting: vendor="X.Org Foundation"
[    82.175]    compiled for 1.20.4, module version = 1.20.4
[    82.175]    Module class: X.Org Video Driver
[    82.175]    ABI class: X.Org Video Driver, version 24.0
[    82.175] (==) Matched modesetting as autoconfigured driver 0
[    82.175] (==) Matched fbdev as autoconfigured driver 1
[    82.175] (==) Matched vesa as autoconfigured driver 2
[    82.175] (==) Assigned the driver to the xf86ConfigLayout
[    82.175] (II) LoadModule: "modesetting"
[    82.176] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[    82.176] (II) Module modesetting: vendor="X.Org Foundation"
[    82.176]    compiled for 1.20.4, module version = 1.20.4
[    82.176]    Module class: X.Org Video Driver
[    82.176]    ABI class: X.Org Video Driver, version 24.0
[    82.176] (II) UnloadModule: "modesetting"
[    82.176] (II) Unloading modesetting
[    82.176] (II) Failed to load module "modesetting" (already loaded, 0)
[    82.176] (II) LoadModule: "fbdev"
[    82.176] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[    82.176] (II) Module fbdev: vendor="X.Org Foundation"
[    82.176]    compiled for 1.20.1, module version = 0.5.0
[    82.176]    Module class: X.Org Video Driver
[    82.176]    ABI class: X.Org Video Driver, version 24.0
[    82.176] (II) LoadModule: "vesa"
[    82.176] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[    82.176] (II) Module vesa: vendor="X.Org Foundation"
[    82.176]    compiled for 1.20.4, module version = 2.4.0
[    82.176]    Module class: X.Org Video Driver
[    82.176]    ABI class: X.Org Video Driver, version 24.0
[    82.176] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[    82.176] (II) FBDEV: driver for framebuffer: fbdev
[    82.176] (II) VESA: driver for VESA chipsets: vesa
[    82.176] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
[    82.176] (WW) Falling back to old probe method for modesetting
[    82.176] (II) modeset(1): using default device
[    82.176] (II) modeset(1): using default device
[    82.176] (WW) Falling back to old probe method for fbdev
[    82.176] (II) Loading sub module "fbdevhw"
[    82.176] (II) LoadModule: "fbdevhw"
[    82.177] (II) Loading /usr/lib/xorg/modules/libfbdevhw.so
[    82.177] (II) Module fbdevhw: vendor="X.Org Foundation"
[    82.177]    compiled for 1.20.4, module version = 0.0.2
[    82.177]    ABI class: X.Org Video Driver, version 24.0
[    82.177] (EE) open /dev/fb0: Permission denied
[    82.177] (II) modeset(G0): using drv /dev/dri/card0
[    82.177] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    82.177] (EE) Screen 0 deleted because of no matching config section.
[    82.177] (II) UnloadModule: "modesetting"
[    82.177] (EE) 
Fatal server error:
[    82.177] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[    82.177] (EE) 
[    82.177] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[    82.177] (EE) Please also check the log file at "/home/borna/.local/share/xorg/Xorg.1.log" for additional information.
[    82.177] (EE) 
[    82.197] (EE) Server terminated with error (1). Closing log file.

I think the issue is here:

[    82.175] (II) LoadModule: "nvidia"
[    82.175] (WW) Warning, couldn't open module nvidia
[    82.175] (EE) Failed to load module "nvidia" (module does not exist, 0)

I have the latest driver installed, however /usr/lib/xorg/modules/drivers/does not contain nvidia_drv.so

I am at a complete loss and any help and directions is appreciated.

michelesr commented 5 years ago

Can you load the module manually using modprobe nvidia? If you can't, the driver is not installed properly or might be incompatible with your kernel and or device.

borna-x86 commented 5 years ago

i can load the module manually - modprobe nvidia returns nothing

the result is the same regardless

michelesr commented 5 years ago

I'm not sure I understand, sorry. Does the module load successfully with modprobe or not. If not, what do you get in the dmesg log?

leo-petrucci commented 5 years ago

I'm not sure I understand, sorry. Does the module load successfully with modprobe or not. If not, what do you get in the dmesg log?

I'm having the same error with the same driver version on 19.04 and my modprobe returns

sudo modprobe nvidia
modprobe: ERROR: ../libkmod/libkmod-module.c:832 kmod_module_insert_module() could not find module by name='off'
modprobe: ERROR: could not insert 'off': Unknown symbol in module, or unknown parameter (see dmesg)

No idea what this could mean. I also just purged nvidia from my system and reinstalled to be sure I'd start fresh.

Tomboyo commented 5 years ago

@creativiii I just had the same issue - sudo prime-select nvidia seemed to be the prerequisite step I was missing.

leo-petrucci commented 5 years ago

@Tomboyo Doesn't prime-select globally activate the nvidia card?

Surely that defeats the purpose of having this script? Unless I'm misunderstanding what xrun is for.

I thought this was used to start programs using Nvidia graphics without having to activate it globally.

Tomboyo commented 5 years ago

That's probably the case, I'm not too terribly sure I know what I'm doing and should likely be ignored. :P

On Sat, Jun 15, 2019, 4:25 AM creativiii notifications@github.com wrote:

@Tomboyo https://github.com/Tomboyo Doesn't prime-select globally activate the nvidia card?

Surely that defeats the purpose of having this script? Unless I'm misunderstanding what xrun is for.

I thought this was used to start programs using Nvidia graphics without having to activate it globally.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Witko/nvidia-xrun/issues/106?email_source=notifications&email_token=AA2OQ6LXF2YMF5MEWUTN2YTP2SRRLA5CNFSM4HI5FBQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXYTF5A#issuecomment-502346484, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2OQ6MSN55Z5UAYCY2FBC3P2SRRLANCNFSM4HI5FBQA .

ghost commented 5 years ago

Seems that you have set an alias for "nvidia" as "off" to prevent it from being loaded. Check your .profile or .bashrc .