From e374e165c2ee372e9c6d10860ea6ef47f180f6b2 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 2 Oct 2022 07:12:21 +0100 Subject: gentoo auto-resync : 02:10:2022 - 07:12:21 --- .../nvidia-drivers-470.141.03.ebuild | 64 +++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) (limited to 'x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild') diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild index f956843454c4..0f4634979526 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.141.03.ebuild @@ -99,7 +99,7 @@ pkg_setup() { Cannot be directly selected in the kernel's menuconfig, and may need selection of a DRM device even if unused, e.g. CONFIG_DRM_AMDGPU=m or DRM_I915=y, DRM_NOUVEAU=m also acceptable if a module and not built-in." - local ERROR_X86_KERNEL_IBT="X86_KERNEL_IBT: is set, be warned the modules may not load with it. + local ERROR_X86_KERNEL_IBT="CONFIG_X86_KERNEL_IBT: is set, be warned the modules may not load. If run into problems, either unset or pass ibt=off to the kernel." use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764 @@ -115,6 +115,68 @@ pkg_setup() { [[ ${MERGE_TYPE} == binary ]] && return + # do some extra checks manually as it gets messy to handle builtin-only + # and some other conditional checks through CONFIG_CHECK + # TODO?: maybe move other custom checks here for uniformity + local warn=() + + if linux_chkconfig_builtin DRM_NOUVEAU; then + # suggest =m given keeps KMS_HELPER enabled and can serve as fallback + warn+=( + " CONFIG_DRM_NOUVEAU: is builtin (=y), and will prevent loading NVIDIA" + " modules (can be safely kept as a module (=m) instead)." + ) + fi + + if linux_chkconfig_builtin DRM_SIMPLEDRM; then + # wrt prebuilts, Fedora is pushing =y and gentoo-kernel-bin uses its + # configs (bug #840439), but without Fedora's kernel patch to + # workaround this issue (which is unlikely to work for us anyway) + # https://github.com/NVIDIA/open-gpu-kernel-modules/issues/228 + warn+=( + " CONFIG_DRM_SIMPLEDRM: is builtin (=y), and may conflict with NVIDIA" + " (i.e. blanks when X/wayland starts, and tty loses display)." + " For prebuilt kernels, unfortunately no known good workarounds." + ) + fi + + if ! linux_chkconfig_present FB_EFI && + ! linux_chkconfig_present FB_SIMPLE && + ! linux_chkconfig_present FB_VESA + then + # nvidia-drivers does not handle the tty (beside mode restoration) but, + # given few options are viable, try to warn if all missing + warn+=( + " CONFIG_FB_(EFI|SIMPLE|VESA): none set, but note at least one is normally" + " needed to get a display for the tty console. In most cases, it is" + " recommended to enable FB_EFI=y and disable FB_SIMPLE (can be quirky)." + " Non-EFI systems are likely to want FB_VESA=y. Users with multiple GPUs" + " or not using the tty may be able to safely ignore this warning." + ) + fi + + if kernel_is -ge 5 18 13; then + if linux_chkconfig_present FB_SIMPLE; then + warn+=( + " CONFIG_FB_SIMPLE: is set, recommended to disable and switch to FB_EFI" + " as it is currently known broken with >=kernel-5.18.13 + NVIDIA." + " https://github.com/NVIDIA/open-gpu-kernel-modules/issues/341" + ) + fi + + if linux_chkconfig_present SYSFB_SIMPLEFB && + { linux_chkconfig_present FB_EFI || linux_chkconfig_present FB_VESA; } + then + warn+=( + " CONFIG_SYSFB_SIMPLEFB: is set, this may prevent FB_EFI or FB_VESA" + " from providing a working tty console display (ignore if unused)." + ) + fi + fi + + (( ${#warn[@]} )) && + ewarn "Detected potential configuration issues with used kernel:${warn[*]/#/$'\n'}" + BUILD_PARAMS='NV_VERBOSE=1 IGNORE_CC_MISMATCH=yes SYSSRC="${KV_DIR}" SYSOUT="${KV_OUT_DIR}"' BUILD_TARGETS="modules" -- cgit v1.2.3