NVIDIA GeForce 320M: No devices connected / No screens found

yha

New Member

Reaction score: 1
Messages: 18

Hello,

I have recently installed 13.0-RELEASE on my old A1342 Mid-2010 MacBook. The machine has a GeForce 320M discrete graphics card, with no integrated graphics as far as I can tell, so it is not an Optimus/multi-GPU setup. The 320M uses shared memory.

As per the documentation, this card is supported by version 340 of the nvidia-driver port/package. I have added the relevant bits to rc.conf so that the nvidia/linux kernel modules are loaded. This is verified with kldstat (nvidia.ko, linux_common.ko, linux.ko, and linux64.ko are all loaded).

My user is added to both the wheel and video groups. If I `startx` as a regular user, I get "Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices". Same thing if I do it as root.

Next I I created driver-nvidia.conf in /usr/local/etc/X11/xorg.conf.d/ with the following config:

Code:
Section "Device"
    Identifier "NVIDIA Card"
    VendorName "NVIDIA Corporation"
    Driver "nvidia"
    BusID "PCI:0:2:0:0"
EndSection

The BusID is taken from `pciconf -lvv`:

Code:
vgapci0@pci0:2:0:0:     class=0x030000 ............
    vendor     = 'NVIDIA Corporation'
    device     = 'MCP89 [GeForce 320M]'
    class      = display
    subclass   = VGA

Running `startx` now gives me "no screens found(EE)". Looking at Xorg.0.log, all messages are informational except the last few lines:

Code:
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(--) Using syscons driver with X support (version 2.0)
(--) using VT number 9

(EE) No devices detected.
(EE)
Fatal server error:
(EE) no screens found(EE)
Please consult the X.Org Foundation support at http://wiki.x.org
for help.
...

Running as root (to rule out a permissions issue) gives the same results.

I figured it may be an issue with the binary package, so I installed x11/nvidia-driver-340 from ports so that it is compiled against my kernel. Same results, no go.

Next, I installed nvidia-xconfig and generated xorg.conf, copied the generated file to /usr/local/etc/X11/xorg.conf. Now every time I run `startx`, the machine immediately reboots (as either root or a regular user).

Has anyone else gotten the nvidia driver to work on their laptop with a 320M card? If not, what is my best option? xf86-video-nv? scfb?
 
Last edited:

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,618
Messages: 37,958

The config isn't correct. The busID is wrong, just remove it. You really only need this:
Code:
Section "Device"
  Identifier "Card0"
  Driver     "nvidia"
EndSection
Has anyone else gotten the nvidia driver to work on their laptop with a 320M card?
Not a laptop but a Zotac small form factor PC with a GT 520M and need to use the 390 version. As far as I know there are known issues with the 304 version (it definitely fails with a recent Xorg version). Not entirely sure about the 340 version.
 
OP
Y

yha

New Member

Reaction score: 1
Messages: 18

