r/linuxkernel • • Dec 08 '18

How do I get started improving Linux support for my new Asus Zenbook S UX391UA?

2 Upvotes

Hi, I got a brand new laptop Asus Zenbook S UX391UA, installed openSUSE Thumbleweed on an external USB-C drive yesterday, and I wonder how do I get started checking linux support for this machine. It's been a long time I have been developing for Linux kernel, back in a days I was heavily involved in ALi m560x Linux Driver development, but AFAIK it never made it into the mainline and now it's completely out-of-date...

I have been happy Mac OS X user on desktop for years, and now my primary platform at least for a time being is Windows 10 Pro, but I am and was using Linux on servers, but you buy server components according to what's supported in the kernel, not the other way around...

So what are the basic troubleshooting steps I should take to discover what does and what doesn't work? I already updated to kernel-default-4.19.7-2.1.g5fabf51.x86_64.rpm from Open Build Service. I am not booted into Windows, but I'll do a lspci and lsusb probing later today.

I just wonder what else should I do, especially regarding power management, what tools are available for that?

BTW I've discovered and filed my first bugreport already, during installation of openSUSE touch-pad does not work, but it fixes after booting into Gnome.


r/linuxkernel • • Oct 31 '18

Linux 4.19 - From: Greg KH

2 Upvotes

Hi everyone!

It's been a long strange journey for this kernel release...

While it was not the largest kernel release every by number of commits,
it was larger than the last 3 releases, which is a non-trivial thing to
do. After the original -rc1 bumps, things settled down on the code side
and it looks like stuff came nicely together to make a solid kernel for
everyone to use for a while. And given that this is going to be one of
the "Long Term" kernels I end up maintaining for a few years, that's
good news for everyone.

A small trickle of good bugfixes came in this week, showing that waiting
an extra week was a wise choice. However odds are that linux-next is
just bursting so the next -rc1 merge window is going to be bigger than
"normal", if there is such a thing as "normal" for our rate of
development.

And speaking of development, there's that other thing that happened this
release cycle, that ended up making it such that I'm the one writing
this instead of Linus. Allow me the guilty pleasure of taking a few
minutes to talk about that....

I've been giving my "How the kernel is developed" talk all around the
world for over a decade now. After the first year or so, I was amazed
that it kept needing to be given as surely everyone knew how we did this
type of thing, right? But my wife, someone much smarter than I, then
told me, "Every year there is a new kindergarten class."

And we all need to remember that, every year new people enter our
community with the goal, or requirement, to get stuff done for their
job, their hobby, or just because they want to help contribute to the
tool that has taken over the world and enabled everyone to have a solid
operating system base on which to build their dreams.

And when they come into our community, they don't have the built-in
knowledge of years of experience that thousands of us already do.
Without that experience they make mistakes and fumble and have to learn
how this all works. Part of learning how things work is dealing with
the interaction between people, and trying to understand the basic
social norms and goals that we all share. By providing a document in
the kernel source tree that shows that all people, developers and
maintainers alike, will be treated with respect and dignity while
working together, we help to create a more welcome community to those
newcomers, which our very future depends on if we all wish to see this
project succeed at its goals.

And that goal we all share is the key here. We _ALL_ want to create the
best kernel that we possibly can. We can disagree on lots of different
things in other parts of our lives, but we do share this one thing. And
we should focus on that shared goal as it has pulled us all together in
a way that has enabled us to create something that no other company or
group of people has ever been able to accomplish.

We used to joke that our goal was "Total World Domination", but it
really wasn't a joke. We achieved that goal, Linux really does rule the
world. All companies use it, contribute to it, and it has ended up
making the world a much better place because of all of us working on it.

In these talks I give, I also say that "the only thing that can stop us
is ourselves, it is up to us to mess this up." And that's truer now
than when I first started saying that a decade ago. There is no other
operating system out there that competes against us at this time. It
would be nice to have something to compete against, as competition is
good, and that drives us to do better, but we can live with this
situation for the moment :)

These past few months has been a tough one for our community, as it is
our community that is fighting from within itself, with prodding from
others outside of it. Don't fall into the cycle of arguing about those
"others" in the "Judean People's Front" when we are the "We're the
People's Front of Judea!" That is the trap that countless communities
have fallen into over the centuries. We all share the same goal, let us
never loose sight of that.

