x11-drivers/nvidia-drivers: update KMS_HELPER error message and sed

Error message updated to help users enable it on kernel 5.15.3+
which no longer selects KMS_HELPER with CONFIG_DRM_FBDEV_EMULATION.

This may unfortunately cause a poor surprise (failing Xorg) to users
that did not notice this newly appearing message with minimal kernels
and didn't have a custom xorg.conf forcing nvidia.

Also modified sed to ensure nvidia-drm is properly built with support
if KMS_HELPER is a module and DRM is not (revbump latest arch/~arch
for this).

Bug: https://bugs.gentoo.org/824594
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2021-11-19 01:07:59 -05:00
parent b40a4ff849
commit 14a3189a2e
7 changed files with 36 additions and 22 deletions

View File

@@ -97,9 +97,11 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and optional nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead.
390.xx branch: also used by a GLX workaround needed for OpenGL."
With 390.xx drivers, also used by a GLX workaround needed for OpenGL.
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
use amd64 || use x86 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -143,7 +145,7 @@ src_prepare() {
fi
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \

View File

@@ -95,8 +95,10 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead."
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -133,7 +135,7 @@ src_prepare() {
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \

View File

@@ -100,8 +100,10 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead."
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -155,7 +157,7 @@ src_prepare() {
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \

View File

@@ -94,8 +94,10 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead."
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -149,7 +151,7 @@ src_prepare() {
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \

View File

@@ -94,8 +94,10 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead."
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -149,7 +151,7 @@ src_prepare() {
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \

View File

@@ -97,8 +97,10 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead."
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -152,7 +154,7 @@ src_prepare() {
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \

View File

@@ -96,8 +96,10 @@ pkg_setup() {
!DEBUG_MUTEXES"
local ERROR_DRM_KMS_HELPER="CONFIG_DRM_KMS_HELPER: is not set but needed for Xorg auto-detection
of drivers (no custom config), and for wayland / nvidia-drm.modeset=1.
Cannot be directly selected in the kernel's menuconfig, so enable
options such as CONFIG_DRM_FBDEV_EMULATION instead."
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.
Note: DRM_SIMPLEDRM may cause issues and is better disabled for now."
use amd64 && kernel_is -ge 5 8 && CONFIG_CHECK+=" X86_PAT" #817764
@@ -151,7 +153,7 @@ src_prepare() {
default
# prevent detection of incomplete kernel DRM support (bug #603818)
sed 's/defined(CONFIG_DRM)/defined(CONFIG_DRM_KMS_HELPER)/' \
sed 's/defined(CONFIG_DRM/defined(CONFIG_DRM_KMS_HELPER/g' \
-i kernel/conftest.sh || die
sed -e '/Exec=\|Icon=/s/_.*/nvidia-settings/' \