You are not logged in.

#1 2015-07-14 13:11:36

bufferunderflow
Member
Registered: 2015-04-20
Posts: 5

nvidia driver not loaded after laptop went to sleep

Hey dear all,

I run a lenovo z50 w a nvidia 840. Optirun and co run fine... until I close the laptop and send it to sleep mode.
When I open the laptop and the os comes alive again the nvidia kernel modul is gone: lsmod | grep nvidia => nothing

modprobe -vv nvidia: 
modprobe: INFO: custom logging function 0x40a190 registered
insmod /lib/modules/4.0.7-2-ARCH/extramodules/nvidia.ko.gz NVreg_DeviceFileUID=0 NVreg_DeviceFileGID=1002 NVreg_DeviceFileMode=0660 
modprobe: INFO: Failed to insert module '/lib/modules/4.0.7-2-ARCH/extramodules/nvidia.ko.gz': No such device
modprobe: ERROR: could not insert 'nvidia': No such device
modprobe: INFO: context 0xc2e1e0 released

I can reproduce this error and am a bit buffled about what is the cause.

Optirun also returns errors

 
% optirun -v bash 
[ 2810.843304] [INFO]Response: No - error: Could not enable discrete graphics card

[ 2810.843335] [ERROR]Cannot access secondary GPU - error: Could not enable discrete graphics card

[ 2810.843352] [ERROR]Aborting because fallback start is disabled.

Primusrun yields:

primus: fatal: Bumblebee daemon reported: error: Could not enable discrete graphics card
lspci -v gives:

03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 840M] (rev ff) (prog-if ff)
	!!! Unknown header type 7f
	Kernel modules: nouveau, nvidia

As stated: A reboot fixes this error. But I wish I did not have to reboot everytime I want to use the nvidia card...

Thanks!
Peter

PS:
I found an old threat suggesting to remove xf86-video-nouveau
trying that now...
PPS:
Nope...

Last edited by bufferunderflow (2015-07-14 13:18:57)

Offline

#2 2015-08-17 23:21:31

pando85
Member
Registered: 2015-08-17
Posts: 1

Re: nvidia driver not loaded after laptop went to sleep

Same problem here, Lenovo z50 nvidia 840 and kernel 4.1.5-1-MANJARO

Offline

#3 2016-11-28 19:06:44

pompei2
Member
Registered: 2015-01-07
Posts: 5

Re: nvidia driver not loaded after laptop went to sleep

Sorry for bumping an old thread, but this perfectly describes my problem. Only started happening recently on a Dell XPS 15. Anyone have any ideas?

GPU: NVIDIA Corporation GM107M [GeForce GTX 960M]
nvidia drivers 375.20-3
kernel 4.8.10-1-ARCH

another possibly interesting fact is that the command "nvidia-smi" errors out with

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

Offline

#4 2016-11-28 19:51:31

pompei2
Member
Registered: 2015-01-07
Posts: 5

Re: nvidia driver not loaded after laptop went to sleep

some more info:

$ sudo modprobe -vv nvidia
modprobe: INFO: custom logging function 0x40a1e0 registered
insmod /lib/modules/4.8.10-1-ARCH/extramodules/nvidia.ko.gz 
modprobe: INFO: Failed to insert module '/lib/modules/4.8.10-1-ARCH/extramodules/nvidia.ko.gz': No such device
modprobe: ERROR: could not insert 'nvidia': No such device
modprobe: INFO: context 0x1e851e0 released

And then this appears in dmesg output:

[ 5202.462590] NVRM: This is a 64-bit BAR mapped above 4GB by the system
               NVRM: BIOS or the Linux kernel, but the PCI bridge
               NVRM: immediately upstream of this GPU does not define
               NVRM: a matching prefetchable memory window.
[ 5202.462593] NVRM: This may be due to a known Linux kernel bug.  Please
               NVRM: see the README section on 64-bit BARs for additional
               NVRM: information.
[ 5202.462603] nvidia: probe of 0000:01:00.0 failed with error -1
[ 5202.462672] nvidia-nvlink: Nvlink Core is being initialized, major device number 241
[ 5202.462718] NVRM: The NVIDIA probe routine failed for 1 device(s).
[ 5202.462720] NVRM: None of the NVIDIA graphics adapters were initialized!
[ 5202.462723] nvidia-nvlink: Unregistered the Nvlink Core, major device number 241

The README file of my nvidia driver has the following to say about 64-bit BARs:

64-Bit BARs (Base Address Registers)                                                                                                                                                                                                                     

    NVIDIA GPUs advertise a 64-bit BAR capability (a Base Address Register
    stores the location of a PCI I/O region, such as registers or a frame
    buffer). This means that the GPU's PCI I/O regions (registers and frame
    buffer) can be placed above the 32-bit address space (the first 4
    gigabytes of memory).

    The decision of where the BAR is placed is made by the system BIOS at boot
    time. If the BIOS supports 64-bit BARs, then the NVIDIA PCI I/O regions
    may be placed above the 32-bit address space. If the BIOS does not support
    this feature, then our PCI I/O regions will be placed within the 32-bit
    address space as they have always been.

    Unfortunately, some Linux kernels (such as 2.6.11.x) do not understand or
    support 64-bit BARs. If the BIOS does place any NVIDIA PCI I/O regions
    above the 32-bit address space, such kernels will reject the BAR and the
    NVIDIA driver will not work.

    The only known workaround is to upgrade to a newer kernel.

That's unfortunate because my kernel is way newer than 2.6.11.x.

A little

primusrun glxinfo | grep "OpenGL renderer"

adds the following to dmesg:

[ 5506.913915] bbswitch: enabling discrete graphics
[ 5506.913933] pci 0000:01:00.0: Refused to change power state, currently in D3

Anyone have any further ideas for investigation?

Offline

Board footer

Powered by FluxBB