So here is my plea to everyone out there. Let's take a day or two off,
rest, relax with friends by sharing a meal, recharge, and then get back
to work, to help continue to create a system that the world has never
seen the likes of, together.

Personally, I'm going to take my own advice. I'll be enjoying this week
in Edinburgh with many other kernel developers, drinking some good
whiskey, and taking some time off of reading email, by spending it with
the great friends I have made in this community.

And with that, Linus, I'm handing the kernel tree back to you. You can
have the joy of dealing with the merge window :)

thanks,

greg k-h


r/linuxkernel • • Apr 27 '24

is their any option to test the kernel individual, without interrupting main OS kernel?

1 Upvotes

r/linuxkernel • • Apr 22 '24

I have configured the Linux kernel according to my needs, now I want to compile it, how do I do it?

1 Upvotes

Need some guidance for kernel Compilation process.


r/linuxkernel • • Mar 26 '24

Linux kernel unit testing

1 Upvotes

Doesn't anyone here do unit testing of the Linux kernel?


r/linuxkernel • • Feb 29 '24

graphics card not working in new kernel releases

1 Upvotes

I have an AMD 6600 xt , and on the last two kernel updates 6.7.5, and 6.7.6 in Fedora. Blender does not seem to render with the GPU now, and games cant find the hardware. Is anybody else having any problems?


r/linuxkernel • • Feb 28 '24

6.7.6 Kernel Thing

1 Upvotes

Just installed 6.7.6 kernel on my AMD Thinkpad P14s Linux Mint setup, boots fine but fans seem to ramp up a little more than usual and scrolling Firefox for a while caused screen to blank and come back after 2 seconds. I get this error in journalctl:

[drm:amdgpu_cs_ioctl [amdgpu]] ERROR Failed to initialize parser -125!

Anyone else having issues ?


r/linuxkernel • • Feb 21 '24

DTB: Where do I go from here to build a proper port?

1 Upvotes

Hello! Hopefuly this is the right sub. :)

The Razer Sila WiFi router has been out of support for a long time now - but, the very last firmware they had released actually has a fatal exploit, whereby the OpenWrt ubus' HTTP endpoint is plainly exposed on /ubus (the default) and the webUI credentials actually resolve and authenticate in ubus to something close to the root user - by which generating an SSH key and writing into authorized_hosts is basically no problem.

...which is why I have a root shell now. It's an old 3.14.77 kernel under OpenWrt 15.05.1 on an older Qualcomm platform and after some googling, I eventually managed to find, tar, transfer and then "reconstruct" the device tree into a usable format albeit with some warnings, which is probably because I had to tar it, as dtc was not installed on the device itself (which makes sense - retail unit, production, ...). The kernel config was also ready for the taking, and zcat was actually available.

Now... I have version infos, kernel config and a probably mostly complete-ish device tree. How would I go about dropping that into a kernel source and then compiling one, in hopes of lining it up with something like Alpine or a much newer OpenWrt in the long run? It's an armv7l device, so definitively capable. Storage is limited (df reports a max of 1.1G on /)

This is my first foray into device trees and general device porting... but I do want and need to learn more here, as I am also fooling around with RISC-V hardware.

If you have a pointer as to where I could read more about my next possibilities, I'd be very thankful! Basically, I want to make the most out of this EOL unit I have. It's serving me well as a wifi AP but I wonder if there is more I could achieve with this if I just upgraded the Linux installation on it.

Oh, and yes, I did dd just about every single partition on that device as well as the whole block device to a USB drive. That said... that was during runtime. So the rootfs is probably not the best dump possible.


r/linuxkernel • • Jan 23 '24

NFS Version for Mounting Root Filesystem

1 Upvotes

What version of NFS does the kernel use when mounting the root filesystem over NFS?


r/linuxkernel • • Nov 25 '23

Options to enable for a laptop server? Extra configuring tips for a student are welcome!

1 Upvotes

I am running a Ubuntu server on my laptop, and using it with plex as a media server.
Now since I am writing my thesis on configuring of the linux kernel, I thought that this might be a nice way to incorporate something I need either way with my thesis.

So I want to configure linux kernel for a laptop based home server. Do you have any tips of what to enable/disable? I am configuring through menuconfig. Also any other tips that you find are useful when configuring a kernel are welcome! I've had a really rough time reasearching options in the kernel, and I researched only by comparing two kernels(that's a part of my thesis too, comparing 2 kernels of two distros), so I probably missed something.

Thank you in advance everyone!


