ThoughtNature

Inconsequential and deceptively simple.

Wednesday, December 18, 2013

God is that, and God is this.
If we think we’re right, we’ve gone amiss.
Many before, and many after,
all our certainties result in laughter.
You tried your best, but fell way short.
Just let go, let reality sort
your misconceptions about defining right.
Into the hands of God, fall you might.
Swept away, a new beginning,
no longer is it about winning.
The circle small with what you know
shall enlarge, Eternal Light will glow.
The universe expanding wide,
the same you’ll feel deep inside.
Where does it start, where does it end?
No enemies, everything’s a friend.
A part of you, a part of me,
a part of this galaxy
that spins around in open space.
Our eyes staring back into the face
of nature exposed to us Divine,
the greatest show, the greatest sign.
A product of the stars, we’re birthed.
Not separate, connected to this earth.
Before human language came to be,
the Light existed from all eternity.
Before books and temples, religious thought,
the cosmos contemplated deep deep naught.
So since we grew from Nothing’s seed,
humble Nothing’s a more fitting creed.
 
Stolen from Jesse Dooley

Thursday, March 28, 2013

Fixing video corruption on resume under Ubuntu Linux

Create a file called /etc/pm/sleep.d/15_chvt and paste the below into it:
#!/bin/sh

# Action script to change VT to fix occasional video corruption on resume
#
# Copyright: Copyright (c) 2012
# License:   GPL-2
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "${1}" in
        resume|thaw)
                vt=$(/bin/fgconsole)
                if [ -z $vt ]; then
                  vt=7
                fi
  chvt $(expr $vt + 1)
  chvt $vt
                ;;
esac

Labels: , , , , , , , ,

Friday, May 25, 2012

Installing Ubuntu Linux 12.04 "Precise Pangolin" on an Apple PowerBook G4 1.5

My notes on making this overpriced slab of style jive with Ubuntu's latest long-term support release.

Hardware specs

PowerBook G4 specs on EveryMac

 

