Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

The coming big 3.0 Kernel - First Impresions

Diposkan oleh Unknown on Saturday, June 11, 2011

After running the 3.0-rc2 for a few days I can say that I notice a higher responsiveness. I'm not sure right now what causes them, but something's definitely improved. On the downside my intel i965 chipset crashes even more. This started in 2.6.39 with video playback, but it's gotten worse now and includes switching to the framebuffer console and back - and a very hard freeze that is, too...
More aboutThe coming big 3.0 Kernel - First Impresions

Using a Linux Driver for a Device that is not yet supported without recompiling

Diposkan oleh Unknown on Saturday, May 14, 2011

If you have  a new shiny webcam or some other device you want to use in Linux, here is a quick short guide how you can have it runnig within minutes with a bit of luck.

Read more »
More aboutUsing a Linux Driver for a Device that is not yet supported without recompiling

Always full of Surprises - Intel Linux Wireless Drivers

Diposkan oleh Unknown on Wednesday, May 4, 2011

You always think that device support is very good in Linux for old drivers. You think that Intel wireless drivers are especially well supported. So an old intel wireless device should have eccelent support. But it turns out I was wrong in this case. Intel took from August 2010 until the end of Apri 2011 to fix a regression in their driver covering several devices introduced in 2.6.35, now in 2.6.39 it's fixed it seems.
More aboutAlways full of Surprises - Intel Linux Wireless Drivers

Things you probably didn't know about the Kindle

Diposkan oleh Unknown on Monday, May 2, 2011

As an outsider I had no idea that the kindle has a wide open linux root. You can install not only a port of FBreader to read epubs and other files, but there is also a port of mplayer to listen to music including internet radio via wifi, font patches, ssh, different screen savers and other things. I just wanted to test it for two weeks as you can in Europe with pretty much any mail ordered thing. But now I'll keep it!
More aboutThings you probably didn't know about the Kindle

Why Not Scale the CPU on Schedule?

Diposkan oleh Unknown on Wednesday, April 20, 2011

Usually e.g. CPU frequency scaling works mostly by seeing how much of the CPU is utilized and then reacting by setting the frequency to a certain level to satisfy this need. But why not at least in addition introduce an interface for some software, e.g. media players, to inform the kernel up front how much CPU it will need. Then it the CPU will be available on time.
More aboutWhy Not Scale the CPU on Schedule?

0.4 Watt Less During Audio Playback - (Updated:) Power Performance: Pulseaudio + Interrupt-Less Alsa

Diposkan oleh Unknown on Saturday, April 16, 2011

(Skip to the update)
Ok, so with some help from Pierre-Louis from Intel I've managed to get it working and do some performance/power tests. But let me start at the beginning: Recently, pulseaudio not only switched to a more power efficient (and otherwise) timing system, as far as I understand a callback API. It also provided the infrastructure to use ALSA devices without causing any interrupts ("period wakeup disabling"), so you CPU can stay longer in standby mode (e.g. "C6 residency"), saving you power and avoiding playback glitches at the same time. See here and here or more background information. With kernel 2.6.38 the first driver (snd-hda-intel) supports this infrastructure out of the box, the snd-hda-intel driver. This combination is what I tested for power efficiency...
Read more »
More about0.4 Watt Less During Audio Playback - (Updated:) Power Performance: Pulseaudio + Interrupt-Less Alsa

The Linux Kernel Trojan Horse Gift

Diposkan oleh Unknown on Saturday, April 9, 2011

Linus describes how he prefers new features to be introduced to Linux:

In other words, every new crazy feature should be hidden in a nice solid "Trojan Horse" gift: something that looks _obviously_ good at first sight.

The fact that it may contain the germs for future features should be hidden so well that not only is it not used as an argument ("Hey, look at all those soldiers in that horse, imagine what you could do with them"), it should also not be obvious from the source code ("Look at all those hooks I sprinkled around, which aren't actually used by anything, but just imagine what you could do with them").
Linus
More aboutThe Linux Kernel Trojan Horse Gift

Pulseaudio Power Efficiency

Diposkan oleh Unknown on Sunday, March 20, 2011

Using pulseaudio in combination with alsa is already more power efficient and avoids many interrupts on current systems. In my experience the interrupts created by hda_intel decreased from 60-80 down to 6 per second. The sleep residency increased from about 3 ms to about 8 ms. This already makes a difference of about .25 Watts. I wonder if and how the difference will be with the new patches that went into 2.6.38, disabling even more interrupts.