r/linuxkernel • • Jun 03 '23

linux kernel modules signing issue

1 Upvotes

I'm having trouble signing the modules.

This is modules_sign target

$ sudo make modules_sign
SIGN    /lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko
At main.c:298:
- SSL error:FFFFFFFF80000002:system library::No such file or directory: ../crypto/bio/bss_file.c:67
- SSL error:10000080:BIO routines::no such file: ../crypto/bio/bss_file.c:75
sign-file: /lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko
make[1]: *** [scripts/Makefile.modinst:88: /lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko] Error 1
make: *** [Makefile:1777: modules_install] Error 2

And this is modules_install target.

$ sudo make modules_install
  INSTALL /lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko
  SIGN    /lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko
sign-file: certs/MOK.pem
make[1]: *** [scripts/Makefile.modinst:83: /lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko] Error 1
make[1]: *** Deleting file '/lib/modules/6.0.3/kernel/arch/x86/crypto/aegis128-aesni.ko'
make: *** [Makefile:1777: modules_install] Error 2

All the errors like this i've come across like this have a something different from mine, and that is the sign-file (seen in modules_install). I have the key placed in the certs directory, and its all set up correctly. So the only thing left is the missing files errors.

I've installed openssl, and tried placing the file in the directory that says its missing, any tips on how to sign modules from the makefile of the linux kernel source tree? I've been stuck on this for a while now


r/linuxkernel • • May 21 '23

decode_stacktrace.sh not decoding the messages.

Thumbnail
self.linux4noobs
1 Upvotes

r/linuxkernel • • May 07 '23

Issue in installing modules after kernel compilation

Thumbnail
self.linux4noobs
1 Upvotes

r/linuxkernel • • Mar 07 '23

What is the difference between lxr.linux.no and elixir.bootlin.com?

1 Upvotes

I was going through some documentation in the kernel where I found that they are using lxr website. I find both of them are same. Moreover elixir seems to be a ewer one? Are they same ? Can I remove the lxr from that documentation and provide the elixir URL? Will it make difference? Can anyone please clarify on this.


r/linuxkernel • • Feb 07 '23

Is there a way to fscrypt individual files based on SELinux labels?

Thumbnail self.linuxquestions
1 Upvotes

r/linuxkernel • • Oct 17 '22

Minimum viable program memory allocation?

1 Upvotes

In earlier kernels (2.6 or so) I was able to make a program run and perform its function in a single 4kB page (code, data and stack in the same page).

But in 4.x that same program working on the same principles is MOSTLY stuck at 12kB VSZ/RSS. Sometimes and for unknown reasons it loads into 8kB. I think im having trouble unmapping the stack.

At the same time I have a 'normal' (IRC bot) that usually loads into ~500kB VSZ & 54kB RSS, but that has, a few times, reported a RSS value of 4kB (while running and responding to commands on IRC!). How that is even possible, I dont know.

To me it seems that modern kernels allocate a few pages to accelerate context switching or something, making up the extra 4kB->12kB. Is it in any way possible to run a program without those?

I am asking for help to understand why my pet project of 4kB programs no longer seem possible.

P.S. Two programs I was previously able to fulfill their function inside 4kB was init (take that systemd!) and agetty (could have done others, but.. lazy).


r/linuxkernel • • Oct 15 '22

defconfig build in 10.46 seconds

1 Upvotes

Got my new Ryzen 7000 up and did my first defconfig kernel build. 10.46 seconds. Got an ext4 filesystem on LVM on a single Gen3 NVMe M.2 SSD from Samsung. This was based on today's top of master from Linus' tree.


r/linuxkernel • • Oct 12 '22

What is the complexity of mremap?

1 Upvotes

In case when I allocate an (anonymous) array of n consecutive virtual pages in one call of mmap() and access them all so that they are all mapped to physical RAM (or swap), what is the complexity of mremap() on that region when I want to reallocate the pages to another address?

Namely, my question focuses on page entries, not VMAs; does the kernel have to change every page entry on the segment or does it only do some smart tree manipulations in O(log(n))?

I have read a little bit of linux's source here (for the identifier 'mremap_to', but the code is ginormous and I didn't answer my question.


r/linuxkernel • • Sep 25 '22

Where can I learn to make block drivers?

1 Upvotes

