Difference between revisions of "Linux-pf"

From ArchWiki
Jump to: navigation, search
m
(Added closed notice for forum thread)
 
(92 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Kernel (English)]]
+
[[Category:Kernel]]
{{i18n|Linux-pf}}
+
[[ja:Linux-pf]]
 +
{{Out of date|UKSM is no longer part of linux-pf|section=linux-pf does not contain TuxOnIce and UKSM anymore}}
 +
[http://pf.natalenko.name/ Linux-pf] is a kernel package based on the stock -ARCH kernel, with the following patches applied:
 +
* [http://ck-hack.blogspot.com/ The latest Con Kolivas' -ck patchset, including BFS]
 +
* [http://algo.ing.unimo.it/people/paolo/disk_sched/ BFQ] (as default I/O scheduler)
 +
* [http://kerneldedup.org/projects/uksm/ UKSM]
 +
* [http://aufs.sourceforge.net/ AUFS3]
  
{{Article summary start}}
+
== Installation ==
{{Article summary text|'''Linux-pf and linux-pf-headers'''}}
 
* Current version: '''3.2.7-1'''
 
* Kernel version: '''3.2.11'''
 
  
{{Article summary heading|Related}}
+
=== From the unofficial repository ===
{{Article summary wiki|Tuxonice}}
 
[https://bitbucket.org/nous/linux-pf/ linux-pf mercurial repository]
 
  
[http://pf.natalenko.name/ Patchset homepage]
+
Precompiled packages are available from the [[Unofficial_user_repositories#archlinuxcn|archlinuxcn]] unofficial repository. See [[Unofficial user repositories]] for configuration details.
  
[http://freecode.com/projects/pf-kernel Patchset changelog]
+
After an [[Pacman#Upgrading_packages|upgrade]], running {{ic|pacman -Sl ''repo_name''}} will show the packages available in the given repository. Afterwards, just install the ''linux-pf'' and ''linux-pf-headers'' packages (for generic binaries - platform-specific binaries are also available in some repositories and will be listed in the output from the aforementioned pacman command). See the [[#Configuration]] section for additional configuration steps.
{{Article summary end}}
 
  
[http://pf.natalenko.name/ Linux-pf] is a kernel package based on the stock -ARCH kernel, patched with a row of significant patches:
+
=== From the AUR ===
* [http://ck-hack.blogspot.com/ The latest Con Kolivas' -ck patchset, including BFS]
+
Install {{AUR|linux-pf}} from the [[AUR]]. A long-term support version of linux-pf is available with {{AUR|linux-pf-lts}}.
* [[TuxOnIce]]
 
* [http://algo.ing.unimo.it/people/paolo/disk_sched/ BFQ (as default I/O scheduler)]
 
* [http://aufs.sourceforge.net/ AUFS3]
 
* [http://www.linuximq.net/ LinuxIMQ]
 
  
The reference PKGBUILD can be found at the [https://aur.archlinux.org/packages.php?ID=50956 AUR linux-pf page] and at the [https://bitbucket.org/nous/linux-pf bitbucket.org mercurial repository]. Precompiled packages, generic and CPU-family optimized are usually uploaded at the [http://dl.dropbox.com/u/11734958/index.html pfkernel unofficial repository] within 6 hours of the AUR update for x86_64 and 2 days for i686. Append the following to {{ic|/etc/pacman.conf}} to activate the pfkernel repo:
+
=== Manual compilation ===
:{{bc|<nowiki>
 
[pfkernel]
 
# Generic and optimized binaries of the ARCH kernel patched with BFS, TuxOnIce, BFQ, IMQ, Aufs3
 
# linux-pf, kernel26-pf, gdm-old, nvidia-pf, nvidia-96xx, xchat-greek, arora-git
 
Server = http://dl.dropbox.com/u/11734958/$arch
 
</nowiki>}}
 
Running '''''pacman -Syyl pfkernel''''' will update all repos and show the available packages of pfkernel.
 
  
== Compilation ==
+
There are a number of options a user is asked to choose from, should he/she select to compile from the PKGBUILD:
There's a number of options a user is asked to choose from, should he/she select to compile from the PKGBUILD:
+
{{bc|<nowiki>
::{{bc|<nowiki>
 
 
==> Hit <Y> to use your running kernel's config
 
==> Hit <Y> to use your running kernel's config
 
     (needs IKCONFIG and IKCONFIG_PROC)
 
     (needs IKCONFIG and IKCONFIG_PROC)
Line 42: Line 30:
 
</nowiki>}}
 
</nowiki>}}
 
The <Y> option is for users who have already compiled and are running a custom kernel. The PKGBUILD reads the running kernel's configuration and uses it for the subsequent compilation.
 
The <Y> option is for users who have already compiled and are running a custom kernel. The PKGBUILD reads the running kernel's configuration and uses it for the subsequent compilation.
The <L> option tries some kind of autodetection of the user's hardware: it first tries to use the [[modprobed_db]] module database, then falls back to the linux kernel's '''''make localmodconfig''''' functionality. The last option is self-explanatory.
+
The <L> option tries some kind of autodetection of the user's hardware: it first tries to use the [[modprobed-db]] module database, then falls back to the linux kernel's {{ic|make localmodconfig}} functionality. The last option is self-explanatory.
  
::{{bc|<nowiki>
+
{{bc|<nowiki>
 
==> Kernel configuration options before build:
 
==> Kernel configuration options before build:
 
     <M> make menuconfig (console menu)
 
     <M> make menuconfig (console menu)
Line 55: Line 43:
 
Choose one of these to use your favourite user interface for configuring the kernel. Note that the last option might still prompt with unresolved/new configuration options, if you have selected <Y> or <L> in the previous step.
 
Choose one of these to use your favourite user interface for configuring the kernel. Note that the last option might still prompt with unresolved/new configuration options, if you have selected <Y> or <L> in the previous step.
  
::{{bc|<nowiki>
+
{{bc|<nowiki>
==> Hit <ENTER>: to create a package named linux-pf
+
==> An non-generic CPU was selected for this kernel.
            regardless of the CPU selected in config (recommended)
+
==> Hit <G>     : to create a generic package named linux-pf
==> Hit <P>   : to create a package named after the selected CPU
+
==> Hit <ENTER> : to create a package named after the selected CPU
            (e.g. linux-pf-core2 - for advanced users)
+
                  (e.g. linux-pf-core2 - recommended)
 +
==> This option affects ONLY the package name. Whether or not the
 +
==> kernel is optimized was determined at the previous config step.
 
</nowiki>}}
 
</nowiki>}}
If you have selected a specific CPU optimization for your kernel in the previous step, choosing <nowiki><P></nowiki> here will append the CPU to the package name. This way, a subsequent package update from the repository will pull the optimized package and not the generic one.
+
If you have selected a specific CPU optimization for your kernel in the previous step, the default action is to append the CPU to the package name. This way, a subsequent package update from the repository will pull the optimized package and not the generic one. This also will help better compatibility with 3rd party precompiled modules (e.g. nvidia-pf), which might break things if loaded on optimized linux-pf kernels.
 +
 
 +
==== Install compiled package ====
  
== Installation ==
+
After the compilation finishes, an additional ''linux-pf-headers[-cpu]'' package will be created. Do not forget to install it too, if you plan on using additional modules like [[NVIDIA]] or [[VirtualBox]].
After the compilation finishes, an additional ''linux-pf-headers'' package will be created. Don't forget to install it too, if you plan on using additional modules like [[nvidia]] or [[virtualbox]]. During the kernel installation, '''mkinitcpio''' will be called to create the initramfs.
+
 
 +
# pacman -U linux-pf-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz linux-pf-headers-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz
 +
 
 +
During the kernel installation, [[mkinitcpio]] will be called by the install script to recreate the initramfs.
 +
{{Note|If you make any changes to {{ic|/etc/mkinitcpio.conf}} after the installation, you must run {{ic|mkinitcpio -p linux-pf}} to have the initial ramdisk recreated.}}
 +
 
 +
== Configuration ==
  
If you plan on using TuxOnIce for hibernation, make sure you have added the necessary modules to the MODULES array of {{ic|/etc/mkinitcpio.conf}} and at least the ''resume'' hook to the HOOKS array:
+
Then, you need to add a boot entry in [[Boot Loader#Configuration files|boot loader configuration file]]{{Broken section link}} which points to linux-pf (the following example is from one of the maintainer's boxes):
 
{{bc|<nowiki>
 
{{bc|<nowiki>
MODULES="... lzo tuxonice_compress tuxonice_swap tuxonice_userui ..."
+
title  Linux-pf 3.2
HOOKS="... sata userui resume filesystems ..."
+
root  (hd0,4)
 +
kernel (hd0,0)/vmlinuz-linux-pf root=/dev/disk/by-label/ROOT ro vga=0x318 lapic resume=/dev/disk/by-label/SWAP video=vesafb:ywrap,mtrr:3 fastboot quiet
 +
initrd (hd0,0)/initramfs-linux-pf.img
 
</nowiki>}}
 
</nowiki>}}
In the example above, TuxOnIce is setup to use a swap partition as the suspended image allocator. The ''resume'' hook must be placed before ''filesystems''. Also, a progress indicator is requested with ''userui''. Please read the [[TuxOnIce]] wiki page for more detailed information.
 
  
{{Note|Due to a bug in TuxOnIce, introduced in the days of kernel26-pf 2.6.39-pf4, hibernating with LZO compression corrupts the snapshotted image and resuming fails in decompression. The bug was recently acknowledged by the TuxOnIce author, who suggested adding "'''''ProcSetting no_multithreaded_io 1'''''" to {{ic|/etc/hibernate/tuxonice.conf}} until it gets fixed. This workaround has been confirmed to work, adding only 1-2 seconds of delay to hibernation.}}
+
== Tips and tricks ==
  
 +
* If you notice disk-related performance problems or occasional hiccups, it might be an I/O scheduler issue. Try a different one than the linux-pf default (BFQ) by echoing to {{ic|/sys/block/sda/queue/scheduler}} ''cfq'', ''noop'' or ''deadline'': {{ic|# echo noop >| /sys/block/sda/queue/scheduler}}. Note, the aforementioned command only sets the I/O scheduler for the 1st hard drive and additional ''echoes'' will be needed if you have more. If the situation improves, then append "''elevator''='''''cfq'''''" (or '''''noop''''' or '''''deadline''''') to the linux-pf command line in {{ic|/boot/grub/menu.lst}}, to make the change permanent.
 +
* For people who build their own tailored kernels and compilation aborts with with an error about "missing include/config/dvb/*.h files", setting ''[*] Digital TV support'' at ''Device Drivers / <M> Multimedia support'' and leaving everything else out, creates just the necessary dvb.h, which allows the compilation to continue.
  
== Tweaks / Tips ==
+
== Forum thread for linux-pf ==
* If you notice disk-related performance problems or occational hickups, it might be an I/O scheduler issue. Try a different one than the linux-pf default (BFQ) by echoing to {{ic|/sys/block/sda/queue/scheduler}} ''cfq'', ''noop'' or ''deadline'': '''''echo bfq >| /sys/block/sda/queue/scheduler'''''. Note, the aforementioned command only sets the I/O scheduler for the 1st hard drive and additional ''echos'' will be needed if you have more. If the situation improves, then append "''elevator''='''''cfq'''''" (or '''''noop''''' or '''''deadline''''') to the linux-pf command line in {{ic|/boot/grub/menu.lst}}, to make the change permanent.
+
 
* For people who build their own tailored kernels and compilation aborts with with an error about "missing include/config/dvb/*.h files", setting <M> at ''DVB for Linux'' at ''Device Drivers/Multimedia support'' and leaving everything else out, creates just the necessary dvb.h, which allows the compilation to continue.
+
There is a [https://bbs.archlinux.org/viewtopic.php?id=103462 discussion thread] at the BBS for reporting errors, impressions, ideas and requests. It is now closed.
 +
 
 +
== See also ==
  
== Forum thread for linux-pf ==
+
* [https://bitbucket.org/nous/linux-pf/ linux-pf mercurial repository]
There's a [https://bbs.archlinux.org/viewtopic.php?id=103462 discussion thread] at the BBS for reporting errors, impressions, ideas and requests.
+
* [http://pf.natalenko.name/ Patchset homepage]
 +
* [http://pf.natalenko.name/forum Patchset community forum]
 +
* [http://freecode.com/projects/pf-kernel Patchset changelog]

Latest revision as of 21:38, 27 April 2017

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: UKSM is no longer part of linux-pf (Discuss in Talk:Linux-pf#linux-pf does not contain TuxOnIce and UKSM anymore)

Linux-pf is a kernel package based on the stock -ARCH kernel, with the following patches applied:

Installation

From the unofficial repository

Precompiled packages are available from the archlinuxcn unofficial repository. See Unofficial user repositories for configuration details.

After an upgrade, running pacman -Sl repo_name will show the packages available in the given repository. Afterwards, just install the linux-pf and linux-pf-headers packages (for generic binaries - platform-specific binaries are also available in some repositories and will be listed in the output from the aforementioned pacman command). See the #Configuration section for additional configuration steps.

From the AUR

Install linux-pfAUR from the AUR. A long-term support version of linux-pf is available with linux-pf-ltsAUR.

Manual compilation

There are a number of options a user is asked to choose from, should he/she select to compile from the PKGBUILD:

==> Hit <Y> to use your running kernel's config
    (needs IKCONFIG and IKCONFIG_PROC)
==> Hit <L> to run 'make localmodconfig'
==> Hit <N> (or just <ENTER>) to build an all-inclusive kernel like stock -ARCH
    (warning: it can take a looong time)

The <Y> option is for users who have already compiled and are running a custom kernel. The PKGBUILD reads the running kernel's configuration and uses it for the subsequent compilation. The <L> option tries some kind of autodetection of the user's hardware: it first tries to use the modprobed-db module database, then falls back to the linux kernel's make localmodconfig functionality. The last option is self-explanatory.

==> Kernel configuration options before build:
    <M> make menuconfig (console menu)
    <N> make nconfig (newer alternative to menuconfig)
    <G> make gconfig (needs gtk)
    <X> make xconfig (needs qt)
    <O> make oldconfig
    <ENTER> to skip configuration and start compiling

Choose one of these to use your favourite user interface for configuring the kernel. Note that the last option might still prompt with unresolved/new configuration options, if you have selected <Y> or <L> in the previous step.

==> An non-generic CPU was selected for this kernel.
==> Hit <G>     :  to create a generic package named linux-pf
==> Hit <ENTER> :  to create a package named after the selected CPU
                   (e.g. linux-pf-core2 - recommended)
==> This option affects ONLY the package name. Whether or not the
==> kernel is optimized was determined at the previous config step.

If you have selected a specific CPU optimization for your kernel in the previous step, the default action is to append the CPU to the package name. This way, a subsequent package update from the repository will pull the optimized package and not the generic one. This also will help better compatibility with 3rd party precompiled modules (e.g. nvidia-pf), which might break things if loaded on optimized linux-pf kernels.

Install compiled package

After the compilation finishes, an additional linux-pf-headers[-cpu] package will be created. Do not forget to install it too, if you plan on using additional modules like NVIDIA or VirtualBox.

# pacman -U linux-pf-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz linux-pf-headers-core2-3.3.2-1-$CPUTYPE.pkg.tar.xz

During the kernel installation, mkinitcpio will be called by the install script to recreate the initramfs.

Note: If you make any changes to /etc/mkinitcpio.conf after the installation, you must run mkinitcpio -p linux-pf to have the initial ramdisk recreated.

Configuration

Then, you need to add a boot entry in boot loader configuration file[broken link: invalid section] which points to linux-pf (the following example is from one of the maintainer's boxes):

title  Linux-pf 3.2
root   (hd0,4)
kernel (hd0,0)/vmlinuz-linux-pf root=/dev/disk/by-label/ROOT ro vga=0x318 lapic resume=/dev/disk/by-label/SWAP video=vesafb:ywrap,mtrr:3 fastboot quiet
initrd (hd0,0)/initramfs-linux-pf.img

Tips and tricks

  • If you notice disk-related performance problems or occasional hiccups, it might be an I/O scheduler issue. Try a different one than the linux-pf default (BFQ) by echoing to /sys/block/sda/queue/scheduler cfq, noop or deadline: # echo noop >. Note, the aforementioned command only sets the I/O scheduler for the 1st hard drive and additional echoes will be needed if you have more. If the situation improves, then append "elevator=cfq" (or noop or deadline) to the linux-pf command line in /boot/grub/menu.lst, to make the change permanent.
  • For people who build their own tailored kernels and compilation aborts with with an error about "missing include/config/dvb/*.h files", setting [*] Digital TV support at Device Drivers / <M> Multimedia support and leaving everything else out, creates just the necessary dvb.h, which allows the compilation to continue.

Forum thread for linux-pf

There is a discussion thread at the BBS for reporting errors, impressions, ideas and requests. It is now closed.

See also