intel-gpu / intel-gpu-i915-backports

Other
94 stars 63 forks source link

Latest "intel-i915-dkms" package is not compatible with latest "intel-platform-vsec-dkms" package #68

Closed eero-t closed 8 months ago

eero-t commented 1 year ago

The bug

I upgraded 22.04 LTS (from Intel "jammy/arc" repo) and among other things got following kernel drivers:

However, i915 did not load on reboot due to:

# dmesg | grep i915
[    3.439954] i915: Unknown symbol intel_vsec_register (err -2)
[    3.503439] i915: Unknown symbol intel_vsec_register (err -2)
[    3.675143] i915: Unknown symbol intel_vsec_register (err -2)

Although vsec module is there:

# grep vsec /proc/modules
intel_vsec 20480 0 - Live 0xffffffffc021c000

Other issues

As it seemed incompability with vsec module, I tried downgrading it, but that failed to packaging issues:

Error! DKMS tree already contains: intel-platform-vsec-dkms-2022.28
You cannot add the same module/version combo more than once.
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/intel-platform-cse-dkms/2022.28/source/dkms.conf does not exist.

Note: triggering issue for above could have been FW package conflict I had earlier, which required removing intel-i915-dkms, before I could remove the conflicting FW package and re-install intel-i915-dkms with its versioned intel-fw-gpu package dependency. However, that's no excuse for DKMS packages ending in broken state.

When downgrading only cse, I saw similar warning for vsec, so both of those DKMS packages seem to have issues.

Downgrading intel-i915-dkms back to previous version did not help either.

The workaround

I got things working only by downgrading all 3 DKMS modules to their previous versions, intel-platform-vsec-dkms and intel-platform-cse-dkms to 2022.28 versions, and intel-i915-dkms to 0.6043.220805.0.5.17.0.1014+i173-1.

Notes

Besides i915 and/or vsec module sources and vsec + cse DKMS packaging needing fixing... When package upgrade results in a setup where the latest package versions obviously do not work together, there's clearly something missing from validation of package repo updates.

eero-t commented 1 year ago

Sorry, I actually had to downgrade all 3 DKMS packages to their previous versions, for i915 to work with vsec, and for DKMS to work => updated bug description accordingly.

eero-t commented 1 year ago

Btw. when doing 22.04 distro (security) upgrade by specifying working DKMS versions:

# apt upgrade intel-i915-dkms=0.6043.220805.0.5.17.0.1014+i173-1 intel-platform-vsec-dkms=2022.28 intel-platform-cse-dkms=2022.28

I see following error on i915 DKMS build for the 5.15 LTS kernel (5.17 OEM build does not show these):

# grep error: /var/lib/dkms/intel-i915-dkms/0.6043.220805.0.1014/build/make.log
/var/lib/dkms/intel-i915-dkms/0.6043.220805.0.1014/build/backport-include/backport/backport.h:11:36: error: implicit declaration of function ‘i915bkpt_count_partial’ [-Werror=implicit-function-declaration]
/var/lib/dkms/intel-i915-dkms/0.6043.220805.0.1014/build/backport-include/backport/backport.h:11:36: error: ‘i915bkpt_count_free’ undeclared (first use in this function); did you mean ‘i915bkpt_oo_order’?
./include/drm/drm_framebuffer.h:150:30: error: ‘DRM_FORMAT_MAX_PLANES’ undeclared here (not in a function); did you mean ‘DRM_FORMAT_MOD_LINEAR’?

While I can understand last drm symbol being kernel version specific, I don't undestand first two build errors. Why i915 would fail to use correct i915 symbols, and will that be fixed in the latest version?

eero-t commented 1 year ago

DKMS errors go away by manually removing the stale directories that the uninstalled (broken) DKMS packages left behind before hand.

dvrogozh commented 1 year ago