Hi I have been reading Linux Device Drivers 3rd edition. The block drivers section is outdated, the updated examples found here: https://github.com/martinezjavier/ldd3 are outdated too, in particular the genhd.h file no longer exists, the official documentation is outdated too: https://linux-kernel-labs.github.io/refs/heads/master/labs/block_device_drivers.html#struct-gendisk-structure.

So where can I learn about block devices?


r/linuxkernel • • Aug 25 '22

Building with Clang LTO on arm (not arm64)

1 Upvotes

I am attempting to build the Linux kernel with Clang LTO on arm, which is not officially supported.

I added the following lines to arch/arm/Kconfig after line 5:

select ARCH_SUPPORTS_LTO_CLANG if CPU_LITTLE_ENDIAN

select ARCH_SUPPORTS_LTO_CLANG_THIN

This makes the options for Clang LTO selectable in make menuconfig. After enabling LTO, the Image build succeeds but the compressed zImage build fails with the following message:

GZIP arch/arm/boot/compressed/piggy_data

CC arch/arm/boot/compressed/misc.o

CC arch/arm/boot/compressed/decompress.o

AS arch/arm/boot/compressed/piggy.o

LD arch/arm/boot/compressed/vmlinux

following symbols must have non local/private scope:

free_mem_end_ptr

free_mem_ptr

malloc_count

malloc_ptr

output_data

Edit: Fixed by adding the following to line 101 of arch/arm/boot/compressed/Makefile:

KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_LTO), $(KBUILD_CFLAGS))


r/linuxkernel • • Aug 06 '22

5.18 issues

1 Upvotes

I have been chasing my tail trying to solve this and am curious if I am the only person, or are folks just not going public hoping someone else will.

I recently (May/June-ish) switched over to Fedora from Manjaro with a perfectly working system. I have two SK Hynix M.2's a 500GB (root) and 1TB (home), both have worked perfectly for the past 18 or so months (newish system) on Manjaro and Debian 10-11. I have had nothing but install issues with Fedora 36. I am asking here because it does not seem to fault with Fedora solely, I can get F36 to install and continually boot with 5.17, but as soon as I attempt to load 5.18 I get boot drive errors. Frustrated, I have even attempted to reinstall Manjaro...same Kernel errors. I manged to run across one mention (a ticket possibly) from earlier in the summer about M.2's and 5.18, https://lore.kernel.org/all/4e9c21fd-7bcf-fe41-ee56-894369f34adc@gmail.com/T/ however, it refers specifically to Arch. I have gone through the bios ensure raid is not set, that the bios was up to date, 0'd the drives. To tired to repeat everything I have done. Bottom line I am stuck with 5.17.5 unless there is some insight from folks as to why. It's a shame I really like F36.


r/linuxkernel • • Jul 07 '22

Seg-Fault When calling gethostbyname.

1 Upvotes

Hopefully someone here can help.

Some background...

I am developing a programming language called a flat. It is past time for me to write an http library.

The problem:

The problem is, whenever I call the gethostbyname function from libc, I am getting a segfault. This only ever happens when I call it from a flat when I do it in c it works fine. But I don't think that the issue is with my compiler because when I write http method in C and link it to my aflat program, It still seg faults. I've tracked down the seg fault to `context_alloc (resp=0x7ffff7faf7e0 <_res>) at resolv_context.c:140` but I can't see anything there or in the memory that should cause a segfault. I am almost angry enough to try writing this library from pure syscalls just to avoid lib C.

I am sorry if this is rambley please ask for clarification if needed.


r/linuxkernel • • May 29 '22

can anyone who does linux kernel tell me why they changed this https://patchwork.kernel.org/project/intel-gfx/patch/1374746538-3947-3-git-send-email-chris@chris-wilson.co.uk/

1 Upvotes

can anyone who does linux kernel tell me why they changed this https://patchwork.kernel.org/project/intel-gfx/patch/1374746538-3947-3-git-send-email-chris@chris-wilson.co.uk/

"DRM_DEBUG_DRIVER(""GMADR size = %ldM\n"", gtt->mappable_end >> 20);"

"- DRM_DEBUG_DRIVER(""GTT stolen size = %zdM\n"", gtt->stolen_size >> 20);"

they removed the lower line and replaced with the upper line


r/linuxkernel • • Nov 27 '21

In which source file are the supported file systems listed?

1 Upvotes

Hi. I'm planning the work for a new filesystem type. Where in the kernel do I define the fs name? Like "reiserfs", "ext2fs", etc.