Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2023 11:32:54 +0200
From:      Mario Marietto <marietto2008@gmail.com>
To:        Theron <theron.tarigo@gmail.com>
Cc:        freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: How to blacklist the nouveau driver on FreeBSD....
Message-ID:  <CA%2B1FSijFq=LiCJvWfpS=FTqrX=CTMr4rVqT4PZbPvahzMXi%2B6w@mail.gmail.com>
In-Reply-To: <CA%2B1FSijWw5nAUHU9LpbzdBMjy6RAkTNndwSCeFAL33KR5GLmKw@mail.gmail.com>
References:  <CA%2B1FSii7cX_pdvi_mioAist1tps-mOCyRPw-Gy-mZ-u-8YH1pQ@mail.gmail.com> <46f1653a-89ba-6df3-6e3a-bd4a6c692be1@gmail.com> <CA%2B1FSihEwaq2jDsrPrd-65-44gMB_6YLhQBFw3AtMBp7ebKusQ@mail.gmail.com> <CA%2B1FSijh33rXXihOyzZp5wO=HEEwpHF0UT-bG1FjEs59=GhnyQ@mail.gmail.com> <CA%2B1FSijWw5nAUHU9LpbzdBMjy6RAkTNndwSCeFAL33KR5GLmKw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000017445905fc956e51
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I've fixed some errors found in the tutorial that I wrote,this :

https://www.reddit.com/r/freebsd/comments/13qfz3t/comment/jlncmxh/?context=
=3D3

adding these command lines :


cp -r /compat/ubuntu/usr/lib/x86_64-linux-gnu /lib

cp -r /compat/ubuntu/etc/alternatives /etc

cp -r /compat/ubuntu/usr/lib/x86_64-linux-gnu /usr/lib


and boom. The error is changed. Now I think that we are getting closer to
the real error to fix :

https://pastebin.ubuntu.com/p/BSGYsWH2Hf/

The real error now is : CUDA cuInit: Unknown error.

This seems to be a more interesting error to talk about.

On Thu, May 25, 2023 at 9:31=E2=80=AFPM Mario Marietto <marietto2008@gmail.=
com>
wrote:

> Hello.
>
> I've asked for some clarifications on the Blender forum about the reason
> why a part of the nouveau userland is called within the linuxulator,inste=
ad
> of the nVidia one. You can read here :
>
>
> https://devtalk.blender.org/t/why-blender-cycles-is-not-able-to-detect-my=
-gpu-s-and-cuda-within-the-ubuntu-linuxulator/27777
>
>
> this is what he said :
>
>
> I can=E2=80=99t give you full help with this, but I will share some infor=
mation
> based on what I can gather from this post and resources online.
>
>    -
>
>    Linuxulator appears to be some kind of compatibility layer. It=E2=80=
=99s not
>    guaranteed to work with all applications, and CUDA is likely to be one=
 of
>    the application types it will have issues with. Maybe try verifying th=
at
>    applications that use the GPU work, then CUDA applications, then look =
into
>    getting Cycles rendering working with CUDA. This may not be a Blender
>    issue, but a Linuxulator issue.
>    -
>
>    Depending on how you installed your GPU drivers on =E2=80=9CLinux=E2=
=80=9D, you might
>    not have all the packages required to run CUDA applications. For examp=
le,
>    on some Linux distributions I had to install packages like libcuda1
>    and libnvoptix1 to use CUDA and OptiX on Linux.
>    -
>
>    As you pointed out, the error libGL error: failed to load driver:
>    nouveau suggests Blender is trying to load the nouveau driver.
>    Typically when installing the Nvidia proprietary driver, the loading o=
f the
>    nouveau drivers gets disabled. Maybe the Nvidia GPU drivers weren=E2=
=80=99t
>    installed properly? Or do you need to disable nouveau manually? Or is =
this
>    just some issue with the Linuxulator?
>    -
>
>    You also have errors related to =E2=80=9Copening a display=E2=80=9D (o=
pening the
>    Blender GUI). This could be related to the GPU driver issue discussed
>    before, or maybe you need to do a bit of extra setup to get GUI
>    applications working in Linuxulator. Such as setting up a desktop
>    environment within your Linuxulator?
>    It also might be easier to test Blender with CUDA rendering if you
>    started with command line rendering rather than GUI render.
>    -
>
>    Command Line Rendering =E2=80=94 Blender Manual 3
>    <https://docs.blender.org/manual/en/latest/advanced/command_line/rende=
r.html>
>
> Sorry if I=E2=80=99m unable to help much with this.
>
> On Thu, May 25, 2023 at 11:47=E2=80=AFAM Mario Marietto <marietto2008@gma=
il.com>
> wrote:
>
>> Can you figure out a method to do what I want to do ? If we are able to
>> "connect" the nVidia driver to the CG / graphic tool instead of the nouv=
eau
>> one,a lot of cool features will be unfrozen. For example we could try to
>> run Unreal Engine 5 within the linuxulator,Davinci Resolve,Maya 3d,a lot=
 of
