waydroid / waydroid

Waydroid uses a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.
https://waydro.id
GNU General Public License v3.0
8.06k stars 334 forks source link

[BUG] Incorrect Vulkan driver on Broadwell (and potentially Haswell) #1604

Open mrvictory1 opened 3 weeks ago

mrvictory1 commented 3 weeks ago

Describe the bug

Waydroid assigns "ro.hardware.vulkan=intel" in waydroid_base.prop file. "intel_hasvk" is used by iGPUs found on Intel Core 4th and 5th generation CPUs instead of "intel". As a result Vulkan does not work at all. Changing "intel" to "intel_hasvk" allows Vulkan to work in Waydroid.

Ekran Görüntüsü_20241029_210539

Waydroid version

1.4.3

Device

Linux Desktop

Operating System

Nobara Linux 40 KDE Plasma

Kernel version

6.11.3-200.fsync.fc40.x86_64

Desktop Environment

KDE Plasma

GPU

Intel HD 6000

Logs

are log files needed?

mrvictory1 commented 3 weeks ago

Waydroid probes current kernel module and determines driver based on that, Broadwell also uses i915 so this method fails https://github.com/waydroid/waydroid/blob/5000c9703de873e4f477ebcdd3556ad163252115/tools/helpers/gpu.py#L25

Quackdoc commented 3 weeks ago

If anyone has a good idea for a better way to probe which driver to use without needing to rely on things like eglinfo it would be nice to hear some ideas

mrvictory1 commented 3 weeks ago

inxi has GPU ID values for Broadwell and Haswell. GPU ID can be found at /sys/class/drm/card1/device/device. I have 0x1626 which matches Broadwell. https://github.com/smxi/inxi/blob/15a55d0b948d4ddaffd5bfb266d4d12077b8fc39/inxi#L18215

Xtr126 commented 2 weeks ago

If anyone has a good idea for a better way to probe which driver to use without needing to rely on things like eglinfo it would be nice to hear some ideas

This is what Bliss OS does to detect GPU generation and set hasvk accordingly https://github.com/BlissRoms-x86/device_generic_common/blob/6017b7d8071e148623efca41531fc1c5ff2a6092/init.sh#L583