1 votes

Utilisez le gpu hybride NVIDIA uniquement pour CUDA et non pour KDE Plasma.

Il existe un question similaire et j'ai suivi cette réponse ici sur askubuntu : https://askubuntu.com/a/1158183/254943 . Cette solution a fonctionné exactement comme je le voulais. Malheureusement, après la mise à jour la plus récente, la solution a cessé de fonctionner et Xorg utilise à nouveau nvidia.

  • | NVIDIA-SMI 450.66 Version du pilote : 450.66 Version CUDA : 11.0 |
  • Linux XXX 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • plasmashell 5.18.5 | Qt : 5.12.8 | KDE Frameworks : 5.68.0 | kf5-config : 1.0

    $ cat /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf

    DO NOT EDIT. AUTOMATICALLY GENERATED BY gpu-manager

    Section "OutputClass" Identifier "Nvidia Prime" MatchDriver "nvidia-drm" Driver "nvidia" Option "AllowEmptyInitialConfiguration" Option "IgnoreDisplayDevices" "CRT"

    Option "PrimaryGPU" "Yes" <<< commented out

    ModulePath "/x86_64-linux-gnu/nvidia/xorg"

    EndSection

    added

    Section "OutputClass" Identifier "intel" MatchDriver "i915" Driver "modesetting" Option "PrimaryGPU" "yes"
    EndSection

J'ai essayé de le déboguer par moi-même mais je n'arrive pas à le réparer.

$ nvidia-smi  # shows running process /usr/lib/xorg/Xorg

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.66       Driver Version: 450.66       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 105...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   50C    P8    N/A /  N/A |      6MiB /  4040MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1257      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

0voto

KIC Points 150

Je pense avoir trouvé la solution. D'abord, j'ai déplacé le fichier 10-nvidia.conf. A la place j'ai ajouté un 10-intel.conf. Ensuite j'ai commenté chaque ligne du fichier 11-nvidia-prime.conf, c'est en fait un fichier vide. Puisque ce fichier est créé/écrit à chaque démarrage/arrêt de xserver, on doit le protéger avec chattr +i

$ pwd
/usr/share/X11

$ ls -l xorg.conf.d/
total 36K
drwxr-xr-x 2 root root 4.0K Okt 20 20:15 .
drwxr-xr-x 6 root root 4.0K Okt 20 18:12 ..
-rw-r--r-- 1 root root   92 Okt 22  2019 10-amdgpu.conf
-rw-r--r-- 1 root root  327 Okt 20 18:10 10-intel-only.conf
-rw-r--r-- 1 root root 1.4K Sep  4 15:34 10-quirks.conf
-rw-r--r-- 1 root root   92 Okt 22  2019 10-radeon.conf
-rw-r--r-- 1 root root  341 Okt 20 20:15 11-nvidia-prime.conf
-rw-r--r-- 1 root root 1.5K Mai 30 15:34 40-libinput.conf
-rw-r--r-- 1 root root 3.4K Mär 11  2020 70-wacom.conf

ls -l bak.xorg/
drwxr-xr-x 2 root root 4.0K Okt 20 20:08 .
drwxr-xr-x 6 root root 4.0K Okt 20 18:12 ..
-rw-r--r-- 1 root root  206 Okt  5 11:19 10-nvidia.conf
-rw-r--r-- 1 root root  333 Okt 20 20:08 11-nvidia-prime.conf

$ cat xorg.conf.d/10-intel-only.conf 
Section "ServerLayout"
    Identifier "Layout0"
    Option "AutoAddGPU" "false"
    Screen 0 "IntelScreen"
EndSection

Section "Device"
    Identifier "IntelDevice"
    BusID "PCI:0:2:0"
    Driver "intel" # or maybe "modesetting"?
EndSection

Section "Screen"
    Identifier "IntelScreen"
    Device "IntelDevice"
EndSection

enter image description here

SistemesEz.com

SystemesEZ est une communauté de sysadmins où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres sysadmins, poser vos propres questions ou résoudre celles des autres.

Powered by:

X