# Yet Black Screen at X with NVidia GeForce 410M (GF119M) in Vaio VPC-EG17FB



## João Luis (Jul 6, 2020)

Hi Folks,

I'm getting beaten a couple months by my nvidia card.
I got beaten to put it working in FreeBSD 11 and now in FreeBSD 12.
I've installed system and immediately updated via freebsd-update to 12.1-RELEASE-p5 and no success to put nvidia working ever since.
I already tried all suggestions put here and anothers sources. So, i am still using the vesa driver (the only X driver that I got making work) that makes some apps to show me some errors/warnings related to glx and others.
I use just 2 separated files at /usr/local/etc/X11/xorg.conf.d to configure X, the nvidia driver and the files section due to some fonts I'd like to test with nvidia... but I also tested just with the nvidia driver file. No success.
I've tried with nvidia 340 and 390 drivers via packages and nvidia downloaded drives as well. Few days nvidia-driver-390 was updated from 132 to 138 and remains the same.
I can't see any error in X log that can prevent brings screen up.

Could someone light me anything ??


----------



## SirDice (Jul 7, 2020)

Enable the NVidia driver (x11/nvidia-driver-390) and start X. Install misc/pastebinit. After running Xorg  run `cat /var/log/Xorg.0.log | pastebinit`. Post the URL here so we can have a look at your logs.


----------



## diego (Jul 8, 2020)

I would recommend to install hw-probe in order to collect hardware information and logs of your computer. Its really easy and when its uploaded you can find similar computers / resources on the database.








						Computers
					

A database of all the hardware that works under bsd




					bsd-hardware.info


----------



## João Luis (Jul 11, 2020)

SirDice said:


> Enable the NVidia driver (x11/nvidia-driver-390) and start X. Install misc/pastebinit. After running Xorg  run `cat /var/log/Xorg.0.log | pastebinit`. Post the URL here so we can have a look at your logs.



The attached file has :

- dmesg
- /boot/loader.conf
- /etc/rc.conf
- pciconf -lv
- /usr/local/etc/X11/xorg.conf.d/  (nvidia driver and files section, the only 2 used files to config X)
- /var/log/Xorg.0.log
- /dev/nvidia* (nvidia related files existent in /dev/)
- /dev/input/
- /etc/devfs.rules

Tks in advance !


----------



## diego (Jul 11, 2020)

João Luis said:


> The attached file has :


Did you add your laptop to the database in https://bsd-hardware.info?
setup (as root)

```
1) pkg install hw-probe
2) hw-probe -all -upload
```
Ping your URL here.
Example: my laptop (taking right now) is, https://bsd-hardware.info/?probe=cef5a64eb8


----------



## João Luis (Jul 13, 2020)

diego said:


> Did you add your laptop to the database in https://bsd-hardware.info?
> setup (as root)
> 
> ```
> ...



Here it is:

Probe URL: https://bsd-hardware.info/?probe=7d48bd3606

Thanks in advance !


----------



## diego (Jul 13, 2020)

João Luis said:


> Here it is:
> Probe URL: https://bsd-hardware.info/?probe=7d48bd3606


You haven't installed properly your nvidia driver. See https://bsd-hardware.info/index.php?probe=7d48bd3606&log=xorg.log

```
[  2172.874] (II) Module int10: vendor="X.Org Foundation"
[  2172.874]     compiled for 1.20.8, module version = 1.0.0
[  2172.874]     ABI class: X.Org Video Driver, version 24.1
[  2172.874] (II) VESA(0): initializing int10
```
Your Xorg server is using  "vesa" driver instead "nvidia" 

For the installation of nvidia drivers, I would recommend this video (4 minutes) and have a look this youtuber content (its great)




_View: https://www.youtube.com/watch?v=Q6KxMUY2aTU_

Keep posting your progress


----------



## João Luis (Jul 16, 2020)

diego said:


> You haven't installed properly your nvidia driver. See https://bsd-hardware.info/index.php?probe=7d48bd3606&log=xorg.log
> 
> ```
> [  2172.874] (II) Module int10: vendor="X.Org Foundation"
> ...



Hi, Diego !

You are absolutely right !! My Xorg server is using vesa driver... I cannot put the nvidia up yet. So, i cannot get any graphical app response using nvidia black screen.
About the video, i already try that... with the loader.conf cards of linux and nvidia and commented them out as well.

I am re-attaching the file of my initial post. It is all related to nvidia logs and attempts to bring it up. Maybe you could see any thing that it's making my screen with nvidia driver getting black and unavailable.

The attached file has :

