Sony Tools & Utilities
Users of Linux 2.4.x systems with devfs - please see here for important information!
sonyxosd
Major features of sonyxosd are:
- Offers full access to all of the Sony Function Key ("Fn") keyboard combinations available through the sonypi device.
- Controls Master Volume and Mute (for both OSS or ALSA sound systems), Processor Speed (requires ACPI support and a Centrino or SpeedStep CPU), Screen Brightness, LCD & VGA Power Down (for ATi Radeon graphics chips), and Disc Eject. Now also supports the "ondemand" power-saving governor on 2.6 kernels.
- Graphically displays information and status both in X and in text-consoles(!) - all without disruption, even if the console is scrolling.
Gentoo ebuild installation instrcutions:
- Download sonyxosd-ebuilds-1.7.tar.bz2 to a temporary directory
- Extract this file into /usr/portage/ or, even better, the $PORTDIR_OVERLAY directory if specified in /etc/make.conf
- "emerge -v sonyxosd" (as root) will then install the latest version of sonyxosd, as well as the prerequisite Perl modules
- To configure sonyxosd, edit the file /etc/sonyxosd.conf, which is fully commented to explain the different options
USE flags:
• acpi - Also install ACPI Hibernation scripts from sys-apps/hibernate-script • alsa - Use ALSA amixer in preference to OSS aumix • noplayer - Don't install bplay for sound output • sonypid - Use app-misc/sonypid instead of sonyxosd's own For the old installation instructions which cover manual installation on non-Gentoo systems, please read here.
Sound Support:
If you want to enable sound playback on keypress, set "$click" to the command necessary to play the sound file of your choice. The latest version of sonyxosd can "stream" data to this sound player, greatly increasing the responsiveness of sonyxosd. This is known to work well with bplay, but has not been extensively tested with alternative players.
If you enable clicking, please ensure that ALSA is configured to allow multiple processes to access the DSP device simultaneously. The easiest way to do this is to add the line:... to /etc/modules.d/alsa (or equivalent for your Linux distribution).options snd-pcm-oss nonblock_open=1Keybindings:
If you wish to change what action each Fn key-press triggers, these are specified from line 1786 of sonyxosd. The defaults are:
• Escape - Return to a previously tagged VT • F1 - Tag the current VT • F2 - Reduce master volume • F3 - Mute/Unmute master volume • F4 - Increase master volume • F5 - Increase brightness level • F6 - Reduce brightness level • F7 - Enable/Disable LCD backlight • P1 - Enable/Disable built-in Bluetooth adaptor • E - Eject CD tray • 1 - Reduce processor speed with CPUfreq • 2 - Increase processor speed with CPUfreq Please note that Processor Speed changes are for PowerNow!/SpeedStep/LongRun-enabled processors which have the ability to be clocked-down. This is not overclocking!
Known issues:
- The ACPI processor control only works on 2.4.x kernels with Centrino/SpeedStep support, and 2.6.6+ kernels with sysfs mounted
- sonyxosd can get blocked when trying to play sounds if the above modules.conf/modprobe.conf option isn't used
- So far as I know, no-one has yet figured out how to address the P1 and P2 buttons individually. When they do, I'll add support.
Todo:
- Build additional packages (RPM etc. - help wanted!)
- Remove the dependancy on sonypid, and perform its function internally
It's been suggested that dd might be worth considering here...- Save context when VTs are cleared, and restore screen contents if no scrolling has occurred
- Give sonyxosd a control interface to allow arbitary messages to be sent to the console, without being disruptive
Invocation:
If using the Gentoo ebuild, then simply run "rc-update add sonypi default" as root.
Jochen Michel contributed a SuSE init script, available from SuSE/etc/init.d/sonypi. Thanks!This tool was inspired by sonypidd by Craig DeForest.
sonystat
This is a simple script to pull information out from the sonypi device, and display it in a user friendly way.
Parameters: none
Configurables: $SONYCTRL - The location of the spicctrl binary
Todo: Prune unused code segments
sonyscreen
This script attempts to reduce the brightness level of the screen as the charge in the battery falls, with the aim of extending battery life and providing a visual indication of the approximate level of charge left.
The nice thing is that if the user corrects the brightness (for example, if it's getting just too dark to see clearly) then we detect that and don't made further changes.
The bad thing is that this detection process is a little hit-and-miss ;)
There are various practical limitations to script, as discussed here.
Parameters: See sonyscreen --help
The (undocumented) --daemon option is designed to be used when called from cron, e.g.
"*/5 * * * * root /bin/sonyscreen --daemon"
Configurables: $CMD - The location of the spicctrl binary $STORE - Where to save state to (preferably tmpfs)
Todo: Remove checks for devfs breakage Re-write from scratch in PerlThis was the first script I wrote to interface with sonypi, and it shows. Apologies to those trying to read/understand/use it <grin>
Linux 2.4 & devfs
In my experience, devfs is not entirely stable when frequent use is made of the sonypi device. The devfs driver can lock-up, which will cause all further accesses to any recently-unused device within the /dev tree to block. The sonyscreen script goes to great lengths to try to avoid this, and to verify reads and writes to and from the device (and all in bash too :) - but this is still not 100% effective. This is why sonyscreen must be specifically enabled by placing "sonypi=on" on the Kernel command-line (e.g. via GRUB or LILO). This is, thankfully, not an issue for 2.6.x systems which use udev.




