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

Create kmod for Fedora/RPM based systems (especially immutable systems like Silverblue/Kinoite) #107

Closed
sihawken opened this issue Aug 30, 2023 · 9 comments

Comments

@sihawken
Copy link

sihawken commented Aug 30, 2023

I have been attempting to use this dkms repository as a base to build an akmod rpm package, so that fedora based systems, including immutable (silverblue/kinoite) can use this kernel module.

Unfortunately, immutable Fedora (Silverblue/Kinoite) is not compatible with dkms. Only akmods are supported.

I gave it my best attempt here https://github.com/sihawken/i915-sriov-kmod/, it seems to work and load (more details in the README.md). However, when I run dmesg | grep i915, I get the dreaded: i915: unknown parameter 'max_vfs' ignored message.

I have a copr repository here if you want to try it out on your own system
Fedora repository: https://copr.fedorainfracloud.org/coprs/sihawken/akmods/

Immutable Fedora: rpm-ostree install akmod-i915-sriov
Fedora: dnf install akmod-i915-sriov

Perhaps I am missing something obvious here. I would really appreciate it if someone who has more experience with kernel modules would take a look.

Here is an example of another dkms package that can be build as an akmod with the two .spec files:
https://github.com/KyleGospo/openrgb-dkms/tree/main

Thanks

@sihawken
Copy link
Author

sihawken commented Sep 3, 2023

I managed to install the akmod on Fedora Workstation 38, with a depmod -a and dracut --force.

It seems that I manage to solve my own problem, but it would be great to have this be officially supported by this repo.

@masiv1001
Copy link

I managed to install the akmod on Fedora Workstation 38, with a depmod -a and dracut --force.

It seems that I manage to solve my own problem, but it would be great to have this be officially supported by this repo.

How did you manage to install it? I'm trying to install it on Fedora 38 too.

@sihawken
Copy link
Author

@masiv1001 The instructions can be found here: https://github.com/sihawken/i915-sriov-kmod/

@ghost
Copy link

ghost commented Nov 24, 2023

@masiv1001 The instructions can be found here: https://github.com/sihawken/i915-sriov-kmod/

I did install from the instructions, did not give any error, how can i see if it works? Can i create VA-API video acceleration in VM now?

@masiv1001
Copy link

masiv1001 commented Nov 25, 2023

I did install from the instructions, did not give any error, how can i see if it works? Can i create VA-API video acceleration in VM now?

@EverlastingOS You can test is by watching the output of the following commands (creating 2 test virtual devices):

sudo su
echo 2 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs

It should not output anything, then run:

lspci | grep VGA

If everything goes well, it should list three devices, 00:02.0 and it's respective sub-devices 2.1 and 2.3.
Beware VM usage requires extra steps, some users could get it working but I couldn't get it working with a windows guest, for further reading go onto some of the other issues like #101, #81 or #8 or go to vGPU (SR-IOV) with Intel 12th Gen iGPU, where I learned some of the things necessary to get it up somewhat working.

@masiv1001 The instructions can be found here: https://github.com/sihawken/i915-sriov-kmod/

I've since successfully installed it but it stopped working ever since I updated the kernel on fedora 39 (now running 6.5)

@ghost
Copy link

ghost commented Nov 26, 2023

I did install from the instructions, did not give any error, how can i see if it works? Can i create VA-API video acceleration in VM now?

@EverlastingOS You can test is by watching the output of the following commands (creating 2 test virtual devices):

sudo su
echo 2 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs

It should not output anything, then run:

lspci | grep VGA

If everything goes well, it should list three devices, 00:02.0 and it's respective sub-devices 2.1 and 2.3. Beware VM usage requires extra steps, some users could get it working but I couldn't get it working with a windows guest, for further reading go onto some of the other issues like #101, #81 or #8 or go to vGPU (SR-IOV) with Intel 12th Gen iGPU, where I learned some of the things necessary to get it up somewhat working.

@masiv1001 The instructions can be found here: https://github.com/sihawken/i915-sriov-kmod/

I've since successfully installed it but it stopped working ever since I updated the kernel on fedora 39 (now running 6.5)

hey, thanks for reply, yes im running fedora 39 also, and my laptop do freeze when typing " sudo su
echo 2 > /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs"

@masiv1001
Copy link

@EverlastingOS I could not get it working on the new fedora release so I don't know if it is possible at all. Your pc freezing might indicate it didn't work, still, do your own research on the topic, you might find something I did not, good luck!

@resiliencer
Copy link

I was unable to compile the dkms i915 module in Alpine Linux, so I did that in Arch Linux and then I took successfully compiled kernel and attached it to my Alpine linux (to do this, just create a separate item in the grub menu and copy the desired folder from /lib/ modules). So I am currently running Alpine with Arch kernel with dkms and i915 mod lol) Works fine.

@bolzerrr
Copy link

I did compile it for alpine with following steps:

I had to update minor version in https://github.com/strongtz/i915-sriov-dkms/blob/master/drivers/gpu/drm/i915/gt/uc/abi/guc_version_abi.h and remove a compile flag ( -DCONFIG_DRM_I915_PXP) in https://github.com/strongtz/i915-sriov-dkms/blob/master/Makefile

make -C /lib/modules/$(uname -r)/build M=$(pwd) modules -j4
mv i915.ko i915_sriov.ko
cp i915_sriov.ko /lib/modules/$(uname -r)/extra/
depmod -a
echo "blacklist i915" | tee /etc/modprobe.d/i915-blacklist.conf
echo "i915_sriov" |  tee -a /etc/modules
 vi /etc/default/grub ## i915.enable_guc=3 
update-grub

@strongtz strongtz closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2024
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

5 participants