Installation procedure

  1. Clear free space on your Mac's hard disk, because we're going to shrink the Mac OS X partition by at least 10 gigabytes, perhaps a bit more if you have space.
  2. Download the Ubuntu 12.04 Power PC live CD from here.
  3. Use the OS X Disk Utility and perform a full verify and repair (if needed) of your system volume (and any other volumes, if you've partitioned your disk).
  4. Boot from your OS X system CD/DVD and run Disk Utility again, and this time resize your system partition (and/or any other partitions, as necessary) to give at least 10 GB of free disk space. Allow the operation to fully complete and then restart the computer, removing the system CD/DVD.

  5. Now, boot from the Ubuntu live CD and run the installer. Choose to install Ubuntu alongside OS X. Answer all other prompts to your preference, and allow install to complete.

 

Post-installation Tweaks

  1. Install the older Mesa libraries to enable user space mode setting 3d hardware acceleration. Look for the section on this problem here.
  2. If you want read/write access to Mac filesystems from Ubuntu, disable HFS+ journalling, by booting into Mac OS X and running (if you already have more than one Mac/HFS+ volume, you'll need to repeat this for each one, giving the correct device file name):

      sudo diskUtil disableJournal /dev/disk0s1
  3. Edit the /etc/yaboot.conf and modify the line beginning 'append=' so that it reads as follows:

      append="quiet radeon.modeset=0 video=radeonfb:1024x768-24@60 radeon.agpmode=-1 nosplash"

    These settings will ensure the best graphics support, with virtual terminals and suspend working properly.
  4. Update yaboot to use the new settings:

      sudo ybin
  5. Edit /etc/modules and add the following lines to load kernel modules for sound support automatically on boot:

    snd_aoa_i2sbus
    snd_aoa_fabric_layout
    snd_aoa_codec_onyx

    NB: Use alsamixer to ensure all volume levels are up, and check that the 'Speakers' control is unmuted. I didn't notice this control for the longest time and was pulling my hair out.

     
  6. Modify the relevant sections of /etc/X11/xorg.conf as follows.

    i. First, optimise the ATI Radeon video support for best performance:

    Section "Device"
            Identifier  "Card0"
            Driver      "radeon"
            BusID       "PCI:0:16:0"
            Option     "AccelMethod"                "EXA"
            Option     "MigrationHeuristic"         "greedy"
            #Option     "BusType"                   "PCI"
    EndSection
    ii. Next, set up Synaptics support for the AppleTouch pad (in my case this made the pad a lot better to use and stopped it clicking on things when I only wanted to move the pointer):

    Section "ServerLayout"
            Identifier     "X.org Configured"
            Screen      0  "Screen0" 0 0
    #       InputDevice    "Mouse0" "CorePointer"
            InputDevice    "Touchpad" "CorePointer"
            InputDevice    "Keyboard0" "CoreKeyboard"
    EndSection

    Section "InputDevice"
            Identifier  "TouchPad"
            Driver      "synaptics"
            Option      "Device" "/dev/input/mouse0"
            Option      "Protocol" "auto-dev"
            Option      "LeftEdge" "100"
            Option      "RightEdge" "1120"
            Option      "TopEdge" "30"
            Option      "BottomEdge" "310"
            Option      "FingerLow" "25"
            Option      "FingerHigh" "35"
            Option      "MaxTapTime" "180"
            Option      "MaxTapMove" "220"
            Option      "VertScrollDelta" "25"
            Option      "MaxDoubleTapTime" "180"
            Option      "MinSpeed" "0.40"
            Option      "MaxSpeed" "2.00"
            Option      "AccelFactor" "0.1500"
            Option      "SHMConfig" "on"
            Option      "TapButton1" "1"
            Option      "TapButton2" "3"
            Option      "TapButton3" "2"
            Option      "VertTwoFingerScroll" "1"
    #       Option      "HorizTwoFingerScroll" "1"
            Option      "EdgeMotionUseAlways" "1"
    EndSection

    Section "InputClass"
            Identifier "touchpad catchall"
            Driver "synaptics"
            MatchIsTouchpad "on"
            MatchDevicePath "/dev/input/event*"
            Option "SHMConfig" "on"
            Option "TapButton1" "1"
            Option "TapButton2" "3"
            Option "TapButton3" "2"
    EndSection 

Optional Tweaks 

  1. Install the FlashVideoReplacer plugin for Firefox, and also the mozilla-vlc package. Remove mozilla-totem.

Labels: , , , , , , , , ,

Tuesday, June 02, 2009

MPD Icecast MP3 streaming

I recently set up MPD with a web front-end and OGG Icecast streaming, and found it was really taxing the 800 MHz CPU of the server.

The idea was to be able to control the music in the communal area from any PC, and also to have the same music streamed to listeners elsewhere.

It worked, in principle, but the CPU load on the server was too great and the audio (both direct output from the server as well as streamed) was cutting out frequently.

After trying all manner of tweaks and hacks, disabling ALSA and trying OSS, modifying /etc/asound.conf, turning off the software mixer and all kinds of arcane encoding directives, even trying XMMS2 and looking into Liquidsoap (which looks incredible, if a little tricky to set up), I eventually compiled MPD from source in order to utilise the new Icecast MP3 streaming option.

To wit:
  1. Download and unpack MPD server sources
  2. Install libmp3lame-dev, libmad0-dev, libasound2-dev, libogg-dev, libshout3-dev, libmp3lame0
  3. Change to the base directory of the unpacked sources
  4. ./configure --enable-shout-mp3 '--enable-lame
  5. make
Now copy the executable to where you want it to reside.

For Ubuntu users, if you already have the Ubuntu version of MPD installed, after compiling simply copy the resulting mpd executable file from the src/ subdirectory of the unpacked sources to /usr/local/bin/ and edit /etc/init.d/mpd, changing the DAEMON= line to specify the full path to the mpd executable.

e.g.
DAEMON=/usr/local/bin/mpd

Now start or restart mpd.

This has made a huge difference - CPU load has dropped immensely and the audio very seldom cuts out anymore.

Labels:

Thursday, January 10, 2008

Someone recently asked me why I cycle tour!

First of all, it combines two things I'm very passionate about: cycling and freedom.

I love to travel, for all the usual reasons, and in light of the climate change issue - amongst others - a few years ago I resolved to cease traveling by aeroplane *except* where no reasonable alternative exists. Naturally cycle touring is one of the most sustainable forms of transport, whilst still allowing respectable distances to be covered each day.

I love to meet people and see how they live, commune with them and share their hospitality; I love the way complete strangers invite me into their homes or tents, feed and entertain me - often with much hand gesturing because they'll be speaking a language I'm not fluent in! I send them all postcards a bit further along the way. Call me a hippie but I really do find this kind of contact enriching, life-affirming.

I love the way touring teaches me to be resourceful and creative and to make do with just the few things my bicycle and I can carry together; t
here is a sense of accomplishment not only in the distance travelled but in making do with the basic necessities, and the clear mental state this seems to bring about. Satisfaction also comes with the crest of every hill; the vista a reward for the climb and the lungs drink in the fresh-smelling, untainted air as the bike rolls down the other side.

The physical fitness that develops, especially in a longer tour, really helps to lift the mo
od... not to mention the appetite! Every meal pure delight with the healthy hunger that develops over a day in the saddle. And with nightfall sleep, as deep as it was supposed to be!

And then there's all of that BEAUTY - the scents, sounds and life - the things you are oblivious to as you zip past in a train or glide above in an airliner. Every day a feast for the eyes: the mountain-tops, valleys and rivers, ruins, the sky, the stars! Wild animals and birds. Yes, there is still a whole lot of beauty outside the cities, almost everywhere you go in fact!

Of course there's a degree of uncertainty and spontaneity about this business, it must be said - often not knowing where to pitch the tent each night. The adventure of stealing a night's sleep in a forest park or the wild grass of a neglected pasture. With the setting sun, the bodyclock, in a fashion normally denied it beneath artificial lights, is allowed to function naturally for a change and under darkened tent in evening stillness, tired bones take deepest sleep and awake rejuvenated in light of morning. Rising with purpose to breakfast, and washing in a stream before getting underway again... or taking a day to rest and enjoy the surroundings - even do some touristy things perhaps.

You haven't lived! you haven't lived, I tell you!

Labels: ,