
更新:到目前為止,透過安裝內核主線 5.6.19-050619-generic 修復了穩定性問題
核心版本 5.6 何時會在 ubuntu 20.04 儲存庫中可用? ++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++ ++++++++++++++++++++++
我最近購買了一台宏碁 aspire 7 筆記型電腦型號 A715-41G(確切型號:A715-41G-R8MJ),但無法正確設定影片。
這款筆記型電腦配備 AMD Ryzen 5 3550H 處理器和獨立 Nvidia Geforce gtx 1650 顯示卡(AMD Ryzen 5 3550H 搭配 Radeon Vega Mobile Gfx)
System: Kernel: 5.4.0-42-generic x86_64 bits: 64 compiler: gcc v: 9.3.0
parameters: BOOT_IMAGE=/vmlinuz-5.4.0-42-generic root=/dev/mapper/vgubuntu-root ro quiet splash
acpi_backlight=vendor vt.handoff=7
Desktop: Gnome 3.36.3 wm: gnome-shell dm: GDM3 3.34.1 Distro: Ubuntu 20.04.1 LTS (Focal Fossa)
Machine: Type: Laptop System: Acer product: Aspire A715-41G v: V1.00 serial: <filter>
Mobo: PK model: Azalea_PKS v: V1.00 serial: <filter> UEFI: INSYDE v: 1.00 date: 03/13/2020
Battery: ID-1: BAT1 charge: 12.7 Wh condition: 50.1/47.8 Wh (105%) volts: 10.6/11.2 model: LGC AP18C8K type: Li-ion
serial: <filter> status: Discharging
CPU: Topology: Quad Core model: AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen+
family: 17 (23) model-id: 18 (24) stepping: 1 microcode: 8108109 L2 cache: 2048 KiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 33537
Speed: 1220 MHz min/max: 1400/2100 MHz boost: enabled Core speeds (MHz): 1: 1223 2: 1223 3: 1222 4: 1222 5: 1221
6: 1222 7: 1222 8: 1222
Vulnerabilities: Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Ubuntu 20.04安裝很順利,但是當我安裝nvidia驅動程式時(sudo apt install nvidia-driver-440),重啟後系統崩潰。
解決方案:使用 /etc/modprobe.d/ 中包含以下內容的檔案將 nouveau 驅動程式列入黑名單
blacklist nouveau
options nouveau modeset = 0
多虧了它我才能啟動 Ubuntu
下一個問題:增加和減少亮度的按鈕顛倒了。解決方案:我新增acpi_backlight = vendor
到/etc/default/grub檔案中
另一個問題:由於 nvidia dGPU 始終消耗 4W 功率,因此電池消耗較高。
解決方案:我遵循了此頁面上的 nvidia 建議:http://download.nvidia.com/XFree86/Linux-x86_64/440.100/README/dynamicpowermanagement.html關於動態電源管理。
我使用以下內容在 /lib/udev/rules.d/ 目錄中建立了檔案 80-nvidia-pm.rules
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"
# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"
# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto"
ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto"
# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on"
ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on"
我建立了 /etc/modprobe.d/nvidia.conf 文件,內容如下:
options nvidia "NVreg_DynamicPowerManagement=0x02"
多虧了這一點,電池性能提高了3小時至6小時以上。
到那時,那些事情都圓滿解決了那些問題,但我仍然有一個問題找不到好的解決方案。這是最重要的問題。我找不到允許 AMD iGPU 和 nvidia dGPU 正常工作的解決方案。
安裝 nvidia 驅動程式並將 nouveau 驅動程式列入黑名單後,nvidia x 伺服器設定顯示一個沒有內容的窗口,並且 nvidia-smi 命令顯示它沒有進程。我檢查了/etc/X11目錄,沒有xorg.conf文件
$ nvidia-smi
Sun Aug 9 00:53:55 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| 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 38C P0 2W / N/A | 0MiB / 3914MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
$ inxi -xxxG
Graphics: Device-1: NVIDIA vendor: Acer Incorporated ALI driver: nvidia v: 440.100 bus ID: 01:00.0 chip ID: 10de:1f99
Device-2: Advanced Micro Devices [AMD/ATI] Picasso vendor: Acer Incorporated ALI driver: amdgpu v: kernel
bus ID: 05:00.0 chip ID: 1002:15d8
Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: nvidia alternate: ati,fbdev,nouveau,vesa
compositor: gnome-shell v: 3.36.3 resolution: 1920x1080~60Hz
OpenGL: renderer: AMD RAVEN (DRM 3.35.0 5.4.0-42-generic LLVM 10.0.0) v: 4.6 Mesa 20.0.8 direct render: Yes
$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x45 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 2 associated providers: 0 name:modesetting
在網路上搜尋後,我找到了這個模型 xorg.conf 檔案。
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
EndSection
Section "Device"
Identifier "AMDGPU"
Driver "amdgpu"
Option "TearFree" "true"
EndSection
Section "OutputClass"
Identifier "iGPU"
MatchDriver "amdgpu"
Driver "modesetting"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection
Section "OutputClass"
Identifier "nvidia"
MatchDriver "nvidia-drm"
Driver "nvidia"
Option "AllowEmptyInitialConfiguration"
ModulePath "/usr/lib/nvidia/xorg"
ModulePath "/usr/lib/xorg/modules"
EndSection
我不喜歡複製和貼上任何內容,但這使它正常工作,現在 nvidia x 伺服器設定顯示內容,nvidia-smi 顯示進程。
$nvidia-smi
Sun Aug 9 00:43:55 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| 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 36C P8 1W / N/A | 49MiB / 3914MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1249 G /usr/lib/xorg/Xorg 14MiB |
| 0 1897 G /usr/lib/xorg/Xorg 34MiB |
+-----------------------------------------------------------------------------+
$inxi -xxxG
Graphics: Device-1: NVIDIA vendor: Acer Incorporated ALI driver: nvidia v: 440.100 bus ID: 01:00.0 chip ID: 10de:1f99
Device-2: Advanced Micro Devices [AMD/ATI] Picasso vendor: Acer Incorporated ALI driver: amdgpu v: kernel
bus ID: 05:00.0 chip ID: 1002:15d8
Display: x11 server: X.Org 1.20.8 driver: modesetting,nvidia alternate: amdgpu,ati,fbdev,nouveau,vesa
compositor: gnome-shell v: 3.36.3 resolution: 1920x1080~60Hz
OpenGL: renderer: AMD RAVEN (DRM 3.35.0 5.4.0-42-generic LLVM 10.0.0) v: 4.6 Mesa 20.0.8 direct render: Yes
$xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x45 cap: 0x9, Source Output, Sink Offload crtcs: 4 outputs: 2 associated providers: 0 name:modesetting
Provider 1: id: 0x231 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0
該解決方案的缺點是它使系統不穩定。在登入畫面上有時它不顯示指針,儘管當我重新啟動時它需要更長的時間,當我在關閉幾分鐘後打開筆記型電腦時,系統顯示黑屏,我什至沒有 ssh 訪問權限,我只是在嘗試完全關閉並再次打開一兩次後才讓它工作。
dmesg 顯示出現了嚴重錯誤
[ 29.654785] kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, signaled seq=1, emitted seq=3
[ 29.654918] kernel: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process Xorg pid 1249 thread Xorg:cs0 pid 1344
[ 29.654926] kernel: amdgpu 0000:05:00.0: GPU reset begin!
[ 30.777283] kernel: amdgpu 0000:05:00.0: GPU reset succeeded, trying to resume
[ 30.777892] kernel: [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
[ 30.778481] kernel: [drm] PSP is resuming...
[ 30.798357] kernel: [drm] reserve 0x400000 from 0xf47f800000 for PSP TMR
[ 30.809000] kernel: [drm] psp command failed and response status is (0x7)
[ 31.479027] kernel: [drm] VCN decode and encode initialized successfully(under DPG Mode).
[ 31.479037] kernel: amdgpu 0000:05:00.0: ring gfx uses VM inv eng 0 on hub 0
[ 31.479040] kernel: amdgpu 0000:05:00.0: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[ 31.479043] kernel: amdgpu 0000:05:00.0: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[ 31.479045] kernel: amdgpu 0000:05:00.0: ring comp_1.2.0 uses VM inv eng 5 on hub 0
[ 31.479048] kernel: amdgpu 0000:05:00.0: ring comp_1.3.0 uses VM inv eng 6 on hub 0
[ 31.479050] kernel: amdgpu 0000:05:00.0: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[ 31.479052] kernel: amdgpu 0000:05:00.0: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[ 31.479054] kernel: amdgpu 0000:05:00.0: ring comp_1.2.1 uses VM inv eng 9 on hub 0
[ 31.479057] kernel: amdgpu 0000:05:00.0: ring comp_1.3.1 uses VM inv eng 10 on hub 0
[ 31.479059] kernel: amdgpu 0000:05:00.0: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
[ 31.479062] kernel: amdgpu 0000:05:00.0: ring sdma0 uses VM inv eng 0 on hub 1
[ 31.479064] kernel: amdgpu 0000:05:00.0: ring vcn_dec uses VM inv eng 1 on hub 1
[ 31.479065] kernel: amdgpu 0000:05:00.0: ring vcn_enc0 uses VM inv eng 4 on hub 1
[ 31.479068] kernel: amdgpu 0000:05:00.0: ring vcn_enc1 uses VM inv eng 5 on hub 1
[ 31.479070] kernel: amdgpu 0000:05:00.0: ring vcn_jpeg uses VM inv eng 6 on hub 1
[ 31.490635] kernel: [drm] recover vram bo from shadow start
[ 31.490636] kernel: [drm] recover vram bo from shadow done
[ 31.490637] kernel: [drm] Skip scheduling IBs!
[ 31.490675] kernel: ------------[ cut here ]------------
[ 31.490681] kernel: WARNING: CPU: 3 PID: 74 at include/linux/dma-fence.h:533 drm_sched_resubmit_jobs+0x152/0x160 [gpu_sched]
[ 31.490682] kernel: Modules linked in: ccm cmac algif_hash algif_skcipher vboxnetadp(OE) vboxnetflt(OE) af_alg vboxdrv(OE) bnep binfmt_misc nls_iso8859_1 snd_soc_dmic snd_hda_codec_realtek snd_acp3x_pdm_dma acp3x_rn snd_hda_codec_generic ledtrig_audio snd_soc_core snd_hda_codec_hdmi snd_compress ac97_bus snd_pcm_dmaengine snd_hda_intel snd_intel_dspcfg snd_hda_codec uvcvideo joydev snd_hda_core snd_hwdep videobuf2_vmalloc videobuf2_memops edac_mce_amd btusb btrtl videobuf2_v4l2 btbcm snd_pcm videobuf2_common kvm_amd btintel bluetooth snd_seq_midi ccp videodev snd_seq_midi_event iwlmvm ecdh_generic kvm ecc snd_rawmidi mc mac80211 snd_seq snd_seq_device libarc4 snd_timer hid_multitouch input_leds serio_raw acer_wmi wmi_bmof sparse_keymap k10temp iwlwifi snd snd_rn_pci_acp3x snd_pci_acp3x cfg80211 soundcore mac_hid acer_wireless nvidia_uvm(OE) sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 dm_crypt nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) amdgpu crct10dif_pclmul
[ 31.490707] kernel: crc32_pclmul ghash_clmulni_intel amd_iommu_v2 hid_generic aesni_intel gpu_sched i2c_algo_bit ttm crypto_simd cryptd drm_kms_helper glue_helper syscopyarea sysfillrect nvme sysimgblt fb_sys_fops r8169 ahci ipmi_devintf i2c_piix4 drm libahci nvme_core realtek ipmi_msghandler i2c_hid video hid wmi
[ 31.490720] kernel: CPU: 3 PID: 74 Comm: kworker/3:1 Tainted: P OE 5.4.0-42-generic #46-Ubuntu
[ 31.490721] kernel: Hardware name: Acer Aspire A715-41G/Azalea_PKS, BIOS V1.00 03/13/2020
[ 31.490724] kernel: Workqueue: events drm_sched_job_timedout [gpu_sched]
[ 31.490727] kernel: RIP: 0010:drm_sched_resubmit_jobs+0x152/0x160 [gpu_sched]
[ 31.490729] kernel: Code: 41 5c 41 5d 41 5e 41 5f 5d c3 49 8b 46 10 31 c9 48 c7 80 80 00 00 00 00 00 00 00 49 8b 7f 70 31 c0 83 e7 01 74 04 0f 0b eb bf <0f> 0b eb c7 0f 0b eb 8b 66 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89
[ 31.490730] kernel: RSP: 0018:ffffab6b403d3d28 EFLAGS: 00010246
[ 31.490731] kernel: RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000000
[ 31.490732] kernel: RDX: ffffa069d4b4a280 RSI: ffffa069e3dcb1f8 RDI: 0000000000000000
[ 31.490733] kernel: RBP: ffffab6b403d3d60 R08: 000000000000050b R09: 0000000000000004
[ 31.490733] kernel: R10: 0000000000000000 R11: 0000000000000001 R12: ffffa069d1b87ad8
[ 31.490734] kernel: R13: ffffa069d1b87980 R14: ffffa069e3dcb000 R15: ffffa069d4b4a240
[ 31.490735] kernel: FS: 0000000000000000(0000) GS:ffffa069e88c0000(0000) knlGS:0000000000000000
[ 31.490736] kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 31.490737] kernel: CR2: 00007f4aeb7fdb38 CR3: 00000001e043a000 CR4: 00000000003406e0
[ 31.490738] kernel: Call Trace:
[ 31.490827] kernel: amdgpu_device_gpu_recover+0x6cd/0x95a [amdgpu]
[ 31.490907] kernel: amdgpu_job_timedout+0x103/0x130 [amdgpu]
[ 31.490909] kernel: drm_sched_job_timedout+0x44/0x90 [gpu_sched]
[ 31.490914] kernel: process_one_work+0x1eb/0x3b0
[ 31.490916] kernel: worker_thread+0x4d/0x400
[ 31.490919] kernel: kthread+0x104/0x140
[ 31.490921] kernel: ? process_one_work+0x3b0/0x3b0
[ 31.490922] kernel: ? kthread_park+0x90/0x90
[ 31.490927] kernel: ret_from_fork+0x22/0x40
[ 31.490928] kernel: ---[ end trace 3f6c6090efb5a251 ]---
[ 31.490960] kernel: amdgpu 0000:05:00.0: GPU reset(2) succeeded!
我還透過 xorg.conf 檔案中的以下內容驗證了系統也不穩定:
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
EndSection
我沒有主意了,有誰知道如何配置這些混合圖形系統 AMD + Nvidia 的正確方法?
如果您來到這裡,感謝您花時間閱讀所有這些內容,我盡力提供我能收集到的所有資訊。
如果您發現寫作中有什麼奇怪的地方,請原諒,英語不是我的母語,我通常不常寫信
編輯:我能夠透過 ssh 存取。這是我能夠收集到的信息帶有 dmesg 的 Pastebin
重新啟動的唯一方法是使用,echo b /proc/sysrq-trigger
因為兩者都不起作用sudo reboot
,systemctl reboot
一切都很慢且受阻
正如我之前所說,打開筆記型電腦時會發生此崩潰,重啟時不會發生這種情況
答案1
我有相同的筆記型電腦,沒有即時選擇要做什麼,我只是安裝了 Pop!_OS,它工作得很好,我可以選擇只使用整合、專用或混合 GPU 模式。