@eero-t : few other people met this issue, me including. I believe the issue appears if you once had system with working installation of this DKMS and try to update to later version. So, if you will try to install on a clean system with the top packages in apt repo stream, you won't face this issue. Maybe you can manually fix that on the system with the previous installation by wiping out the prev. packages, but I did not try that.

eero-t commented 1 year ago

After doing DKMS updates for Flex (jammy/flex) yesterday, which went fine, I tried again updating jammy/arc packages for Arc today, which went fine too, so it seems that the updated DKMS packages fix the module dependency + upgrade issues:

@dvrogozh Do the latest jammy/arc DKMS packages work for you too?

dvrogozh commented 1 year ago

Do the latest jammy/arc DKMS packages work for you too?

I never tried jammy/arc and don't plan to. I was trying yesterday for jammy/flex and it did not work for me. Since I don't have a system with previously installed packages I was emulating setup with this:

# installing older packages from jammy/flex:
$ sudo -E apt-get install -y intel-platform-vsec-dkms=2022.43-4 intel-platform-cse-dkms=2022.42-2 intel-i915-dkms=0.6365.0.0.221124.0.5.17.0.1019+i2-1 intel-fw-gpu=2022.42.3+183
$ reboot
# all works here

# and now updating
$ sudo -E apt-get install -y intel-platform-vsec-dkms intel-platform-cse-dkms intel-i915-dkms intel-fw-gpu

Get:1 https://repositories.intel.com/graphics/ubuntu jammy/flex amd64 intel-fw-gpu all 2022.44.2+188 [16.0 MB]
Get:2 https://repositories.intel.com/graphics/ubuntu jammy/flex amd64 intel-platform-vsec-dkms amd64 2022.43-20 [22.4 kB]
Get:3 https://repositories.intel.com/graphics/ubuntu jammy/flex amd64 intel-i915-dkms all 0.6379.0.13.221103.11.5.17.0.1020+i20-1 [2283 kB]
Get:4 https://repositories.intel.com/graphics/ubuntu jammy/flex amd64 intel-platform-cse-dkms amd64 2022.46.1-20 [87.4 kB]

# Here is the update issue with CSE/VSEC:
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/intel-platform-cse-dkms/2022.42-2/source/dkms.conf does not exist.

# but still rebooting...
$ reboot

# and now it fails
$ sudo dmesg | grep i915
[    8.013323] i915: Unknown symbol intel_vsec_register (err -2)
eero-t commented 1 year ago

I had quite a bit of trouble on Flex with jammy/flex DKMS install because it had the versions listed in the original bug description, but unlike on Arc, for some reason there was no intel_vsec_register error, for me that happened only on Arc with jammy/arc packages.

Because module loading worked on Flex, I re-tried Arc, and noticed that there were now new versions of packages available from jammy/arc (listed above), which actually fixed both DKMS install & vsec bootup issue.

PS. Is there some way to know from which source version given loaded module is actually built with?

(Flex had earlier some internal DKMS versions, and now I started to wonder whether there could be some remains of earlier DKMS versions that get loaded instead of currently installed DKMS oackage versions...)

eero-t commented 1 year ago

Best working upgrade procedure I've found so far:

Some details of above:

# downgrade all DKMS versions
apt install intel-i915-dkms=0.6043.220805.0.5.17.0.1014+i173-1 intel-platform-vsec-dkms=2022.28 intel-platform-cse-dkms=2022.28

# remove problematic DKMS dirs
rm -r /var/lib/dkms/intel-platform-cse-dkms/2022.28/ /var/lib/dkms/intel-platform-vsec-dkms/2022.28/

# upgrade other DKMSes than i915
apt upgrade intel-i915-dkms=0.6043.220805.0.5.17.0.1014+i173-1

# reboot
reboot now

# upgrade also i915 DKMS
apt upgrade
smuqthya commented 8 months ago

Request you to upgrade to latest revisions of dkms, as vsec and cse are now added as part of i915 package itself and dependency should not be a probelm.