DisplayLink / evdi

Extensible Virtual Display Interface
MIT License
689 stars 179 forks source link

failed to validate module [evdi] BTF: -22 #377

Closed Grisu118 closed 1 year ago

Grisu118 commented 1 year ago

I am unable to load evdi kernel module Tested with evdi 1.11.0 and latest 1.12.0 both gave the same error when executing modprobe evdi

sudo modprobe evdi 
modprobe: ERROR: could not insert 'evdi': Invalid argument

Kernel logs

Aug 25 07:25:28 brunb500 kernel: evdi: loading out-of-tree module taints kernel.
Aug 25 07:25:28 brunb500 kernel: evdi: module verification failed: signature and/or required key missing - tainting kernel
Aug 25 07:25:28 brunb500 kernel: BPF: [112087] ENUM perf_event_task_context 
Aug 25 07:25:28 brunb500 kernel: BPF: size=4 vlen=4
Aug 25 07:25:28 brunb500 kernel: BPF:  
Aug 25 07:25:28 brunb500 kernel: BPF: Invalid btf_info kind_flag
Aug 25 07:25:28 brunb500 kernel: BPF: 
Aug 25 07:25:28 brunb500 kernel: failed to validate module [evdi] BTF: -22

I already tried the following without success

It stopped working after I updated my packages yesterday morning. Before that, it worked with kernel 5.19.2 and evdi 1.11.0. Also, my colleague from work, with a similar setup, does not have the issue.

DreamTexX commented 1 year ago

Same here, worked with evdi 1.11.0 and kernel 5.19.2 but after upgrading on 5.19.3 everything broke and I cannot get it working anymore.

DreamTexX commented 1 year ago

Although doing modinfo evdi does give a result, I cannot do rmmod or modprobe, And Displaylink does not work

rbeucher commented 1 year ago

Same issue for me. I am on 5.19.3-arch1-1

I have tried to install evdi 1.12.0, 1.11.0 no luck

DreamTexX commented 1 year ago

I've got it working again, steps to do:

  1. Uninstall evdi (and displaylink)
  2. Find all references on evdi, I used find / -nowarn -iname "*evdi*" 2>/dev/null
  3. Delete evdi references in your modules folders, so try to nuke evdi from your system completely
  4. Clone git clone https://aur.archlinux.org/evdi.git
  5. Basicly do what was suggested here but with one commit later 2f74d0020f7fa08528b741b316c7107eade76fb7
  6. Of course, reinstall DisplayLink and reboot your system

This worked for me, be careful of what you delete from your system

Edit for those who don't read to the end of the issue: A reboot between steps 3 and 4 might be needed

rbeucher commented 1 year ago

Thanks, I'll try that and will post the outcome here.

Grisu118 commented 1 year ago

I tried the steps from @DreamTexX, It still fail with the same error

rbeucher commented 1 year ago

Yes I tried too. Same pb.

epontan commented 1 year ago

I tried the steps from @DreamTexX, It still fail with the same error

It didn't work for me either the first time. The second time I rebooted before step 4 and this time evdi module was able to load properly.

DreamTexX commented 1 year ago

I tried the steps from @DreamTexX, It still fail with the same error

It didn't work for me either the first time. The second time I rebooted before step 4 and this time evdi module was able to load properly.

Yeah I think I already uninstalled evdi yesterday and just did the cleanup today after reboot, I'm not sure so a reboot after uninstall (and/or cleanup) might be necessary

direc85 commented 1 year ago

After a brief search, failed to validate module [evdi] BTF: -22 (or -EINVAL) seems to indicate some sort of mismatch between the kernel and the module. Most likely the module isn't properly compiled for the kernel, and this is NOTABUG. This should help:

It may well be that the dkms folder is full of old junk. If this is the case, remove evdi package and manually remove /var/lib/dkms/evdi from the system. Then reboot and install evdi again.

And remember:

rbeucher commented 1 year ago

I tried again with the above and the issue remains. I tried 1.11.0 and 1.12.0. I made sure that evdi was uninstalled and I did reboot...

rbeucher commented 1 year ago

I am using linux-headers for 5.19.3.arch1-1. The module should build properly no?

Grisu118 commented 1 year ago

After the update to kernel 5.19.4-arch1-1 this morning, I was able to install evdi again and it worked

What I did:

  1. Remove evdi (and displaylink) completely
  2. System upgrade (inlcuding kernel 5.19.4-arch1-1)
  3. Reboot
  4. Install displaylink with yay
  5. Reboot

Now displaylinkg 5.6.1 and evdi 1.12.0 runs without issues.

direc85 commented 1 year ago

Great! Do you think this issue can be closed then?

rbeucher commented 1 year ago

Yes I can confirm. all good.