>> cool stuff will use the nvidia driver and it will work great.
>>
>> On Thu, May 25, 2023 at 11:10=E2=80=AFAM Mario Marietto <marietto2008@gm=
ail.com>
>> wrote:
>>
>>> Smplayer behaves the same as blender. I think this is a general
>>> behavior. Check below what happens when I run it within the linuxulator=
 :
>>>
>>> root@marietto:/mnt/zroot2/zroot2 # chroot /compat/ubuntulunar /bin/bash
>>>
>>> root@marietto:/# smplayer
>>>
>>> QStandardPaths: error creating runtime directory '/var/run/user/1001'
>>> (No such file or directory)
>>> This is SMPlayer v. 22.7.0 (revision 10091) running on Linux
>>> libGL error: glx: failed to create dri2 screen
>>> *libGL error: failed to load driver: nouveau*
>>>
>>>
>>>
>>> On Thu, May 25, 2023 at 2:56=E2=80=AFAM Theron <theron.tarigo@gmail.com=
> wrote:
>>>
>>>> On 5/24/23 04:43, Mario Marietto wrote:
>>>> > since the nouveau driver can't be blacklisted within the Linuxulator
>>>> > because it's impossible to run "sudo update-initramfs -u" inside of
>>>> > it. For this reason,I would ask if in your opinion the nouveau drive=
r
>>>> > can be blacklisted directly in FreeBSD or in some other way. Thanks.
>>>> >
>>>> FreeBSD does not contain the nouveau kernel module so there is nothing
>>>> to blacklist.
>>>>
>>>> > He says that he created a Python script for updating Nvidia drivers
>>>> on
>>>> > CentOS 7 and Ubuntu. That's nice,but it can't work. Why ? please giv=
e
>>>> > a look to an old post created by me some time ago and you will see :
>>>> >
>>>> >
>>>> https://www.reddit.com/r/freebsd/comments/11431bi/how_to_blacklist_the=
_nouveau_driver_within_the/
>>>> >
>>>> These libGL errors are from Mesa libGL, which is trying to use the
>>>> userspace part of nouveau (which is part of the Mesa project),
>>>> presumably based on Nvidia GPU's PCI ID being known to Mesa, despite
>>>> there being no nouveau kernel interface available.
>>>>
>>>> Since you are trying to use Nvidia's binary driver (the only one which
>>>> works on FreeBSD), Blender should have never loaded Mesa's libGL in th=
e
>>>> first place - there is most likely a configuration problem here with
>>>> libglvnd, the component responsible for choosing the correct libGL
>>>> implementation.
>>>>
>>>> When Blender fails to detect CUDA this has nothing to do with libGL an=
d
>>>> absolutely nothing to do with nouveau - have you found any other CUDA
>>>> program to work in linux compat?
>>>>
>>>> Theron
>>>>
>>>
>>>
>>> --
>>> Mario.
>>>
>>
>>
>> --
>> Mario.
>>
>
>
> --
> Mario.
>


--=20
Mario.

