# Drivers for nvidia GTX 970 and set up freebsd resolution



## kxyd (Jan 15, 2021)

Hi,

I am a new FreeBSD user and I just installed FreeBSD on my computer. My PC has 2 graphics processing units, one on the cpu(intel) and a gpu(nvidia). First time I set it up, I had some scaling problems with the display, eg the Intel GPU has a full HD resolution on xfce but the nvidia card hasn't. Is it a drivers problem? Is there a way to change the resolution of the system via the terminal?

Also, how can I get(if there are any) drivers for the GPU?

Thanks for your time!


----------



## SirDice (Jan 15, 2021)

kxyd said:


> Also, how can I get(if there are any) drivers for the GPU?


x11/nvidia-driver-340


----------



## matt_k (Jan 15, 2021)

set desired resolution with xrandr according to Xorg configuration


----------



## kxyd (Jan 15, 2021)

SirDice said:


> x11/nvidia-driver-340


Thanks for your reponse, I appreciate it!


----------



## olli@ (Jan 15, 2021)

For setting the desired resolution and other properties I recommend the x11/nvidia-settings package. It is very easy to use. It also displays various monitoring parameters, like the GPU temperature etc.


----------



## kxyd (Jan 15, 2021)

matt_k said:


> set desired resolution with xrandr according to Xorg configuration


It seems that there is something wrong with the xorg configuration on my pc, i am trying to change the resolution as stated but it cannot recognise my monitors resolution or its name either, its listed as default, not as hdmi or anything


----------



## kxyd (Jan 15, 2021)

olli@ said:


> For setting the desired resolution and other properties I recommend the x11/nvidia-settings package. It is very easy to use. It also displays various monitoring parameters, like the GPU temperature etc.


Hi! thanks for your response, i installed the port but unfortunately i cannot run it, i am trying both from the settings tab and cannot launch a windows and from the terminal i get an "ERROR: Unable to load info from any available system".

Is there a way to "touch" a.conf file or anything to change that?

Sounds weird


----------



## SirDice (Jan 15, 2021)

kxyd said:


> It seems that there is something wrong with the xorg configuration on my pc


Look in /var/log/Xorg.0.log



kxyd said:


> Is there a way to "touch" a.conf file or anything to change that?


Why do you think the modification time of a file matters? These files are not read "on-the-fly", they're read when X starts. So if you've made changes to them restart X.


----------



## olli@ (Jan 15, 2021)

kxyd said:


> Hi! thanks for your response, i installed the port but unfortunately i cannot run it, i am trying both from the settings tab and cannot launch a windows and from the terminal i get an "ERROR: Unable to load info from any available system".
> 
> Is there a way to "touch" a.conf file or anything to change that?


Well, the tool tries to contact Xorg’s GPU driver, i.e. the Nvidia driver. Are you sure that the Nvidia driver was loaded correctly? If it failed to load, Xorg will fallback to something else (VGA, VESA VBE, UEFI framebugger) – In this case, Nvidia-specific tools will not work.

Please check the contents of the /var/log/Xorg.0.log file, as SirDice has noted. It will tell you exactly which drivers were loaded, and the reasons for any failures.


----------



## kxyd (Jan 15, 2021)

I installed the packages mentioned above but now that i restarted the pc and it freezes after i log in and i "startx"


SirDice said:


> Look in /var/log/Xorg.0.log
> 
> 
> Why do you think the modification time of a file matters? These files are not read "on-the-fly", they're read when X starts. So if you've made changes to them restart X.


----------



## olli@ (Jan 15, 2021)

kxyd said:


> I installed the packages mentioned above but now that i restarted the pc and it freezes after i log in and i "startx"


Attempt #3: „Please check the contents of the /var/log/Xorg.0.log file …“


----------



## shkhln (Jan 15, 2021)

SirDice said:


> x11/nvidia-driver-340


That driver is so old, it doesn't actually support the card in question.


----------



## olli@ (Jan 15, 2021)

Oh, right. No idea why SirDice mentioned the v340 legacy driver. The GTX 970 is supported since v343, and it is still supported by the current driver.
So, please remove the nvidia-driver-340 package and install the regular x11/nvidia-driver package.


----------



## SirDice (Jan 15, 2021)

shkhln said:


> That driver is so old, it doesn't actually support the card in question.





olli@ said:


> No idea why SirDice mentioned the v340 legacy driver.


Shoot. I looked up Geforce 9 series instead of Geforce 900 series. I overslept this morning and I've been "off" all day.


----------



## matt_k (Jan 15, 2021)

kxyd said:


