Depuis que les noyaux sont passés à la version 6.8 j’ai le même problème avec drivers 470. Des mises à jours existent il me semble, mais elles ne sont pas encore disponible pour Fedora.
Mais il y a une astuce qui a très bien fonctionné pour moi.
Si tu essayes de forcer la construction du module nvidia pour ton kernel en faisant :
sudo akmods --kernels $(uname -r) --rebuild --force
et que ca échoue.
Regarde dans le log dans le répertoire :
/etc/var/cache/akmods
Vers la fini du log si tu peux lire ceci :
error: ‘DRM_UNLOCKED’ undeclared here (not in a function); did you mean ‘VM_LOCKED’?
C’est que c’est un problème lié au fichier
/usr/src/kernels/Version 6.8 de ton noyeau/include/drm/drm_ioctl.h
Il y manque la définition de DRM_UNLOCKED
Il faut que tu ouvres le fichier
/usr/src/kernel/version 6.8 de ton noyau/include/drm/drm_ioctl.h
que tu y cherches ce bout de code :
enum drm_ioctl_flags {
/**
* @DRM_AUTH:
*
* This is for ioctl which are used for rendering, and require that the
* file descriptor is either for a render node, or if it's a
* legacy/primary node, then it must be authenticated.
*/
DRM_AUTH = BIT(0),
/**
* @DRM_MASTER:
*
* This must be set for any ioctl which can change the modeset or
* display state. Userspace must call the ioctl through a primary node,
* while it is the active master.
*
* Note that read-only modeset ioctl can also be called by
* unauthenticated clients, or when a master is not the currently active
* one.
*/
DRM_MASTER = BIT(1),
/**
* @DRM_ROOT_ONLY:
*
* Anything that could potentially wreak a master file descriptor needs
* to have this flag set. Current that's only for the SETMASTER and
* DROPMASTER ioctl, which e.g. logind can call to force a non-behaving
* master (display compositor) into compliance.
*
* This is equivalent to callers with the SYSADMIN capability.
*/
DRM_ROOT_ONLY = BIT(2),
/**
* @DRM_RENDER_ALLOW:
*
* This is used for all ioctl needed for rendering only, for drivers
* which support render nodes. This should be all new render drivers,
* and hence it should be always set for any ioctl with DRM_AUTH set.
* Note though that read-only query ioctl might have this set, but have
* not set DRM_AUTH because they do not require authentication.
*/
DRM_RENDER_ALLOW = BIT(5),
};
et que tu y ajoutes celui-ci :
( ce bout de code vient de l’entête drm_ioctl.h
des versions 6.7 du noyau. Pour je ne sais quelle raison depuis les versions 6.8 il a été modifiés et c’est ce qui cause l’échec de la compilation du module)
/**
* @DRM_UNLOCKED:
*
* Whether &drm_ioctl_desc.func should be called with the DRM BKL held
* or not. Enforced as the default for all modern drivers, hence there
* should never be a need to set this flag.
*
* Do not use anywhere else than for the VBLANK_WAIT IOCTL, which is the
* only legacy IOCTL which needs this.
*/
DRM_UNLOCKED = BIT(4),
Après avoir copié le bout de code la version complète de l’enum
drm_ioctl_flags
doit ressemblé à ça ( fait directement un copié collé de ce bout de code ça sera plus simple ):
enum drm_ioctl_flags {
/**
* @DRM_AUTH:
*
* This is for ioctl which are used for rendering, and require that the
* file descriptor is either for a render node, or if it's a
* legacy/primary node, then it must be authenticated.
*/
DRM_AUTH = BIT(0),
/**
* @DRM_MASTER:
*
* This must be set for any ioctl which can change the modeset or
* display state. Userspace must call the ioctl through a primary node,
* while it is the active master.
*
* Note that read-only modeset ioctl can also be called by
* unauthenticated clients, or when a master is not the currently active
* one.
*/
DRM_MASTER = BIT(1),
/**
* @DRM_ROOT_ONLY:
*
* Anything that could potentially wreak a master file descriptor needs
* to have this flag set. Current that's only for the SETMASTER and
* DROPMASTER ioctl, which e.g. logind can call to force a non-behaving
* master (display compositor) into compliance.
*
* This is equivalent to callers with the SYSADMIN capability.
*/
DRM_ROOT_ONLY = BIT(2),
/**
* @DRM_UNLOCKED:
*
* Whether &drm_ioctl_desc.func should be called with the DRM BKL held
* or not. Enforced as the default for all modern drivers, hence there
* should never be a need to set this flag.
*
* Do not use anywhere else than for the VBLANK_WAIT IOCTL, which is the
* only legacy IOCTL which needs this.
*/
DRM_UNLOCKED = BIT(4),
/**
* @DRM_RENDER_ALLOW:
*
* This is used for all ioctl needed for rendering only, for drivers
* which support render nodes. This should be all new render drivers,
* and hence it should be always set for any ioctl with DRM_AUTH set.
* Note though that read-only query ioctl might have this set, but have
* not set DRM_AUTH because they do not require authentication.
*/
DRM_RENDER_ALLOW = BIT(5),
};
Après avoir enregistré les modifications faites sur le fichier drm_ioctl.h
la reconstruction du module peut avoir lieu :
sudo akmods --kernels $(uname -r) --rebuild --force
Je ne suis pas sur que --rebuild
soit vraiment nécessaire, mais ca fonctionnera quand même.
Edit Nicosss : Correction balises Markdown -> Voir FAQ