--00000000000017445905fc956e51
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail-_3cjCphgls6DH-irkVaA0GM"><div class=3D=
"gmail-_292iotee39Lmt0MkQZ2hPV gmail-RichTextJSON-root"><p class=3D"gmail-_=
1qeIAgB0cPwnLhDF9XSiJM">I&#39;ve fixed some errors found in the tutorial th=
at I wrote,this :</p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM"><a href=3D"=
https://www.reddit.com/r/freebsd/comments/13qfz3t/comment/jlncmxh/?context=
=3D3">https://www.reddit.com/r/freebsd/comments/13qfz3t/comment/jlncmxh/?co=
ntext=3D3</a></p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM">adding these co=
mmand lines :</p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM"><br></p><p clas=
s=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM">cp -r /compat/ubuntu/usr/lib/x86_64-lin=
ux-gnu /lib</p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM">cp -r /compat/ubu=
ntu/etc/alternatives /etc</p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM">cp =
-r /compat/ubuntu/usr/lib/x86_64-linux-gnu /usr/lib</p><p class=3D"gmail-_1=
qeIAgB0cPwnLhDF9XSiJM"><br></p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM">a=
nd boom. The error is changed. Now I think that we are getting closer to th=
e real error to fix :</p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM"><a href=
=3D"https://pastebin.ubuntu.com/p/BSGYsWH2Hf/" class=3D"gmail-_3t5uN8xUmg0T=
OwRCOGQEcU" rel=3D"noopener nofollow ugc" target=3D"_blank">https://pastebi=
n.ubuntu.com/p/BSGYsWH2Hf/</a></p><p class=3D"gmail-_1qeIAgB0cPwnLhDF9XSiJM=
">The real error now is : CUDA cuInit: Unknown error.</p><p class=3D"gmail-=
_1qeIAgB0cPwnLhDF9XSiJM">This seems to be a more interesting error to talk =
about.</p></div></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr"=
 class=3D"gmail_attr">On Thu, May 25, 2023 at 9:31=E2=80=AFPM Mario Mariett=
o &lt;<a href=3D"mailto:marietto2008@gmail.com">marietto2008@gmail.com</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div =
dir=3D"ltr"><div>Hello.</div><div><br></div><div>I&#39;ve asked for some cl=
arifications on the Blender forum about the reason why a part of the nouvea=
u userland is called within the linuxulator,instead of the nVidia one. You =
can read here :</div><div><br></div><div><a href=3D"https://devtalk.blender=
.org/t/why-blender-cycles-is-not-able-to-detect-my-gpu-s-and-cuda-within-th=
e-ubuntu-linuxulator/27777" target=3D"_blank">https://devtalk.blender.org/t=
/why-blender-cycles-is-not-able-to-detect-my-gpu-s-and-cuda-within-the-ubun=
tu-linuxulator/27777</a></div><div><br></div><div><br></div><div>this is wh=
at he said :</div><div>=C2=A0<br></div><div></div><div><div><p>I can=E2=80=
=99t give you full help with this, but I will=20
share some information based on what I can gather from this post and=20
resources online.</p>
<ul><li>
<p>Linuxulator appears to be some kind of compatibility layer. It=E2=80=99s=
 not=20
guaranteed to work with all applications, and CUDA is likely to be one=20
of the application types it will have issues with. Maybe try verifying=20
that applications that use the GPU work, then CUDA applications, then=20
look into getting Cycles rendering working with CUDA. This may not be a=20
Blender issue, but a Linuxulator issue.</p>
</li><li>
<p>Depending on how you installed your GPU drivers on =E2=80=9CLinux=E2=80=
=9D, you might
 not have all the packages required to run CUDA applications. For=20
example, on some Linux distributions I had to install packages like <code>l=
ibcuda1</code> and <code>libnvoptix1</code> to use CUDA and OptiX on Linux.=
</p>
</li><li>
<p>As you pointed out, the error <code>libGL error: failed to load driver: =
nouveau</code>
 suggests Blender is trying to load the nouveau driver. Typically when=20
installing the Nvidia proprietary driver, the loading of the nouveau=20
drivers gets disabled. Maybe the Nvidia GPU drivers weren=E2=80=99t install=
ed=20
properly? Or do you need to disable nouveau manually? Or is this just some=
=20
issue with the Linuxulator?</p>
</li><li>
<p>You also have errors related to =E2=80=9Copening a display=E2=80=9D (ope=
ning the=20
Blender GUI). This could be related to the GPU driver issue discussed=20
before, or maybe you need to do a bit of extra setup to get GUI=20
applications working in Linuxulator. Such as setting up a desktop environme=
nt
 within your Linuxulator?<br>
It also might be easier to test Blender with CUDA rendering if you started =
with command line rendering rather than GUI render. <br></p></li><li><p><a =
href=3D"https://docs.blender.org/manual/en/latest/advanced/command_line/ren=
der.html" rel=3D"noopener nofollow ugc" target=3D"_blank">Command Line Rend=
ering =E2=80=94 Blender Manual <span title=3D"3 clicks">3</span></a></p>
</li></ul>
<p>Sorry if I=E2=80=99m unable to help much with this.</p></div></div></div=
><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Th=
u, May 25, 2023 at 11:47=E2=80=AFAM Mario Marietto &lt;<a href=3D"mailto:ma=
rietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>&gt; wrot=
e:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0=
.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"l=
tr">Can you figure out a method to do what I want to do ? If we are able to=
 &quot;connect&quot; the nVidia driver to the CG / graphic tool instead of =
the nouveau one,a lot of cool features will be unfrozen. For example we cou=
ld try to run Unreal Engine 5 within the linuxulator,Davinci Resolve,Maya 3=
d,a lot of cool stuff will use the nvidia driver and it will work great. <b=
r></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr=
">On Thu, May 25, 2023 at 11:10=E2=80=AFAM Mario Marietto &lt;<a href=3D"ma=
ilto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com</a>&g=
t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div d=
ir=3D"ltr"><div>Smplayer behaves the same as blender. I think this is a gen=
eral behavior. Check below what happens when I run it within the linuxulato=
r :<br></div><div><br></div><div><span style=3D"color:rgb(0,0,0);background=
-color:rgb(255,255,255);font-family:arial,sans-serif">root@marietto:/mnt/zr=
oot2/zroot2 # chroot /compat/ubuntulunar /bin/bash</span></div><div><span s=
tyle=3D"font-family:arial,sans-serif"><br>root@marietto:/# smplayer=C2=A0</=
span></div><div><span style=3D"font-family:arial,sans-serif"><br></span></d=
iv><div><span style=3D"font-family:arial,sans-serif">QStandardPaths: error =
creating runtime directory &#39;/var/run/user/1001&#39; (No such file or di=
rectory)
<br>This is SMPlayer v. 22.7.0 (revision 10091) running on Linux
<br>libGL error: glx: failed to create dri2 screen
<br><b>libGL error: failed to load driver: nouveau</b></span><span style=3D=
"font-family:monospace"><br></span></div><div><span style=3D"font-family:mo=
nospace"><br></span></div><div><span style=3D"font-family:monospace"><br></=
span></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"g=
mail_attr">On Thu, May 25, 2023 at 2:56=E2=80=AFAM Theron &lt;<a href=3D"ma=
ilto:theron.tarigo@gmail.com" target=3D"_blank">theron.tarigo@gmail.com</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 5=
/24/23 04:43, Mario Marietto wrote:<br>
&gt; since the nouveau driver can&#39;t be blacklisted within the Linuxulat=
or <br>
&gt; because it&#39;s impossible to run &quot;sudo update-initramfs -u&quot=
; inside of <br>
&gt; it. For this reason,I would ask if in your opinion the nouveau driver =
<br>
&gt; can be blacklisted directly in FreeBSD or in some other way. Thanks.<b=
r>
&gt;<br>
FreeBSD does not contain the nouveau kernel module so there is nothing <br>
to blacklist.<br>
<br>
&gt; He says that he created a Python script for updating Nvidia drivers on=
 <br>
&gt; CentOS 7 and Ubuntu. That&#39;s nice,but it can&#39;t work. Why ? plea=
se give <br>
&gt; a look to an old post created by me some time ago and you will see :<b=
r>
&gt;<br>
&gt; <a href=3D"https://www.reddit.com/r/freebsd/comments/11431bi/how_to_bl=
acklist_the_nouveau_driver_within_the/" rel=3D"noreferrer" target=3D"_blank=
">https://www.reddit.com/r/freebsd/comments/11431bi/how_to_blacklist_the_no=
uveau_driver_within_the/</a><br>
&gt;<br>
These libGL errors are from Mesa libGL, which is trying to use the <br>
userspace part of nouveau (which is part of the Mesa project), <br>
presumably based on Nvidia GPU&#39;s PCI ID being known to Mesa, despite <b=
r>
there being no nouveau kernel interface available.<br>
<br>
Since you are trying to use Nvidia&#39;s binary driver (the only one which =
<br>
works on FreeBSD), Blender should have never loaded Mesa&#39;s libGL in the=
 <br>
first place - there is most likely a configuration problem here with <br>
libglvnd, the component responsible for choosing the correct libGL <br>
implementation.<br>
<br>
When Blender fails to detect CUDA this has nothing to do with libGL and <br=
>
absolutely nothing to do with nouveau - have you found any other CUDA <br>
program to work in linux compat?<br>
<br>
Theron<br>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>
</blockquote></div><br clear=3D"all"><br><span>-- </span><br><div dir=3D"lt=
r">Mario.<br></div>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>

--00000000000017445905fc956e51--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSijFq=LiCJvWfpS=FTqrX=CTMr4rVqT4PZbPvahzMXi%2B6w>