当我在线搜索时,我看到了几个类似的问题,但大多数问题都与 Dock 站有关。我没有使用底座,而是使用 HDMI 转 USB-C 电缆。HDMI 部分连接到外部显示器,USB-C 连接到我的笔记本电脑(Thinkpad X1 Extreme Gen 2)。该电缆在 Windows 操作系统上工作正常,但在 Ubuntu 上不工作。显示器使用 HDMI 转 HDMI 电缆工作,因此显示器可以工作。
我得到了使用输出journalctl -b
,这是我插入 USB-C 时的输出;
Mar 31 22:38:11 aydin kernel: usb 1-7: new full-speed USB device number 9 using xhci_hcd
Mar 31 22:38:11 aydin kernel: usb 1-7: not running at top speed; connect to a high speed hub
Mar 31 22:38:11 aydin kernel: usb 1-7: New USB device found, idVendor=25a4, idProduct=9311, bcdDevice= 2.01
Mar 31 22:38:11 aydin kernel: usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 31 22:38:11 aydin kernel: usb 1-7: Product: USB C Video Adaptor
Mar 31 22:38:11 aydin kernel: usb 1-7: Manufacturer: USB C
Mar 31 22:38:11 aydin kernel: usb 1-7: SerialNumber: 000000000001
Mar 31 22:38:11 aydin mtp-probe[32822]: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7"
Mar 31 22:38:11 aydin mtp-probe[32822]: bus: 1, device: 9 was not an MTP device
Mar 31 22:38:11 aydin mtp-probe[32829]: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-7"
Mar 31 22:38:11 aydin mtp-probe[32829]: bus: 1, device: 9 was not an MTP device
Mar 31 22:38:15 aydin kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS returned 0 bytes
我的xrand
输出是:
DVI-I-5-4 disconnected (normal left inverted right x axis y axis)
DVI-I-4-3 disconnected (normal left inverted right x axis y axis)
DVI-I-3-2 disconnected (normal left inverted right x axis y axis)
DVI-I-2-1 disconnected (normal left inverted right x axis y axis)
eDP-1-2 disconnected (normal left inverted right x axis y axis)
HDMI-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-1 disconnected (normal left inverted right x axis y axis)
DP-1-2 disconnected (normal left inverted right x axis y axis)
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
1920x1080 60.01 + 60.01* 59.97 59.96 59.93
1680x1050 59.95 59.88
1600x1024 60.17
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.02
1440x900 59.89
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1360x768 59.80 59.96
1280x800 59.99 59.97 59.81 59.91
1152x864 60.00
1280x720 60.00 59.99 59.86 59.74
1024x768 60.04 60.00
并且,lshw -C display
输出是;
*-display
description: VGA compatible controller
product: TU117M [GeForce GTX 1650 Mobile / Max-Q]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nouveau latency=0
resources: irq:166 memory:ed000000-edffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:3000(size=128) memory:ee080000-ee0fffff
*-display
description: VGA compatible controller
product: UHD Graphics 630 (Mobile)
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
logical name: /dev/fb0
version: 00
width: 64 bits
clock: 33MHz
capabilities: pciexpress msi pm vga_controller bus_master cap_list fb
configuration: depth=32 driver=i915 latency=0 mode=1920x1080 visual=truecolor xres=1920 yres=1080
resources: iomemory:600-5ff iomemory:400-3ff irq:167 memory:6040000000-6040ffffff memory:4000000000-400fffffff ioport:4000(size=64) memory:c0000-dffff
最后,lsusb
输出是;
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 06cb:00bd Synaptics, Inc.
Bus 001 Device 004: ID 04f2:b67d Chicony Electronics Co., Ltd Integrated Camera
Bus 001 Device 009: ID 25a4:9311 USB C USB C Video Adaptor
Bus 001 Device 002: ID 1532:005c Razer USA, Ltd Razer DeathAdder Elite
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
如您所见,
Bus 001 Device 009: ID 25a4:9311 USB C USB C Video Adaptor
Ubuntu 将 USB 识别为视频适配器(我猜),但我在 xrandr 上看不到它。是否可以将 USB-C 添加到 xrandr?问题可能是什么?可能我找不到答案,但我只是想试一试 :)
答案1
我终于找到了解决办法 https://askubuntu.com/a/1134579/1185670
正如“thomasbangels”在该帖子中提到的,用 nano 编辑该行;
sudo nano /lib/modprobe.d/nvidia-kms.conf
并评论
# This file was generated by nvidia-prime
# Set value to 0 to disable modesetting
# options nvidia-drm modeset=1
然后改变sudo prime-select nvidia
解决了问题。