Kernel patching confusion

Hi Guys,

First post on here so bear with me and thanks for reading :slight_smile:

Haven’t used Linux in quite awhile but decided to get back in and learn, so that I can eventually build kernels for my Nexus and maybe even system images. I think a good understanding of Linux should come first though and I’m failing horribly haha

Ok so my current issue I am trying to build a kernel from source for my old laptop, I’ve compiled 3 so far and each has had issues the last one the grub was updated everything looked good it booted and then no KDE interface. My laptop runs a Nforce 630M also known as a Geforce 7150M using the proprietary 304.131 driver I have blacklisted the **nouveau **driver and when compiling left it out.

How can I make sure KDE loads after compiling and how can I also add the BFS patch and nvidea driver I want if suse removes it on kernel update?

I have put the default desktop compositor as Xrender with instant animation and crisp for settings even though the video card should support opengl it stutters so this seemed the best option.

The system uses nvidia for most things ethernet pci etc etc the only other drivers are ricoh and broadcom from what I can see the cpu is AMD Turion64 Dual core TL-58 K8.

So how can I make a kernel that excludes all the extra unneeded drivers etc without breaking something again?

Also the issue with patching is as follows
linux-i21q:/usr/src # /usr/src/4.5-sched-bfs-469.patch | patch -p1 --dry-run
bash: /usr/src/4.5-sched-bfs-469.patch: Permission denied

its in the src folder aswell as the 4.5 source ive been using to compile…

Anyway any help would be greatly appreciated and Opensuse is now my only OS and my Daily. I have to say from the last time I used Linux to where it is now is a massive massive difference, it feels like a polished system that’s really found its stride now and with steam pushing more game developers towards it im very happy and hopeful and even if that doesn’t happen ive got an xbox one and for everything else Opensuse :smiley:

Wondering why you’re doing all this extra work?
Is this being done for your own interest or is there a practical or perceived need to do this (which today likely wouldn’t be so)?

Nowadays,
The graphics driver is compiled into the initrd on demand during every boot.
To install proprietary nVidia drivers, you should follow one of the three other SDB articles (links provided) on this page
https://en.opensuse.org/SDB:NVIDIA

Nowadays the general consensus is that the benefits of always available device support provided in the kernel outweighs any increased size issue.

TSU

Mostly just to learn but also to tweak the kernel and get rid of unneeded bits and add BFS, as I know it would benefit this setup as the default CFQ is a bit of a dumb Sched compared to whats now available both on linux and android. Unfortunately most of the newer stuff optimizes for SSD so I want BFS as it still provides a good boost for HDD anything over 40MB/s resting rate is good for desktop use with HDD mine sits at 70MB/s so its a good quality HDD that would see benefit from BFS

And ok if I leave the nvidea side as it is and just run Zypper inr at boot on the new kernel that should be fine?

Its mostly just about trimming the fat on the kernel changing the timer to 1000hz and other small tweaks and because I’m interested in this side of linux :slight_smile:

Also in my /usr/src/kernel/sched I can see two files for BFS and one is a .c file so does this mean the patch applied and I just didnt get confirmation is there anything I need to do while compiling to make sure its included?

Hi
BFS or BFQ?

One of the openSUSE/SLE Kernel developers has bfq as a kmp;
https://lists.opensuse.org/opensuse-factory/2014-06/msg00002.html

Since your running 4.5 kernel, just use from the kernel stable repo and grab the stable version from;
http://download.opensuse.org/repositories/home:/tiwai:/bfq/stable/

Hi Malcom,

From what I understood of BFQ it uses cgroups and a hierarchy system and seemed to be mostly geared toward Nand storage (android) or SSD’s (desktop) could be worth a shot though. The patch I was trying to apply was the latest BFS patch to the 4.5 kernel so I could compile the 4.5 kernel and tweak it a bit to suite my system :slight_smile:

Was also going to keep ondemand for the cpu and just edit through

echo -n percent > /sys/devices/system/cpu/cpufreq/<governor>/up_threshold

