Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Succeded with intel-i915-dkms bakckport for LTS61 on 11800h laptop, host suspends and wakes perfectly! #101

Open
right-0903 opened this issue Aug 17, 2023 · 78 comments

Comments

@right-0903
Copy link

right-0903 commented Aug 17, 2023

I have tried with the dkms module from the repositroy(with 6.1.44-MANJARO or 6.4.10-zen2), and I also tried to build this 6.1.38 from linux-intel-lts with this aur package. None of them work with my instance.

Then I found the backport driver ocassionally. You will get the introduction about backport here, aka the out-of-tree driver. And you will find more functions about sriov in backport driver compared with linux-intel-lts, that is no wonder why backport driver work for 11800h while linux-intel-lts not.

you can install the dkms module similarly, make sure you are 515LTS kernel as backport required, I just tested with it. If you are ubuntu, suse, or redhat refer this. There is a packaged dkms module.

Today(10/07/2023), I have packaged for backports driver, you can easily install on arch, refer this

The source doesn't contain a dkms configuration file, you should create one, I list below(I built the debian package in my cloud instance, which contains this.), actually you can download it from intel's repository accroding to this.

PACKAGE_NAME="intel-i915-dkms"
PACKAGE_VERSION="1.23.6.24.230425.29"
AUTOINSTALL="yes"

BUILT_MODULE_NAME[0]="compat"
BUILT_MODULE_LOCATION[0]="compat"
DEST_MODULE_LOCATION[0]="/updates"

BUILT_MODULE_NAME[1]="i915"
BUILT_MODULE_LOCATION[1]="drivers/gpu/drm/i915"
DEST_MODULE_LOCATION[1]="/updates"

BUILT_MODULE_NAME[2]="i915_spi"
BUILT_MODULE_LOCATION[2]="drivers/gpu/drm/i915"
DEST_MODULE_LOCATION[2]="/updates"

BUILT_MODULE_NAME[3]="iaf"
BUILT_MODULE_LOCATION[3]="drivers/gpu/drm/i915/fabric"
DEST_MODULE_LOCATION[3]="/updates"

BUILT_MODULE_NAME[4]="mei"
BUILT_MODULE_LOCATION[4]="drivers/misc/mei/"
DEST_MODULE_LOCATION[4]="/updates"

BUILT_MODULE_NAME[5]="mei-me"
BUILT_MODULE_LOCATION[5]="drivers/misc/mei/"
DEST_MODULE_LOCATION[5]="/updates"

BUILT_MODULE_NAME[6]="mei-gsc"
BUILT_MODULE_LOCATION[6]="drivers/misc/mei/"
DEST_MODULE_LOCATION[6]="/updates"

BUILT_MODULE_NAME[7]="mei_wdt"
BUILT_MODULE_LOCATION[7]="drivers/watchdog/"
DEST_MODULE_LOCATION[7]="/updates"

BUILT_MODULE_NAME[8]="mei_hdcp"
BUILT_MODULE_LOCATION[8]="drivers/misc/mei/hdcp/"
DEST_MODULE_LOCATION[8]="/updates"

BUILT_MODULE_NAME[9]="mei_pxp"
BUILT_MODULE_LOCATION[9]="drivers/misc/mei/pxp/"
DEST_MODULE_LOCATION[9]="/updates"

BUILT_MODULE_NAME[10]="mei_iaf"
BUILT_MODULE_LOCATION[10]="drivers/misc/mei/iaf/"
DEST_MODULE_LOCATION[10]="/updates"

BUILT_MODULE_NAME[11]="intel_vsec"
BUILT_MODULE_LOCATION[11]="drivers/platform/x86/intel"
DEST_MODULE_LOCATION[11]="/updates"

BUILT_MODULE_NAME[12]="pmt_class"
BUILT_MODULE_LOCATION[12]="drivers/platform/x86/intel/pmt"
DEST_MODULE_LOCATION[12]="/updates"

BUILT_MODULE_NAME[13]="pmt_telemetry"
BUILT_MODULE_LOCATION[13]="drivers/platform/x86/intel/pmt"
DEST_MODULE_LOCATION[13]="/updates"

BUILT_MODULE_NAME[14]="pmt_crashlog"
BUILT_MODULE_LOCATION[14]="drivers/platform/x86/intel/pmt"
DEST_MODULE_LOCATION[14]="/updates"