- dmesg
- /boot/loader.conf
- /etc/rc.conf
- pciconf -lv
- /usr/local/etc/X11/xorg.conf.d/ (nvidia driver and files section, the only 2 used files to config X)
- /var/log/Xorg.0.log
- /dev/nvidia* (nvidia related files existent in /dev/)
- /dev/input/
- /etc/devfs.rules

BTW, I redid the procedure following the video... no progress.

I'm really grateful for your attention ... I'm trying to solve it a long time.

TKS in advance,

JL


----------



## SirDice (Jul 16, 2020)

In your rc.conf:

```
nvidia_name="nvidia"
nvidia_modeset_name="nvidia-modeset"
```
Where did you get those from? They don't do anything, just remove them. 

According to your Xorg.0.log the driver is correctly loaded and the laptop's display is enabled:

```
[   193.666] (II) NVIDIA(0): Requested modes:
[   193.666] (II) NVIDIA(0):     "DFP-0:nvidia-auto-select"
[   193.666] (II) NVIDIA(0): Validated MetaModes:
[   193.666] (II) NVIDIA(0): MetaMode "DFP-0:nvidia-auto-select":
[   193.666] (II) NVIDIA(0):     Size: 1366 x 768
[   193.666] (II) NVIDIA(0):     cPATH (DFP-0): "nvidia-auto-select"
[   193.666] (II) NVIDIA(0):         Size          : 1366 x 768
[   193.666] (II) NVIDIA(0):         Offset        : +0 +0
[   193.666] (II) NVIDIA(0):         Panning
[   193.666] (II) NVIDIA(0):          Domain       : 1366 x 768
[   193.666] (II) NVIDIA(0):          Tracking Area: 1366 x 768 +0 +0
[   193.666] (II) NVIDIA(0):          Border       : 0,0,0,0
[   193.666] (II) NVIDIA(0): Virtual screen size determined to be 1366 x 768
```


----------



## João Luis (Jul 16, 2020)

SirDice said:


> In your rc.conf:
> 
> ```
> nvidia_name="nvidia"
> ...




Yes, it is... and that's exactly why I came to bother you.

BTW, the nvidia's name in rc.conf were cut off.

I have already tried lots of thing... with FreeBSD 11 i could get success with the post of tobik@ (https://forums.freebsd.org/threads/howto-setup-xorg-with-nvidias-driver.52311/)... but it did not work with FreeBSD 12 anymore. I have worked with drivers 390 and 340, cause both shows my card in it, using pkgs and ports... and "that beautiful" screen still black.

So what do you advise me, guys ?

Except throwing the laptop on the wall, of course.


----------



## SirDice (Jul 16, 2020)

Have you tried with an external monitor attached to your laptop? Maybe it just tries to switch to an invalid resolution or refreshrate for your internal display.


----------



## diego (Jul 16, 2020)

João Luis said:


> So what do you advise me, guys ?


The driver is loaded correctly. I have been in similar situation where the driver was loaded but didn't work neither 
Saying that I have two ideas...

1) Load the minimal configuration for the nvidia driver and reboot. (freebsd with set the best boardname). See if /var/log/Xorg.0.log is similar that before. (it looks silly but........just try it )

```
===> /usr/local/etc/X11/xorg.conf.d/driver-nvidia-minimal.conf
Section "Device"
    Identifier  "Device0"
    Driver      "nvidia"
    BusID      "PCI:1:0:0"
EndSection
```

2) Dont use the nvidia driver and try  modesetting driver. This solution works in my current laptop with similar problem as you (driver properly installed but Xorg didnt work)

```
===> /usr/local/etc/X11/xorg.conf.d/driver-nvidia-minimal.conf
Section "Device"
    Identifier  "Device0"
    #Driver      "nvidia"
    Driver      "modesetting"
    BusID      "PCI:1:0:0"
EndSection
```

I got the feeling that option 2) might work for you using "modesetting" driver......


----------



## João Luis (Jul 17, 2020)

SirDice said:


> Have you tried with an external monitor attached to your laptop? Maybe it just tries to switch to an invalid resolution or refreshrate for your internal display.



I attached an external monitor on laptop. Report below in two cases:

1. With Vesa driver I still get the main screen (laptop) active but did not get the external monitor working. The xrandr's response at this case just shows one screen device.

2. With nvidia driver I still get the main screen black but i could use the external monitor in VGA mode.
The xrandr however shows two screens and their related resolutions.

Files with the Xorg logs of both cases are attached here, as well as the xrandr output of the nvidia case (2).

At least i see nvidia working in VGA mode.


----------



## João Luis (Jul 17, 2020)

diego said:


> The driver is loaded correctly. I have been in similar situation where the driver was loaded but didn't work neither
> Saying that I have two ideas...
> 
> 1) Load the minimal configuration for the nvidia driver and reboot. (freebsd with set the best boardname). See if /var/log/Xorg.0.log is similar that before. (it looks silly but........just try it )
> ...




I have already tried that minimal configuration, Diego... but i did it again. With just Identifier and Driver, and Identifier, Driver and BusID.

Same result as reported to SirDice  (2. With nvidia driver I still get the main screen black but i could use the external monitor in VGA mode. The xrandr however shows two screens and their related resolutions.)

And about "modesetting", maybe the system is missing some thing. The log is attached here.

...


----------



## diego (Jul 18, 2020)

João Luis said:


> And about "modesetting", maybe the system is missing some thing. The log is attached here.
> [   603.894] (EE) open /dev/dri/card0: No such file or directory


For using "modesetting" driver you need a metaport for different versions of Linux DRM based on the FreeBSD version named drm-kmod. In the following post I found the solution for my laptop 








						X fails with AMD integrated graphics, "/dev/dri/card0: No such file or directory"
					

I am trying to get X running on an AMD board with integrated graphics. I increased the graphics memory from 64MB to 256MB.  This is a fresh install of FreeBSD 11.2, there is no xorg.conf file and I try using startx.  rh@lark2:~ % pciconf -lv | grep -B 4 VGA vgapci0@pci0:0:1:0:     class=0x030000...




					forums.freebsd.org
				



(you could see even my comments there)

try this....

```
1) pkg install drm-kmod
2) Add extra modules on /etc/rc.conf:   (instead of /boot/loader.conf)

kld_list="linux linux64 cuse fuse  /boot/modules/i915kms.ko /boot/modules/amdgpu.ko acpi_video"

3) Correct default xorg.conf adding /usr/local/etc/X11/xorg.conf.d/driver-modesetting.conf
Section "Device"
        Identifier  "Card0"
        Driver      "modesetting"
        BusID       "PCI:1:0:0"
EndSection

4) reboot
```

It is always better to take the original driver (intel, nvidia, amd, etc) instead that "modesetting", but I have seen this driver running on my 2 FreeBSD's laptops and also a lot of Linux machines.

Good luck


----------



## João Luis (Jul 27, 2020)

Hi Folks !

Sorry for the great delay to answer... kids had to use the laptop.

Back to the problem, no progress. 

Diego, I got the same error of missing dri devs... so i removed all nvidia packages and reinstalled the xorg and xf86 files. It still missing /dev/dri/card0. The Xorg.0.log and kldstat report is attached here.

I think i gonna wait for new nvidia versions drivers that, possibly, won't support my GF119M.

Thanks a lot, guys !!
JL


----------



## shkhln (Jul 27, 2020)

Modesetting doesn't work with Nvidia.
Switching to a virtual console and back to Xorg helps with some black screen bugs.
What about nvidia-settings?


----------



## João Luis (Jul 27, 2020)

Hi shkhln,

I got using Xorg only with vesa driver... so nvidia-settings answers me with 
 "ERROR: Unable to load info from any available system".

That's it.


----------



## shkhln (Jul 27, 2020)

João Luis said:


> Hi shkhln,
> 
> I got using Xorg only with vesa driver... so nvidia-settings answers me with
> "ERROR: Unable to load info from any available system".
> ...





João Luis said:


> 2. With nvidia driver I still get the main screen black but i could use the external monitor in VGA mode.
> The xrandr however shows two screens and their related resolutions.



Am I imagining things? (There is no "VGA mode" by the way.)


----------



## João Luis (Jul 27, 2020)

shkhln said:


> Am I imagining things? (There is no "VGA mode" by the way.)



Sorry shkhln !! How kids also took the monitor from my table when got the laptop, i simply forgot it. 
( It would be comical if it weren't tragic)

BTW, no progress. I tried 2 X setups...  both monitors in a one screen and each monitor in a screen (two screens)... Following attached the Xorg logs, xorg confs and nvidia-settings output with options query=all and verbose=all.

Thanks a lot, guys !!!


----------



## shkhln (Jul 28, 2020)

Have you tried switching to a console and back, as I suggested above?


----------



## João Luis (Aug 1, 2020)

shkhln said:


> Have you tried switching to a console and back, as I suggested above?



I have never accessed to any console neither before nor now... they all have always been black screens, even at the working  setup with the external monitor.

First, in a dumb consideration, i thought of laptop's monitor issue but i reconsiderated that because i got it working with vesa driver.

The battle goes on !!

Thanks shkhln, again !


----------



## shkhln (Aug 1, 2020)

What result did you get?


----------



## João Luis (Aug 1, 2020)

shkhln said:


> What result did you get?



No change. I can use laptop display normally using graphic and text modes with vesa driver. 
If i use nvidia driver, i can only have system access from an external monitor (laptop display and all text consoles are black screens).


----------