Update: Also check how to save 0.4 Watts and more with pulseaudio and alsa.
More aboutPulseaudio Power Efficiency

Linux - LibreOffice 3.3 Released

Diposkan oleh Unknown on Thursday, January 27, 2011

Development team who 'defected' from the recently released OpenOffice office suite based on open source and free, namely LibreOffice 3.3.

After leaving the OpenOffice development team, some developers are then established LibreOffice. Departure of the developers was triggered by acquisitions made by Oracle to OpenOffice.

The 'dissident' is felt that this acquisition could make OpenOffice is
More aboutLinux - LibreOffice 3.3 Released

Ubuntu Linux Installed In Mobile Nexus S

Diposkan oleh Unknown on Wednesday, January 26, 2011

Humans are creatures homoludens, creatures play, so they never cease to innovate, this is done by the people at XDA forum Fevelopers to change their gadgets for work than usual.

Recently one of XDA-Developers named stroughtonsmith - or Steven Troughton-Smith who previously had managed to fit the OS on the device Nexus S MeeGo now he has managed to insert the Ubuntu Linux operating system in the
More aboutUbuntu Linux Installed In Mobile Nexus S

Saving 2 W power by Making Sure Laptop_Mode oesn't destroy your HD

Diposkan oleh Unknown on Wednesday, December 22, 2010

Laptop_mode is actually a great thing, as it activates a few powerful power saving modes in Linux, most importantly disk power saving and delayed writes. But if you use it with out of the box settings, there are two major bugs in Laptop Mode Tools, which could cause your disk to crash and are the reason it's normally disabled. Now let me show you how to work around them and easily save 2 W of power:
Read more »
More aboutSaving 2 W power by Making Sure Laptop_Mode oesn't destroy your HD

3rd Stage Opening Windows with Ubuntu Password

Diposkan oleh Unknown on Thursday, December 9, 2010

Lost is a problem commonly faced by mankind. If you forget your Windows login password, no way to recover it using the Ubuntu Linux operating system.

The first thing to do is create a Live CD or Live USB stick Ubuntu Linux. Ubuntu Live will be used to boot into the system and perform the procedures required to dismantle the Windows password earlier.
The easiest way to do that is by downloading
More about3rd Stage Opening Windows with Ubuntu Password

How To Uninstall Windows And Use Linux Instead

Diposkan oleh Unknown on Wednesday, December 1, 2010

There are some users who have grown beyond the need for Windows and have decided to remove it from their systems.

Really this is only a step that one should take once you have used Linux full time for quite a while and know how to use the system for your needs. Removing Windows isn't completely necessary but some Linux users will want to do this.

There are a couple of ways of doing this. The
More aboutHow To Uninstall Windows And Use Linux Instead

What can Governor Adjustments do for your Battery Mileage?

Diposkan oleh Unknown on Thursday, November 25, 2010

After my previous post about Android saving power with Linux governor tweaking, I did some governor tweak testing on my netbook with a tweaked phoronix test suide (pts) and came up with these results:

The first two show the power usage in Watts, the third shows the frequencies used during the test.


Read more »
More aboutWhat can Governor Adjustments do for your Battery Mileage?

"Unusual" Linux Games

Diposkan oleh Unknown on Monday, November 22, 2010

Linuxaria has a great list of fun, "different" Linux games, can't wait to try out some of them.

If you liked this article, you might want to subscribe for more.
More about"Unusual" Linux Games

Immediate Latency Improvement on Recent Linux Kernels

Diposkan oleh Unknown on Friday, November 19, 2010

Check out this article on Webupd8. But I'm sure an easier version you can just install as a normal package will come out soon as well.

But it works excellently indeed. I can transcode now and I don't even notice any change in responsiveness.
More aboutImmediate Latency Improvement on Recent Linux Kernels

Atom Power Usage Reduced with kernel 2.6.36

Diposkan oleh Unknown on Monday, October 25, 2010

As expected, the intel_idle driver includes ATM-C4 and ATM-C6 CPU power saving modes in kernel 2.6.36, even if your BIOS doesn't announce them. Check it out!

