2021年7月18日 星期日

Gigabyte_AOURS setting

環境: Xubuntu 20.04
kernel: 5.8.0-59-generic

  • Ethernet Card (RTL8125)
    lspci -knn | grep Eth -A3
    
    2e:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller [10ec:8125] (rev 05)
            Subsystem: Gigabyte Technology Co., Ltd RTL8125 2.5GbE Controller [1458:78d2]
            Kernel driver in use: r8125
            Kernel modules: r8125
    
    
    下載
    
    $ sudo ./autorun.sh
    
    Check old driver and unload it.
    rmmod r8169
    Build the module and install
    At main.c:160:
    - SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
    - SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
    sign-file: certs/signing_key.pem: No such file or directory
    Warning: modules_install: missing 'System.map' file. Skipping depmod.
    Backup r8169.ko
    rename r8169.ko to r8169.bak
    DEPMOD 5.8.0-59-generic
    load module r8125
    Updating initramfs. Please wait.
    update-initramfs: Generating /boot/initrd.img-5.8.0-59-generic
    Completed.
  • ref: askubuntu

  • Nvidia Driver (Xubutn 20.04, kernel: 5.8.0-59-generic)
    $lspci -k | grep -EA2 'VGA|NVIDIA' -A 3
    00:02.0 VGA compatible controller:
    Intel Corporation Device 9a60 (rev 01) DeviceName: Onboard - Video Subsystem: Gigabyte Technology Co., Ltd Device 78cc Kernel driver in use: i915 -- 01:00.0 VGA compatible controller: NVIDIA Corporation Device 249d (rev a1) Subsystem: Gigabyte Technology Co., Ltd Device 78cc Kernel driver in use: nvidia

    $ ubuntu-drivers devices(driver: nvidia-driver-460 - distro non-free recommended)
    裝 nvidia-460 (470+cuda 11.2/11.4都有問題 = =")
    
    $ sudo ubuntu-drivers autoinstall
    ...
    ...
    Setting up libstdc++6:i386 (10.3.0-1ubuntu1~20.04) ...
    Setting up nvidia-utils-460 (460.80-0ubuntu0.20.04.2) ...
    Setting up libnvidia-decode-460:amd64 (460.80-0ubuntu0.20.04.2) ...
    Setting up libnvidia-ifr1-460:amd64 (460.80-0ubuntu0.20.04.2) ...
    Setting up libdrm-amdgpu1:i386 (2.4.102-1ubuntu1~20.04.1) ...
    Setting up libwayland-client0:i386 (1.18.0-1) ...
    Setting up linux-modules-nvidia-460-5.8.0-59-generic (5.8.0-59.66~20.04.1) ...
    linux-image-nvidia-5.8.0-59-generic: constructing .ko files
    nvidia-drm.ko: OK
    nvidia-modeset.ko: OK
    nvidia-uvm.ko: OK
    nvidia.ko: OK
    Setting up nvidia-compute-utils-460 (460.80-0ubuntu0.20.04.2) ...
    Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
    Adding system user `nvidia-persistenced' (UID 123) ...
    Adding new group `nvidia-persistenced' (GID 133) ...
    Adding new user `nvidia-persistenced' (UID 123) with group `nvidia-persistenced' ...
    Not creating home directory `/nonexistent'.
    Setting up libxdmcp6:i386 (1:1.1.3-0ubuntu1) ...
    Setting up libdrm-nouveau2:i386 (2.4.102-1ubuntu1~20.04.1) ...
    Setting up libxcb1:i386 (1.14-2) ...
    Setting up libxcb-xfixes0:i386 (1.14-2) ...
    Setting up libdrm-radeon1:i386 (2.4.102-1ubuntu1~20.04.1) ...
    Setting up libxcb-glx0:i386 (1.14-2) ...
    Setting up libedit2:i386 (3.1-20191231-1) ...
    Setting up libdrm-intel1:i386 (2.4.102-1ubuntu1~20.04.1) ...
    Setting up libxcb-present0:i386 (1.14-2) ...
    Setting up libllvm11:i386 (1:11.0.0-2~ubuntu20.04.1) ...
    Setting up libnvidia-encode-460:amd64 (460.80-0ubuntu0.20.04.2) ...
    Setting up libxcb-sync1:i386 (1.14-2) ...
    Setting up libxcb-dri2-0:i386 (1.14-2) ...
    Setting up libxcb-randr0:i386 (1.14-2) ...
    Setting up libx11-6:i386 (2:1.6.9-2ubuntu1.2) ...
    Setting up linux-modules-nvidia-460-generic-hwe-20.04 (5.8.0-59.66~20.04.1) ...
    Setting up nvidia-driver-460 (460.80-0ubuntu0.20.04.2) ...
    Setting up libxcb-dri3-0:i386 (1.14-2) ...
    Setting up mesa-vulkan-drivers:i386 (20.2.6-0ubuntu0.20.04.1) ...
    Setting up libxdamage1:i386 (1:1.1.5-2) ...
    Setting up libgl1-mesa-dri:i386 (20.2.6-0ubuntu0.20.04.1) ...
    Setting up libxext6:i386 (2:1.3.4-0ubuntu1) ...
    Setting up libxxf86vm1:i386 (1:1.1.4-1build1) ...
    Setting up libxfixes3:i386 (1:5.0.3-2) ...
    Setting up libnvidia-gl-460:i386 (460.80-0ubuntu0.20.04.2) ...
    Setting up libnvidia-decode-460:i386 (460.80-0ubuntu0.20.04.2) ...
    Setting up libglx-mesa0:i386 (20.2.6-0ubuntu0.20.04.1) ...
    Setting up libglx0:i386 (1.3.2-1~ubuntu0.20.04.1) ...
    Setting up libgl1:i386 (1.3.2-1~ubuntu0.20.04.1) ...
    Setting up libnvidia-encode-460:i386 (460.80-0ubuntu0.20.04.2) ...
    Setting up libnvidia-ifr1-460:i386 (460.80-0ubuntu0.20.04.2) ...
    Setting up libnvidia-fbc1-460:i386 (460.80-0ubuntu0.20.04.2) ...
    Processing triggers for mime-support (3.64ubuntu1) ...
    Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
    Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
    Processing triggers for man-db (2.9.1-1) ...
    Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
    Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
    update-initramfs: Generating /boot/initrd.img-5.8.0-59-generic
    Processing triggers for linux-image-5.8.0-59-generic (5.8.0-59.66~20.04.1) ...
    /etc/kernel/postinst.d/initramfs-tools:
    update-initramfs: Generating /boot/initrd.img-5.8.0-59-generic
    /etc/kernel/postinst.d/zz-update-grub:
    Sourcing file `/etc/default/grub'
    Sourcing file `/etc/default/grub.d/init-select.cfg'
    Generating grub configuration file ...
    Found linux image: /boot/vmlinuz-5.8.0-59-generic
    Found initrd image: /boot/initrd.img-5.8.0-59-generic
    Found linux image: /boot/vmlinuz-5.8.0-43-generic
    Found initrd image: /boot/initrd.img-5.8.0-43-generic
    Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
    Adding boot menu entry for UEFI Firmware Settings
    done
    Trying to select the on-demand PRIME profile
    Info: selecting the on-demand profile
    Writing /lib/modprobe.d/nvidia-runtimepm.conf
    Updating the initramfs. Please wait for the operation to complete:
    Done
    
  • 目前問題:
    裝nvidia-driver-470 + cuda 11.2/11.4不是進不了系統就是會出現下面問題
     $ dmesg | grep NVRM
    NVRM: rm_init_adapter failed for device bearing minor number
    自行手動安裝的話,好像需要對UEFI做些設定才行

    check
    $ nvidia-smi
    
    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 460.80       Driver Version: 460.80       CUDA Version: 11.2     |
    |-------------------------------+----------------------+----------------------+
    | 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 RTX 307...  Off  | 00000000:01:00.0 Off |                  N/A |
    | N/A   37C    P0    18W /  N/A |      5MiB /  7982MiB |      0%      Default |
    |                               |                      |                  N/A |
    +-------------------------------+----------------------+----------------------+
    
    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |    0   N/A  N/A       964      G   /usr/lib/xorg/Xorg                  4MiB |
    +-----------------------------------------------------------------------------+
    

  • Cuda 11.2 (才支援 compute_86)

    下載 (11.4需要nvidia-driver-470, 所以裝11.2)
    $ wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
    $ sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
    $ wget https://developer.download.nvidia.com/compute/cuda/11.2.0/local_installers/cuda-repo-ubuntu2004-11-2-local_11.2.0-460.27.04-1_amd64.deb
    $ sudo dpkg -i cuda-repo-ubuntu2004-11-2-local_11.2.0-460.27.04-1_amd64.deb
    $ sudo apt-key add /var/cuda-repo-ubuntu2004-11-2-local/7fa2af80.pub
    $ sudo apt-get update
    $ apt-cache search cuda-11-2 (應該只會出現一個 cuda-11-2)
    $ sudo apt-get -y install cuda-11-2 (安裝前確認不會裝 nvidia-driver-470)
    
    一開始裝的是cuda-10.2,然後就是一連串問題的開始:
    編譯darknet
    Error 804: forward compatibility was attempted on non supported HW
    gemfield error: 804
    下載cuda-samples,然後要編譯deviceQuery,出錯
    nvcc fatal : Unknown option '--threads'
    發現cuda-10.2沒有支援compute_86, 要cuda-11.2才有

  • Brightness panel
    $ vim /sys/class/backlight/intel_backlight
    $ cat max_brightness
    $ vim brightness

  • Disable Keyboard RGB backlight
    Fn + Space

  • Disable Touchpad
    $ xinput list
    $ xinput --disable 25
    ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ GIGABYTE Fusion RGB KB Mouse id=14 [slave pointer (2)] ⎜ ↳ GIGABYTE Fusion RGB KB Consumer Control id=16 [slave pointer (2)] ⎜ ↳ Microsoft Microsoft® Nano Transceiver v2.0 Consumer Control id=19 [slave pointer (2)] ⎜ ↳ Microsoft Microsoft® Nano Transceiver v2.0 Mouse id=20 [slave pointer (2)] ⎜ ↳ Microsoft Microsoft® Nano Transceiver v2.0 Consumer Control id=21 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=25 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Video Bus id=7 [slave keyboard (3)] ↳ Video Bus id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Power Button id=10 [slave keyboard (3)] ↳ Sleep Button id=11 [slave keyboard (3)] ↳ GIGABYTE Fusion RGB KB id=12 [slave keyboard (3)] ↳ GIGABYTE Fusion RGB KB id=13 [slave keyboard (3)] ↳ GIGABYTE Fusion RGB KB System Control id=15 [slave keyboard (3)] ↳ GIGABYTE Fusion RGB KB Wireless Radio Control id=17 [slave keyboard (3)] ↳ Microsoft Microsoft® Nano Transceiver v2.0 id=18 [slave keyboard (3)] ↳ Microsoft Microsoft® Nano Transceiver v2.0 System Control id=22 [slave keyboard (3)] ↳ USB2.0 HD UVC WebCam: USB2.0 HD id=23 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=24 [slave keyboard (3)] ↳ GIGABYTE Fusion RGB KB Consumer Control id=26 [slave keyboard (3)] ↳ Microsoft Microsoft® Nano Transceiver v2.0 Consumer Control id=27 [slave keyboard (3)]

  • Backup
    ~/home/$USER/.config/google-chrome/
    ~/home/$USER/.config/git/
    ~/home/$USER/.config/Google/
    ~/home/$USER/.config/ibus/
    ~/home/$USER/.config/Mousepad/
    ~/home/$USER/.config/nnn/
    ~/home/$USER/.config/autostart/
    ~/home/$USER/.config/terminator/
    ~/home/$USER/.config/xfce4
    ~/home/$USER/.config/xubuntu
    
    ~/home/$USER/.bashrc
    ~/home/$USER/.fzf/
    ~/home/$USER/.fzf.bash
    ~/home/$USER/.gitconfig
    ~/home/$USER/.tmux/
    ~/home/$USER/.tmux.conf
    ~/home/$USER/.vimrc
    ~/home/$USER/.vim/
    ~/home/$USER/.thunderbird/
    
    ~/home/$USER/.local/share/applications/

沒有留言:

張貼留言