GTX1060的绝唱
- categories
- >
- AI
写在前面
GTX 1060 作为一款 2016 年发布的显卡,到 2026 年已经经过了 10 年的历程。NVIDIA 已宣布 Pascal(包括 GTX 1060)在 2025 年 10 月停止 Game Ready 驱动支持(NVIDIA announces end-of-life support for many of its GTX cards — but it’s not all bad news)。但是生活还得继续,我还希望笔记本再战 5 年,因此总结一些驱动和 CUDA 相关。
驱动限制
某日升级系统(Gentoo)后再启动后无法进入桌面系统。startx报错:No devices detected,查看xorg的日志发现:
98 [ 709.244] (II) modeset(G0): using drv /dev/dri/card0
99 [ 709.244] (WW) Falling back to old probe method for modesetting
100 [ 709.244] (WW) NVIDIA(0): The NVIDIA NVIDIA GeForce GTX 1060 with Max-Q Design GPU
101 [ 709.244] (WW) NVIDIA(0): installed in this system is supported through the NVIDIA
102 [ 709.244] (WW) NVIDIA(0): 580.xx Legacy drivers. Please visit
103 [ 709.244] (WW) NVIDIA(0): http://www.nvidia.com/object/unix.html for more
104 [ 709.244] (WW) NVIDIA(0): information. The 590.48.01 NVIDIA driver will ignore this
105 [ 709.244] (WW) NVIDIA(0): GPU. Continuing probe...
106 [ 709.244] (WW) Falling back to old probe method for modesetting
107 [ 709.244] (EE) No devices detected.
108 [ 709.244] (EE)
109 Fatal server error:
110 [ 709.244] (EE) no screens found(EE)
111 [ 709.244] (EE)
原因:错误安装了驱动,不支持590及以上驱动
sudo vim /etc/portage/package.mask/nvidia-drivers
设置屏蔽
>=x11-drivers/nvidia-drivers-581
重启后正常进入系统
PyTorch限制
Python3.12在使用yolo12的过程中,尽管pip安装没有任何报错,但不能使用GPU进行训练。
CUDA available: True
/home/vv/tmp/py_video/venv/lib/python3.12/site-packages/torch/cuda/**init**.py:283: UserWarning:
Found GPU0 NVIDIA GeForce GTX 1060 which is of cuda capability 6.1.
Minimum and Maximum cuda capability supported by this version of PyTorch is
(7.0) - (12.0)
warnings.warn(
/home/vv/tmp/py_video/venv/lib/python3.12/site-packages/torch/cuda/**init**.py:304: UserWarning:
Please install PyTorch with a following CUDA
configurations: 12.6 following instructions at
https://pytorch.org/get-started/locally/
warnings.warn(matched_cuda_warn.format(matched_arches))
/home/vv/tmp/py_video/venv/lib/python3.12/site-packages/torch/cuda/**init**.py:326: UserWarning:
NVIDIA GeForce GTX 1060 with CUDA capability sm_61 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_70 sm_75 sm_80 sm_86 sm_90 sm_100 sm_120.
If you want to use the NVIDIA GeForce GTX 1060 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(
Device: NVIDIA GeForce GTX 1060
CUDA runtime: 12.8
主要是因为2024 年底~2025 年开始,PyTorch 官方的新版本已经逐步放弃了对 sm_61 的支持,目前(2026年1月)主流版本最低要求通常是 sm_70 或 sm_75,所以才会看到这样的警告:
NVIDIA GeForce GTX 1060 with CUDA capability sm_61 is not compatible with the current PyTorch installation.
一些显卡与架构如下:
| 显卡 | 架构 | SM |
|---|---|---|
| GTX 750 / 750Ti | Maxwell | sm_50 |
| GTX 9xx | Maxwell | sm_52 |
| GTX 10xx | Pascal | sm_61 |
| GTX 16xx | Turing | sm_75 |
| RTX 20xx | Turing | sm_75 |
| RTX 30xx | Ampere | sm_86 |
| RTX 40xx | Ada | sm_89 |
测试脚本:
import torch
print("PyTorch version:", torch.__version__)
print("CUDA available:", torch.cuda.is_available())
print("Device count:", torch.cuda.device_count())
print("Current device:", torch.cuda.get_device_name(0) if torch.cuda.is_available() else "CPU")
print("Supported architectures:", torch.cuda.get_arch_list())
输出如下无报警即成功:
PyTorch version: 2.7.1+cu126
CUDA available: True
Device count: 1
Current device: NVIDIA GeForce GTX 1060
Supported architectures: ['sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'sm_90']
结合GPT,Grok后测出的符合的版本是:
Python3.12在CUDA版本12.6的情况下需要安装
- torch 2.7.1
- torchvision 0.22.1
- torchaudio 2.7.1
pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/cu126
comment:
- Valine
- LiveRe
- ChangYan