Build SRIOV fails for Debian 12.5 and Ubuntu 22.04 guest
Doug411 opened this issue · comments
I'm successfully able to enable SRIOV on my proxmox host. I am able to pass a VF into a jellyfin LXC. However, I have not been able to build the module on a Ubuntu 22.04 or Debian 12.5 VM. On Ubuntu 22.04 kernel 6.5 I get an error ERROR (dkms apport): binary package for i915-sriov-dkms: 6.1 not found. I've tried setting the version to 6.5 etc, but still get the error.
oug@appserver:/usr/src$ sudo git clone https://github.com/strongtz/i915-sriov-dkms.git i915-sriov-dkms-6.1
Cloning into 'i915-sriov-dkms-6.1'...
remote: Enumerating objects: 2499, done.
remote: Counting objects: 100% (587/587), done.
remote: Compressing objects: 100% (281/281), done.
remote: Total 2499 (delta 374), reused 310 (delta 298), pack-reused 1912
Receiving objects: 100% (2499/2499), 3.93 MiB | 9.83 MiB/s, done.
Resolving deltas: 100% (1395/1395), done.
doug@appserver:/usr/src$ ls
i915-sriov-dkms-6.1 linux-headers-6.5.0-28-generic python3.10
i915-sriov-dkms-6.5 linux-hwe-6.5-headers-6.5.0-27
linux-headers-6.5.0-27-generic linux-hwe-6.5-headers-6.5.0-28
doug@appserver:/usr/src$ cd 915-sriov-dkms-6.1
bash: cd: 915-sriov-dkms-6.1: No such file or directory
doug@appserver:/usr/src$ cd i915-sriov-dkms-6.1
doug@appserver:/usr/src/i915-sriov-dkms-6.1$ ls
dkms.conf i915-sriov-dkms-git.install Makefile README.md
drivers include PKGBUILD
doug@appserver:/usr/src/i915-sriov-dkms-6.1$ sudo nano dkms.conf
doug@appserver:/usr/src/i915-sriov-dkms-6.1$ dkms install --force -m i915-sriov-dkms -v 6.1
Error! You must be root to use this command.
doug@appserver:/usr/src/i915-sriov-dkms-6.1$ sudo dkms install --force -m i915-sriov-dkms -v 6.1
Creating symlink /var/lib/dkms/i915-sriov-dkms/6.1/source -> /usr/src/i915-sriov-dkms-6.1
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j4 KERNELRELEASE=6.5.0-28-generic -j4 -C /lib/modules/6.5.0-28-generic/build M=/var/lib/dkms/i915-sriov-dkms/6.1/build KVER=6.5.0-28-generic................(bad exit status: 2)
ERROR (dkms apport): binary package for i915-sriov-dkms: 6.1 not found
Error! Bad return status for module build on kernel: 6.5.0-28-generic (x86_64)
Consult /var/lib/dkms/i915-sriov-dkms/6.1/build/make.log for more information.
doug@appserver:/usr/src/i915-sriov-dkms-6.1$
This is where cat /var/lib/dkms/i915-sriov-dkms/6.1/build/make.log
comes in handy. Please include this so we know what exactly is going on during the build process.
/var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_dp_mst.c: In function ‘intel_dp_mst_find_vcpi_slots_for_bpp’:
/var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:85:31: error: too few arguments to function ‘drm_dp_calc_pbn_mode’
85 | crtc_state->pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock,
| ^~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_display_types.h:36,
from /var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:40:
./include/drm/display/drm_dp_mst_helper.h:835:5: note: declared here
835 | int drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc);
| ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_dp_mst.c: In function ‘intel_dp_mst_mode_valid_ctx’:
/var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:898:13: error: too few arguments to function ‘drm_dp_calc_pbn_mode’
898 | drm_dp_calc_pbn_mode(mode->clock, min_bpp) > port->full_pbn) {
| ^~~~~~~~~~~~~~~~~~~~
./include/drm/display/drm_dp_mst_helper.h:835:5: note: declared here
835 | int drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc);
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:251: /var/lib/dkms/i915-sriov-dkms/6.5/build/drivers/gpu/drm/i915/display/intel_dp_mst.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/src/linux-headers-6.5.0-28-generic/Makefile:2039: /var/lib/dkms/i915-sriov-dkms/6.5/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.5.0-28-generic'
I think you may want to check out this:
#151 (comment)
I tried the three steps described in that link
- Rename ./drivers/gpu/drm/i915/display/intel_dp_mst.c to intel_dp_mst.c.bak
- Download https://raw.githubusercontent.com/makazeu/i915-sriov-dkms/ffc23727f106995d89bc7ad32df4f1a3809ee737/drivers/gpu/drm/i915/display/intel_dp_mst.c to ./drivers/gpu/drm/i915/display/
- Re-build
Similar errors. Help Please :)
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dsi_vbt.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dvo.o
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c: In function ‘intel_dp_mst_find_vcpi_slots_for_bpp’:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:85:31: error: too few arguments to function ‘drm_dp_calc_pbn_mode’
85 | crtc_state->pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock,
| ^~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_display_types.h:36,
from /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:40:
./include/drm/display/drm_dp_mst_helper.h:835:5: note: declared here
835 | int drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc);
| ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c: In function ‘intel_dp_mst_mode_valid_ctx’:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:898:13: error: too few arguments to function ‘drm_dp_calc_pbn_mode’
898 | drm_dp_calc_pbn_mode(mode->clock, min_bpp) > port->full_pbn) {
| ^~~~~~~~~~~~~~~~~~~~
./include/drm/display/drm_dp_mst_helper.h:835:5: note: declared here
835 | int drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc);
| ^~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:251: /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/usr/src/linux-headers-6.5.0-28-generic/Makefile:2039: /var/lib/dkms/i915-sriov-dkms/6.1/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.5.0-28-generic'
FYI. Error log on debian 12.5
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_aux.o
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_get_modes’:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.c:4847:69: warning: passing argument 2 of ‘intel_connector_update_modes’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
4847 | num_modes = intel_connector_update_modes(connector, edid);
| ^~~~
In file included from /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.c:55:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_connector.h:28:47: note: expected ‘struct edid *’ but argument is of type ‘const struct edid *’
28 | struct edid *edid);
| ~~~~~~~~~~~~~^~~~
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_edp_init_connector’:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.c:5362:51: warning: passing argument 2 of ‘drm_add_edid_modes’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
5362 | if (drm_add_edid_modes(connector, edid)) {
| ^~~~
In file included from /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp.c:44:
/usr/src/linux-headers-6.1.0-20-common/include/drm/drm_edid.h:575:70: note: expected ‘struct edid *’ but argument is of type ‘const struct edid *’
575 | int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
| ~~~~~~~~~~~~~^~~~
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_hdcp.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_link_training.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dsi.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.o
CC [M] /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dsi_vbt.o
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c: In function ‘intel_dp_mst_find_vcpi_slots_for_bpp’:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:85:31: error: too few arguments to function ‘drm_dp_calc_pbn_mode’
85 | crtc_state->pbn = drm_dp_calc_pbn_mode(adjusted_mode->crtc_clock,
| ^~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_display_types.h:36,
from /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:40:
/usr/src/linux-headers-6.1.0-20-common/include/drm/display/drm_dp_mst_helper.h:835:5: note: declared here
835 | int drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc);
| ^~~~~~~~~~~~~~~~~~~~
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c: In function ‘intel_dp_mst_mode_valid_ctx’:
/var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.c:898:13: error: too few arguments to function ‘drm_dp_calc_pbn_mode’
898 | drm_dp_calc_pbn_mode(mode->clock, min_bpp) > port->full_pbn) {
| ^~~~~~~~~~~~~~~~~~~~
/usr/src/linux-headers-6.1.0-20-common/include/drm/display/drm_dp_mst_helper.h:835:5: note: declared here
835 | int drm_dp_calc_pbn_mode(int clock, int bpp, bool dsc);
| ^~~~~~~~~~~~~~~~~~~~
make[1]: *** [/usr/src/linux-headers-6.1.0-20-common/scripts/Makefile.build:255: /var/lib/dkms/i915-sriov-dkms/6.1/build/drivers/gpu/drm/i915/display/intel_dp_mst.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [/usr/src/linux-headers-6.1.0-20-common/Makefile:2035: /var/lib/dkms/i915-sriov-dkms/6.1/build] Error 2
make: Leaving directory '/usr/src/linux-headers-6.1.0-20-amd64'
Try this in your Linux Guest:
Git clone this repo:
git clone https://github.com/strongtz/i915-sriov-dkms
cd i915-sriov-dkms
List past commits:
git log -n 10 --oneline
1e1daf4
is what we looking for, use it as HEAD
:
git reset --hard 1e1daf4
Then proceed to the normal installation in Linux guest.
I ran into this issue with kernel 6.5.0-41
but it works without modification with 6.5.0-35
.
I can confirm @ToniCipriani comment, Ubuntu 23.10 VM (first installed Nov 2023) has Kernel 6.5.0-35, and dkms built and installed without issue. However, Ubuntu 23.10 (downloaded July 2024) has Kernel 6.5.0-41 and dkms has build issue (Error 2 - similar as reported above).
Still doesn't work with 6.5.0-44. I guess I'll wait till I upgrade to Ubuntu 24.04 LTS with a different kernel and try again.