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

yha

Member

Reaction score: 5
Messages: 21

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: 13,119
Messages: 39,712

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

Member

Reaction score: 5
Messages: 21

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

Menelkir

Well-Known Member

Reaction score: 415
Messages: 356

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: 925
Messages: 2,071

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

Member

Reaction score: 5
Messages: 21

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

Well-Known Member

Reaction score: 280
Messages: 303

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

Well-Known Member

Reaction score: 280
Messages: 303

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_

Active Member

Reaction score: 19
Messages: 105

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: 13,119
Messages: 39,712

/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

Member

Reaction score: 5
Messages: 21

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

Well-Known Member

Reaction score: 134
Messages: 311

[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

Aspiring Daemon

Reaction score: 506
Messages: 826

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: 925
Messages: 2,071

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: 13,119
Messages: 39,712

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

Member

Reaction score: 5
Messages: 21

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: 612
Messages: 1,312

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

Member

Reaction score: 5
Messages: 21

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.
 
OP
Y

yha

Member

Reaction score: 5
Messages: 21

So, I tried xf86-video-nv, but that does not support my card. I'd have to use the nouveau driver, which is not available for FreeBSD. In the end, I gave up on getting anything accelerated to work and settled on xf86-video-scfb. For such an old machine, my "benchmark" is to see if I can play a YouTube video. scfb doesn't cut it, but at least I have a graphical display now. I have a dual-boot setup with macOS so I can boot into that if I need to watch YouTube and whatnot.

Thanks for everyone who contributed to this thread.
 

jammied

Member

Reaction score: 17
Messages: 35

Best advice, get rid of ALL X.org configuration files, the existence of ANY X.org config files stops automatic detection of your hardware setup.
 

jammied

Member

Reaction score: 17
Messages: 35

In other words, run rm -R /etc/X11/*

If you are more cautious: mv /etc/X11 /etc/X11-old
 
OP
Y

yha

Member

Reaction score: 5
Messages: 21

Best advice, get rid of ALL X.org configuration files, the existence of ANY X.org config files stops automatic detection of your hardware setup.

That's how I originally started. There was nothing in /etc/X11/ and /usr/local/etc/X11/(xorg.conf.d/) in my first attempt.
 

jammied

Member

Reaction score: 17
Messages: 35

That's how I originally started. There was nothing in /etc/X11/ and /usr/local/etc/X11/(xorg.conf.d/) in my first attempt.

Ok, there is probably a separate issue. However, I know when I spent ages trying to get my NVIDIA (NVS 510) card working, deleting all X config files, including some I had not noticed where there, is what fixed the issue. The general change in functionality made it pretty obvious that those files needed to be gone.

That said, I had taken several other steps before that which would have likely fixed other issues in the process. What I can lay odds on is though that you unlikely to sort any other issue with the existence of any X config files.

Can you post your /etc/rc.conf though please? For reference, this is what mine looks like (with my NVIDIA card):

clear_tmp_enable="YES"
syslogd_flags="-ss"
sendmail_enable="NONE"
keymap="uk.kbd"
ifconfig_re0="DHCP"
sshd_enable="YES"
ntpdate_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
hald_enable="YES"
dbus_enable="YES"
nvidia_load="YES"
nvidia_name="nvidia"
nvidia_modeset_load="YES"
nvidia_modeset_name="nvidia-modeset"
linux_enable="YES"
# Added by auto-admin from desktop-installer
ntpdate_flags="-u pool.ntp.org"
# End auto-admin addition
# Added by auto-admin from desktop-installer
nfs_client_enable="YES"
# End auto-admin addition
# Added by auto-admin from desktop-installer
rpc_statd_enable="YES"
# End auto-admin addition
# Added by auto-admin from desktop-installer
rpc_lockd_enable="YES"
# End auto-admin addition
# Added by /usr/local/sbin/auto-autofs-nfs-setup
autofs_enable="YES"
# Added by auto-admin from desktop-installer
devd_enable="YES"
# End auto-admin addition
# Added by auto-admin from desktop-installer
devfs_system_ruleset="system"
# End auto-admin addition
# Added by auto-admin from desktop-installer
moused_port=/dev/ums0
# End auto-admin addition
# Added by auto-admin from desktop-installer
moused_enable="YES"
# End auto-admin addition
kld_list="fusefs nvidia-modeset"
# Added by auto-admin from desktop-installer
cupsd_enable="YES"
uld_load="YES"
# End auto-admin addition
# Added by auto-admin from desktop-instaler
# End auto-admin addition
sddm_enable="YES"
vboxdrv_load="YES"
vboxnet_enable="YES"
ifconfig_ue0="DHCP"
cuse_load="YES"
webcamd_enable="YES"
mysql_enable="YES"
cbsd_workdir="/usr/jails"
If it can't be fixed by further altering your rc.conf in some way, then we can look at other steps (specifically, analysing X logs for any hints specific to your computer). I do see you have already been checking X logs looking more closely at the other posts but essentially, what we are looking for though is any changes in the output to that after various configuration changes.
 

jammied

Member

Reaction score: 17
Messages: 35

Actually, I lie... I do have this config file...
/usr/local/etc/X11/xorg.conf.d/nvidia.conf

which has the following contents:
Section "Device"
Identifier "NVIDIA Card"
VendorName "NVIDIA Corporation"
Driver "nvidia"
EndSection
To test, I did try removing it and my desktop didn't completely stopped functioning but I lost my dual screens and basically all the fancy features of my graphics card.
 

Jaskie

Member

Reaction score: 3
Messages: 23

Hi, your specs seem really close to mine. I am running FreeBSD 13 and Nvidia 220M (laptop, no integrated GPU, just nvidia. Legacy BIOS, MBR) with 340 driver from pkg. Nvidia 320M should be fine with 340 driver too I think. When I was installing xorg and nvidia-driver, X won't start either until I installed nvidia-xconfig and generated xorg.conf. I don't need BusID either, this is the section in /etc/X11/xorg.conf :

Code:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    Option         "NoLogo" "true"
    VendorName     "NVIDIA Corporation"
EndSection

My /etc/X11/rc.conf :

Code:
zfs_enable="YES"
hostname="freebsd.asus"
wlans_ath0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
dbus_enable="YES"
lightdm_enable="YES"
kld_list="nvidia fusefs acpi_asus acpi_asus_wmi acpi_video"
#ifconfig_alc0="DHCP"
clear_tmp_enable="YES"
clear_tmp_X="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
dumpdev="AUTO"
rc_startmsgs="NO"
background_dhclient="YES"
sshd_enable="YES"
moused_enable="YES"
powerd_enable="YES"
syslogd_flags="-ss"
 
Top