Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
For the screen brightness, you need to load a module (sonypi, I think it's in the mainline 2.6.x kernels). You can get a utility here to control the brightness:
The biggest issue that I have left to work out is scrolling on the touchpad, and (en/dis)abling tapclicking. I think this requires a kernel recompile and/or patch of some kind though, as the touchpad is an Alps and not Synaptic from what I understand. Have you messed with this at all?
Which distribution are you running? For me, it worked (usually?) in Ubuntu Warty, and it works wonderfully in Hoary as long as you use the xorg drivers, not the ATI binary drivers.
In Hoary, you can run /etc/acpi/sleep.sh as root to suspend to ram. I have not set this up or done much tweaking by hand, so I'm not sure what needs to be done on other distros.
Kernel 2.6.10+ may help as well, as I noticed a major increase in the speed of suspend/resume with it. That may have been a coincidence though.
Glad to know. I use Debian. It would be nice to know what exactly must be tweaked so that it works. If we know all this info maybe we can have any distro work.
Update: I was using the 2.6.10 stock kernel. Using either the Debian 2.6.9 or 2.6.10 kernels let s3 work from X. From text console I need boot-radeon. A straight 2.6.10 kernel also works if you choose the right options (use for example the config file in Deb 2.6.10).
I have not used the sonypid program beyond doing what you have. I the spicctrl program from that website to control screen brightness from the command line.
There was another program I used (I may have hacked the sonypid code somewhat?) that allowed me to use the Fn-key combinations to adjust brightness, but that caused a lot of other problems with the touchpad and other items.
There are easier ways to do this I'm sure, but I haven't looked into them too much. If you do find anything better please let me know.
I'm using Debian on my s260, and I was wondering if it is possible to allow multiple applications to use the sound card. Currently, it seems only one app at a time can make sound. Any help is appreciated.
I ditched arch linux for ubuntu hoary. Everything and I do mean Everything* configured just about perfect automatically.
2 exceptions: No modem driver still because it is proprietary. and the lamp didn't get preconfigured. I'm gonna try sonypi under ubuntu and see how it goes *crosses fingers*
The sonypi + spicctrl combo works well for me on Hoary. I haven't been able to tie the Fn+Function keys to their proper functions without breaking other items, but I don't adjust the screen brightness that often anyway, so it's not such a big deal.
I just edited a script that someone wrote for their Z1 to get the function keys working on my machine. It needs sonypid, aumix for audio, and spicctrl for the screen brightness. You could also map whatever you would like to the sleep key. I toyed around with mapping some radeontool commands to the lcd/external output key, but that was quite unstable so I dropped it. The mute key will mute the audio by setting the volume to zero, so it won't unmute and restore to where it was if you press it again.
Hope it helps.
Code:
#!/usr/bin/perl
###########
#
# Daemon to monitor sonypi events and do things, on machines that have
# the sony programmable I/O device. Requires the "sonypid" daemon as
# input, and the "spicctrl", "aumix", and "sox" programs for output.
#
# There is a table of actions to take for each sonypi function-key event.
# Only a few of the events (notably brightness and loudness) are used.
#
# There is currently no support for anything other than function-key
# events -- but it should be obvious where to add that functionality.
#
# The external commands may need customization for your system; they work
# on my Z1 machine with Red Hat 9 and aumix and spicctrl installed in
# /usr/local/bin.
#
# Best of luck; questions, comments, or revisions may be directed to
# "deforest@boulder.swri.edu".
#
# Copyright Craig DeForest, 2003
#
# You may distribute this under the terms of the GPL version 2; the
# complete license is available at http://www.gnu.org/licenses/gpl.txt
#
##########
# Some setup variables collected here for convenience
$bright_steps = 10;
$spicctrl = '/usr/bin/spicctrl';
$aumix = '/usr/bin/aumix';
#$click = "/usr/bin/sox /opt/kde/share/sounds/KDE_Click.wav -r 48000 -t raw /dev/audio";
$click = '';
##########
# What to do when the brightness key is hit
$bs = 256/$bright_steps;
$brighter = sub {
$B = int( $bs * ( int(`$spicctrl -B` / $bs + 0.5) + 1 ));
`$spicctrl -b $B`;
};
$dimmer = sub {
$IB = int (`$spicctrl -B`);
if ($IB ne 0){
$B = int( $bs * ( int(`$spicctrl -B` / $bs + 0.5) - 1 ));
`$spicctrl -b $B`;
}
};
##########
# Table of function-key actions. List ref containing strings
# executes strings as shell commands; code ref gets executed in situ.
@fcmds = (undef # 0
, undef # 1
, ["$aumix -v0 -W0"] # 2 - mute
, ["aumix -v-10 -W-10","$click"] # 3 - reduce volume
, ["$aumix -v+10 -W+10","$click"] # 4 - increase volume
, $dimmer # 5 - increase brightness
, $brighter # 6 - decrease brightness
# , ["$spicctrl -b 0"] # 6 - minimum brightness
, undef # 7 - LCD/VGA - not yet
, undef # 8
, undef # 9
, undef # 10
, undef # 11
, undef # 12
);
#
# Daemon stuff -- check the lockfile (There Can Only Be One!) and
# spawn twice to disassociate from the terminal.
#
if(open FILE,"</tmp/.sonypidd-lock" ) {
chomp($otherpid = <FILE>);
@lines = `ps -e`;
@found = grep(/^\s*$otherpid\s/o && /sonypidd/,@lines);
if(@found) {
print STDERR "Sonypidd is already running (PID $otherpid)\n";
exit(1);
}
}
open FILE,">/tmp/.sonypidd-lock" || die "Couldn't open lock file\n";
exit 0 if(fork);
exit 0 if(fork);
print FILE $$,"\n";
close FILE;
##########
# Open a sonypid process to read the sonypi device
pipe READ,WRITE;
$pid = fork();
$| = 1;
if(!$pid) {
close READ;
open STDERR,">&WRITE";
open STDOUT,">&WRITE";
exec('/usr/bin/sonypid');
die;
}
close WRITE;
##########
# Interrupt handling -- clean up the sonypid before dying...
$die = sub{ kill(9,$pid); exit 1; };
$SIG{HUP} = $SIG{INT} = $SIG{QUIT} = $SIG{TERM} = $die;
##########
# Event loop -- grab the function-key events, look 'em up, and do 'em.
# Go away as soon as the sonypid dies.
while(defined( $_ = <READ> )){
s/^Event:\s*//;
@words = split(m/\s+/,$_);
if($words[0] =~ m/^Fn-F(\d+)$/) {
my $f_no = $1;
if(defined($fcmds[$f_no])) {
if(ref $fcmds[$f_no] eq 'CODE') {
&{$fcmds[$f_no]};
} elsif(ref $fcmds[$f_no] eq 'ARRAY') {
for(@{$fcmds[$f_no]}) {
`$_`;
}
}
}
}
}
exit 0;
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.