# Find out how many CPU cores can be use if we pass appropriate -j option to make.
# DKMS could use all cores on multicore systems to build the kernel module.
num_cpu_cores()
{
  if [ -x /usr/bin/nproc ]; then
np=1
if [ "$np" -le "64" ]; then
echo "$np"
else
echo "64"
fi
  else
    echo "1"
  fi
}

# Here is where we could specify use of the defconfig. Right now it uses the kernel configuration from /usr/src/
MAKE="cp defconfigs/i915 .config; 'make' -j$(num_cpu_cores) KLIB=/lib/modules/$kernelver olddefconfig; 'make' -j$(num_cpu_cores) KLIB=/lib/modules/$kernelver"
CLEAN="'make' clean"

In the future, you can generate one according to modules.order, which will be genereted when you make defconfig-i915 && make.

Time to build the driver out of tree

git clone https://github.com/intel-gpu/intel-gpu-i915-backports.git 
cd intel-gpu-i915-backports
git checkout backport/main
mv /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/i915/i915.ko.xz /lib/modules/$(uname -r)/kernel/drivers/gpu/drm/i915/i915.ko.xzbak
# copy dkms.conf to this dir, I have attach above, I won't do it here
sudo dkms install -m intel-i915-dkms -v 1.23.6.24.230425.29 -k $(uname -r)
# don't forget add GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt i915.modeset=1 i915.enable_guc=3 i915.max_vfs=7 i915.reset=1 vfio-pci.enable_sriov=1 split_lock_detect=off" to your /etc/default/grub, 
# don't forget download the lastest [firmware](https://github.com/intel-gpu/intel-gpu-firmware) for you platform, tgl_guc_70.7.0.bin for me.
sudo update-grub
# you may should also regenerate initramfs, it is unnecessary for arch linux without [early kms](https://wiki.archlinux.org/title/Kernel_mode_setting#Early_KMS_start)
# after reboot
sudo -i
# don't do it with sudo echo balabala
echo 1 >  /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs
# vfio bind VF
virsh nodedev-detach pci_0000_00_02_1

The following is my configuration.

Test Environment:

host info:

OS: Manjaro Linux x86_64
Kernel: 5.15.125-1-MANJARO 
CPU: 11th Gen Intel i7-11800H (16) @ 4.600GHz
GPU: Intel TigerLake-H GT1 [UHD Graphics]
GRUB_CMDLINE_LINUX="intel_iommu=on iommu=pt i915.modeset=1 i915.enable_guc=3 i915.max_vfs=7 i915.reset=1 vfio-pci.enable_sriov=1 split_lock_detect=off" (I think not all parms. are necessary)

virsh or qemu configuration

I got it from archwiki, maybe unnecessary.

    <hyperv mode="custom">
      ...
      <vendor_id state="on" value="GenuineIntel"/>
      ...
    </hyperv>

make sure you don't hidden virtualization, credit to @pagkly . I think the guest driver need a flag to know itself is a VF. Hiding kvm is allowed in my case.

⚠️ Warning: do not use!

    <feature policy="disable" name="hypervisor"/>

guest info:

Driver suggestion: 4577 or the latest, some guides recommend 3222, it doesn't work for me.

Guest 1 backport kenel driver driver from intel-lts or this repository
3222 or 3111 code43 0% utilization
4577 works code43
  • guest 1
Edition: Windows 10 LTSC
Version: 21H2
OS build: 19044.3324
Guest driver: 4577
  • guest 2
Edition: Windows 10 Pro
Version: 2009
OS build: 19042.631
Guest driver: 4577
  • guest 3
Edition: Windows 10 Pro N
Version: 22H2
OS build: 19045.2965
Guest driver: 4577

All my VMs work now with 4577.


Result

Working normally here with intel-i915-dkms bakckport for LTS515 on my 11800h laptop.
Screenshot_20230817-121228
Here is the intel_gpu_top -d sriov output under headless.
IMG_20230817_121114632_HDR


Suspend

About suspend, the guest will not sleep I think, after I wake host up, I reconnect my guest, there is no relogin animation, and I can't access sleep info by powercfg /sleepstudy. In the host,

