Linux/显卡:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
 
(未显示同一用户的7个中间版本)
第1行: 第1行:
[[Linux|返回上一级]]
[[Linux|返回上一级]]
== 检查 ==
== 检查 ==
=== glxinfo ===
确定显卡程序已经安装。
{{shc_out|<syntaxhighlight lang="bash">
glxinfo | grep rendering</syntaxhighlight>|<syntaxhighlight lang="javascript">
direct rendering: Yes
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
{{shc_out|<syntaxhighlight lang="bash">
glxinfo | grep -i rend</syntaxhighlight>|<syntaxhighlight lang="javascript">
direct rendering: Yes
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_MESA_query_renderer,
    Renderbuffer free memory - total: 7686 MB, largest block: 6083 MB
    Renderbuffer free aux. memory - total: 56154 MB, largest block: 42137 MB
OpenGL renderer string: Radeon RX 5500 XT
    GL_ARB_compute_shader, GL_ARB_conditional_render_inverted,
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,
    GL_ARB_conditional_render_inverted, GL_ARB_conservative_depth,
    GL_NV_conditional_render, GL_NV_copy_depth_to_color, GL_NV_copy_image,
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
=== lspci ===
检测显卡驱动版本
检测显卡驱动版本


第41行: 第65行:
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
{{shc|<syntaxhighlight lang="bash">
moreinfo amdgpu
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}


=== nvidia GPU ===
=== nvidia GPU ===
第56行: 第85行:
=== amd GPU ===
=== amd GPU ===
查看GPU型号
查看GPU型号
<syntaxhighlight lang="bash">
 
lspci | grep -i amd</syntaxhighlight>
{{shc_out|<syntaxhighlight lang="bash">
<blockquote><pre>
lspci | grep -i amd
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev c7)
</syntaxhighlight>|<syntaxhighlight lang="javascript">
01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev c5)
</pre></blockquote>
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 14 [Radeon RX 5500/5500M / Pro 5500M] (rev c5)
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 HDMI Audio
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}


查看驱动版本
查看驱动版本
<syntaxhighlight lang="bash">
 
sudo dpkg --list | grep amd-*</syntaxhighlight>
{{shc_out|<syntaxhighlight lang="bash">
<blockquote><pre>
sudo dpkg --list | grep amd-*
ii  accountsservice                            0.6.55-0ubuntu10                      amd64        query and manipulate user account information
</syntaxhighlight>|<syntaxhighlight lang="javascript">
ii  acl                                        2.2.53-4                              amd64        access control list - utilities
ii  accountsservice                            0.6.55-0ubuntu11                      amd64        query and manipulate user account information
...
ii  amd64-microcode                            3.20191218.1ubuntu1                  amd64        Processor microcode firmware for AMD CPUs
ii  amdgpu                                    20.20-1089974                        amd64        Meta package to install amdgpu components.
ii  amdgpu-core                                20.20-1089974                        all          Core meta package for unified amdgpu driver.
ii  amdgpu-dkms                                1:5.6.0.13-1089974                    all          amdgpu driver in DKMS format.
...
...
ii  zlib1g:amd64                              1:1.2.11.dfsg-1ubuntu3                amd64        compression library - runtime
ii  zip                                        3.0-11build1                          amd64        Archiver for .zip files
ii  zlib1g-dev:amd64                           1:1.2.11.dfsg-1ubuntu3                amd64        compression library - development
ii  zlib1g:amd64                               1:1.2.11.dfsg-2ubuntu1                amd64        compression library - runtime
</pre></blockquote>
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
 
==== 风扇控制 ====
==== 风扇控制 ====
{{shc|<syntaxhighlight lang="bash">
{{shc|<syntaxhighlight lang="bash">
第102行: 第140行:
echo "2" > pwm1_enable</syntaxhighlight>|$}}
echo "2" > pwm1_enable</syntaxhighlight>|$}}
* Warning: Resetting fan speed to auto may not work due to a driver bug and instead a restart of the driver may be required as a workaround.
* Warning: Resetting fan speed to auto may not work due to a driver bug and instead a restart of the driver may be required as a workaround.
== OpenGL ==
检查硬件加速。
{{shc_out|<syntaxhighlight lang="bash">
glxinfo | grep OpenGL</syntaxhighlight>|<syntaxhighlight lang="javascript">
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: Radeon RX 5500 XT
OpenGL core profile version string: 4.6.14736 Core Profile Context 20.20
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.14736 Compatibility Profile Context 20.20
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: 4.6.14736 Compatibility Profile Context 20.20
OpenGL ES profile shading language version string: 4.60
OpenGL ES profile extensions:
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}


== AMD ==
== AMD ==
第116行: 第175行:
sudo apt install radeontop</syntaxhighlight>|$}}
sudo apt install radeontop</syntaxhighlight>|$}}


{{shc|<syntaxhighlight lang="bash">
{| class="wikitable"
|-
|{{shc|<syntaxhighlight lang="bash">
sudo radeontop</syntaxhighlight>|$}}
sudo radeontop</syntaxhighlight>|$}}
|[[文件:Linux 显卡 amd GPU radeontop 1.png|500px|左|Linux 显卡 amd GPU radeontop 1]]
|}
这里可以看到显卡有些不正常,目前还不知道解决办法。


== Nvidia ==
== Nvidia ==
第378行: 第443行:
power1:      16.00 W  (cap = 125.00 W)
power1:      16.00 W  (cap = 125.00 W)
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
</syntaxhighlight>|kangjian@kangjian:~/桌面$}}
==== watch ====
配合 watch命令,可以每秒执行一次。
{{shc|<syntaxhighlight lang="bash">
watch -n 1 sensors</syntaxhighlight>|kangjian@kangjian:~/桌面$}}


=== psensor ===
=== psensor ===