我正在尝试使用 HDMI 线将外接显示器插入我的笔记本电脑,以实现双屏。
当我这样做时,什么都没有发生,外接屏幕根本无法识别。我认为这是因为我的笔记本电脑的视频卡驱动程序没有正确安装/启用。
要安装驱动程序,我所做的就是
sudo add-apt-repository ppa:graphics-drivers/ppa
然后使用“附加驱动程序”GUInvidia-driver-430
在我的系统上进行设置。
我重新启动了机器,但什么都没有改变,外接显示器仍然无法识别......
当我尝试启动时nvidia-settings
,出现此错误:
ERROR: Unable to load info from any available system
(nvidia-settings:3585): GLib-GObject-CRITICAL **: 17:36:06.267: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
** Message: 17:36:06.271: PRIME: No offloading required. Abort
** Message: 17:36:06.271: PRIME: is it supported? no
以下是 的输出nvidia-smi
:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.40 Driver Version: 430.40 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 1650 Off | 00000000:01:00.0 Off | N/A |
| N/A 39C P8 1W / N/A | 0MiB / 3911MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
我正在运行带有 5.0.0-20-generic 内核的 Xubuntu 19.04,并且已在 BIOS 中禁用“安全启动”。
lsmod | grep -i nvidia
:
nvidia_uvm 847872 0
nvidia_drm 45056 0
nvidia_modeset 1114112 1 nvidia_drm
nvidia 19025920 12 nvidia_uvm,nvidia_modeset
drm_kms_helper 180224 2 amdgpu,nvidia_drm
drm 475136 9 gpu_sched,drm_kms_helper,amdgpu,nvidia_drm,ttm
ipmi_msghandler 102400 2 ipmi_devintf,nvidia
lspci | grep -i --color 'vga\|3d\|2d'
:
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f91 (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c2)
sudo lspci -v -s 01:00.0
:
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1f91 (rev a1) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. Device 109f
Flags: bus master, fast devsel, latency 0, IRQ 68
Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at d0000000 (64-bit, prefetchable) [size=32M]
I/O ports at f000 [size=128]
[virtual] Expansion ROM at f7000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Legacy Endpoint, MSI 00
Capabilities: [100] Virtual Channel
Capabilities: [250] Latency Tolerance Reporting
Capabilities: [258] L1 PM Substates
Capabilities: [128] Power Budgeting <?>
Capabilities: [420] Advanced Error Reporting
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Capabilities: [900] #19
Capabilities: [bb0] #15
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
这真的很烦人...有人能帮我解决这个问题吗?提前谢谢
答案1
看起来您的系统中已选择 Intel GPU(并在 BIOS 中禁用)作为主要 GPU。
运行以下命令:
sudo nvidia-xconfig
然后运行此命令来选择 Nvidia:
sudo prime-select nvidia
或者,对于英特尔,使用以下命令:
sudo prime-select intel
答案2
我终于找到了解决这个问题的方法。
- 从 PPA 安装驱动程序。有很多文章介绍如何操作。
- 删除
/etc/X11/xorg.conf
。 - 切换到
tty3
并关闭 Xorg:sudo systemctl stop gdm
(适用于 Ubuntu) xorg.conf
从日志中制作骨架文件:sudo Xorg -configure :0
- 复制
xorg.conf.new
到等:sudo cp /root/xorg.conf.new /etc/X11/xorg.conf
在“设备”部分更改驱动程序名称:
Section "Device" ### Available Driver options are:- ### Values: <i>: integer, <f>: float, <bool>: "True"/"False", ### <string>: "String", <freq>: "<f> Hz/kHz/MHz", ### <percent>: "<f>%" ### [arg]: arg optional #Option "SWcursor" # [<bool>] #Option "HWcursor" # [<bool>] #Option "NoAccel" # [<bool>] #Option "ShadowFB" # [<bool>] #Option "VideoKey" # <i> #Option "WrappedFB" # [<bool>] #Option "GLXVBlank" # [<bool>] #Option "ZaphodHeads" # <str> #Option "PageFlip" # [<bool>] #Option "SwapLimit" # <i> #Option "AsyncUTSDFS" # [<bool>] #Option "AccelMethod" # <str> #Option "DRI" # <i> Identifier "Card1" Driver "nvidia" BusID "PCI:1:0:0"
重启
此后nvidia-settings
即可正常启动。