Can't load module. Found this in source, Is this why?

I’m trying to load the module samsung-laptop. Even when I use -f I can’t. So I took a look at the source and I see this part:

static int __init samsung_init(void)
	struct samsung_laptop *samsung;
	int ret;

	if (efi_enabled(EFI_BOOT))
		return -ENODEV;

I don’t know C that well, so I would like to ask someone who does: Does this say that this module will always refuse to load as long as you use an EUFI boot?

So I recompiled the module with that part commented out and now I don’t get a key rejected message. Now I get a “No such device” message.
I have a Samsung galaxy book ion 15.6. I thought forcing modprobe would disable the check for specific models. Any ideas of how I can get this module working?

Yes, exactly that.

If the kernel module developers didn’t find a way?

I don’t think any members of this forum - with all due respect to everyone - none of us are smarter than the kernel developers.

Here’s the commit that introduced the check:

commit e0094244e41c4d0c7ad69920681972fc45d8ce34
Author: Matt Fleming <...>
Date:   Thu Jan 3 09:02:37 2013 +0000

    samsung-laptop: Disable on EFI hardware
    It has been reported that running this driver on some Samsung laptops
    with EFI can cause those machines to become bricked as detailed in the
    following report,
    There have also been reports of this driver causing Machine Check
    Exceptions on recent EFI-enabled Samsung laptops,
    So disable it if booting from EFI since this driver relies on
    grovelling around in the BIOS memory map which isn't going to work.
1 Like

I will say - this happened a few days ago :grin:

I’m a bit bewildered by this bug/feature. The original fault with Samsung laptops seem to have been fixed, and it was a looong time ago.

Here is a guy who found the same thing I did, (before I did):

But he discovered that you need CSM support for the modified module to work. I can’t find such an option in my EUFI settings so unless you can spot why that would be necessary in the source code I don’t know what to try next.

I did some more digging, by inserting some printk(KERN_INFO "Err msg\n"); in the source code at various places to see where it goes wrong. The code goes as far as samsung_sabi_init(samsung). And in there it exits because it’s not able to find a signature with:
find_signature(samsung->f0000_segment, samsung->config->test_string);

I see that there is a debug function in the source but I don’t know how to enable it when I run modprobe. How do I do that?