Summary: | x11/nvidia-driver, x11/linux-nvidia-libs: update to 525.89.02 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Bartek Jasicki <thindil> | ||||||||||||||
Component: | Individual Port(s) | Assignee: | Kevin Bowling <kbowling> | ||||||||||||||
Status: | Closed FIXED | ||||||||||||||||
Severity: | Affects Only Me | CC: | danfe, grahamperrin, iwtcex, junchoon, kbowling, ohartmann, rhurlin, theron.tarigo, x11 | ||||||||||||||
Priority: | --- | Flags: | danfe:
maintainer-feedback+
|
||||||||||||||
Version: | Latest | ||||||||||||||||
Hardware: | Any | ||||||||||||||||
OS: | Any | ||||||||||||||||
Bug Depends on: | |||||||||||||||||
Bug Blocks: | 270322 | ||||||||||||||||
Attachments: |
|
Description
Bartek Jasicki
2023-03-09 08:39:09 UTC
> 2. ... I don't use Wayland, so I didn't test if it works. See https://forums.freebsd.org/threads/call-for-testing-nvidia-drm-kernel-module.87161/ > %%NVEGL%%lib/libGLX_indirect.so.0 Will conflict with graphics/mesa-libs after ports b44acc9409bd3. > %%NVEGL%%lib/libnvidia-egl-wayland.so > %%NVEGL%%lib/libnvidia-egl-wayland.so.1 [...] > %%NVEGL%%share/egl/egl_external_platform.d/10_nvidia_wayland.json Will conflict with graphics/egl-wayland (bug 244087). The split is mainly to avoid depending on x11/nvidia-driver (latest version) on legacy NVIDIA (via x11/nvidia-driver-*) or non-NVIDIA (graphics/mesa-dri). I don't use NVIDIA GPUs atm. Maybe ports e0dd5a422029c + ports 87762c1bbcb6 should be reverted in favor of bundling via GH_TUPLE. > %%NVEGL%%lib/libnvidia-egl-gbm.so > %%NVEGL%%lib/libnvidia-egl-gbm.so.1 > %%NVEGL%%share/egl/egl_external_platform.d/15_nvidia_gbm.json These should be installed unconditionally (if exist). graphics/egl-wayland covers EGLStreams while graphics/mesa-libs covers GBM. As nvidia-drm.ko on FreeBSD unlike Linux was never supported by x11/nvidia-driver versions that lacked GBM there's no reason to use EGLStreams on FreeBSD. See also ports 95c12168657a. Created attachment 240716 [details] 525.89.02 (fixed Wayland conflicts) Thank you for checking. Here is a new version of the patch. Removed conflicting files. It just a revert a part of the patch. They were commented in the pkg-plist file earlier. Just there are new files in drivers which depends on libnvidia-egl-wayland.so.1. I added a new dependency for the driver, the port graphics/egl-wayland. > Maybe ports e0dd5a422029c + ports 87762c1bbcb6 should be reverted in favor of bundling via GH_TUPLE. I would rather to stay with current solution for now. The future stable version of the driver will bring again some changes to the provided libraries. We can think about it when there will be a new major stable version. > These should be installed unconditionally (if exist). graphics/egl-wayland covers EGLStreams while graphics/mesa-libs covers GBM. The reason why they are conditionals, is that they appeared in 525 version. At least I didn't spot them earlier. ;) (In reply to Bartek Jasicki from comment #2) Thanks for your hard work! Builds/working without unknown issue for me on working environment. (Using ports-mgmt/pkg_replace as root.) But unfortunately, poudriere build fails on staging as below. =======================<phase: stage >============================ ===> Staging for nvidia-driver-525.89.02_1 ===> Generating temporary packing list ===> src (install) ===> src/nvidia (install) install -T release -o 65534 -g 65534 -m 555 nvidia.ko /wrkdirs/usr/ports/x11/nvidia-driver/work/stage/boot/modules/ ===> src/nvidia-modeset (install) install -T release -o 65534 -g 65534 -m 555 nvidia-modeset.ko /wrkdirs/usr/ports/x11/nvidia-driver/work/stage/boot/modules/ ===> lib (install) ===> lib/libGLX_nvidia (install) ===> lib/libnvidia-tls (install) ===> lib/libnvidia-cfg (install) ===> lib/libnvidia-glcore (install) ===> lib/libnvidia-wayland-client (install) ===> lib/libvdpau_nvidia (install) ===> lib/libnvidia-glvkspirv (install) ===> lib/libnvidia-vulkan-producer (install) ===> lib/libnvidia-eglcore (install) ===> lib/libnvidia-glsi (install) ===> lib/libEGL_nvidia (install) ===> lib/libGLESv2_nvidia (install) ===> lib/libGLESv1_CM_nvidia (install) ===> lib/libnvidia-egl-wayland (install) ===> lib/libnvidia-ml (install) ===> lib/libnvidia-egl-gbm (install) ===> lib/libnvidia-allocator (install) mkdir: /usr/local/lib/gbm: Permission denied *** Error code 1 Stop. make[3]: stopped in /wrkdirs/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-525.89.02/lib/libnvidia-allocator *** Error code 1 Stop. make[2]: stopped in /wrkdirs/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-525.89.02/lib *** Error code 1 Stop. make[1]: stopped in /wrkdirs/usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86_64-525.89.02 *** Error code 1 Stop. make: stopped in /usr/ports/x11/nvidia-driver =>> Cleaning up wrkdir ===> Cleaning for nvidia-driver-525.89.02_1 build of x11/nvidia-driver | nvidia-driver-525.89.02_1 ended at Sun Mar 12 13:05:14 JST 2023 build time: 00:01:10 !!! build failure encountered !!! Created attachment 240791 [details] 525.89.02 fixup for attachment 240716 [details] > The reason why they are conditionals, is that they appeared in 525 > version. At least I didn't spot them earlier. ;) Already handled by the following: .if ${NVVERSION} < 495.02905 ${REINPLACE_CMD} -e '/libnvidia-egl-gbm\.so/d ; \ /15_nvidia_gbm\.json/d' ${TMPPLIST} .endif See the attached example how to maintain existing style. (In reply to Jan Beich from comment #4) Thanks! This made poudriere happy. Not sure why, but applying your patch over Bartek's patch applied failed some hunks on dry-run, but backing out Bartek's, hand-merging both patch and applying it succeeded. *** Bug 267220 has been marked as a duplicate of this bug. *** (In reply to Bartek Jasicki from comment #0) > 1. In previous versions of the driver, I had serious problems with 525 and 520 > series of the driver. Thanks for the update Bartek. I'd like to let the dust settle a little after recent bump to 515.x to assess the damage^Wimpact caused by it and tie some loose ends (missing explanations and references to relevant PRs in the scarce commit log). Kevin, please do not close PRs filed *earlier* as duplicates: not only this goes against the logic, but makes them harder to track down, review, and include in the commit message. Created attachment 240811 [details] 525.89.02 (merged Jan Beich fixes) (In reply to Jan Beich from comment #4) Thank you very much, Jan, for checking and the patch. I need new glasses, completely missed it. :) (In reply to Tomoaki AOKI from comment #5) Thank you for testing. I merged Jan's fixes into the new version of the patch. If it is not a problem, could you please check, if it works for you? (In reply to Alexey Dokuchaev from comment #7) I agree with waiting with approve the patch. I want to spend a bit more time on testing this version of the driver, plus I will be happy if someone else confirms that the problem mentioned in comment #0 does not exist. (In reply to Bartek Jasicki from comment #8) Thanks for updating the patch. I've compared your updated patch with mine, and the actual contexts matched. The only differences are index lines and line range (mine is hand-crafted). Just to be sure, tried dry-run of reverse patch and sanely finished. And sorry, I've not yet encountered the situations described on comment #0. Only configured for X (Wayland is pulled into as dependency, though). No __GL_SHADER_DISK_CACHE* configured on /etc/X11/xorg.conf. No Linux binaries which heavily uses OpenGL is installed. (In reply to Tomoaki AOKI from comment #9) Thank you very much for testing. About the issue from comment #0: 1. According to the Nvidia documentation, and my experience, OpenGL cache is always created. The user can only specify if the cache is per an application or per an account. If you don't set any options, then the driver will create the cache in $HOME/.cache/nvidia directory. There will be several directories with random names and inside them also several files with caches and indexes for them. 2. If not set manually, the default size of the cache is 256 MB. After reaching this amount, the cache will be cleaned/revalidated. The same happens when the driver is upgraded or downgraded. 3. The cache is produced by almost every application which uses GPU. For example, it created a couple of files in the cache's directory after running Kitty terminal emulator. It can grow a bit faster if you watch YouTube, or visit some graphical heavy pages. 4. Even playing modern Windows games with Dxvk 2.x which generates large amount of cache, it takes hours to reach 200 MB size in the cache. For me, it took around 3 to 5 days of normal usage + gaming. That's why I don't mind to wait for results from others. ;) Keep in mind there a few new libs in this version of the driver: libnvidia-nvvm.so, libnvidia-ngx.so, libnvoptix.so. They should be included in linux-nvidia-libs. Created attachment 240835 [details] 525.89.02 (added missing Linux libraries) (In reply to Alex S from comment #11) Thank you for the report. I've added missing files in the newest version of the patch, I hope all of them. But now linux-nvidia-libs definitely needs more tests. It's puzzling me why there are Windows libraries like nvngx.dll. They are not added in the patch. (In reply to Bartek Jasicki from comment #12) According to "Chapter 5. Listing of Installed Components" on README of Linux driver [1], it is NGX for Proton and Wine. So possibly users of Wine on linux emulation (is there any?) want it. Not sure such use case works or not. [1] http://us.download.nvidia.com/XFree86/Linux-x86_64/525.89.02/README/installedcomponents.html (In reply to Bartek Jasicki from comment #10) Thanks for your info. With my use case, there were 2 sets of *.bin and *.toc, around 390kB total on around 24hrs up time. (Not hardly using OpenGL, maybe.) (In reply to Tomoaki AOKI from comment #13) Thank you for pointing me there. I guess it isn't needed, because it should be included into an application, a game or a Linux Wine directory. Additionally, trying to include them, causes a crash of the installation script, due to unknown file format for "strip" command. I will look closer into the documentation, and probably update the patch in a couple of days. I'm not sure do the nvidia-ngx-updater file should be included too. (In reply to Tomoaki AOKI from comment #14) Yes, normally the cache grows very slowly. I started getting big sizes of it after update dxvk to 2.x series, which generates a lot of data. Created attachment 240915 [details]
525.89.02 (added more missing Linux libraries)
The new version of patch. I think, I found all needed Linux libraries and their symlinks, but it still needs to be tested by someone. Also, as I wrote earlier, removed nvidia-glx-updater, it seems to be application-based file, not need for the driver.
(In reply to Bartek Jasicki from comment #16) Thanks for updating. Built/installed fine for me. The only possible consumer of x11/linux-nvidia-libs* in the ports tree seems to be net-im/zoom, and unfortunately, I'm not using it. Needs someone else to pop in. The command line I've attempted for search is as below. % bfs /usr/ports/ -name "Makefile*" -exclude -name ".git" -exclude -name ".distfiles" -exclude -name "packages" | xargs rg -H "linux-nvidia-libs" The output was as follows at ports commit d69f12ccb038d2685f332a980f86dc5e47e94eec. /usr/ports/x11/linux-nvidia-libs-390/Makefile 5:MASTERDIR= ${.CURDIR}/../linux-nvidia-libs /usr/ports/x11/nvidia-driver/Makefile.orig 195:# `x11/linux-nvidia-libs' port or its slaves) /usr/ports/x11/nvidia-driver/Makefile.510 187:# `x11/linux-nvidia-libs' port or its slaves) /usr/ports/x11/linux-nvidia-libs-304/Makefile 5:MASTERDIR= ${.CURDIR}/../linux-nvidia-libs /usr/ports/x11/nvidia-driver/Makefile 198:# `x11/linux-nvidia-libs' port or its slaves) /usr/ports/x11/linux-nvidia-libs-340/Makefile 5:MASTERDIR= ${.CURDIR}/../linux-nvidia-libs /usr/ports/x11/linux-nvidia-libs-470/Makefile 5:MASTERDIR= ${.CURDIR}/../linux-nvidia-libs /usr/ports/x11/Makefile 216: SUBDIR += linux-nvidia-libs 217: SUBDIR += linux-nvidia-libs-304 218: SUBDIR += linux-nvidia-libs-340 219: SUBDIR += linux-nvidia-libs-390 220: SUBDIR += linux-nvidia-libs-470 /usr/ports/net-im/zoom/Makefile 24:LINUX_NVIDIA_LIBS_AVAILABLE= linux-nvidia-libs linux-nvidia-libs-304 linux-nvidia-libs-340 linux-nvidia-libs-390 /usr/ports/graphics/linux-c7-libglvnd/Makefile 15:CONFLICTS_INSTALL= linux-nvidia-libs linux-nvidia-libs-* The line 24 of net-im/zoom/Makefile was used as below. So it should pull x11/linux-nvidia-libs* if the admin chose any of them. LINUX_NVIDIA_LIBS_AVAILABLE= linux-nvidia-libs linux-nvidia-libs-304 linux-nvidia-libs-340 linux-nvidia-libs-390 OPTIONS_RADIO= PREINSTALL_GL_DRIVER OPTIONS_RADIO_PREINSTALL_GL_DRIVER= ${LINUX_NVIDIA_LIBS_AVAILABLE:tu:S/-/_/g} PREINSTALL_GL_DRIVER_DESC= Install OpenGL libraries for your system: .for p in ${LINUX_NVIDIA_LIBS_AVAILABLE} ${p:tu:S/-/_/g}_DESC= NVidia libraries x11/${p} ${p:tu:S/-/_/g}_RUN_DEPENDS= ${p}>0:x11/${p} .endfor (In reply to Tomoaki AOKI from comment #17) > The only possible consumer of x11/linux-nvidia-libs* in the ports tree seems to be net-im/zoom Any Linux OpenGL/Vulkan app is a "possible consumer". For Nvidia video card owners, that is. Not to mention that my little CUDA/NVENC/OpenCL hack depends on Linux libs. (In any case, I always test that thing well in advance of port updates.) (In reply to Alex S from comment #18) Of course. ;-) But if such softwares are in ports tree, they should explicitly depend on x11/linux-nvidia-libs* like how net-im/zoom does. Without it, how can we (and pkg database) know that it (implicitly) depending on x11/linux-nvidia-libs*? Currently just a FYI: Recently new feature branch 530.41.03 is created upstream. This version states, among others, that: "Fixed a bug that could cause excessive GPU power consumption at idle when driving multiple displays with a high refresh rate." Possibly this relates with Bug 268689 Comment 1, for maybe limited situation. (I've not bitten by the overheating, so cannot test at all.) This version incorporates files/extra-patch-src-nvidia_subr.c.in for x11/nvidia-driver and libnvidia-egl-wayland.so is bumped to 1.1.11 for x11/linux-nvidia-libs. Unfortunately, I have not enough time to dig into newly introduced libraries. (Possibly none, though.) but applying above changes allows building both ports. (In reply to Tomoaki AOKI from comment #20) Thank you for the information. :) I think it will be better to wait a bit longer with this one (two, maybe three weeks) and upgrading to 530 series as a new issue. About the overheating bug, no, it was the one from comment #0. At first glance, it was looking like something related to overheating, but after all it was related to the size of cache. I have been using Nvidia 525.60.11 since Dec 29 with none of the above problems encountered. I'll now update to latest 525.XXX and report again if anything has stopped working. (In reply to Bartek Jasicki from comment #0) Is there a panic dump for the supposedly GLCache-related crash? Did you confirm that panic dumps are working on this system, and rule out a filesystem corruption problem? (In reply to Theron Tarigo from comment #22) Unfortunately, I didn't get any core dumps related to the crash, that's why at first I thought, this is related to overheating. I didn't notice any files corrupted, even the cache file, which was caused the problem, was ok. Btw, I think we have one blocker here: bug #270483 (In reply to Bartek Jasicki from comment #21) I agree with keeping these ports track with latest production branch. But allowing builds with beta or new feature versions could help someone having problems and beta and/or new feature versions states fixing them. This means only Makefile (and possibly some extra patches) incoporates the support but not with distfiles. Unfortunately, on base main at commit 9b20ab1e1ef7d3de672ec20a62f26a605db8d3d0, amd64 fails to build nvidia-driver 530.41.03 with errors below. my previous test was on stable/13 at commit 38e0d28fa4e2f98ebb060441f0aeb0536d6fd202, amd64. --- nvidia_subr.o --- nvidia_subr.c:1187:13: error: incompatible integer to pointer conversion assigning to 'void *' from 'vm_offset_t' (aka 'unsigned long') [-Wint-conversion] address = NV_KMEM_ALLOC_CONTIG(size, flags, 0, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ nvidia_subr.c:1319:17: error: incompatible integer to pointer conversion assigning to 'void *' from 'vm_offset_t' (aka 'unsigned long') [-Wint-conversion] address = NV_KMEM_ALLOC_CONTIG(PAGE_SIZE, flags, 0, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. *** [nvidia_subr.o] Error code 1 Warnings are omitted. Maybe CFLAGS should be somehow modified. 525.89.02 builds fine even on main. I can upload the modified patch for testing, if anyone wants. (Hand-crafted based on the patch here. Just for allowing builds and runs on stable/13 and not at all tried on main until today.) Not yet tested at all, so just a FYI for now: nvidia-driver 525.105.17 is out upstream. This version for FreeBSD x64 states *Fixed a bug that could cause the nvidia-settings control panel to crash when resetting the display layout. *Fixed a bug that could cause excessive GPU power consumption at idle when driving multiple displays with a high refresh rate. Anyone struggling with overheating with mentioned configuration may give it a try. And Bug 270483, which Bartek stated as blocker, is closed as "overcome by event". (In reply to Tomoaki AOKI from comment #25) Thank you for the information. Personally, I would prefer to stay with this version of the driver and later will do a small incremental update. So, question to the maintainer and others also ;), update the patch to the newest version of the driver? The advantage of the update will be to keep the version with a Linux driver, if someone uses debootstrap for Linuxator. On a recent CURRENT (FreeBSD 14.0-CURRENT #7 main-n261934-4e703f445ef2: Sat Apr 1 07:08:09 CEST 2023 amd64) with an nvidia 960 board (oldish, I know), there is now problem in compiling AND running version nvidia-driver-525.105.17_1 x11/nvidia-driver There was once a Linux issue but I faced that issue in a state of "code transition on CURRENT" (pitfal) and it is gone by now. danfe can you state your intent for action on this PR. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=cbe3fe720370f09375c4c6e3157901a1de7c8a5d commit cbe3fe720370f09375c4c6e3157901a1de7c8a5d Author: Bartek Jasicki <thindil@laeran.pl.eu.org> AuthorDate: 2023-04-21 17:12:43 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2023-04-21 19:57:14 +0000 x11/nvidia-driver, x11/linux-nvidia-libs: update to 525.89.02 Changes https://www.nvidia.com/Download/driverResults.aspx/199660/en-us/ PR: 267220, 270060 Tested by: many Approved by: danfe (previous version), maintainer timeout x11/linux-nvidia-libs/Makefile | 32 ++++++++++++++++++++++++++++++-- x11/linux-nvidia-libs/distinfo | 6 +++--- x11/linux-nvidia-libs/pkg-plist | 19 +++++++++++++++++++ x11/nvidia-driver/Makefile | 19 ++++++++++++++++--- x11/nvidia-driver/distinfo | 6 +++--- x11/nvidia-driver/pkg-plist | 9 ++++++--- 6 files changed, 77 insertions(+), 14 deletions(-) A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0ab0e6c25141b61ab2d2ead44511bdb5aaaa1060 commit 0ab0e6c25141b61ab2d2ead44511bdb5aaaa1060 Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2023-04-21 19:32:36 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2023-04-21 19:57:15 +0000 x11/nvidia-driver, x11/linux-nvidia-libs: update to 525.105.17 Changes https://www.nvidia.com/Download/driverResults.aspx/202352/en-us/ PR: 270060 Approved by: maintainer timeout x11/linux-nvidia-libs/Makefile | 2 +- x11/linux-nvidia-libs/distinfo | 6 +++--- x11/nvidia-driver/Makefile | 2 +- x11/nvidia-driver/distinfo | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) Committed with some fixes. Thanks! A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/doc/commit/?id=fe27cb167ac0d42f7dfef344adb8c0b1779d921e commit fe27cb167ac0d42f7dfef344adb8c0b1779d921e Author: Graham Perrin <grahamperrin@FreeBSD.org> AuthorDate: 2023-04-22 04:57:18 +0000 Commit: Graham Perrin <grahamperrin@FreeBSD.org> CommitDate: 2023-04-22 04:57:18 +0000 Document x11/nvidia-driver 525.105.17 After a version update to any of the five or more (or less) NVIDIA drivers, habitually update the wiki https://wiki.freebsd.org/Graphics and the FreeBSD Handbook. https://bugs.freebsd.org/270060#c29 https://bugs.freebsd.org/270060#c30 PR: 270060 documentation/content/en/books/handbook/x11/_index.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) |