Thanks for the suggestion, but the machine still reboots immediately after `startx` (with or without nvidia-xconfig's xorg.conf).
 

Menelkir

Active Member

Reaction score: 193
Messages: 183

The config isn't correct. The busID is wrong, just remove it. You really only need this:
Code:
Section "Device"
  Identifier "Card0"
  Driver     "nvidia"
EndSection

Not a laptop but a Zotac small form factor PC with a GT 520M and need to use the 390 version. As far as I know there are known issues with the 304 version (it definitely fails with a recent Xorg version). Not entirely sure about the 340 version.
390 works fine with modern Xorg for me:
vendor = 'NVIDIA Corporation'
device = 'GT215M [GeForce GTS 360M]'
 

scottro

Daemon

Reaction score: 836
Messages: 1,975

I have sometimes, not always (and with different Nvidia cards than mentioned) had to use the nvidia-xconfig package. In one case, for example, X wouldn't start and the nvidia-xconfig package gave me an xorg.conf that included the BusID (which, until that machine, I had never, ever, needed in several years of installing FreeBSD). It might be worth a shot. (though doing pkg search, there may only be a package for nvidia-460.)
 
OP
Y

yha

New Member

Reaction score: 1
Messages: 18

Version 390 does not work for me, it explicitly tells me that my card is supported through 340.

Following the advice on this post, I ktraced X and got this vital piece of info:

(EE) Failed to load /usr/local/lib/xorg/modules/drivers/nvidia_drv.so: /usr/local/lib/xorg/modules/drivers/nvidia_drv.so: invalid file format
 

bsduck

Active Member

Reaction score: 136
Messages: 179

I do have a laptop (HP) with a GT320M but it isn't running FreeBSD.

Last time I tried, FreeBSD 12.x worked fine with the nvidia driver, except that I couldn't find a way to set the brightness.

Your problem is a good occasion for me to see how FreeBSD 13.0 is doing on that hardware, so I will try soon.
 

bsduck

Active Member

Reaction score: 136
Messages: 179

So I tried and it still works. Even brightness control works, it just requires acpi_video.ko to be loaded.

Quick summary of the procedure:
  1. fresh install of FreeBSD 13.0
  2. user in groups wheel, operator, video
  3. # pkg install xorg-minimal xfce nvidia-driver-340 nvidia-xconfig
  4. # kldload nvidia acpi_video
  5. # nvidia-xconfig
  6. $ startxfce4
... and I get a working desktop.

I don't know why it doesn't work on your MacBook...
 

fbsd_

Member

Reaction score: 18
Messages: 99

Also
/boot/loader.conf
ADD THIS LINE -> nvidia_load="YES"
/etc/rc.conf
ADD THIS to /etc/rc.conf -> acpi_load="YES"

you would want to add this line to your loader.conf in boot dir which get loads on system boot. It will make system automaticlly load nvidia and acpi_video kernel module on boot so you will not have to load them all the time manually.
You have to install nvidia-driver-340 like bsduck said.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,618
Messages: 37,958

/etc/rc.conf
ADD THIS to /etc/rc.conf -> acpi_load="YES"
That's not going to work. Variables with *_load always go in loader.conf. It will not produce an error if you put it in rc.conf but it's not going to load acpi(4) either. Besides that acpi(4) doesn't need to be loaded, it's already included with the GENERIC kernel.

Now, there's some movement away from loader.conf. You should really only use it to load drivers that are required to boot the machine. Everything else should be loaded with kld_list in /etc/rc.conf:
Code:
kld_list="nvidia"
It will make system automaticlly load nvidia and acpi_video kernel module on boot
There is a difference between acpi(4) and acpi_video(4), those are two separate drivers. And, as I mentioned before, acpi(4) is already included with the GENERIC kernel, there's no need to load it. Loading acpi_video(4) only makes sense on laptops, it does nothing on desktops. But it may not work on your particular model of laptop as controlling the backlight (or switching outputs) very much depends on how it's been implemented by the manufacturer.
 
OP
Y

yha

New Member

Reaction score: 1
Messages: 18

I cannot seem to reproduce the crashes/reboots anymore, but I'm still unable to start X. The only bits that are different now is loading acpi_video and adding myself to the operator group. Still no go. Running ktrace still gives that "invalid file format" error.
 

Tieks

Active Member

Reaction score: 66
Messages: 157

[yha="invalid file format" error[/QUOTE]

Looks like a wrong version or a messed up file. Deinstall it and try again with /usr/ports/x11/nvidia-driver-390. I have that same driver without problems using kld_list="nvidia-modeset" in /etc/rc.conf. Make sure there is nothing related to nvidia left in /boot/loader.conf, then reboot.
 

Geezer

Well-Known Member

Reaction score: 170
Messages: 361

The config isn't correct. The busID is wrong, just remove it. You really only need this:
Code:
Section "Device"
  Identifier "Card0"
  Driver     "nvidia"
EndSection

On my machine, it did not work until I put the BusID line in.
 

scottro

Daemon

Reaction score: 836
Messages: 1,975

I also have one machine that didn't work without the BusID. I've found that to be unusual, but it does happen. On several other machines, it's been unnecessary.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,618
Messages: 37,958

I suspect it has something to do with the mainboard having integrated graphics or not. If that's still enabled in the BIOS/UEFI then you basically have two graphics cards in your system. In that case the BusID just tells Xorg which is the right one for the driver.
 
OP
Y

yha

New Member

Reaction score: 1
Messages: 18

Looks like a wrong version or a messed up file. Deinstall it and try again with /usr/ports/x11/nvidia-driver-390. I have that same driver without problems using kld_list="nvidia-modeset" in /etc/rc.conf. Make sure there is nothing related to nvidia left in /boot/loader.conf, then reboot.

Like I said in my earlier post, when I try to use version 390, it explicitly tells me that my GPU is (only) supported by version 340.
 

VladiBG

Daemon

Reaction score: 510
Messages: 1,111

Did you test if the video card work on the official supported OS? I had similar issue with error 43 on another laptop with dual video cards and it turn out that the NVidia card was broken.
 
OP
Y

yha

New Member

Reaction score: 1
Messages: 18

Did you test if the video card work on the official supported OS? I had similar issue with error 43 on another laptop with dual video cards and it turn out that the NVidia card was broken.

Yes, it works just fine under macOS.
 
Top