Editing Kernel Power
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
- | + | =Kernel for Power Users= | |
- | + | ||
- | The | + | The enhanced kernel "kernel-power" is compatible with [[Maemo_5/PR1.2|PR1.2]], contain lots of additional features (IPv6, NAT etc) and bugfixes. The kernel can be installed via Application manager from the System section. |
+ | Installation of the customization package Kernel-Power-Settings is sufficient, as it depends on the kernel page. | ||
- | + | The custom kernel contains additional modules for IPv6, packet filtering, QoS, NAT, tunneling, kernel configuration, Wifi mesh networking, builtin ext3 for booting from other media, ext4, XFS, reiserfs, NTFS read support, ISO9660, UDF, CIFS, automounter, squashfs, unionfs, device mapper and dm-loop, cryptography, cryptoloop, EFI partitions, UTF8 codepages, mouse+joystick input, PPP, PPTP, serial support, USB/IP and generic USB device drivers, battery info, overclocking and kexec support. | |
- | + | ||
- | + | ||
- | + | ||
+ | '''Note: This page is under construction and based on the [[Overclocking|overclocking instructions]]. Hence the heavy bias to overclocking.''' | ||
+ | For overclocking it includes a large set of possible frequencies (125MHz-1.15GHz) which you manually set and try out without flashing a new kernel. | ||
+ | The defaults are set to the standard 250-600MHz range. | ||
Changes between versions are announced on the [https://garage.maemo.org/news/?group_id=1528 garage page]. | Changes between versions are announced on the [https://garage.maemo.org/news/?group_id=1528 garage page]. | ||
- | == | + | == Installation of the kernel == |
- | + | This kernel makes it possible to dynamically change the maximum frequency up to 1.15GHz (supported frequencies are 125,250,500,550,600,700,750,805,850,900,950,1000,1100,1150MHz). | |
- | + | WARNING: Overclocking may damage your device and is at your own risk! It may void your warranty and destroy your data. You have been warned. | |
- | + | [http://talk.maemo.org/showthread.php?t=43420 talk.maemo.org: Discussion of the enhanced kernel] | |
- | '''Note:''' | + | '''Note:''' all commands on this page must be [[root access|run as root]] in [[terminal|X Terminal]] (install rootsh package and enter "sudo gainroot") |
- | + | ||
- | + | ||
- | === | + | === Installation of the more stable [http://maemo.org/downloads/product/Maemo5/kernel-power-flasher// kernel (maemo24)] from extras === |
With this kernel you can change the frequency limits, the voltages and DSP frequencies online. It requires firmware [[Maemo 5/PR1.1|PR1.1]] or newer. | With this kernel you can change the frequency limits, the voltages and DSP frequencies online. It requires firmware [[Maemo 5/PR1.1|PR1.1]] or newer. | ||
# Install the package <code>[http://maemo.org/downloads/product/Maemo5/kernel-power-settings/ kernel-power-settings]</code> (section system in Application manager). It will automatically also install <code>kernel-power-flasher</code>. | # Install the package <code>[http://maemo.org/downloads/product/Maemo5/kernel-power-settings/ kernel-power-settings]</code> (section system in Application manager). It will automatically also install <code>kernel-power-flasher</code>. | ||
- | # | + | # shutdown and boot again. There's no need for reflashing etc. |
- | + | ||
- | === | + | [[#Configuring_the_kernel_settings_.28of_the_stable_version_from_extras.29|See below for configuration information]] |
+ | |||
+ | === Installation of the experimental [https://maemo.org/packages/package_instance/view/fremantle_extras-devel_free_armel/kernel-power-flasher/2.6.28-maemo25/ kernel (maemo25)] from extras-devel === | ||
This kernel version contains additional experimental features and patches. | This kernel version contains additional experimental features and patches. | ||
+ | Changelogs are posted [https://garage.maemo.org/news/?group_id=1528 on Garage]. | ||
+ | # Install the package "Enhanced kernel for power users" (section system in HAM). | ||
+ | # shutdown and boot again. There's no need for reflashing etc. | ||
- | + | [[#Configuring_the_kernel_settings_.28of_the_experimental_version_from_extras-devel.29|See below for configuration information]] | |
- | + | === Verification of proper installation === | |
- | + | First verify, that the kernel is actually running: | |
- | === | + | uname -r |
- | First verify, that the kernel is actually running: | + | should return "2.6.28.10power-omap1" |
- | should return "2.6.28.10power | + | It it does not, you should reboot or try to install again |
- | + | apt-get install --reinstall -y kernel-power kernel-power-flasher | |
+ | reboot, and test again. | ||
=== Upgrade from older versions (< maemo24) === | === Upgrade from older versions (< maemo24) === | ||
- | The kernel package was previously called | + | The kernel package was previously called kernel-flasher-maemo. |
- | If you have one of the older packages installed it you | + | Unfortunately Application Manager does not support package transitions. |
- | + | If you have one of the older packages installed it is recommended that you upgrade in X Terminal | |
- | apt-get install -y kernel-power-flasher | + | sudo gainroot |
- | apt-get remove kernel-flasher-maemo | + | apt-get install -y kernel-power-flasher |
- | + | apt-get remove kernel-flasher-maemo | |
If the new kernel still doesn't boot up, try | If the new kernel still doesn't boot up, try | ||
- | + | apt-get install --reinstall -y kernel-power kernel-power-flasher | |
- | Also try [http://talk.maemo.org/showpost.php?p=608343&postcount=2603 other hints] for | + | Also try [http://talk.maemo.org/showpost.php?p=608343&postcount=2603 other hints] for deinstalling the old package. |
- | Make sure you reset | + | Make sure you reset /etc/pmconfig to the defaults: |
- | + | # Power management configuration file | |
- | # Power management configuration file | + | enable_off_mode 1 |
- | enable_off_mode 1 | + | sleep_while_idle 1 |
- | sleep_while_idle 1 | + | sr_vdd1_autocomp 0 |
- | sr_vdd1_autocomp 0 | + | sr_vdd2_autocomp 0 |
- | sr_vdd2_autocomp 0 | + | clocks_off_while_idle 1 |
- | clocks_off_while_idle 1 | + | voltage_off_while_idle 1 |
- | voltage_off_while_idle 1 | + | scaling_governor ondemand |
- | scaling_governor ondemand | + | scaling_max_freq 600000 |
- | scaling_max_freq 600000 | + | scaling_min_freq 125000 |
- | scaling_min_freq 125000 | + | sleep_ind 1 |
- | sleep_ind 1 | + | |
- | + | ||
- | === | + | === Deinstallation === |
- | Do not | + | Do not deinstall the package in Application Manager! It does not work. |
- | + | Install the package rootsh first and then execute in X-Terminal | |
+ | sudo gainroot | ||
+ | apt-get install --reinstall -y kernel kernel-flasher | ||
+ | apt-get remove kernel-power kernel-power-modules | ||
- | + | === Holding a specific kernel version === | |
- | === | + | If your manually installed kernel should be not upgraded to the one in extras* try [http://talk.maemo.org/showpost.php?p=603915&postcount=2063 this]: |
- | + | echo kernel-power-flasher hold | dpkg --set-selections | |
+ | echo kernel-power hold | dpkg --set-selections | ||
+ | echo kernel-power-modules hold | dpkg --set-selections | ||
+ | to unlock the version: | ||
+ | echo kernel-power-flasher install | dpkg --set-selections | ||
+ | echo kernel-power install | dpkg --set-selections | ||
+ | echo kernel-power-modules install | dpkg --set-selections | ||
- | + | == Configuring the kernel settings (of the stable version from extras) == | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | These instructions refer to kernel-power-flasher v24 and kernel-power-settings 0.3. | |
- | + | ||
- | + | ||
- | + | ||
- | + | For more details on voltages read [[Overclocking#Voltage_tables]]. | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | Make sure the packages ''kernel-power-settings'' and ''rootsh'' are installed. | |
+ | '''All commands need to be run as root user.''' | ||
+ | If you are normal user in X Terminal enter "sudo gainroot". | ||
- | + | 1) to try a configuration (you can replace "ideal" with [[#Kernels.27_specifications | default, lv, ulv, xlv]] or specify a file you created based on the template /usr/share/kernel-power-settings/default ) | |
- | + | /usr/sbin/kernel-load /usr/share/kernel-power-settings/ideal | |
- | + | '''Note''': do ''NOT'' modify the files in /usr/share/kernel-power-settings/! | |
+ | see '''Creating your own configuration:'' below. | ||
- | + | 2) to permanently install a default configuration | |
- | + | rm -f /etc/default/kernel-power | |
- | + | ln -s /usr/share/kernel-power-settings/ideal /etc/default/kernel-power | |
- | + | 3) or your own config | |
+ | rm -f /etc/default/kernel-power | ||
+ | cp <filename> /etc/default/kernel-power | ||
+ | 4) and to immediately apply it | ||
+ | /usr/sbin/kernel-load | ||
- | + | '''For beginners:''' first reboot. then try 1) and check whether the device is stable. then do 2). | |
- | + | ||
- | + | '''Creating your own configuration''' | |
- | + | 5) copy the template to your mydocs (when not in mass storage mode) | |
- | + | cp /usr/share/kernel-power-settings/ideal /home/user/MyDocs/kernel.txt | |
- | + | 6) edit the file ''/home/user/MyDocs/kernel.txt''. The defaults are | |
- | + | #UP_THRESHOLD=75 | |
- | to | + | #SAMPLING_RATE=150000 |
+ | VDD1_OPPS_VSEL="30 30 38 48 54 48 60 60 60 60 60 60 60 72 72" | ||
+ | DSP_OPPS_RATE="90 90 180 360 400 430 430 430 430 500 500 500 500 520 520" | ||
+ | MIN_FREQ=250000 | ||
+ | MAX_FREQ=599000 | ||
+ | SMARTREFLEX_VDD1=0 | ||
+ | SMARTREFLEX_VDD2=0 | ||
+ | For changing the frequency range change MIN_FREQ/MAX_FREQ (see "Temporary change of the frequency limits" below ). | ||
+ | Either edit the file with an editor on your device (e.g., leafpad) | ||
+ | or USB mount it to edit it on the PC. unmount and unplug USB. | ||
+ | After editing load the configuration with | ||
+ | /usr/sbin/kernel-load /home/user/MyDocs/kernel.txt | ||
+ | and repeat 6) until you're happy. | ||
- | + | 7) to permanently install this new configuration | |
- | + | rm -f /etc/default/kernel-power | |
- | + | cp /home/user/MyDocs/kernel.txt /etc/default/kernel-power | |
- | + | /usr/sbin/kernel-load | |
- | + | ||
- | + | 8) to reset the device to the defaults use | |
+ | rm -f /etc/default/kernel-power | ||
+ | /usr/sbin/kernel-load /usr/share/kernel-power-settings/default | ||
- | + | '''Note''': the package automatically detects whether a certain misconfiguration has caused '''reboot loop.''' | |
- | < | + | It your device reboots twice within 5 minutes, it will load the default settings (250-600Mhz) so that you can fix or remove the invalid configuration file. |
- | + | This also means that, when for some reason you manually reboot too quickly (<5min) your configuration will not be loaded. | |
- | + | To load it nonetheless run after booting | |
+ | /usr/sbin/kernel-load | ||
- | == | + | === Temporary change of the frequency limits === |
+ | sudo gainroot | ||
+ | echo 250000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq | ||
+ | echo 599000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | ||
+ | cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq | ||
+ | cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq | ||
+ | The last line shows which values were actually set. | ||
+ | To set 125MHz use 124999, for 600MHz 599999, for everthing else x000 with x=MHz. | ||
+ | This setting takes effect immediately and is cleared with the next reboot. | ||
- | === | + | === Permanent configuration of the frequency limits === |
+ | WARNING: Permanent overclocking is very dangerous! | ||
- | + | Install kernel-power-settings and follow the above instructions. | |
- | + | == Configuring the kernel settings (of the experimental version from extras-devel) == | |
- | + | These instructions refer to kernel-power-flasher v25 and kernel-power-settings 0.5. | |
- | and | + | |
- | === | + | The instructions are not yet available but read [http://talk.maemo.org/showpost.php?p=638620&postcount=3392 this for the features] |
- | + | and [http://talk.maemo.org/showpost.php?p=641064&postcount=3412 this mini-tutorial] in the meantime. | |
+ | |||
+ | == Battery == | ||
In kernels version >=maemo20 you can read out the current battery info: | In kernels version >=maemo20 you can read out the current battery info: | ||
- | + | modprobe bq27x00_battery | |
- | + | cat /sys/class/power_supply/bq27200-0/capacity | |
- | modprobe bq27x00_battery | + | cat /sys/class/power_supply/bq27200-0/voltage_now |
- | cat /sys/class/power_supply/bq27200-0/capacity | + | cat /sys/class/power_supply/bq27200-0/current_now |
- | cat /sys/class/power_supply/bq27200-0/voltage_now | + | cat /sys/class/power_supply/bq27200-0/temp |
- | cat /sys/class/power_supply/bq27200-0/current_now | + | |
- | cat /sys/class/power_supply/bq27200-0/temp | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
*'capacity' value in percentage of battery level. | *'capacity' value in percentage of battery level. | ||
*'voltage_now' value in mV of battery voltage level. | *'voltage_now' value in mV of battery voltage level. | ||
- | *'current_now' value in | + | *'current_now' value in mA of battery current consumption. (???) |
- | *'temp' value in degrees C of battery temperature. | + | *'temp' value in degrees C of battery temperature. |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
To remove this kernel module use: | To remove this kernel module use: | ||
- | + | modprobe -r bq27x00_battery | |
or reboot. | or reboot. | ||
- | + | = Remarks = | |
- | + | ||
- | + | ||
- | + | # even if 125Mhz is disabled, the telephone app will always try to set the minimum freq. to 125Mhz after a phone call, but it is ignored unless you enable 125Mhz. | |
- | + | # if you enable 125MHz also set "echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load" [http://talk.maemo.org/showpost.php?p=602687&postcount=185 hint] | |
- | + | # [http://talk.maemo.org/showpost.php?p=597703&postcount=141 the 125MHz issue] | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | # even if | + | |
- | # if you enable | + | |
- | # [http://talk.maemo.org/showpost.php?p=597703&postcount=141 the | + | |
# Installing another version of the enhanced kernel will just overwrite the older version. The stock kernel modules are preserved so that you can simply reflash the stock kernel via USB. | # Installing another version of the enhanced kernel will just overwrite the older version. The stock kernel modules are preserved so that you can simply reflash the stock kernel via USB. | ||
- | # The kernel supports | + | # If you for some reason get errors like this during removal or installation "rm: cannot remove '/lib/modules/2.6.28.10maemo-lv-omap1/modules.*': No such file or directory".try this [http://talk.maemo.org/showpost.php?p=603938&postcount=196 workaround]. There was a bug in one of the early LV kernels but it should be fixed in more recent versions. |
- | + | # This kernel will not conflict with the future PR1.2 upgrade. The upgrade will, however, overwrite this kernel and you'll have to install it again. | |
+ | # The screen calibration in settings crashes immediately. It is a known bug in the calibration app, not in the kernel. It's mentioned in the kernel package description and is due to additional evdev (joystick,mouse) support. Just calibrate once with the stock kernel before you install the fully featured kernel. | ||
+ | # The kernel supports 125MHz but this frequency is [http://talk.maemo.org/showpost.php?p=617488&postcount=3095 disabled by default] in avoid_frequencies. In version <25, it is enabled by specifying "124999", in later versions it is disabled in ''/sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies'' and can be enabled with | ||
+ | echo > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies | ||
+ | similarily, individual frequencies can be disabled in >=v25 | ||
+ | echo 125000 250000 750000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/avoid_frequencies | ||
[[Category:Power users]] | [[Category:Power users]] | ||
[[Category:N900]] | [[Category:N900]] |
Learn more about Contributing to the wiki.