> It seems that there is something wrong with the xorg configuration on my pc, i am trying to change the resolution as stated but it cannot recognise my monitors resolution or its name either, its listed as default, not as hdmi or anything


Well, that may be because, as SirDice and olli pointed out, your nvidia driver isn't even loaded properly.


----------



## kxyd (Jan 16, 2021)

Hi all! Thanks a lot for your replies!

After a lot of thinking i decided to go to freebsd 13-current since following this video seemed okay for amd gpus but since i have nvidia, i decided to, instead of installing the drm-kmod since it mentioned nothing about nvidia, to follow these instructions .

Long story short i get a problem with startx saying that no screens found(EE).

I think i fixed the drivers issue since before that i would get a message saying there was an issue with framebuffers and according to the video, it happens because the system cannot see any drivers for the GPU, so i am guessing that this small issue is fixed.

Does anyone have an idea about the screen?

I am guessing that i need to do something similar on the xorg.conf.d directory, like create a new .conf file and include something about my monitor.

Is there a way to locate the monitor settings?

I tried xrandr to see any info about the display but i get a message "Cant open display"

Thanks for your time and hopefully this is the last issue with nvidia cards


----------



## kxyd (Jan 16, 2021)

I checked the log file and i get an error:
(EE) Failed to load module "nvidia-modeset" (module doesnt exist,0).
(EE)No drivers available.
Fatal server error:
(EE) no screens found(EE)


----------



## kxyd (Jan 16, 2021)

kxyd said:


> I checked the log file and i get an error:
> (EE) Failed to load module "nvidia-modeset" (module doesnt exist,0).
> (EE)No drivers available.
> Fatal server error:
> (EE) no screens found(EE)



EDIT:
i checked with kldstat and i see that the module is loaded


----------



## shkhln (Jan 16, 2021)

Not that again…


----------



## kxyd (Jan 16, 2021)

shkhln said:


> Not that again…


is it that bad?


----------



## Snurg (Jan 16, 2021)

For my part, I do not know the reason why not to use the nvidia drivers you can find on the Nvidia Advanced Driver Search page.

I installed FreeBSD 12.2 short before Christmas and I am very pleased with the stability of Nvidia driver version 390.138.
(In the meantime, a new driver has been released, 390.141.)
The installation README is easy to follow.
It just works, no problems at all. Suspend/resume has never failed yet.


----------



## kxyd (Jan 16, 2021)

Snurg said:


> For my part, I do not know the reason why not to use the nvidia drivers you can find on the Nvidia Advanced Driver Search page.
> 
> I installed FreeBSD 12.2 short before Christmas and I am very pleased with the stability of Nvidia driver version 390.138.
> (In the meantime, a new driver has been released, 390.141.)
> ...


Hi!

Right now i am at a point that i cannot enter firefox and download that since i do not have a graphical interface 

Does it matter though? Is it different developers behind the 2 versions?


----------



## Snurg (Jan 16, 2021)

I always thought the drivers in the ports/packages are intended as easy-to-use drivers for historic cards.
But there might be other reasons also why 304 and 340 were conserved that way. Maybe some insider knows more?
My personal experience is that the actively-maintained drivers on their website are usually more stable.

Edit: Maybe you can fetch the driver directly:
`fetch https://www.nvidia.com/content/DriverDownload-March2009/confirmation.php?url=/XFree86/FreeBSD-x86_64/390.141/NVIDIA-FreeBSD-x86_64-390.141.tar.gz&lang=us&type=TITAN`


----------



## kxyd (Jan 16, 2021)

Snurg said:


> I always thought the drivers in the ports/packages are intended as easy-to-use drivers for historic cards.
> But there might be other reasons also why 304 and 340 were conserved that way. Maybe some insider knows more?
> My personal experience is that the actively-maintained drivers on their website are usually more stable.
> 
> ...


I think that the problem with the whole situation is not that, in the video, the guy is also installing an xf86-video-amdgpu and as i understood(i might be wrong) this is something like x11/nvidia-xconfig that, essentially autoconfigures the drivers. I tried to run that and i rebooted. I will let you know the results soon.


----------



## kxyd (Jan 16, 2021)

Yep, its fixed!!!

I needed to download and run the nvidia-xconfig as a root!!

Thanks a lot everyone for your help!


----------



## Snurg (Jan 16, 2021)

Good it worked 
I don't know of which video you talk, but maybe the reason the guy used `nvidia-xconfig` was just that it is a convenient way to get a basic xorg.conf.


----------



## shkhln (Jan 16, 2021)

Snurg said:


> I always thought the drivers in the ports/packages are intended as easy-to-use drivers for historic cards.


We actually do not support directly downloaded drivers. At least I don't.


----------