etc etc

On Thu 14 Apr 2016 02:46:01 AM CDT, Danzano wrote:

malcolmlewis;2774587 Wrote:
> Hi
> BFS or BFQ?
>
> One of the openSUSE/SLE Kernel developers has bfq as a kmp;
> https://lists.opensuse.org/opensuse-factory/2014-06/msg00002.html
>
> Since your running 4.5 kernel, just use from the kernel stable repo
> and grab the stable version from;
> http://download.opensuse.org/repositories/home:/tiwai:/bfq/stable/

Hi Malcom,

From what I understood of BFQ it uses cgroups and a hierarchy system and
seemed to be mostly geared toward Nand storage (android) or SSD’s
(desktop) could be worth a shot though. The patch I was trying to apply
was the latest BFS patch to the 4.5 kernel so I could compile the 4.5
kernel and tweak it a bit to suite my system :slight_smile:

Was also going to keep ondemand for the cpu and just edit through

echo -n -percent- >

/sys/devices/system/cpu/cpufreq/<governor>/up_threshold

etc etc

Hi
Ahh ok, I know which one now :wink:

Just check the ownership and attributes of the patch (since your
running as root, yikes…);


ls -la  /usr/src/4.5-sched-bfs-469.patch
chown root:root /usr/src/4.5-sched-bfs-469.patch
chmod 0644 /usr/src/4.5-sched-bfs-469.patch

I would move the patch into your kernel tree (4.5?) and use;


4.5-sched-bfs-469.patch < patch -p0 --dry-run
4.5-sched-bfs-469.patch < patch -p0

See how that goes… you might want to investigate the openSUSE Build
Service and building rpms…


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.53-60.30-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

First part sweet as second part failed I think ive broken something between the last build and now because even make mrproper fails in the same directory /usr/src/

Hmmmm how can I fix the build tools to retry this dunno what broke it unless I removed the tools by mistake when removing a previous kernel version?

Under terminal if I try reinstall build tools it reports must up to date tools are installed

zypper install ncurses-devel

Loading repository data…
Reading installed packages…
‘ncurses-devel’ is already installed.
No update candidate for ‘ncurses-devel-5.9-53.4.x86_64’. The highest available version is already installed.
Resolving package dependencies…

Nothing to do.

Just noticed the system update from 4.1.15 or whatever it was to 4.1.20 last night when i was asleep could this have messed with the build tools ?
Or still something I messed up?

Tapa@linux-i21q:~> rpm -qa | grep -i kernel
kernel-devel-4.1.15-8.1.noarch
kernel-macros-4.1.20-11.1.noarch
kernel-devel-4.1.20-11.1.noarch
kernel-default-devel-4.1.20-11.1.x86_64
kernel-default-4.1.20-11.1.x86_64
kernel-firmware-20150925git-1.1.noarch
kernel-default-4.1.15-8.1.x86_64
kernel-default-devel-4.1.15-8.1.x86_64
Tapa@linux-i21q:~>

If I go into the software manager and look for the above kernel it doesn’t exist neither does it exist for the initrd and under uname -r it only shows 4.1.20

If I try to remove with rm it cant be found and ive also tried rebuilding grub etc

Im guessing its that previous kernel version causing the issues but im unsure as to how i can remove it

#rpm -qf /boot/kernel-default-4.1.15-8.1.x86_64
error: file /boot/kernel-default-4.1.15-8.1.x86_64: No such file or directory

it exists but doesnt???

Found it wouldnt show in the gui but…

zypper rm kernel-default-4.1.15-8.1
Loading repository data…
Reading installed packages…
Resolving package dependencies…

The following package is going to be REMOVED:
kernel-default-4.1.15-8.1

1 package to remove.
After the operation, 222.9 MiB will be freed.

Hopefully all goes well now

Still broken ok im now really stuck :S

Fixed used zypper se -si kernel and found the last remaining parts of the old kernel and now everythings fine and worked out the patch build time yay