我正在尝试将搭载 Ubuntu 22.04(内核6.5.0-21-generic
)的 Lenovo Legion 5i Gen 7 笔记本电脑连接到外接显示器 LG 27gp850p-b。Displays
只显示我的主显示屏,xrandr --auto
什么都不显示。xrandr --query
显示以下内容:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 194mm ...
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
并xrandr --verbose
显示以下内容:
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (0x46) normal (normal left inverted right x axis y axis) 344mm x 194mm
Identifier: 0x42
Timestamp: 13938
Subpixel: unknown
Gamma: 0.54:1.0:1.7
Brightness: 0.73
Clones:
CRTC: 0
CRTCs: 0 1 2 3
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
EDID:
00ffffffffffff0009e51c0a00000000
0d1f0104b52213780754a5a7544c9b26
0f505400000001010101010101010101
010101010101b99c80a0703859403020
360058c21000001a000000fd003ca5c1
c128010a202020202020000000fe0042
4f452043510a202020202020000000fe
004e5631353646484d2d4e59380a0040
vrr_capable: 1
range: (0, 1)
Colorspace: Default
supported: Default, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, RGB_WIDE_FIXED, RGB_WIDE_FLOAT, BT601_YCC
max bpc: 12
range: (6, 12)
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
panel orientation: Normal
supported: Normal, Upside Down, Left Side Up, Right Side Up
scaling mode: Full aspect
supported: Full, Center, Full aspect
link-status: Good
supported: Good, Bad
CTM: -97228368 0 67911409 0 4555994 -2147483648 40159710 0 -28429073 0 3193240 -2147483648 32617329 0 24203080 0
-44098461 0
CONNECTOR_ID: 236
supported: 236
non-desktop: 0
range: (0, 1)
1920x1080 (0x46) 401.210MHz +HSync -VSync *current +preferred
h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 192.89KHz
v: height 1080 start 1083 end 1089 total 1169 clock 165.00Hz
1920x1080 (0x47) 381.303MHz +HSync -VSync
h: width 1920 start 1968 end 2000 total 2080 skew 0 clock 183.32KHz
v: height 1080 start 1083 end 1088 total 1111 clock 165.00Hz
1680x1050 (0x48) 327.895MHz +HSync -VSync
h: width 1680 start 1728 end 1760 total 1840 skew 0 clock 178.20KHz
v: height 1050 start 1053 end 1059 total 1080 clock 165.00Hz
1400x1050 (0x49) 335.644MHz +HSync +VSync
h: width 1400 start 1488 end 1640 total 1880 skew 0 clock 178.53KHz
v: height 1050 start 1052 end 1064 total 1082 clock 165.00Hz
1600x900 (0x4a) 268.916MHz +HSync -VSync
h: width 1600 start 1648 end 1680 total 1760 skew 0 clock 152.79KHz
v: height 900 start 903 end 908 total 926 clock 165.00Hz
1280x1024 (0x4b) 296.909MHz +HSync +VSync
h: width 1280 start 1328 end 1440 total 1688 skew 0 clock 175.89KHz
v: height 1024 start 1025 end 1028 total 1066 clock 165.00Hz
1400x900 (0x4c) 238.357MHz +HSync -VSync
h: width 1400 start 1448 end 1480 total 1560 skew 0 clock 152.79KHz
v: height 900 start 903 end 913 total 926 clock 165.00Hz
1280x960 (0x4d) 297.006MHz +HSync +VSync
h: width 1280 start 1376 end 1488 total 1800 skew 0 clock 165.00KHz
v: height 960 start 961 end 964 total 1000 clock 165.00Hz
1368x768 (0x4e) 199.179MHz +HSync -VSync
h: width 1368 start 1416 end 1448 total 1528 skew 0 clock 130.35KHz
v: height 768 start 771 end 781 total 790 clock 165.00Hz
1280x800 (0x4f) 195.549MHz +HSync -VSync
h: width 1280 start 1328 end 1360 total 1440 skew 0 clock 135.80KHz
v: height 800 start 803 end 809 total 823 clock 165.00Hz
1152x864 (0x50) 237.605MHz +HSync +VSync
h: width 1152 start 1216 end 1344 total 1600 skew 0 clock 148.50KHz
v: height 864 start 865 end 868 total 900 clock 165.00Hz
1280x720 (0x51) 176.065MHz +HSync -VSync
h: width 1280 start 1328 end 1360 total 1440 skew 0 clock 122.27KHz
v: height 720 start 723 end 728 total 741 clock 165.00Hz
1024x768 (0x52) 178.742MHz -HSync -VSync
h: width 1024 start 1048 end 1184 total 1344 skew 0 clock 132.99KHz
v: height 768 start 771 end 777 total 806 clock 165.00Hz
1024x768i (0x53) 85.198MHz +HSync +VSync Interlace
h: width 1024 start 1032 end 1208 total 1264 skew 0 clock 67.40KHz
v: height 768 start 768 end 776 total 817 clock 165.00Hz
960x720 (0x54) 321.757MHz -HSync +VSync DoubleScan
h: width 960 start 1024 end 1128 total 1300 skew 0 clock 247.51KHz
v: height 720 start 720 end 722 total 750 clock 165.00Hz
928x696 (0x55) 299.916MHz -HSync +VSync DoubleScan
h: width 928 start 976 end 1088 total 1264 skew 0 clock 237.28KHz
v: height 696 start 696 end 698 total 719 clock 165.00Hz
896x672 (0x56) 281.538MHz -HSync +VSync DoubleScan
h: width 896 start 960 end 1060 total 1224 skew 0 clock 230.01KHz
v: height 672 start 672 end 674 total 697 clock 165.00Hz
1024x576 (0x57) 115.851MHz +HSync -VSync
h: width 1024 start 1072 end 1104 total 1184 skew 0 clock 97.85KHz
v: height 576 start 579 end 584 total 593 clock 165.00Hz
960x600 (0x58) 211.759MHz +HSync -VSync DoubleScan
h: width 960 start 984 end 1000 total 1040 skew 0 clock 203.61KHz
v: height 600 start 601 end 604 total 617 clock 165.00Hz
832x624 (0x59) 126.786MHz -HSync -VSync
h: width 832 start 864 end 928 total 1152 skew 0 clock 110.06KHz
v: height 624 start 625 end 628 total 667 clock 165.00Hz
960x540 (0x5a) 102.751MHz +HSync -VSync
h: width 960 start 1008 end 1040 total 1120 skew 0 clock 91.74KHz
v: height 540 start 543 end 548 total 556 clock 165.00Hz
800x600 (0x5b) 105.602MHz +HSync +VSync
h: width 800 start 824 end 896 total 1024 skew 0 clock 103.13KHz
v: height 600 start 601 end 603 total 625 clock 165.00Hz
840x525 (0x5c) 163.947MHz +HSync -VSync DoubleScan
h: width 840 start 864 end 880 total 920 skew 0 clock 178.20KHz
v: height 525 start 526 end 529 total 540 clock 165.00Hz
864x486 (0x5d) 84.481MHz +HSync -VSync
h: width 864 start 912 end 944 total 1024 skew 0 clock 82.50KHz
v: height 486 start 489 end 494 total 500 clock 165.00Hz
700x525 (0x5e) 167.822MHz +HSync +VSync DoubleScan
h: width 700 start 744 end 820 total 940 skew 0 clock 178.53KHz
v: height 525 start 526 end 532 total 541 clock 165.00Hz
800x450 (0x5f) 134.458MHz +HSync -VSync DoubleScan
h: width 800 start 824 end 840 total 880 skew 0 clock 152.79KHz
v: height 450 start 451 end 454 total 463 clock 165.00Hz
640x512 (0x60) 148.454MHz +HSync +VSync DoubleScan
h: width 640 start 664 end 720 total 844 skew 0 clock 175.89KHz
v: height 512 start 512 end 514 total 533 clock 165.00Hz
700x450 (0x61) 119.178MHz +HSync -VSync DoubleScan
h: width 700 start 724 end 740 total 780 skew 0 clock 152.79KHz
v: height 450 start 451 end 456 total 463 clock 165.00Hz
640x480 (0x62) 69.301MHz -HSync -VSync
h: width 640 start 656 end 752 total 800 skew 0 clock 86.63KHz
v: height 480 start 490 end 492 total 525 clock 165.00Hz
720x405 (0x63) 60.840MHz +HSync -VSync
h: width 720 start 768 end 800 total 880 skew 0 clock 69.14KHz
v: height 405 start 408 end 413 total 419 clock 165.00Hz
720x400 (0x64) 68.881MHz -HSync +VSync
h: width 720 start 756 end 828 total 936 skew 0 clock 73.59KHz
v: height 400 start 401 end 404 total 446 clock 165.00Hz
684x384 (0x65) 99.589MHz +HSync -VSync DoubleScan
h: width 684 start 708 end 724 total 764 skew 0 clock 130.35KHz
v: height 384 start 385 end 390 total 395 clock 165.00Hz
640x400 (0x66) 61.091MHz -HSync +VSync
h: width 640 start 672 end 736 total 832 skew 0 clock 73.43KHz
v: height 400 start 401 end 404 total 445 clock 165.00Hz
576x432 (0x67) 118.802MHz +HSync +VSync DoubleScan
h: width 576 start 608 end 672 total 800 skew 0 clock 148.50KHz
v: height 432 start 432 end 434 total 450 clock 165.00Hz
640x360 (0x68) 49.369MHz +HSync -VSync
h: width 640 start 688 end 720 total 800 skew 0 clock 61.71KHz
v: height 360 start 363 end 368 total 374 clock 165.00Hz
640x350 (0x69) 61.091MHz +HSync -VSync
h: width 640 start 672 end 736 total 832 skew 0 clock 73.43KHz
v: height 350 start 382 end 385 total 445 clock 165.00Hz
512x384 (0x6a) 89.371MHz -HSync -VSync DoubleScan
h: width 512 start 524 end 592 total 672 skew 0 clock 132.99KHz
v: height 384 start 385 end 388 total 403 clock 165.00Hz
512x384i (0x6b) 42.547MHz +HSync +VSync Interlace DoubleScan
h: width 512 start 516 end 604 total 632 skew 0 clock 67.32KHz
v: height 384 start 384 end 388 total 408 clock 165.00Hz
512x288 (0x6c) 57.827MHz +HSync -VSync DoubleScan
h: width 512 start 536 end 552 total 592 skew 0 clock 97.68KHz
v: height 288 start 289 end 292 total 296 clock 165.00Hz
416x312 (0x6d) 63.298MHz -HSync -VSync DoubleScan
h: width 416 start 432 end 464 total 576 skew 0 clock 109.89KHz
v: height 312 start 312 end 314 total 333 clock 165.00Hz
480x270 (0x6e) 51.375MHz +HSync -VSync DoubleScan
h: width 480 start 504 end 520 total 560 skew 0 clock 91.74KHz
v: height 270 start 271 end 274 total 278 clock 165.00Hz
400x300 (0x6f) 52.716MHz +HSync +VSync DoubleScan
h: width 400 start 412 end 448 total 512 skew 0 clock 102.96KHz
v: height 300 start 300 end 301 total 312 clock 165.00Hz
432x243 (0x70) 42.240MHz +HSync -VSync DoubleScan
h: width 432 start 456 end 472 total 512 skew 0 clock 82.50KHz
v: height 243 start 244 end 247 total 250 clock 165.00Hz
320x240 (0x71) 34.584MHz -HSync -VSync DoubleScan
h: width 320 start 328 end 376 total 400 skew 0 clock 86.46KHz
v: height 240 start 245 end 246 total 262 clock 165.00Hz
360x202 (0x72) 30.347MHz +HSync -VSync DoubleScan
h: width 360 start 384 end 400 total 440 skew 0 clock 68.97KHz
v: height 202 start 204 end 206 total 209 clock 165.00Hz
360x200 (0x73) 34.440MHz -HSync +VSync DoubleScan
h: width 360 start 378 end 414 total 468 skew 0 clock 73.59KHz
v: height 200 start 200 end 202 total 223 clock 165.00Hz
320x200 (0x74) 30.476MHz -HSync +VSync DoubleScan
h: width 320 start 336 end 368 total 416 skew 0 clock 73.26KHz
v: height 200 start 200 end 202 total 222 clock 165.00Hz
320x180 (0x75) 24.684MHz +HSync -VSync DoubleScan
h: width 320 start 344 end 360 total 400 skew 0 clock 61.71KHz
v: height 180 start 181 end 184 total 187 clock 165.00Hz
320x175 (0x76) 30.476MHz +HSync -VSync DoubleScan
h: width 320 start 336 end 368 total 416 skew 0 clock 73.26KHz
v: height 175 start 191 end 192 total 222 clock 165.00Hz
DP-1 disconnected (normal left inverted right x axis y axis)
Identifier: 0x43
Timestamp: 13938
Subpixel: unknown
Clones:
CRTCs: 0 1 2 3
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
HDCP Content Type: HDCP Type0
supported: HDCP Type0, HDCP Type1
Content Protection: Undesired
supported: Undesired, Desired, Enabled
vrr_capable: 0
range: (0, 1)
Colorspace: Default
supported: Default, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, RGB_WIDE_FIXED, RGB_WIDE_FLOAT, BT601_YCC
max bpc: 12
range: (6, 12)
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
subconnector: Unknown
supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
link-status: Good
supported: Good, Bad
CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0 1
CONNECTOR_ID: 245
supported: 245
non-desktop: 0
range: (0, 1)
DP-2 disconnected (normal left inverted right x axis y axis)
Identifier: 0x44
Timestamp: 13938
Subpixel: unknown
Clones:
CRTCs: 0 1 2 3
Transform: 1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
filter:
HDCP Content Type: HDCP Type0
supported: HDCP Type0, HDCP Type1
Content Protection: Undesired
supported: Undesired, Desired, Enabled
vrr_capable: 0
range: (0, 1)
Colorspace: Default
supported: Default, BT709_YCC, XVYCC_601, XVYCC_709, SYCC_601, opYCC_601, opRGB, BT2020_CYCC, BT2020_RGB, BT2020_YCC, DCI-P3_RGB_D65, RGB_WIDE_FIXED, RGB_WIDE_FLOAT, BT601_YCC
max bpc: 12
range: (6, 12)
Broadcast RGB: Automatic
supported: Automatic, Full, Limited 16:235
audio: auto
supported: force-dvi, off, auto, on
subconnector: Unknown
supported: Unknown, VGA, DVI-D, HDMI, DP, Wireless, Native
link-status: Good
supported: Good, Bad
CTM: 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0
0 1
CONNECTOR_ID: 258
supported: 258
non-desktop: 0
range: (0, 1)
未列出 HDMI 端口。在 Google 上搜索到 HDMI 可能与 GPU(在我的情况下是 Nvidia)有关后,我尝试升级驱动程序,sudo update-drivers autoinstall
结果出现了以下 nvidia-smi。
由于某些不兼容错误,无法将驱动程序降级到 <=515(由于其他软件依赖于当前设置,因此无法重新安装整个 CUDA 支持)。安全启动已禁用。
同时添加inxi -Gxx
结果:
Graphics:
Device-1: Intel Alder Lake-P Integrated Graphics vendor: Lenovo
driver: i915 v: kernel ports: active: eDP-1 empty: DP-1,DP-2
bus-ID: 00:02.0 chip-ID: 8086:46a6
Device-2: NVIDIA vendor: Lenovo driver: nvidia v: 535.161.07 pcie:
speed: 2.5 GT/s lanes: 8 bus-ID: 01:00.0 chip-ID: 10de:24e0
Display: x11 server: X.Org v: 1.21.1.4 compositor: gnome-shell v: 42.9
driver: X: loaded: modesetting unloaded: fbdev,vesa gpu: i915
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 98
Monitor-1: eDP-1 model: BOE Display res: 1920x1080 dpi: 142
diag: 395mm (15.5")
OpenGL: renderer: Mesa Intel Graphics (ADL GT2)
v: 4.6 Mesa 23.2.1-1ubuntu3.1~22.04.2 direct render: Yes
您能建议下一步的故障排除步骤吗?
我通过切换到 Windows 并无缝连接到那里的显示器来验证硬件是否运行正常。
答案1
以下内容有助于解决我的问题:
grep nvidia /etc/modprobe.d/* /lib/modprobe.d/*
- 在输出中,找到包含
options nvidia-drm modeset=1
- 打开此文件并替换
options nvidia-drm modeset=0
为options nvidia-drm modeset=1
sudo update-initramfs -u
reboot
重新启动后,系统会检测 HDMI 端口并自动连接显示器。