Tuesday, January 30, 2007

KPowersave outlook to 0.7.2

Currently I work on the next KPowersave version 0.7.2. The most work is already done and the new configure GUI get finished for this version. Here two screenshots of the new dialog.

The first show the new schemes section which now allow to create new and delete existing schemes. I also included a new tab to config the CPU frequency policy for each scheme:


The second show the new 'General Settings' section which now include the already in 0.7.1 via the config file changeable options: battery levels and actions, button events and the default AC/battery scheme (click on the picture to show the animated gif and all new tabs).


I plan to release the new package (including many bugfixes) within the next days. A complete translation is currently only available in german. Feel free to checkout the translation files from here, to translate to your language and to send me the updated file. Any help would be really appreciated.
Tech Tags:

Friday, January 19, 2007

KDE Tablet PC support

One of problems with Tablet PCs under Linux is lacking support for small, but very essential features as the Windows XP Tablet PC Edition provide. There are already drivers for machines with e.g. Wacom tablets or some Fujitsu Siemens (FSC) devices and also some applications as Xournal, Jarnal or xstroke which provide useful features.

On SUSE there is also support in SAX to configure Wacom and FSC devices and I already wrote a patch for HAL (v0.5.8/git) to detect Tablet PCs and set the needed Ports correct and automatically. There is also a patch for XDM to show xvkbd on login and a patch for KDE to show xvkbd on the unlock dialog from Lubos Lunak.

But until now one feature was missing: The user could rotate the screen via KRandr and also the Wacom driver support already rotation but there was no way to do this together because the Wacom driver did not support the XRandR extension. The user had to call xsetwacom to rotate also the input devices to use rotation. Thanks to Stephan Binner the user can now rotate the screen and the input devices together via KRandr and it work like a charm. You can find the patch here.
Tech Tags:

HAL patch collection (3)

Some time since I posted the last blog entry. So now the first message of the new year.

Here some new patches I send to the HAL mailing list which aren't included in the git repository because they are not approved (I think David Zeuthen is currently in Australia, so he is maybe not that often online.):
  • two patches to cleanup the Linux LUKS scripts [1] and fix the password handling to prevent the bash from word splitting and path expanding [2]
  • a patch to add support for IBM ACPI hotkey events, which allow HAL to send e.g. the sleep and s2disk/hibernate button event as currently already for other machines: here
  • a patch which fixes the detection of libsmbios for the Dell backlight addon - the code of the addon need libsmbios >= 0.11.6 - by proof the library version: here
  • a fix for set/get brightness on machines which supported by sonypi kernel module: here
  • a fix support the old and the newer version of the omnibook kernel module, which try to find the max. supported levels of brightness: here
These patches are against current HAL git. As always: you can find all my current HAL patches here.
Tech Tags:

Friday, November 24, 2006

KPowersave config tutorial

As wrote in my last post about the current KPowersave release 0.7.1 there are some settings which the user can't change at the moment via the configure dialog. Here now a small tutorial how to control this settings via the KPowersave config file.

You can control the settings for these options:
  • battery warning levels
  • actions for battery warning levels and lidclose
  • default AC and battery scheme
  • CPU frequency policy for each scheme
To change the config keys for these options you need to open in your home with a editor of your choise this file (if the file is not present, create the file): ~/.kde/share/config/kpowersaverc

KPowersave provide three different battery warning levels: warning, low and critical. To define the percentage (between 0 and 100) of battery fill for these levels you need to edit config keys in the section [General]. If the section is not there, simply add a line with [General] at top of the file and add/edit these keys there :
batteryWarning=12
batteryLow=7
batteryCritical=2
You can also define a action (currently only one per level) which is called if one of the battery warning levels reached. The available actions are:
  • shutdown the machine (SHUTDOWN)
  • suspend to disk (SUSPEND2DISK)
  • suspend to ram (SUSPEND2RAM)
  • change the CPU freqency policy to 'performance' (CPUFREQ_POWERSAVE) or 'dynamic' (CPUFREQ_DYNAMIC)
  • change the brightness if supported by your hardware (BRIGHTNESS)
To define the actions for the battery warning levels you have to change this keys (also in the section [General]):
batteryWarningAction=
batteryLowAction=BRIGHTNESS
batteryCriticalAction=SHUTDOWN
The values in this example are the already defined defaults, so you don't need to add/change the keys if this is what you want. For the action BRIGHTNESS you need an additional key for each level to define the level (in percentage) of brightness to set:
batteryWarningActionValue=
batteryLowActionValue=
batteryCriticalActionValue=
You can use the same actions and values as for battery warning levels also for the event if the lid of your laptop get closed. To control the behavior you need to change these keys:
ActionOnLidClose=
ActionOnLidCloseValue=
To control which scheme KPowersave should use on battery or on AC you need to know the names of the available schemes. You can find them in this file: /opt/kde3/share/config/kpowersaverc . Currently there are (excluding the [default-scheme]) these schemes per default: Performance, Powersave, Presentation and Acoustic. To set the schemes you have to change these keys:
ac_scheme=Performance
battery_scheme=Powersave
At least you can change the CPU frequency for each scheme. For this you need, if not already there, for each a own section in the config file (a section starts with the name of the scheme withing '[ ]'). The available CPU frequency policies are: PERFORMANCE, POWERSAVE and DYNAMIC. Here a example for the performance scheme:
[Performance]
cpuFreqPolicy=DYNAMIC
If you canged all you want, you need to restart KPowersave to apply the changes.

