From nobody Thu May 25 19:31:13 2023 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QRyqC24Hvz4Wbtb for ; Thu, 25 May 2023 19:31:51 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QRyqB1ZFCz49Lp for ; Thu, 25 May 2023 19:31:50 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20221208 header.b=CIhZEsCA; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::1130 as permitted sender) smtp.mailfrom=marietto2008@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-565a63087e9so1531837b3.2 for ; Thu, 25 May 2023 12:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685043109; x=1687635109; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=KMFOyLKrXV+CSaL4/VOwEiZetB2t041p+r8WzOBMQa8=; b=CIhZEsCAC/tGi8vBCa61oA2cILCCwM3tQjHgAvCY7HS4gK97DCHl3OkMYvAGE3OMe/ IU0rCekUNzzZROO9G/Kr0VhuzHQ2bosB1HvRps4/PpwUph4Qk1uvk7YD33tulLBgW04g A+AM3a5MQZwJCjffk3T0hu3/xOJYIJM9KuBVmnprFem0Ayx/gUGkMNhGOq4+xgIOfIZE tdMKjL50v3wTOexNCSkbIxKuOH+ZJX0XIni4lGdomWW7H2DOMDnDYy1quT2jPG3gF5Sm 7eaarccvTrJDDRi87NmBalqoSCIl63XvBzSGZOWtecvtkduC9p0G7ljP3cO2ejEXwo2/ eK3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685043109; x=1687635109; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KMFOyLKrXV+CSaL4/VOwEiZetB2t041p+r8WzOBMQa8=; b=FlddF56QQ/YTr7bGo3qwH9MjRWQfmx/gc8RDu/KCBdpKS/RVJUhblnVwFocDlPPi08 SyUNgtxjFAbeGVxYW5pBINPSaIccNZsX1hADglhTUHAGOK1SbKd/Xm5K7uMvIGQokgYT G+a1u0iTybHMkXc5NnhcxfMbJBZdUlmgLU0bvytMFK57OsztVBT/uwzjt7tsUKwr1Qxe dEnXIqOHajByy0rnKhbAadS5Bg5jyHJlo/K5ukFXuvOhrOl1KpNRyQA68HzWVbLj+UZn MSIaAE25QAVg0S5Awo/9LbbVd7KIfHL7sb22fjrzvaieJ+wHn7r5UOPuieynLI9IQFSi KETA== X-Gm-Message-State: AC+VfDwSgzWYcYjnX+M7qyiLzEsAgY0pDKMjhqxd0Eyjea9jkD1UP13f iBHaI+Pjfdk/jX3hSatfN2gFE/rRwGXmvSJ/weOPvUlJTUmhXA== X-Google-Smtp-Source: ACHHUZ7/WK7yRFX0XIMXG9AM+ORSrwxgar4KByzOCP+M3ZCIdf29LHpwNYouWrYqd2/dbbuSCkAF0Y+Oa8uC5WQPR80= X-Received: by 2002:a0d:d612:0:b0:565:1b47:a6cd with SMTP id y18-20020a0dd612000000b005651b47a6cdmr752866ywd.50.1685043109279; Thu, 25 May 2023 12:31:49 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <46f1653a-89ba-6df3-6e3a-bd4a6c692be1@gmail.com> In-Reply-To: From: Mario Marietto Date: Thu, 25 May 2023 21:31:13 +0200 Message-ID: Subject: Re: How to blacklist the nouveau driver on FreeBSD.... To: Theron Cc: freebsd-hackers Content-Type: multipart/alternative; boundary="000000000000f5bc9f05fc89abef" X-Spamd-Result: default: False [-2.35 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.65)[0.647]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20221208]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TAGGED_RCPT(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1130:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; FREEMAIL_TO(0.00)[gmail.com]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QRyqB1ZFCz49Lp X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N --000000000000f5bc9f05fc89abef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,instead of the nVidia one. You can read here : https://devtalk.blender.org/t/why-blender-cycles-is-not-able-to-detect-my-g= pu-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 informa= tion 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 o= f the application types it will have issues with. Maybe try verifying that applications that use the GPU work, then CUDA applications, then look in= to 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 example= , 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: nouvea= u suggests Blender is trying to load the nouveau driver. Typically when installing the Nvidia proprietary driver, the loading of the nouveau drivers gets disabled. Maybe the Nvidia GPU drivers weren=E2=80=99t inst= alled properly? Or do you need to disable nouveau manually? Or is this just so= me issue with the Linuxulator? - You also have errors related to =E2=80=9Copening a display=E2=80=9D (ope= ning 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 workin= g 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 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 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 nouve= au > 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 > 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' (N= o >> 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 = 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 driver >>> > 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 o= n >>> > CentOS 7 and Ubuntu. That's nice,but it can't work. Why ? please give >>> > 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 the >>> 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 and >>> absolutely nothing to do with nouveau - have you found any other CUDA >>> program to work in linux compat? >>> >>> Theron >>> >> >> >> -- >> Mario. >> > > > -- > Mario. > --=20 Mario. --000000000000f5bc9f05fc89abef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

I've asked for so= me clarifications on the Blender forum about the reason why a part of the n= ouveau userland is called within the linuxulator,instead of the nVidia one.= You can read here :



this is what he said :<= /div>
=C2=A0

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.

  • 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.

  • 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 l= ibcuda1 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=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?

  • 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?
    It also might be easier to test Blender with CUDA rendering if you started = with command line rendering rather than GUI render.

  • Comma= nd Line Rendering =E2=80=94 Blender Manual 3

Sorry if I=E2=80=99m unable to help much with this.


On Th= u, May 25, 2023 at 11:47=E2=80=AFAM Mario Marietto <marietto2008@gmail.com> wrote:
Can you figure= out a method to do what I want to do ? If we are able to "connect&quo= t; the nVidia driver to the CG / graphic tool instead of the nouveau one,a = lot of cool features will be unfrozen. For example we could try to run Unre= al Engine 5 within the linuxulator,Davinci Resolve,Maya 3d,a lot of cool st= uff will use the nvidia driver and it will work great.

On Thu, May 25, = 2023 at 11:10=E2=80=AFAM Mario Marietto <marietto2008@gmail.com> wrote:
Sm= player behaves the same as blender. I think this is a general behavior. Che= ck below what happens when I run it within the linuxulator :
=
root@marietto:/mnt/zroot2/zroot2 # chro= ot /compat/ubuntulunar /bin/bash

root@marietto:/# smplayer=C2=A0

QStandardPaths: error creating runtime d= irectory '/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 Linuxulat= or
> 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 driver =
> 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 ? plea= se give
> 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_no= uveau_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 the=
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 and absolutely nothing to do with nouveau - have you found any other CUDA
program to work in linux compat?

Theron


--
Mario.


--
Mario.


--
Mario.
--000000000000f5bc9f05fc89abef--