[  672.034378] PM: suspend entry (s2idle)
[  672.052260] Filesystems sync: 0.017 seconds
[  673.198593] Freezing user space processes ... (elapsed 0.002 seconds) done.
[  673.200765] OOM killer disabled.
[  673.200766] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  673.202039] printk: Suspending console(s) (use no_console_suspend to debug)
[  673.202289] i915 0000:00:02.0: VF1 paused
[  673.683927] ACPI: EC: interrupt blocked
[  675.220518] ACPI: EC: interrupt unblocked
[  675.240016] ------------[ cut here ]------------
[  675.240019] i915 0000:00:02.0: can't update enabled VF BAR0 [mem 0x4010000000-0x4016ffffff 64bit]
[  675.240035] WARNING: CPU: 10 PID: 4781 at drivers/pci/iov.c:923 pci_iov_update_resource+0x141/0x150
< I skip here>
[  675.241947] ---[ end trace c9b201cfd30033c9 ]---
[  675.772752] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.7.0.bin version 70.7.0
[  675.772756] i915 0000:00:02.0: [drm] GT0: HuC firmware i915/tgl_huc_7.9.3.bin version 7.9.3
[  675.772936] vfio-pci 0000:00:02.1: enabling device (0000 -> 0002)
[  675.776967] i915 0000:00:02.0: [drm] GT0: HuC: authenticated!
[  675.777487] i915 0000:00:02.0: [drm] GT0: GUC: submission enabled
[  675.777489] i915 0000:00:02.0: [drm] GT0: GUC: SLPC enabled
[  675.777996] i915 0000:00:02.0: [drm] GT0: GUC: RC enabled
[  676.434191] OOM killer enabled.
[  676.434194] Restarting tasks ... 
[  676.434637] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[  676.435436] mei_pxp 0000:00:16.0-fbf6fcf1-96cf-4e2e-a6a6-1bab8cbe36b1: bound 0000:00:02.0 (ops i915_pxp_tee_component_ops [i915])
[  676.436328] done.
[  676.451166] PM: suspend exit
[  678.523222] i915 0000:00:02.0: VF1 has completed migration

[ 678.523222] i915 0000:00:02.0: VF1 has completed migration is the key I think, it sotres the state of the vm, you can learn about it here, compared with linux-intel-lts one.

EDIT:

  1. revise grub confg update, I mess them up, sudo grub-mkconfig -> sudo update-grub, or use sudo grub-mkconfig -o /boot/grub/grub.cfg.
  2. append several kernel commandline parm.s: intel_iommu=on iommu=pt i915.modeset=1, I notice not all people use them, but necessary.
  3. add several guest instances, and remove version requirement(21h2+), add credits.
  4. add an aur repository for this backports package.
@pagkly
Copy link

pagkly commented Aug 18, 2023

Sorry I want to try this but dkms command returns error '/var/lib/../source/dkms.conf' missing

@right-0903
Copy link
Author

Sorry I want to try this but dkms command returns error '/var/lib/../source/dkms.conf' missing

copy my dkms.conf, I have already listed it above. looking forward to feedback.

@pagkly
Copy link

pagkly commented Aug 18, 2023

Hi, my distro is Arch and backport successfully built with 5.19 kernel. I could not get dkms to install on 5.15. However, once I reboot, GDM could not load. It shows black screen with blinking underscore.

@right-0903
Copy link
Author

right-0903 commented Aug 19, 2023

Hi, my distro is Arch and backport successfully built with 5.19 kernel. I could not get dkms to install on 5.15. However, once I reboot, GDM could not load. It shows black screen with blinking underscore.

You mean you can't install dkms or i915 dkms module with 5.15. Have you read dkms log? Is Ctrl+Alt+F2-7 available? have you looked into journal such as journalctl -rb -1? BTW, I use sddm-git which is running on Wayland, X11 or Wayland login session work. At last, why don't you try to install Manjaro Linux515 and headers packages ? you can download and install easily as I download linux-zen from the arch official repository.

@pagkly
Copy link

pagkly commented Aug 19, 2023

Cannot build i915 backport dkms module on kernel 5.15, due to error but I can install it on 5.19.13-arch1-1.
I tried switching to sddm-git but still cant load sddm it says Error Internal "Process crashed" when I looked into journalctl -rb -1

@right-0903
Copy link
Author