I'm sure it'll lower your power consumption by at least 0.5W on average loads. Of course there might be no difference at all if your BIOS already supports them. But often the BIOS disables the states when the AC adapter is plugged in. They still work, though, when using intel_idle. This makes your netbook less power hungry and more importantly: quieter. For some netbooks this will definitely be a big difference in run time as well.

Let me know how it works for you in the comments.
More aboutAtom Power Usage Reduced with kernel 2.6.36

Disabling Fsync in Laptop_Mode

Diposkan oleh Unknown on Saturday, October 23, 2010

There are several libraries that help you to disable fsync temporarily so your hard disk doesn't always spin up to save your notebooks battery. Of course that is not very flexible as you need to preload the libraries meaning you have to restart the programs.

Read more »
More aboutDisabling Fsync in Laptop_Mode

Introducing (native!) µTorrent for Linux

Diposkan oleh Unknown on Saturday, October 9, 2010

If you've ever looked into the various programs available to download via bittorrent, you will probably have discovered µtorrent. Back then it was probably already tiny and full-featured at the same time. It even had customizations to better run inside WINE. But it didn't run natively on Linux. Of course that made the very low resource bittorrent client much more resource hungry. Now this all changed. (Screenshots inside)

Read more »
More aboutIntroducing (native!) µTorrent for Linux

Syncronized Folders across Windows and Linux - (Cloud-)Free Encrypted Cross-Platform Synchronisation with Unison

Diposkan oleh Unknown on Sunday, August 15, 2010

I always wanted to sync a few folders of my system across all my computers. E.g. the my scripts directory, where I constantly fiddle with my scripts and create new ones, my documents I always want to be able to have and edit everywhere, etc. I would never know where the most current version is without bothersome comparison of the dates. I would have to check every file and then copy the newer one. But that's now history, thanks to unison and my sync scripts.

What you need
The biggest problem is that you need a Linux server somewhere that is best constantly running and connected. I sync all my files with an online server. This is not a big deal because with SSH the connection is securely encrypted. Also due to compression and the fact that files are only transferred once, sync is pretty fast even with an ADSL connection. Of course this won't work for slow dial up connections in combination with large files. But as long as there are only small changes in certain files, even dial up might work for you. A Linux server is not really needed, but makes the setup much easier, which is why that's what I demonstrate here. And of course if you only want to sync two computers with each other, then there's no need for a constantly active server. It should work with Mac as a client or even server, but I don't own one so I can't help with that.

Downloads
You can get your unison downloads for Mac, Windows here and for Linux here (Ubuntu binaries i386 for 9.10 and 10.04 and more in this ppa. I recommend version 2.40.16, read below for why.

For Windows you also need to get Putty Agent (Pagent), Putty Puttygen and Plink get them at http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html. For Linux you also need openssh-server ssh-agent, ssh-keygen (in the openssh-client package) and keychain. You need to setup a working ssh connection with public key authentication for this to work without your interaction in the background. See here how to do this.

Bugs in the past
At the time I found it, over a year ago, it was still pretty buggy. It couldn't handle unicode, special characters or Umlauts properly. Especially between different system you'd end up with two differently named versions of a file unless you restricted yourself to normal a-z characters - very annoying.

But recently new version has come out, which fixes the problem. Now unison is not only a tool to synchronize flawlessly across different systems, it's also faster and prettier "GUI" than older versions and it still synchronized across encrypted ssh connections if you want it to. In my view this makes it the perfect tool for my needs. I've set it up to synchronize my laptop and my netbook with each other and my server system over ssh.

How it works
It's blazingly fast by only copying those parts of the files that have changed. And it doesn't transfer any files to check this. It runs both on the server and the client and only transfers the dates and hash coddes of the files via a secure compressed ssh connection. You can find out more about unison at LinuxJournal.

The easiest setup and the one I will show here is a star topology setup. This means there are several client systems synchronizing with one server. It works because unison knows which files are newer. The great side effect is that you automatically have a distributed backup on all your systems - the server and all clients of all your files.

The script runs automatically every X minutes in the background via cron on Linux (completely invisible) and is called by the Windows Task Manager on Windows (almost invisible).

Important to know
You need to use exactly the same version on all system you deploy it. There are easy to install packages for Debian and Ubuntu and precompiled versions for Windows. I haven't worked with OS X version yet, but they should work as well. I use a Linux server, Windows on the server side should be possible to set up but it's going to be much more difficult. Setting up the client on Windows is already non-trivial.

As you don't modify the same file on both systems at the same time before a server sync, then there won't be any problems. If you do, unison will not sync them. You need to call unison by itself and it will prompt you to chose how to deal with the situation.

The Linux version uses the symlink feature of Linux to let you configure which folders to sync on the go. In Windows this won't work, so all your folders you want to sync need to be inside one parent folder. I know no way around this, though the unison config file might have a solution somewhere...

Sync script:
#!/bin/bash

LOG="tee -a $HOME/logs/mysync2.log"
source $HOME/scripts/functions $HOME/scripts/variables

main ()
{
echo Starting at $(date)

# exit if running on battery
grep on-line /proc/acpi/ac_adapter/*/state >> /dev/null
if [ ! $? ]; # 1 if not "on-line"
then
echo Running on battery. Leaving now...
exit 0;
else
echo Running on AC Adapter.
fi

# use ssh-agent
source $HOME/.keychain/*-sh 2>&1
echo sock $SSH_AUTH_SOCK pid $SSH_AGENT_PID me $(whoami)
ssh-add -l || (echo "SSH Key not active\!"; ssh-add || exit 1)

cd $HOME

unison-2.40.16 sync -batch -maxbackups 2 ${@} 2>&1

echo Exiting at $(date)
}

main | $LOG

It checks and exits when the system is running on battery. To be able to work in the background, it uses ssh-agent. So you need to setup ssh key authentication.

Unison config in ~/.unison/sync.prf:
# Unison preferences file
root = /home/user/sync
root = ssh://user@syncserver:port/syncfolder
follow = Path *
ignore = Path {scripts/s3.sh}

This is a sample config file. It follows all symlinks in the $HOME/sync folder to syncfolder on syncserver via ssh. The ignore section shows you how to exclude certain files from synchronization.

Windows Setup
This should already work just fine in Linux. Now let's turn to the Windows client.

The Window setup, as you will see, it much more "fun". There are several steps you need: Putty Agent (Pagent), Putty Puttygen and Plink (see above for links) and then a few bash scripts.

You need to copy your private ssh key from your linux box and convert it to putty's format with puttygen. Then copy it into a safe folder. I have it in the same folder as the Unison.exe. Then setup an ssh connection to your server with Putty that uses the key and save it to profile name unisonssh. Copy the following bash files to your unison folder and adjust the path names accordingly.

Putty Agent.bat:
pageant.exe sshkey.ppk
This needs to be a script or otherwise it's not started in the right folder and won't find the key. Try it with the full path of the key file then. This must be linked into Autostart if your and will prompt you for your ssh key password if your key is password protected.

SSH Connect.bat
@plink -C -ssh -load unisonssh -i "C:\unison\sshkey.ppk" -l djtm -P 22 unison -server -auto
Change the path to where your ssh key lies and the port to your server's port if necessary.

Unison Sync.bat
C:
cd "C:\unison\"
unison2.4.exe -sshcmd sshconnect.bat -backups -backupdir unisonbackups -backuplocation central -batch -confirmbigdeletes -contactquietly

Testing it
Now is a good chance to try everything works fine. Try creating a file one one system and see how after two syncs it magically appears on the other. Edit it there to see how the edits are transferred back to the first system.

Scheduling it
Once everything works you can schedule it to run regularly without you needing to do anything. In Linux, you should install keychain for this to work in scripts and then enter the following into your cron. (To edit your cron type crontab -e)
*/15 * * * * $HOME/scripts/unisonsync
The */15 means to sync every 15 minutes. Don't worry, usually nothing will be done - I hardly ever notice anything happening. Of course the path should be where your unison sync script lies.

In Windows it's a tad more difficult again. The most difficult part of it all is to make it run in the background without annyoing you every 15 minutes or so. The following command looks a bit quirky, but that's the best I could do. Enter exactly this behind Execute: in the task scheduler.
cmd /C start /LOW /MIN "Unison Sync" "C:\unison\unison.bat"
and "C:\unison" next to execute in. Check both execute only when logged in and, under the settings tab, not to start the task if you're running on battery.

And now - finally - enjoy great, free, in sync folders!

Another older, less detailed guide is available here and here. Thanks to the authors of Unison.
More aboutSyncronized Folders across Windows and Linux - (Cloud-)Free Encrypted Cross-Platform Synchronisation with Unison