FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

vmwgfx/FreeBSD12 System hangs/freeze #144

Open ZOleg73 opened 5 years ago

ZOleg73 commented 5 years ago

My system: Intel Core i5-9600k/32Gb RAM/Nvidia RTX-2080 Windows 10 1809, VMware 15.0.4, FreeBSD12-stable x64 Guest(cpu - 6 cores,ram -16gb), all packages installed from latest ports collection. Accelerate 3D graphics option checked.

Install drm-fbsd12.0-kmod-4.16.g20190424, and when load vmwgfx module (kldload vmwgfx or via kld_list="vmwgfx" in /etc/rc.conf) FreeBSD screen goes black and os freezes. Same with FreeBSD13-current x64 with drm-current-kmod-4.16.g20190424.

johalun commented 5 years ago

Try with 1 virtual cpu. There's still some race condition cause freeze sometimes on kldload if you have > 1 cpu.

ZOleg73 commented 5 years ago

Same with 1CPU/1 Core. I try drm-v5.0 on FreeBSD 13.0-CURRENT 0a0552bab73(drm-v5.0) (from https://github.com/FreeBSDDesktop/freebsd-base) - screen goes black and os freezes. If add to /boot/loader.conf ttm_load="YES" and to /etc/rc.conf kld_list="/boot/modules/vmwgfx.ko", then the OS does not hang when booting, but when the vmwgfx module is loaded, the following message is displayed:

drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] DMA map mode: Using physical TTM page addresses.
[drm] Capabilities:
[drm]   Rect copy.
[drm]   Cursor.
[drm]   Cursor bypass.
[drm]   Cursor bypass 2.
[drm]   8bit emulation.
[drm]   Alpha cursor.
[drm]   3D.
[drm]   Extended Fifo.
[drm]   Multimon.
[drm]   Pitchlock.
[drm]   Irq mask.
[drm]   Display Topology.
[drm]   GMR.
[drm]   Traces.
[drm]   GMR2.
[drm]   Screen Object 2.
[drm]   Command Buffers.
[drm]   Command Buffers 2.
[drm]   Guest Backed Resources.
[drm]   DX Features.
[drm]   HP Command Queue.
[drm] Capabilities2:
[drm]   Grow oTable.
[drm]   IntraSurface copy.
[drm] Max GMR ids is 64
[drm] Max number of GMR pages is 65536
[drm] Max dedicated hypervisor surface memory is 0 kiB
[drm] Maximum display memory size is 131072 kiB
[drm] VRAM at 0xf0000000 size is 4096 kiB
[drm] MMIO at 0xfb800000 size is 256 kiB
[drm ERROR :vmw_driver_load] Failed initializing TTM buffer object driver.
device_attach: drmn0 attach returned 12
demik commented 4 years ago

Reproductible on the following configuration: macOS 10.5 / VMWare Fusion 11.1 / FreeBSD 12.0 with 1 or 2 CPU + drm-kmod-g20190710

Checking/Unchecking Accelerate 3D graphics option does not change anything.

AleksandrNY commented 3 years ago

This sequencing solves the problem: 1) in rc.conf insert kld_list="/boot/modules/radeonkms.ko" 2) my loader.conf without line ttm_load="YES" 3) than kldload /boot/modules/vmwgfx.ko

Environment: VMware Workstation Player 12 Guest OS: FreeBSD 12.1 64 bit Accelerate 3D graphics option is checked

P.S. I have created VM instance based on Ubuntu16 64 bit, than Checking Accelerate 3D graphics option, than i have installed FreeBSD 12.1 and than i have changed type os to FreeBSD 64 bit

tuaris commented 3 years ago

@AleksandrNY what is the purpose of loading the Radeon KMS module? My guess is that you need to load KMS driver for vmwgfx to work? Would it have the same result if we load the Intel KMS driver?

AleksandrNY commented 3 years ago

@tuaris Actually, I dont know clearly why it is worked. This was just experiment. Note, that for me if radeonkms is in rc.conf kld_list, that it is not worked. You should use kldload radeonkms after boot. I suppouse, that intel KMS driver should work too