Thursday, November 23, 2006

KPowersave 0.7.1 released

Monday I released the first offical (v0.7.0 was only for openSUSE 10.2) release from the new development tree of KPowersave. With this release KPowersave depends no longer on the powersave daemon (sadly!) and use HAL (>= 0.5.8.1) instead to get hardware information and to trigger suspend or set brightness and the CPU frequency policies.

Also if KPowersave depend no longer on powersave, I would recommend to use the new powersave daemon furthermore. The daemon can, if there is no program that claim org.freedesktop.Policy.Power on the D-Bus system bus, handle system powermanagement without do crazy things like start a applet in KDM or GDM. If KPowersave start up the daemon stop automatically to handle powermanagement policy and KPowersave applet can force (if allowed) the user specific settings.

With this release KPowersave handle the different schemes and battery/lid actions independently. This include this parts:
  • definable battery warning levels (warning, low, critical)
  • definable actions for each battery warning level (e.g. suspend, change brightness, set a special CPU frequency policy or shutdown the machine)
  • definable actions if the lid get closed (same as for batteries)
  • set CPU frequency policy for each scheme
  • define AC and battery schemes
Currently the user can't change these settings via the config dialog in KPowersave, I concentrated for this release on reproduce the former functionality of KPowersave together with the old powersave daemon. A tutorial to change the settings in the config file follow as soon as possible. Extend the config dialog is one of the todos for the next releases.

I also fixed the KDE screensaver and DPMS handling to reduce/avoid interfer with the KDE user settings (e.g. if KPowersave exit). There is a KDE patch, from Dirk Müller (Thanks!), available to check if KPowersave already handle DPMS settings and call the KPowersave config dialog instead of the KControl dialog.

You can download KPowersave from kde-apps.org or directly from the sourceforge project page. This version is included in openSUSE 10.2. Feel free to test the package. Bugreports (for openSUSE to the Novell bugzilla, for other distros to the powersave-devel mailinglist) are really appreciated!
Tags:

Tuesday, November 21, 2006

Why waste GNOME/GConf /etc ?

I was always wonder why /etc need on a fresh installed system so much space, if there are only config files. On a fresh installed openSUSE 10.2Beta2 with KDE and some development pattern /etc need ~39 MByte on my harddisk. The question is: Which config files need all this space?

After some investigate: /etc/opt need 28 MByte and /etc/opt/gnome need 96 % of this. So why the hell need GNOME 27 MByte for config files in /etc ? I was wondering how many config keys they could have there and what they could configure within 27 MByte, but after taking a look at the files in e.g. /etc/gnome/gconf/schemas/ it become more clear. GConf store in this directory on my machine 1630 config keys, but need ~12MByte for them because they also have translations (and hints for the translators) for the key descriptions within the files.

Why store GConf translations/localisation information of key descriptions within the config files and not in seperate files e.g. under /opt/gnome ? The current behavior waste /etc with (for configuration) bootless information, make it painful to change the keys e.g. with vim and is IMO potentially incompatible with FHS 2.3 because this files are more translation than config files.

So my proposal: separate the translations from the config data and hold only a generic english description in the files under /etc (as already e.g. in firefox.schemas). This would: reduce the needed space under /etc/gnome/gconf/schemas/ significantly (e.g. for gfloppy.schemas from 64KByte to 1.5 KByte which means -97.5 %), make it easier to find the keys and values and should make it easier to update the translation part without touch the config files.

Let see what the discussion in this bug bring ...
Tags:

Wednesday, November 08, 2006

HAL patch collection (2)

Today again some new patches I send to the HAL mailing list which aren't included in the git repository because they are not approved so far :
  • fix detection of wireless network capability for devices which use drivers with dscape stack as e.g. rt2500pci: here
  • fix to add hardware specific/dependent sound devices to HAL (as e.g. /dev/snd/hwC0D0): here
  • fix of libhal related to changed behavior of dbus_error_is_set(error) if error == NULL in the new D-Bus. Now the check would crash the realated application which use libhal. Download: here
These patches are against current HAL git. As always: you can find all my current HAL patches here.
Tags: