顯示具有 ubuntu 標籤的文章。 顯示所有文章
顯示具有 ubuntu 標籤的文章。 顯示所有文章

2024年8月16日 星期五

Ubuntu 20.04 安裝 ASUS TUF Gaming B650m PLUS WiFi 驅動程式

簡單來說

這張板子安裝了Ubuntu 20.04 後,找不到 wifi 選項

幸好插上實體網路線還能用

一般來說就是沒驅動程式

上網 google 這板子用哪個 wifi 晶片還找不到

一直到 ASUS 的驅動程式下載網頁才看到晶片名稱

https://www.asus.com/tw/motherboards-components/motherboards/tuf-gaming/tuf-gaming-b650m-plus-wifi/helpdesk_download?model2Name=TUF-GAMING-B650M-PLUS-WIFI


Realtek RTL8852BE WiFi driver V6001.15.124.0 For Windows 10/11 64-bit.
版本 6001.15.124.0
6.15 MB
2022/09/13

Please install the corresponding driver according to the WIFI/BT chip on your motherboard.

知道晶片名稱再來下關鍵字就簡單多了

找到下面兩篇

https://blog.csdn.net/qq_75220669/article/details/137251306

https://ubuntuforums.org/showthread.php?t=2484689

為避免以後連結失效

這裡將需要的步驟複製貼上

sudo apt update
sudo apt install git make gcc bc

查看核心版本

uname -r

低於 5.18 => https://github.com/HRex39/rtl8852be.git

高於 5.18=> https://github.com/HRex39/rtl8852be.git -b dev


git clone https://github.com/HRex39/rtl8852be.git
cd rtl8852be
make    /*  如果要 multi-thread build 的話,輸入 make -j$(nproc)  */
sudo make install
sudo modprobe 8852be


走完步驟 WiFi 就可以使用了


2024年6月4日 星期二

ubuntu 20.04 安裝 CUDA 11.8 for RTX 4090

 先上個連結

https://gist.github.com/MihailCosmin/affa6b1b71b43787e9228c25fe15aeba?permalink_comment_id=4665431

上面這連結是在講 ubuntu 22.04 怎麼裝 CUDA 11.8

他的最後更新時間是 Oct 29, 2023

而現在是 June 04, 2024

NV Driver 版號又不太一樣了,在這紀錄一下踩坑紀錄

====================先照貼原本的內容====================

#!/bin/bash ### steps #### # verify the system has a cuda-capable gpu # download and install the nvidia cuda toolkit and cudnn # setup environmental variables # verify the installation ### ### to verify your gpu is cuda enable check lspci | grep -i nvidia ### If you have previous installation remove it first. sudo apt purge nvidia* -y sudo apt remove nvidia-* -y sudo rm /etc/apt/sources.list.d/cuda* sudo apt autoremove -y && sudo apt autoclean -y sudo rm -rf /usr/local/cuda* # system update sudo apt update && sudo apt upgrade -y # install other import packages sudo apt install g++ freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libglu1-mesa libglu1-mesa-dev # first get the PPA repository driver sudo add-apt-repository ppa:graphics-drivers/ppa sudo apt update # find recommended driver versions for you ubuntu-drivers devices # install nvidia driver with dependencies sudo apt install libnvidia-common-515 libnvidia-gl-515 nvidia-driver-515 -y # reboot sudo reboot now # verify that the following command works nvidia-smi sudo wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /" # Update and upgrade sudo apt update && sudo apt upgrade -y # installing CUDA-11.8 sudo apt install cuda-11-8 -y # setup your paths echo 'export PATH=/usr/local/cuda-11.8/bin:$PATH' >> ~/.bashrc echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc source ~/.bashrc sudo ldconfig # install cuDNN v11.8 # First register here: https://developer.nvidia.com/developer-program/signup CUDNN_TAR_FILE="cudnn-linux-x86_64-8.7.0.84_cuda11-archive.tar.xz" sudo wget https://developer.download.nvidia.com/compute/redist/cudnn/v8.7.0/local_installers/11.8/cudnn-linux-x86_64-8.7.0.84_cuda11-archive.tar.xz sudo tar -xvf ${CUDNN_TAR_FILE} sudo mv cudnn-linux-x86_64-8.7.0.84_cuda11-archive cuda # copy the following files into the cuda toolkit directory. sudo cp -P cuda/include/cudnn.h /usr/local/cuda-11.8/include sudo cp -P cuda/lib/libcudnn* /usr/local/cuda-11.8/lib64/ sudo chmod a+r /usr/local/cuda-11.8/lib64/libcudnn* # Finally, to verify the installation, check nvidia-smi nvcc -V # install Pytorch (an open source machine learning framework) pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

====================以下是要更改的內容====================

# install nvidia driver with dependencies sudo apt install libnvidia-common-535 libnvidia-gl-535 nvidia-driver-535 -y

因為 driver 版本更新,這個時間點已經找不到 515 了

所以這邊把 515 改成 535


# verify that the following command works nvidia-smi sudo wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"

這邊講的都是 ubuntu 22.04

我要的版本是 20.04,可以去下面這個網址

https://developer.nvidia.com/cuda-11-8-0-download-archive

選擇 Linux -> x86_64 -> Ubuntu -> 20.04 -> deb(network)

他會列出 Installation Instructions 如下

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.debsudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda

注意上面最後這句還有坑

# installing CUDA-11.8 sudo apt install cuda-11-8 -y

如果不指定版本的話他預設裝的版本一直安裝失敗

後來找到有人說其實可以指定 driver 版本

可以寫成下列的樣子

# installing CUDA-11.8 sudo apt install cuda-11-8 cuda-drivers=535.161.08-1

後面的步驟就沒有不同了

照著複製貼上即可成功安裝