Cannot build i915 backport dkms module on kernel 5.15, due to error but I can install it on 5.19.13-arch1-1. I tried switching to sddm-git but still cant load sddm it says Error Internal "Process crashed" when I looked into journalctl -rb -1

I can't find a prebuilt linux515 or linux519 for arch linux, so I can't test for you, can you show me dkms build error log on 515? Make sure your subversion is not too old, mine is 5.15.125, you can also access the prebuilt linux515-5.15.125-1-x86_64.pkg.tar.zst linux515-headers-5.15.125-1-x86_64.pkg.tar.zst from manjaro mirror, such as here.

@right-0903
Copy link
Author

right-0903 commented Aug 20, 2023

do some changes, make it built on 6.1, then I get a underscore too, that means i915 don't work, but my Nvidia works when I attach another monitor to it. log tell me there are some unknown symbol, one of the reasons is svm, I commented svm when building, because thera are some changes to vma, svm code use it. But I am not familiar with it and I can't find any commit about i915 svm in mainline.

@pagkly
Copy link

pagkly commented Aug 23, 2023

I tried following your setup on Manjaro 5.15.125 but could not get sr-iov to work.
When I tried to set VF, it says Numerical result out of range.
Might be because I have Iris Xe GPU. My CPU is i5 1135G7.

@right-0903
Copy link
Author

When I tried to set VF, it says Numerical result out of range.

have you set kernel command line? what is the kernel buffer? This issue is related to max_vfs setting which is logged in kernel buffer

@pwouik
Copy link

pwouik commented Aug 31, 2023

I get echo write error no such file or directory when I echo anything other than 0
cpu:11th Gen Intel(R) Core(TM) i5-1135G7
linux 5.15.127-1-lts515
gpu: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics]
I get "driver does not support SR-IOV configuration via sysfs" in journalctl, I guess it's not there yet for Iris Xe

@right-0903
Copy link
Author

I get "driver does not support SR-IOV configuration via sysfs" in journalctl, I guess it's not there yet for Iris Xe

intel claims the driver support that, make sure you have make it work instead of original one. sysfs is enabled here.

@right-0903
Copy link
Author

I get echo write error no such file or directory when I echo anything other than 0
cpu:11th Gen Intel(R) Core(TM) i5-1135G7
linux 5.15.127-1-lts515
gpu: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics]
I get "driver does not support SR-IOV configuration via sysfs" in journalctl, I guess it's not there yet for Iris Xe

you can modinfo i915 to determine the working driver, which will display driver path and dependencies, one of dependencies is compat. BTW, if you have set early kms or some other things, make sure you have regenerated initramfs.

@pwouik
Copy link

pwouik commented Sep 2, 2023

modinfo i915.txt
seems correct

@pwouik
Copy link

pwouik commented Sep 2, 2023

I regenerated initramfs, I get 'Numerical result out of range'
max_vfs is correctly set : systool -vm i915.txt

@right-0903
Copy link
Author

right-0903 commented Sep 3, 2023

I regenerated initramfs, I get 'Numerical result out of range'
max_vfs is correctly set : systool -vm i915.txt

have you install the latest firmware for guc? post kernel buffer about i915 too. Also, your kernel source and distribution.

@right-0903
Copy link
Author

right-0903 commented Sep 3, 2023

I regenerated initramfs, I get 'Numerical result out of range' max_vfs is correctly set : systool -vm i915.txt

just look into this.

i915 parm: modeset:Use kernel modesetting [KMS] (0=disable, 1=on, -1=force vga console preference [default]) (int)

yours is -1, I forget to attach i915.modeset=1.

@right-0903
Copy link
Author

I tried following your setup on Manjaro 5.15.125 but could not get sr-iov to work. When I tried to set VF, it says Numerical result out of range. Might be because I have Iris Xe GPU. My CPU is i5 1135G7.

can you try to add enable KMS i915.modeset=1 and try again?

@right-0903
Copy link
Author

please append several kernel commandline parm.s: intel_iommu=on iommu=pt i915.modeset=1, I notice they are not used by default, but necessary.

@pwouik
Copy link

pwouik commented Sep 3, 2023

same message with new options
archlinux linux-lts515(aur)
sudo dmesg | rg i915:

[    0.040381] Kernel command line: BOOT_IMAGE=/vmlinuz-linux-lts515 root=UUID=5f555fd7-165b-4d9a-b566-e45c86beec81 rw intel_iommu=on iommu=pt i915.modeset=1 i915.enable_guc=3 i915.max_vfs=7 i915.reset=1 vfio-pci.enable_sriov=1 split_lock_detect=off
[    3.869860] i915 0000:00:02.0: Running in SR-IOV PF mode
[    3.869929] i915 0000:00:02.0: [drm] GT count: 1, enabled: 1
[    3.870270] i915 0000:00:02.0: [drm] VT-d active for gfx access
[    3.874347] i915 0000:00:02.0: vgaarb: deactivate vga console
[    3.874401] i915 0000:00:02.0: [drm] Using Transparent Hugepages
[    3.875165] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    3.876438] i915 0000:00:02.0: Direct firmware load for i915/tgl_dmc_ver2_12.bin failed with error -2
[    3.876443] i915 0000:00:02.0: [drm] Failed to load DMC firmware i915/tgl_dmc_ver2_12.bin. Disabling runtime power management.
[    3.876445] i915 0000:00:02.0: [drm] DMC firmware homepage: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
[    3.887179] i915 0000:00:02.0: [drm] *ERROR* GT0: GuC firmware i915/tgl_guc_70.7.0.bin: fetch failed -ENOENT
[    3.887187] i915 0000:00:02.0: [drm] GT0: GuC firmware(s) can be downloaded from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
[    3.888006] i915 0000:00:02.0: [drm] GT0: GuC firmware i915/tgl_guc_70.7.0.bin version 0.0.0
[    3.888110] i915 0000:00:02.0: [drm] *ERROR* GT0: GuC initialization failed -ENOENT
[    3.888113] i915 0000:00:02.0: [drm] *ERROR* GT0: Enabling uc failed (-5)
[    3.888115] i915 0000:00:02.0: [drm] *ERROR* GT0: Failed to initialize GPU, declaring it wedged!
[    3.895277] i915 0000:00:02.0: [drm:add_taint_for_CI [i915]] CI tainted:0x9 by intel_gt_init+0xd8/0x600 [i915]
[    3.992730] mei_hdcp 0000:00:16.0-b638ab7e-94e2-4ea2-a552-d1c54b627f04: bound 0000:00:02.0 (ops i915_hdcp_component_ops [i915])
[    4.320866] i915 0000:00:02.0: [drm:add_taint_for_CI [i915]] CI tainted:0x9 by i915_gem_init+0x148/0x240 [i915]
[    4.331121] i915 0000:00:02.0: IOV0: Initialization failed (-EIO) GT wedged
[    4.331126] i915 0000:00:02.0: [drm:i915_sriov_pf_confirm.cold [i915]] PF aborted (-EIO) i915_driver_probe+0x1b7f/0x1c50 [i915]
[    4.331300] i915 0000:00:02.0: No VFs could be associated with this PF!
[    4.331682] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    4.511122] sof-audio-pci-intel-tgl 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[    4.512869] fbcon: i915drmfb (fb0) is primary device
[    4.538902] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device```

@pwouik
Copy link

pwouik commented Sep 3, 2023

I am normally using "linux" arch packege(6.4.12.arch1-1 currently)
maybe my linux-firmware is too recent

@right-0903
Copy link
Author

right-0903 commented Sep 4, 2023

I am normally using "linux" arch packege(6.4.12.arch1-1 currently)
maybe my linux-firmware is too recent

Yours is too old, the driver out of tree is more recent than mainline. And the firmware that the module loaded is compatible downwardly, I don't want to explain here, you can read i915 source code. Apparently, your module can't load firmware, download firmware for tgl in the link I mentioned or log mentioned, and place them to /lib/firmware. just read log carefully, dude. ERROR* GT0: GuC firmware i915/tgl_guc_70.7.0.bin: fetch failed -ENOENT

@right-0903
Copy link
Author

I am normally using "linux" arch packege(6.4.12.arch1-1 currently)

You can't use it with Linux 6+ until it is merged to mainline, around Q4 2023. The dkms module for 6+ offered by this repository is incomplete, not all devices work, and can't wake from suspend.

@pwouik
Copy link

pwouik commented Sep 4, 2023

I managed to add all missing firmwares, I could echo in num_vfs
Thanks a lot for the help
Now I have error 43
windows 22H2
with driver 4672 and 4577

@right-0903
Copy link
Author

right-0903 commented Sep 5, 2023

Now I have error 43
windows 22H2
with driver 4672 and 4577

code43 is really weird. my suggestion is try to add some quirks like vendor Id, use MS stock image with the latest update installed, remove virtual display like qxl, connect to it with RDP. And you can also use 3222 or 3111, it chances, good luck.
BTW, use rapr to clean graphics driver when you are trying new driver, I would clean all components came with it, like audio and so on. clean install offered by intel is garbage.

@pwouik
Copy link

pwouik commented Sep 5, 2023

turn out I just forgot vendor_id, mb

@right-0903
Copy link
Author

turn out I just forgot vendor_id, mb

ok, then if you make it work?

@pwouik
Copy link

pwouik commented Sep 7, 2023

I managed to use looking glass with iddsampledriver: https://github.com/ge9/IddSampleDriver
Everything works fine except minecraft bedrock
image
also I had another screen in addition to the one I specified in the driver option.txt and I had to tell windows to only display on one of them to fix mouse position and have graphic acceleration

@cyril-cheng
Copy link

Can pve8 be installed?

@right-0903
Copy link
Author

I managed to use looking glass with iddsampledriver: https://github.com/ge9/IddSampleDriver
Everything works fine except minecraft bedrock

glad to know, I only use it with RDP.

@right-0903
Copy link
Author

gen 11 works perfect using this "intel-i915-dkms bakckport ", while in gen 12(i3-12100, uhd730) I always get code 43 in vm.

many reasons cause code 43, like hiding virtualization, improper driver, etc. You should submit more information. BTW, i915 backport have support linux 6.0lts officially, you can also report this to Intel.

@resiliencer
Copy link

gen 11 works perfect using this "intel-i915-dkms bakckport ", while in gen 12(i3-12100, uhd730) I always get code 43 in vm.

Did you try to pass to romfile qemu/libvirt parameter IntelGopDriver.efi from your motherboard's BIOS? For me it had solved the issue.

@sieskei
Copy link

sieskei commented Nov 21, 2023

Hello, all!
Just now, I find time for it and I managed to compile it for LTS 6.2.
I'm trying it with Win11, and I think it's working, but I'm having trouble launching the Looking Glass host.
I created a virtual monitor with IDDM.
What are the settings in your Looking Glass INI file?

@right-0903
Copy link
Author

Hello, all!
Just now, I find time for it and I managed to compile it for LTS 6.2.
I'm trying it with Win11, and I think it's working, but I'm having trouble launching the Looking Glass host.
I created a virtual monitor with IDDM.
What are the settings in your Looking Glass INI file?

You can create a qxl display to check, I don't set specific settings. BTW, 6.2 is not LTS, even though 6.2 is supported officially now.

@sieskei
Copy link

sieskei commented Nov 21, 2023

[I]    335250769              time.c:85   | windowsSetTimerResolution      | System timer resolution: 500.0 μs
[I]    335251612               app.c:809  | app_main                       | Looking Glass Host (B6-225-22d949c4)
[I]    335252430           cpuinfo.c:38   | cpuInfo_log                    | CPU Model: 11th Gen Intel(R) Core(TM) i9-11900KB @ 3.30GHz
[I]    335253241           cpuinfo.c:39   | cpuInfo_log                    | CPU: 1 sockets, 6 cores, 12 threads
[I]    335254847           ivshmem.c:132  | ivshmemInit                    | IVSHMEM 0* on bus 0x6, device 0x2, function 0x0
[I]    335266380               app.c:826  | app_main                       | IVSHMEM Size     : 64 MiB
[I]    335266610               app.c:827  | app_main                       | IVSHMEM Address  : 0x2753BEA0000
[I]    335266846               app.c:828  | app_main                       | Max Pointer Size : 1024 KiB
[I]    335267074               app.c:829  | app_main                       | KVMFR Version    : 20
[I]    335267292               app.c:848  | app_main                       | Trying           : DXGI
[I]    335269957              dxgi.c:448  | dxgi_init                      | Not using unsupported adapter: Microsoft Basic Render Driver
[I]    335270368              dxgi.c:448  | dxgi_init                      | Not using unsupported adapter: Microsoft Basic Render Driver
[E]    335270681              dxgi.c:503  | dxgi_init                      | Failed to locate a valid output device
[I]    335270961               app.c:848  | app_main                       | Trying           : NVFBC
   335271567 [E]          wrapper.cpp:61   | NvFBCInit                      | Failed to load NvFBC64.dll: 0x0000007e (The specified module could not be found.)
[E]    335271947               app.c:868  | app_main                       | Failed to find a supported capture interface
[I]    335273971               app.c:1029 | app_main                       | Host application exited

Screenshot 2023-11-21 145753

@sieskei
Copy link

sieskei commented Nov 21, 2023

It's working now. The issue was that the screen was set to clone mode.

@right-0903
Copy link
Author

It's working now. The issue was that the screen was set to clone mode.

You mean windows setting? I never meet that.

@purplepalmdash
Copy link

gen 11 works perfect using this "intel-i915-dkms bakckport ", while in gen 12(i3-12100, uhd730) I always get code 43 in vm.

many reasons cause code 43, like hiding virtualization, improper driver, etc. You should submit more information. BTW, i915 backport have support linux 6.0lts officially, you can also report this to Intel.

Tried the same configuration(use the same ssd for booting 2 machines) on different platform(gen11 vs gen 13), following is the result.

OS/Hardware Gen 13(i5-13400)/(uhd 730) Gen 11(i5-1135G7)/(Iris Xe Graphics) dkms Repository
RockLinux 5.14.0-284(official)/Qemu7.1 Code 43, gpu not working in vm OK https://github.com/intel-gpu/intel-gpu-i915-backports
RockLinux 6.1.63(self-build) /Qemu7.1 OK Code 43, can see vf in vm but not working https://github.com/strongtz/i915-sriov-dkms

Just wondering what caused this difference(cpu gen? iGPU type?), does anybody runs well using backport driver on gen12/13?

@right-0903
Copy link
Author

@purplepalmdash hope you have read all the thread. Then dive into those logs.

@right-0903
Copy link
Author

gen 11 works perfect using this "intel-i915-dkms bakckport ", while in gen 12(i3-12100, uhd730) I always get code 43 in vm.

many reasons cause code 43, like hiding virtualization, improper driver, etc. You should submit more information. BTW, i915 backport have support linux 6.0lts officially, you can also report this to Intel.

Tried the same configuration(use the same ssd for booting 2 machines) on different platform(gen11 vs gen 13), following is the result.

OS/Hardware Gen 13(i5-13400)/(uhd 730) Gen 11(i5-1135G7)/(Iris Xe Graphics) dkms Repository
RockLinux 5.14.0-284(official)/Qemu7.1 Code 43, gpu not working in vm OK https://github.com/intel-gpu/intel-gpu-i915-backports
RockLinux 6.1.63(self-build) /Qemu7.1 OK Code 43, can see vf in vm but not working https://github.com/strongtz/i915-sriov-dkms

Just wondering what caused this difference(cpu gen? iGPU type?), does anybody runs well using backport driver on gen12/13?

I got a 12700h laptop, using the past ssd and system, got the code43. I have no idea now.

@plantroon
Copy link

1235U here, error 43. Gentoo with kernel 6.1 LTS. But I could get it working with https://github.com/strongtz/i915-sriov-dkms - however this one makes the laptop freeze when entering sleep mode.

@right-0903
Copy link
Author

1235U here, error 43. Gentoo with kernel 6.1 LTS. But I could get it working with https://github.com/strongtz/i915-sriov-dkms - however this one makes the laptop freeze when entering sleep mode.

Let's wait for xe driver, which supports sriov natively, coming in linux 6.8

@pelhadda
Copy link

pelhadda commented Dec 22, 2023

I managed to use looking glass with iddsampledriver: https://github.com/ge9/IddSampleDriver Everything works fine except minecraft bedrock image also I had another screen in addition to the one I specified in the driver option.txt and I had to tell windows to only display on one of them to fix mouse position and have graphic acceleration

I had the same issue with Minecraft. In Windows 11 Settings > Display > Graphics, and set Minecraft to "Specific GPU".

image

Edit: I should add I'm using Proxmox/Windows 11 VM with Sunshine/Moonlight

@rba-andrade
Copy link

Has anyone else tried this with xe kernel driver from 6.8 mainline kernel? I get "xe 0000:00:02.0: driver does not support SR-IOV configuration via sysfs" when trying to enable 1 VFs.

@plantroon
Copy link

Has anyone else tried this with xe kernel driver from 6.8 mainline kernel? I get "xe 0000:00:02.0: driver does not support SR-IOV configuration via sysfs" when trying to enable 1 VFs.

You're not using the Xe driver but i915 (as that's still the default) you must use xe.force_probe to use Xe driver, like: i915.force_probe=!56a2 xe.force_probe=56a2 where 56a2 is your GPU's model ID from lspci -nn.

I did try, good luck getting even a desktop running. Long way to go.

@rba-andrade
Copy link

I did use the force probe, I can get desktop running, but no sucess with SR-IOV. You need to compile mesa with meson build option "-Dintel-xe-kmd=enabled" so you can get to desktop.

@plantroon
Copy link

I built mesa-git with that build option and it only showed me rainbows or psychedelic imagery in all sddm, gdm, hyprland and gnome session. Is a specific version of mesa needed?

@rba-andrade
Copy link

I use mesa 24.0.1, but in theory if you are using mesa-git you don't need this option anymore. It has been removed from mesa-git and should work without it. I use hyprland and greetd+gtkgreet for login manager. Will try with mesa-git and give you feedback.

@plantroon
Copy link

plantroon commented Feb 24, 2024

Tried mesa 24.0.1 as well. In both cases I get errors like in the photoscreenshot.
20240224_115626
😔

What is your hardware? I have i5 1235U with Iris Xe graphics

@rba-andrade
Copy link

rba-andrade commented Feb 28, 2024

Didn't work for me with mesa-git, but mesa 24.0.1 works. I'm using an i7-1165G7 with Iris Xe graphics. Did you include CONFIG_DRM_XE_DISPLAY=y in yours kernel config?

@plantroon
Copy link

plantroon commented Feb 28, 2024

Yes CONFIG_DRM_XE_DISPLAY=y was configured. How did mesa-git behave on your side?

EDIT: mesa 24.0.1 works. Colors seem off but at least they're not all inverted. That's on Gnome shell. Hyprland(/-git) no luck ;(

@rba-andrade
Copy link

Has anyone successfully built the new version of the i915-backport which enables support for kernel 6.5 against the 6.6 lts?

@right-0903
Copy link
Author

Has anyone successfully built the new version of the i915-backport which enables support for kernel 6.5 against the 6.6 lts?

yes, I gave it a try, after did some changes, it can be built, then boot into desktop, throw dereference null ptr error, and drm issue, screen freezing. nowadays, it's a mess, they backported drm module, added dmabuf module, give several build option i915, i915_only, drm, dmabuf, nodrm and so on, but I don't find a doc about how to really do it. I set build all modules, but it wouldn't.

@right-0903
Copy link
Author

at your risks, a rough and unstable patch here.
Screenshot_20240309_223805
i915-out-tree-for-Linux6.6-progressing.txt

@rba-andrade
Copy link

Which defconfig did you use? I'm getting stuck at loading modules during init.

@right-0903
Copy link
Author

Which defconfig did you use? I'm getting stuck at loading modules during init.

i915, but I tried all deconfigs, then I got the same .config

@rba-andrade
Copy link

Did anyone already tried the new backport version with kernel 6.6 support (I915_24WW23.5_881.19_24.2.17_240301.20)? I'm trying it with kernel 6.6.32 and is not working well for me. It only boots with "ibt=off" kernel parameter because of MISSING ENDBR instructions. Is there any changes to compile parameters that makes it work?

@zyxhere
Copy link

zyxhere commented Jun 25, 2024

Hi chiming in, am total newbie just wanna ask some questions (sorry for clutter) Can sr-iov work out of the box now for example on debian unstable which has kernel 6.8 (has the new xe driver which supposedly has it sriov built in?) and mesa 24.1.1? if no then what components are still missing? Also do you need anything other than virtualization enabled in bios? I have a basic locked down bios on a 12th gen laptop (i5-1235U)

@johntdavis84
Copy link

johntdavis84 commented Jun 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests