@chivers adding MODULES=(amdgpu)
and MODULES_DECOMPRESS="yes"
to /etc/mkinitcpio.conf
made it possible for me to boot without patching the kernel.
Search Criteria
Package Details: linux-neptune-65-headers 6.5.0.valve23-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/linux-neptune-65.git (read-only, click to copy) |
---|---|
Package Base: | linux-neptune-65 |
Description: | Headers and scripts for building modules for the SteamOS linux-neptune 6.5 mirrored from Valve kernel |
Upstream URL: | https://gitlab.steamos.cloud/jupiter/linux-integration/-/tree/6.5.0-valve23 |
Licenses: | GPL2 |
Submitter: | mkopec |
Maintainer: | mkopec |
Last Packager: | mkopec |
Votes: | 3 |
Popularity: | 0.140772 |
First Submitted: | 2024-02-01 06:02 (UTC) |
Last Updated: | 2024-12-20 17:00 (UTC) |
Dependencies (11)
- pahole (pahole-gitAUR)
- bc (bc-ghAUR) (make)
- cpio (cpio-gitAUR) (make)
- gettext (gettext-gitAUR) (make)
- git (git-gitAUR, git-glAUR) (make)
- libelf (elfutils-gitAUR) (make)
- openssh (openssh-gitAUR, openssh-dotconfigAUR, openssh-dotconfig-binAUR, openssh-selinuxAUR, openssh-hpn-shimAUR, openssh-gssapiAUR, openssh-dnatAUR) (make)
- pahole (pahole-gitAUR) (make)
- perl (perl-gitAUR) (make)
- tar (tar-gitAUR, busybox-coreutilsAUR) (make)
- xz (xz-gitAUR) (make)
Required by (0)
Sources (3)
Latest Comments
traysh commented on 2024-10-28 08:35 (UTC)
kleinergoo commented on 2024-10-22 18:26 (UTC)
to fix memory allocation issue you need this patch, changes kmalloc to kvmalloc like upstream, needed for nvidia for example
--- 6.5.0-valve21/kernel/module/decompress.c 2024-10-22 21:33:15.769634509 +0200
+++ linux/kernel/module/decompress.c 2024-10-22 21:33:27.073633670 +0200
@@ -100,7 +100,7 @@
s.next_in = buf + gzip_hdr_len;
s.avail_in = size - gzip_hdr_len;
- s.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
+ s.workspace = kvmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
if (!s.workspace)
return -ENOMEM;
@@ -138,7 +138,7 @@
out_inflate_end:
zlib_inflateEnd(&s);
out:
- kfree(s.workspace);
+ kvfree(s.workspace);
return retval;
}
#elif defined(CONFIG_MODULE_COMPRESS_XZ)
@@ -241,7 +241,7 @@
}
wksp_size = zstd_dstream_workspace_bound(header.windowSize);
- wksp = kmalloc(wksp_size, GFP_KERNEL);
+ wksp = kvmalloc(wksp_size, GFP_KERNEL);
if (!wksp) {
retval = -ENOMEM;
goto out;
@@ -284,7 +284,7 @@
retval = new_size;
out:
- kfree(wksp);
+ kvfree(wksp);
return retval;
}
#else
tyrheimdal commented on 2024-08-20 12:21 (UTC)
It seems your automated CI has broken down, and is timing out. @mkopec
chrivers commented on 2024-07-05 08:40 (UTC) (edited on 2024-07-05 08:43 (UTC) by chrivers)
The newest userspace tools are incompatible with this kernel.
I spent a while tracking down the cause, and it seems to be related to compressed kernel modules, and the way memory is allocated. As far as I remember, it's because zstd is now the default compression algorithm for kernel modules, and it has different memory requirements from, say, gzip.
This kernel allocates memory using kmalloc(wksp_size, GFP_KERNEL);
, which needs contiguous free memory to succeed, as far as I understand.
This is "usually" fine, but some modules need a lot of space (amdgpu
, for example), and these will fail with this combination of kernel and userspace.
The following patch changes the allocation type for compressed kernel modules, and it completely solves this problem for me.
(I found this patch in a discussion, but I failed to save the link. I believe it's included upstream in newer kernels)
diff --git a/kernel/module/decompress.c b/kernel/module/decompress.c
index 8a5d6d63b06c..87440f714c0c 100644
--- a/kernel/module/decompress.c
+++ b/kernel/module/decompress.c
@@ -241,7 +241,7 @@ static ssize_t module_zstd_decompress(struct load_info *info,
}
wksp_size = zstd_dstream_workspace_bound(header.windowSize);
- wksp = kmalloc(wksp_size, GFP_KERNEL);
+ wksp = vmalloc(wksp_size);
if (!wksp) {
retval = -ENOMEM;
goto out;
@@ -284,7 +284,7 @@ static ssize_t module_zstd_decompress(struct load_info *info,
retval = new_size;
out:
- kfree(wksp);
+ vfree(wksp);
return retval;
}
#else
@mkopec I would highly recommend you consider including this patch in your package. Otherwise it's mostly broken :)
DocMAX commented on 2024-05-09 22:52 (UTC)
initramfs cant mount btrfs. loading manually the btrfs module says "cannot allocate memory"... wtf?
mkopec commented on 2024-02-01 06:56 (UTC) (edited on 2024-02-16 08:04 (UTC) by mkopec)
This package is updated automatically using CI: https://git.nozomi.space/michal/linux-neptune-65
The sources come from https://gitlab.com/evlaV/jupiter-PKGBUILD , which is an unofficial mirror of SteamOS sources (Valve still has not published their own repositories).
The PKGBUILDs repo is mirrored to my server so that I can configure git hooks for it, but I've had to make it private since some SEO company has been making 24/7 constant requests, causing the git hooks to run for no reason and updating the aur package approx 3000 times now.
Pinned Comments
mkopec commented on 2024-02-01 06:56 (UTC) (edited on 2024-02-16 08:04 (UTC) by mkopec)
This package is updated automatically using CI: https://git.nozomi.space/michal/linux-neptune-65
The sources come from https://gitlab.com/evlaV/jupiter-PKGBUILD , which is an unofficial mirror of SteamOS sources (Valve still has not published their own repositories).
The PKGBUILDs repo is mirrored to my server so that I can configure git hooks for it, but I've had to make it private since some SEO company has been making 24/7 constant requests, causing the git hooks to run for no reason and updating the aur package approx 3000 times now.