Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jul 2016 23:53:27 +0900
From:      Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
To:        freebsd-x11@freebsd.org
Subject:   Re: Add NVIDIA driver to built-in Xorg configuration?
Message-ID:  <20160727235327.08579cbe1ade9ac39fb20930@dec.sakura.ne.jp>

next in thread | raw e-mail | index | archive | help
On Tue Jul 19 18:26:02 UTC 2016
Arto Pekkanen <isoa@kapsi.fi> wrote:

> Kris Moore kirjoitti 19.07.2016 18:09:
>> On 07/19/2016 10:32, Tobias Kortkamp wrote:
>>> Hi,
>>> 
>>> would it be possible to include the following patch in
>>> x11-servers/xorg-server?  It adds the NVIDIA driver to the built-in X
>>> configuration.  It would remove the need to have an xorg.conf on 
>>> systems
>>> with an NVIDIA GPU which have to use x11/nvidia-driver.  I think it's 
>>> a
>>> source of unnecessary friction that doesn't really need to be there.  
>>> It
>>> was deceptively simple to add, so I'm sure I'm missing something. ;-)
>>> 
>>> Thanks,
>>> Tobias
>>> 
>>> https://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/common/xf86pciBus.c?id=xorg-server-1.17.4#n1187
>>> ===================================================================
>>> --- files/patch-hw_xfree86_common_xf86pciBus.c  (nonexistent)
>>> +++ files/patch-hw_xfree86_common_xf86pciBus.c  (working copy)
>>> @@ -0,0 +1,10 @@
>>> +--- hw/xfree86/common/xf86pciBus.c.orig        2016-07-19
>>> 15:37:53.698794484 +0200
>>> ++++ hw/xfree86/common/xf86pciBus.c     2016-07-19 15:37:26.000000000
>>> +0200
>>> +@@ -1192,6 +1192,7 @@
>>> + #ifdef __linux__
>>> +         driverList[idx++] = "nouveau";
>>> + #endif
>>> ++        driverList[idx++] = "nvidia";
>>> +         driverList[idx++] = "nv";
>>> +         break;
>>> +     }
>>> _______________________________________________
>>> freebsd-x11 at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-x11
>>> To unsubscribe, send any mail to "freebsd-x11-unsubscribe at freebsd.org"
>> 
>> Ohh, we've been bit by that a bunch. I'm going to include this in 
>> PC-BSD
>> also. Thanks!
>
> Bad idea, since nVidia driver is proprietary and must be installed 
> separately. Thus it is only logical to have it configured separately. 
> This is important to maintain a distiction between the bundled X.org 
> drivers vs. 3rd party drivers.

I don't think it's bad idea.
This patch shoud detect and use nvidia-driver <IF ALREADY INSTALLED>.
Not forcing nvidia-driver to be installed.

More accurately, try to detect nvidia-driver, if none, fall back to
nv driver.

Are you mis-understanding that, with this patch, nvidia-driver becomes
mandatory?
No. Even nv driver, already contained in original code, is NOT
mandatory.

If you hesitate to always polluting original code for proprietary code,
making the patch to be extra patch and controll its application with
OPTIONS (off by default) would be a good solution.

# I would prefer nvidia line to be before #ifdef __linux__ line for
# nouveau driver for future nouveau support of FreeBSD.


> Also, currently the nVidia driver is broken on many FreeBSD versions
> due to KMS/DRM integration or lack thereof. Having X.org load nVidia 
> automatically is just gonna cause a lot of trouble for the end user.

As I wrote above, in cases nvidia-driver[-*] are not suitable and nv
works OK, just NOT installing nvidia-driver[-*] should help.
nvidia-driver[-*] is NOT at all mandatory.


> And then there's the problem with nVidia Optimus laptops, where by 
> default only the Intel driver works since the nVidia chip is not wired 
> to any of the standard video outputs. Having nVidia auto loaded is just 
> yet another problem waiting to happen.
>
> Why would PC-BSD even benefit from having nVidia auto loaded? The 
> integration scripts should suggest enabling nVidia driver if compatible 
> hardware is detected (ie. non-Optimus nVidia hardware, or Optimus where 
> IGP outpus have been rewired to nVidia via BIOS). If the nVidia driver 
> does not work, then the end user would actually realize, from context, 
> that it was the nVidia driver that had problems. In case of problems if 
> nVidia gets auto loaded without any notification to the user about it, 
> then the user will be totally in the dark regarding why X.org won't 
> start.
>
> Not even Linux distros auto load the proprietary nVidia driver. And for 
> a good reason.
>
> -- 
> Arto Pekkanen

-- 
Tomoaki AOKI    junchoon@dec.sakura.ne.jp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160727235327.08579cbe1ade9ac39fb20930>