Adblocking with DNS


Ads on websites can be both annoying and resource intensive for older PowerPC systems. Waiting for the browser to load all the ads just so you can use the site can be trying on your patience. This is where adblocking becomes a great help.

Dan has a really good post comparing different types of adblocking tools for TenFourFox. I would like to suggest another method you can use that will take the work of adblocking off of your browser and machine by using DNS. If you have a spare machine (I will be using my Mac mini G4 running Jessie) then setting this up will be pretty simple.

First we will install bind9 then setup DNS caching and forwarding. Then we will setup the adblock portion. Finally we will set up a simple webserver to present a transparent pixel instead of the ads.


Setting up DNS caching

First we will need to install bind9 if you have not already. This is as simple as running the command as root, apt-get install bind9. Next you will want to edit the file /etc/bind/named.conf.options. Below is my file.

acl goodclients {
    192.168.0.0/24;
    localhost;
    localnets;
};

options {
    directory "/var/cache/bind";

        recursion yes;
        allow-query { goodclients; };

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

    // If your ISP provided one or more IP addresses for stable
    // nameservers, you probably want to use them as forwarders. 
    // Uncomment the following block, and insert the addresses replacing
    // the all-0's placeholder.

     forwarders {
         208.67.222.222;
        208.67.220.220;
     };

    //========================================================================
    // If BIND logs error messages about the root key being expired,
    // you will need to update your keys.  See https://www.isc.org/bind-keys
    //========================================================================
    dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};


The acl section defines who is allowed to ask queries to the DNS server. This stops unwanted people from trying to use your server. It is better suited if this was server was accessible from the internet, but it is good practice to do.

Next we want to turn on recursion and define who is allowed to query. DNS recursion is when the DNS server queries other servers on behalf of the client and sends the reply back.

Then we will define the forwarders to use. Some people refer google DNS, but I like using OpenDNS. This should be all you need to set up caching. A great tutorial on DNS caching the can be found at Digitial Ocean.


Adblocking

Now you need to get a blacklist file, which can be found here. Select the bind8 option and download the file. The open it and edit the zone lines to look as follows.

zone “101com.com” IN { type master; notify no; file “/etc/bind/null.zone.file”; };

If you are handy with vim then doing this should be really quick and easy.

The next thing is to copy the file to the /etc/bind directory and add this line to the /etc/bind/named.conf.local file.

include “/etc/bind/blacklist”;

Now it is time to create the /etc/bind/null.zone.file. This will redirect the ad urls to the simple webserver we will setup shortly. You want to set the A records to point the web server. In my case the mini serves as both. Here is my file.

$TTL 86400 ; one day

@ IN SOA ads.attlocal.net. hostmaster.attlocal.net. (
2002061000 ; serial number YYMMDDNN
28800 ; refresh 8 hours
7200 ; retry 2 hours
864000 ; expire 10 days
86400 ) ; min ttl 1 day
NS debian-minippc.attlocal.net

A web server

@ IN A web server
* IN A web server


Now you want to restart bind so that it takes all these changes you made. The first command to run is named-confcheck. This does a sanity check on the configs. If all is good then you should return to the prompt. Then to restart the command is systemctl bind9 restart and to check status of the service systemctl status bind9.

This finishes all that you need to set up the DNS server.


Pixelserver

Like I said in the beginning we want to set up a simple server to present a transparent image to replace the ads. If not then you page will full of page not found errors.

Pixelserver is a simple pearl script that can be found here. Download the file and edit it so that the listening ip address is your server. Then you change the permissions and run the server.
chmod u+x pixelserver.pl
./pixelserver.pl

Now point your machine to get DNS requests to your  server and test. Here is an example of a successful query.
herminio-hernandezs-power-mac-g4:~ herminio$ nslookup foo.doubleclick.com
Server: dns server
Address: dns server#53

Name: foo.doubleclick.com
Address: pixelserver

You should see the domain name point to your web server. Now browse the web ad free!

UPDATE I:

If you want to start the pixelserver.pl script on boot. Then you going to have it managed by systemd. This is not too hard to do.

First I put a copy of the script in the /usr/bin directory. Then entered the /etc/systemd/system directory and create a service file ( I called mine pixelserv.service). Here is what it looks like.

[Unit]
Description=pixelsirv.pl

[Service]
ExecStart=/usr/bin/pixelserver.pl

[Install]
WantedBy=multi-user.target

Then run systemctl enable pixelserv.service after run systemctl restart pixelserv.service. Now check to see if systemd is running the service.
root@debian-minippc:/etc/systemd/system# systemctl status pixelserv.service
● pixelserv.service - pixelsirv.pl
Loaded: loaded (/etc/systemd/system/pixelserv.service; enabled)
Active: active (running) since Thu 2015-11-19 00:37:26 CST; 7s ago
Main PID: 5345 (pixelserver.pl)
CGroup: /system.slice/pixelserv.service
└─5345 /usr/bin/perl -Tw /usr/bin/pixelserver.pl

UPDATE II:

If you do not turn off dnssec-validation in the /etc/bind/named.conf.options file then forwarding will break. Change the setting to what you see below then restart bind.

dnssec-validation no;

UPDATE III:

If anyone is stuck with provider wifi router that will not let you modify the DNS option in DHCP then you can add this line to the /etc/dhcp/dhclient.conf file.
prepend domain-name-servers server ip address
Then run the command dhclent <interface> to restart dhcp and you should be good.

PowerPC parts exchange?


I have had this idea for a while, but it somehow always went to the back of my mind.  What would you guys think of me adding a parts exchange area to this blog?  I'm asking my fellow authors as well as all the readers.

It would simply be an area on this blog where fellow PowerPC users can give and receive any spare parts they have, especially if they don't really have a use for it themselves.  If we do this, I would like to start it as a pure parts exchange, where the only real money involved is for shipping.  If it goes well then we could even add the ability for people to use it as a sort of PowerPC-specific Craigslist of sorts, but parts are MUCH cheaper to ship compared to systems.

I'm not talking about you all sending spare parts to one place, then making them available to others, as that would be horribly inefficient, but rather a page here to put people that have and/or need parts in touch with each other.  You would then work out your details with each other in private, in your preferred method of communication.  A central parts portal, if you will, for our always shrinking little PowerPC community.

So tell me what you guys think.  I don't want to add this here if no one will really use it.

Since none of the Apple PowerPC parts can be bought new any longer, I think an exchange could really fill a parts void for many.

New SATA PCI card findings


This will be brief...  as there really isn't much to tell, but a more recent finding has changed everything for me.

About three or four years ago, I had come to the conclusion that booting from SATA PCI cards was only about 99.9% stable.  This is because every so often things would just lock up system-wide, and I would be forced to do a hard boot.  Not a good thing when you're smack dab in the middle of important work.  After tolerating it for a couple years...  I finally decided that I would stick to SATA card attached drives for storage only, and boot from IDE/PATA drives instead.

About four or five months ago, I realized that during all those system lockups I had drive sleep enabled.  So I decided to try it for a while without any type of sleep enabled, other than display sleep, which has no effect whatsoever on hard drives.  I never use system sleep, as my systems are always 24/7 on, but I normally use drive and display sleep on every OS.

So I have now been running a WD Caviar Black 2TB as my boot drive for about five months, with drive sleep disabled on every OS, and have never once had an issue.  I have now found 100% reliability with SATA card booting!

The WD Black is the perfect drive to use in a system where drives don't sleep, because it's built for higher endurance than most drives, and has more performance to go along with that.

I had already tried every version of firmware for my FirmTek SATA cards, and nothing solved it, but disabling drive sleep did.  The only real difference now in my computing habbits is that I need to unmount all the externals I'm not using, since they are typically backup drives, and don't go to sleep any longer. 

Keep in mind that these finding are all based off use in two Sawtooth, along with one Gigabit Ethernet system.

Anyway, I had told some readers in the past via comments that SATA card booting wasn't 100% stable, and I just wanted to share how I did find that sweet spot on my hardware.

For the record...  this is all with the FirmTek SeriTek/1S2 PCI controller; I own three.  The Sonnet 2-port PCI is the same card, as they are made for Sonnet by FirmTek.  By the way...  the best firware to use in G4 towers is 5.1.3.  You still need to disable drive sleep, but the newer firmware (5.3.x) is meant for early G5's with standard PCI, and most of these cards ship with the newer version.  So if you have a G4, and you have the 5.3.x firmware, you need to downgrade to 5.1.3 for best results.  You can download the 5.1.3 firmware here.

Please share any SATA PCI controller stories and findings you may have in comments.

G5: (And G4) Nouveau Modesetting Bug and Fix Explained


This is an expansion of the bug report Dan linked to in the previous post here at the PowerPC Liberation blog regarding a specific PPC bug which happened to break nouveau modesetting for PPC Nvidia card users. Much of what I am about to discuss is a already covered in relevant bug report, but I thought I would put it out here with the hope that more individuals would learn about the bug, what it consisted of, the workaround, and how it was fixed.  So with these goals in mind, let us move to the meat of this post.

The Bug

The same Debian user, Peter Saisanas, who reported on the page size and MSI interrupt issue with nouveau on G5 PowerMacs and supplied a working kernel for it, was also the individual who reported on the broken modesetting bug I am discussing in this post. Kernel versions starting after 3.18.16 started to showcase problems attempting to extract the FCODE ROM / DCB block for PPC machines' GPUs through the machine's Open Firmware (OF) device tree.

What are these FCODE ROMs and DCBs?  FCODE ROMs are essentially Open Firmware expansion image ROMs containing bytecode as well as PPC native code that include the necessary graphics device drivers and information for both boot-up and run time. It is one of the ways Apple closely tied the hardware with its software back in the day.

On the other hand, DCB stands for Data Control Block, which is at its very core just a type of data structure that describes the dataset in a program. In the context of our situation, it is just essentially the information about the graphics card's VBIOS and how and where to load it.

This is only part of the story though.  The question was why was it not extracting these two things properly? Turns out that the VBIOS within OF on PowerMacs does not contain a PCIR section (this holds information about the PCI expansion ROM), which the nouveau driver's VBIOS parser now requires by default.  The actual GPU PROM contains a PCIR section, but that is still separate from the OF VBIOS.

So with a PPC system unable to load this data, the kernel has a hard time communicating properly with your graphics card.  Which in turns means the Nvidia card's power and capabilities are not being fully utilized. And as a result of that, the end user ends up still using the nouveau driver, but with completely software rendered graphics.  This can be and usually is quite the disappointment in terms of performance on our old PPC machines.

The Workaround

The work around is quite simple and straightforward fortunately and will likely be the means for several users to at least have the 2D driver working until the patch hits mainline nouveau and works it way down into a later release of nouveau in Debian.  That is unless you want to try and install the patch of which I will discuss later.

Essentially, all that is needed is for you to download the x86 VGA BIOS ROM for your specific Nvidia card and configure (force) your system to load that firmware for your graphics card at boot up.  I will break it down in a few more steps though for the sake of simplicity.

1. Shutdown your system and pull out the graphics card to see exactly what manufacturer and BIOS your card consists of so you know what version you should download.

2.  Browse out to Tech Power Up's VGA BIOS database.  Search for and download the appropriate firmware for your card using the info you obtained earlier from the markings on the card.

3.  Once downloaded, rename it to something simple and related to your Nvidia card version.  For example, I used GeForce_7800_GS.fw for my Nvidia card. 
mv BFG.7800GS.256.051221.rom GeForce_7800_GS.fw

4.  Copy this file to your /lib/firmware/ directory.  You will need root permissions to do this.
sudo mv GeForce_7800_GS.fw /lib/firmware/

5. Add a line similar to below to your desired kernel(s) in your /etc/yaboot.conf file.
append="options nouveau config="NvBIOS=GeForce_7800_GS.fw"

6.  Apply the changes per usual.
sudo ybin -v

6. Reboot and once again enjoy 2D acceleration.


The Fix

Peter Saisanas reported a few days ago that a patch was created via a cloned code repository of the existing nouveau driver that should hopefully eventually hit mainline soon.  I thought it would be sort of interesting to view what changes were made in the commit to resolve the issue.

A direct link to the specific patch can be found here.  From the developer Ilia Mirkin's notes, the patch essentially forces the system to always accept the OF VBIOS.  The only changes made according to the commit were within the priv.h, shadow.c, and shadowof.c files. I thought it would be interesting to look and dissect some of those changes (mostly the ones I can figure out with a quick glance). Follow along with the highlighted changes you see within the link to the patch/commit above and you should be able to see some of what I am talking about.  I was going to post the code, but could not make it format and display in a clean and easily readable fashion as it would just squish everything into one line.

For the header file, two easily noticeable changes are two bool (true or false) variables that were added for the nouveau driver to be aware of whether or not the VBIOS it is parsing contains a PCIR section and another indicating whether the VBIOS checksum should be ignored or not.  A third size variable is declared as well that as we will see later holds the size of the OF VBIOS and image it has read. Pretty straightforward.

As for the edits in the other two files they are a bit more complex, but not much.  In shadow.c, an additional if statement is added to handle the situation where a PCIR section is NOT present. Also, an if statement below that was moved so that it was nested in the else statement in the above if else logic that is there for handling different situations that would result in debugging and error reporting.  After that you can see some additional logic added to an if statement to tell the nouvea driver to ignore invalid checksums.

Last, but not least, there is shadowof.c, which is probably the most difficult in terms of understanding the changes. First, a new header file (core/pci.h) was included. Based on name alone, I have a feeling this header defines the interface through which linux can communicate with the PCI bus and devices on a system. I am not entirely positive about the length calculation addition, but I do know a new of_size function has been created that simply returns the size of the data that has been extracted from OF and set inside of a size variable later on in the code.  Here, the two bools referenced earlier are set to true, which again basically forces the nouveau driver to always accept the image extracted from OF.  The rest is not as straightforward.  It would probably help tremendously to peruse some of the other code within the driver.

According to Peter, he was able to install the patch, but not without some additional edits to shadowof.c.  I have yet to attempt it myself, but will do so here in the next few days and post the required changes needed to install this latest patch.

Hopefully, you, the readers, have read this post and are taking away some new knowledge of nouveau, loading of roms, and reading code, as well as learned some new terms related to your PPC computers.  Once again, it is encouraging that these bugs are receiving attention and being fixed. I still strongly believe we can eventually reach a point where we can have 3D acceleration fully working on our Nvidia cards with the nouveau driver. It just involves us using our voice on the web, filing bug reports, testing the latest and greatest, and learning other ways we can help with and in development.

If you have any questions or additional comments about what I have covered here, I encourage you to drop a comment or email me directly.  Or if I am just flat out wrong about something, tell me as well as I would hate to be spreading false information.

HTTPS is now availible here


Recently, Google added an HTTPS option to all Blogger blogs, and I am of course choosing to enable it here.  So to use this blog with a secure and encrypted connection, you can bookmark this link, or simply add an 's' manually after http in your browsers address bar.


The advantages Google gives for using this new encrypted option:

  • It helps check that your visitors open the correct website and aren’t being redirected to a malicious site.
  • It helps detect if an attacker tries to change any data sent from Blogger to the visitor.
  • It adds security measures that make it harder for other people to listen to your visitors’ conversations, track their activities, or steal their information.


So please...  use this if you feel the need, and enjoy more security and privacy here.  If you link to us, please feel free to add https to the address you link to.

Let me know if you have any issues with it, or any thoughts you want to share on the matter.

Progress on Debian Bugs


Peter Saisanas left an update on Debian's PowerPC mailing list reporting that a patch has been created to fix a bug that broke nouveau modesetting for Nvidia GPU users (bug applies to kernels > 3.18.16).  The patch hasn't been made official yet, but you can view the original bug report here.

Clementine and xfburn had nasty PowerPC bugs, or perhaps just 32-bit bugs, that have now been fixed.  The fixed xfburn is in Testing and the fixed Clementine as of now is in Sid.  So if you haven't gotten Clementine to play files and wanted to enjoy its Spotify, Last.fm, or Soundcloud plugins, now's your chance.

In Iceweasel news, the bookmark folder bug and customization bug are fixed in version 41.0.1 in Experimental.  So now Iceweasel appears back to its normal, healthy self.

Also, there's an r128 patch in this report that I haven't gotten around to testing.  It fixes some breakage in the Stretch version of the driver, so Rage 128 users may want to check it out.

I suppose it wouldn't be a Debian bug reporting party if there weren't some unacknowledged bugs, and on the front I left two kernel bug reports (an appletouch trackpad bug and an Apple Motion Sensor bug).  They haven't even been tagged, though the appletouch bug might have been fixed—I'm having trouble reproducing it.  Possibly related:  the appletouch trackpad driver performs much smoother with the latest kernel update in Sid.

Finally, if anyone wants to test the new pbbuttonsd in Experimental, see if you can duplicate this bug report.  The suggested fix didn't work for me.

And if you want to literally shoot bugs, there's always MacBugs!

G5: Temperatures & Fan Speeds Part I


Hopefully most of you with G5 PowerMacs now have Debian up and running on your system and with little to no hassle. I would now like to take a few posts to cover the temperatures and fan speeds these machines should run at on average and under heavy load while also just covering general items relating to monitoring these items.  This first post will cover just general agenda regarding the temperatures and fan speeds related to your G5.  Follow up posts to this topic will be more in-depth.

The G5's case itself is made of a anodized aluminum alloy that is combined with multiple system fans (most had up to 9!) and designated thermal zones to provide optimum cooling. Another thing to keep in mind regarding the cooling of these systems is that the different models had different means of cooling the system. Most G5 models simply used the traditional CPU heat sink method and built-in fans, such as the ones that you will see residing next to the CPU.  Certain high end models used a liquid cooling system (LCS), which tended to be prone to coolant leaks.  This led Apple to release models with a revised LCS to overcome the issues, but these can be harder to come by and seem to be few and far between. From what I have learned, only the 2.5 GHz Dual Processor (June 2004), 2.7 GHz Dual Processor, and Quad-Core G5 models had the LCS instead of the traditional CPU heat sink.

If you have a system temperature and fan speed utility installed within your OS X/Debian drive or partition, you will quickly learn that these G5 PowerMacs have quite a few hardware sensors built in you can use for monitoring which thrills me for a number of reasons. Temperature and fan RPM information can help you quickly spot current potential issues with certain devices in your system and help you pro-actively address and/or prevent possible issues down the road. Overall, they can help you increase the longevity of your G5 for years to come.  Speaking of system maintenance, I would encourage all G5 owners to check out this post from Cameron Kaiser on the topic.  Very detailed and insightful and I would say it applies in general for owners of other PPC machines as well in many regards.

Let us first review the safe operating ranges in terms of the general temperatures for our G5 PowerMacs as recommended and prescribed by Apple.  Below are links to the technical specifications for each of the 5 generations of G5 PowerMacs released by Apple along with the safe operating temperatures for both storage (not system storage, but storage in terms of its external environment) and the system as a whole.

Original 2003 Series -
  • Operating temperature: 50° to 95° F (10° to 35° C)
  • Storage temperature: -40° to 116° F (-40° to 47° C)

June 2004 Series
  • Operating temperature: 50° to 95° F (10° to 35° C)
  • Storage temperature: -40° to 116° F (-40° to 47° C)

Late 2004 Series -
  • Operating temperature: 50° to 95° F (10° to 35° C)
  • Storage temperature: -40° to 116° F (-40° to 47° C)

Early 2005 Series -  
  • Operating temperature: Not available
  • Storage temperature: Not available

Late 2005 Series -
  • Operating temperature: 50° to 95° F (10° to 35° C)
  • Storage temperature: -40° to 149° F (-40° to 65° C)

As you can see, the safe temperature ranges are quite similar across each generation. Not too much of a surprise there.  If you take a look at each of those documents linked above, you will also notice safe humidity percentage ranges and I would encourage you to review those as well because where you store and run your G5 is also an important consideration to keep in mind. I myself keep my running in the basement where it is generally much cooler but also more damp, so I keep a small dehumidifier running during times of high humidity.

So with these numbers in mind and available for reference, let us discuss the different pieces of software we have at our disposal for monitoring the system's various temperature and fan sensor values under both OS X and Linux.

OS X
  • Hardware Monitor (10.4 or Later) - Only gives temperature readings and still requires payment for full application access.
  • Temperature Monitor - By the same authors as Hardware Monitor. Basically an older version of Hardware Monitor that is a free download.
  • QuickFans - Another utility by the Cameron Kaiser for G5s, but may also work on G3 and G4 machines. However, this utility may or may work correctly though according to his notes, so use at your own risk.
  • iStat Pro - Well known and heavily used widget that is my personal favorite and go to sensor monitoring application.  Lightweight and available at the hit of a few buttons.
  • XRG - Have not personally tried this one, but it looks quite interesting as it also includes GPU monitoring as well. Only available for OS X 10.5 in terms of PPC support.
  •  
Linux (Debian)
  • Conky - A utility many of us are probably familiar with. Incredibly powerful and adaptable. Requires a bit more legwork to start reading available sensors, but it is possible as I have wrote about here.  I would recommend downloading the version available from the official Debian repositories. It does not actually have the native ability to obtain these values but gives you the tools to use other tools to output them. Makes sense right?
  • lm-sensors - I cannot vouch for this either, but supposedly others have been able to make it work with different PPC machines in the past. I am willing to give it a shot myself. Their official site would not load, so I have linked to its Wikipedia page.
  • sensors-applet - According to their page, "Gnome sensors applet is an applet for the gnome panel that displays readings from hardware sensors, including temperatures, fan speeds and voltage readings."  I see it includes support for lm-sensors so should provide similar results. No experience with this one either.

So not a whole lot to choose from, but perhaps that is a good thing? Anyways, my next couple of posts will cover some of my own actual readings using some of the utilities mentioned in this post and how they compared with each other. If you are aware of other utilities and methods at our disposal for obtaining these values, please share as well and I will add them to the lists above.

What would be really sweet was if we could build our own custom utility for Linux for gathering this PPC sensor specific system information across the different models.  Its certainly possible and I would be more than willing to help tackle it.  Let me know your thoughts!

Other than, no update yet on the Nouveau driver situation for G5s, but my hope and willingness to resolve the issues are strong.  I have actually started to write up another post on how to upgrade to Nouveau's latest drivers for testing purposes for when the time to test the fix does (and it will) come.  It is not as straightforward as one would think.

Three years!


We turned 3 today, and more than a lot has happened here since I started this place back on August 11, 2012.

This blog has transitioned from a sole author (me) to currently having five authors in total, and is now transforming into a place where some of the the greatest minds in the PowerPC community are collaborating together.

I have really enjoyed sharing this place with others, and I can never thank all four of the other authors enough.  Those four being Mark (fiftysixk), Dan, Brock (B-rock) and Herminio (rican-linux).  You're all appreciated more than I could ever possibly convey.

Also, lets not forget Dr.Dave.  He was with us for much of 2013, and most of his posts still exist here.  Thanks again, Dave.

A big thanks to all the readers/followers of this blog for sticking around for these three years to read what we have to say.

Here is to another strong three years, and then another three after that, and so on...

G5: Simple Dual Monitor Setup


Since my last post dealt with graphics, I thought I would continue on that same subject although this time the topic should be a little more straightforward.

Before I start though, I would like to provide a quick update for Nvidia card users.  As promised, I poked the Nouveau developers about the 64K page size issue by commenting on the existing bug that was filed a couple of years ago.  I am happy to report that one of the developers has replied stating that he is planning to untangle the vm (virtual memory) mess in the coming weeks where he also plans to address the page size issue for 64-bit PPC machines. You can follow the bug here. Consider this another giant step forward for us G5 owners!  I have offered to help in any way and have recently cloned the appropriate nouveau repositories to start parsing through the code myself and to install the latest version of the drivers for testing. I will keep you all updated.

Okay onto my regularly scheduled content. One of the many fantastic things about using a G5 PowerMac is that most of its supported graphics cards included dual head support of some kind.  If you are one of the lucky to have two monitors to put to use, I would highly recommend it when using your G5 as the extra screen real estate definitely makes a difference.  Not only that, the G5 has more than enough horsepower to drive both displays without eating up hardly any system resources. I myself have a flashed Nvidia FX4500 card with 512 MB of VRAM that includes two DVI heads. Along with that, I have two excellent 20" Apple Cinema Displays to plug into each head.  These monitors support a maximum resolution of 1680x1050 and the results are magnificent.

Now that I at least have a working 2D accelerated desktop, I have managed to successfully get a dual monitor setup going as well as found a way to make the setup persistent across reboots.  As we all know, there are many ways to accomplish a task in Linux and so with that in mind here is the simple setup I have configured to make this work on my G5.

The first thing you will want to do is install the graphical wrapper for xrandr called Arandr:

sudo apt-get install arandr

Once installed, you can find this utility under your Preferences menu.  When opened, you will see square boxes for each of your detected displays as well as their identification names. For example, mine are called DVI-I-1 and DVI-I-2 as can be seen from the screenshot below.  Your output IDs and rectangle sizes will vary depending on video card and monitors in use.


To configure your desired layout, simply drag each monitor to its desired position, which is likely how you have them setup on your desk/stand (i.e. to the left and right of each other, but again, your setup may differ).  Once in place, simply click the green button with the arrow pointing to your right to apply the layout and put it to the test.  Under the hood, this layout is actually a constructed xrandr command that gets called, but more on that in a minute.

If the results are satisfactory, you will want to save the setup by going to Layout -> Save As.  The default directory to save it under is your .screenlayout folder in your home directory.  I would recommend leaving it that location.  The resulting file is actually a shell script, so the file extension should show .sh and if you view the permissions of the file it should be executable.

As mentioned above, the file only really contains the xrandr call that was constructed via your graphical layout you created.  My particular layout ended up as follows:

xrandr --output DVI-I-1 --mode 1680x1050 --pos 1752x0 --rotate normal --output DVI-I-2 --mode 1680x1050 --pos 0x0 --rotate normal

Now that you have a shell script with the saved xrandr command that will create your desired dual monitor layout and configuration, you can apply it at any time by opening the shell script within Arandr and applying it or manually running the script within a terminal.

But wait? Why would you always wanting to be doing this manually?  We have the power of automation at our fingertips.  A good place to have this script run automatically at login is (you probably guessed it) your autostart file.  For me, mine is located at ~/home/.config/lxsession/LXDE/autostart. I added the following line to the file and saved the changes:

/home/br0c0l1/.screenlayout/DualAppleCinemaDisplays.sh &

To test the changes out, simply restart your X display manager. For LXDE users, that can be done by restarting the lightdm service.  Or better yet, just logout and back in.  If all else fails, do a full reboot.

And so from now on, when you login to your G5 Linux install, you should automatically have your dual monitors configured in your desired layout.  Enjoy the extra screen real estate!



If you run into any issues or have other ways of accomplishing this same task, feel free to leave a comment below.

New blogger guidelines for cookies in the EU


My blogger admin page provided me with the following message on new cookie regulations for the European Union and its member states:

European Union laws require you to give European Union visitors information about cookies used on your blog. In many cases, these laws also require you to obtain consent.

As a courtesy, we have added a notice on your blog to explain Google's use of certain Blogger and Google cookies, including use of Google Analytics and AdSense cookies.

You are responsible for confirming that this notice actually works for your blog and that it is displayed. If you employ other cookies, for example by adding third-party features, this notice may not work for you.

So as the administrator of this blog, I am responsible for making sure this notice is available to anyone from an EU nation.  I have made more custom modifications to this blog than I can count, and there is a chance they could get in the way of this notice.  If you live in the EU and do not see this notice; please contact me directly, or comment here, and I will correct it.

This blog doesn't use AdSense at all, so the only cookies are blogger stats and my third-party stats.  I can assure you that both are perfectly harmless.  The third-party stats I speak of is StatCounter, which are one of the most trusted and popular website/blog stat services on the net.


Update

Based on some testing I have done... the notice only shows itself once. I tried it with at least 5 EU nation codes, and once I clicked either "Learn More" or "Got It" it didn't show itself again. Even after a browser relaunch.

The MacMini G4 file server


I recently received a MacMini G4 and now to figure out what to do with it. I saw really cool video on how to use a macmini as a file server. In the video OS X was used but I wanted to do this on Linux. Two common ways to set up a file server are NFS and Samba.

This post will deal with setting up a file server using NFS on PowerPC.


Initial setup and network management

Besides the MacMini, I also got an external 1TB hard drive that I would be using as shared storage. I chose the 1TB drive mostly for testing. Right now it is fitting my needs, however in the future I do plan upgrading to a 4TB drive.

I installed Jessie on the mini with XFCE as the DE. I am going to run this headless, but I also wanted to be able to remote into the GUI. When I set my lxc containers I used vnc4server for remote access. Now I have found a better tool. Anyone who needs to have remote DE access to a server the tool I now recommend is xrdp. The is pretty easy, all you need to do is install the package,
apt-get install xrdp

The system takes care of the rest. Then all you need is an rdp client. The best one I have seen so far is remmina. Using it is pretty straight forward. The only gotcha I found was that you will need to define your screen resolution or it will not connect.
It is best if the macmini had a static ip in case dhcp give it a new address on reboot. So made a static reservation on my router.


NFS Install

Installing the NFS package is as simple as following,
apt-get install nfs-kernel-server

This will install package and needed dependencies. The system should start NFS upon install, but to verify this run these commands to see if you get the following results,
rican-linux@debian-minippc:~$ ps aux |grep smbd
root 8877 0.0 2.8 40012 14476 ? Ss Jul07 0:10 /usr/sbin/smbd -D
root 8878 0.0 1.5 40020 8028 ? S Jul07 0:01 /usr/sbin/smbd -D
root 15921 0.0 2.6 40332 13388 ? S 22:36 0:00 /usr/sbin/smbd -D
root 15922 0.0 2.6 40332 13388 ? S 22:36 0:00 /usr/sbin/smbd -D
root 15924 0.0 2.7 40484 14084 ? S 22:36 0:00 /usr/sbin/smbd -D
root 15926 0.0 2.6 40528 13768 ? S 22:36 0:00 /usr/sbin/smbd -D
rican-l+ 15949 0.0 0.4 4564 2072 pts/0 S+ 22:43 0:00 grep smbd
rican-linux@debian-minippc:~$ ps aux |grep nmbd
root 8899 0.0 1.0 25728 5432 ? Ss Jul07 0:03 /usr/sbin/nmbd -D
rican-l+ 15952 0.0 0.4 4564 2180 pts/0 S+ 22:43 0:00 grep nmbd

Once you have verified that NFS running, then you will need to edit the /etc/exports file in order to add the directories to share. You should have something like this below,
"/media/rican-linux/My Passport/" ip address(rw,sync,no_subtree_check,no_root_squash)

The first portion defines what directory you are sharing. Then you need define what machine you want to access your share. I have heard you can actually define by an entire subnet, but for some reason that did not work for me. So have a separate entry for each machine I want to access my share via NFS. The portion in parenthesis defines the permissions of the share. You can reference the exports man page for details. Then after you are done with the exports file, you need to reload it by running the following,
exportfs -ra

This should get you ready to set up the client side. This is done by installing the following package,
apt-get istall nfs-common

Once that is installed create a directory to serve as your mount point (I created one in my home directory for convenience). Then as root mount the drive,
mount ip address:path_to_drive mount_point

If successful you should see the following,
rican-linux@debian-ppc:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 71G 25G 43G 37% /
udev 10M 0 10M 0% /dev
tmpfs 404M 12M 393M 3% /run
tmpfs 1010M 72K 1010M 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1010M 0 1010M 0% /sys/fs/cgroup
tmpfs 202M 8.0K 202M 1% /run/user/1000
ip address:/media/rican-linux/My Passport 932G 1.6G 930G 1% /home/rican-linux/macmini-ppc

If you wanted to make this permenant then update the fstab file. If you are wanting more information the Debian Wiki and the Linux Documentation Project sites are good resources to look at.

G5: Nouveau & 2D Acceleration


DISCLAIMER: None of what you'll read below is of my own work, but mostly a summary on what I read about on the Debian PPC mailing list.

I have what I believe is somewhat exciting news for G5 owners in regards to using Nvidia cards and the open source nouveau driver, but more testing needs to be done!  What I'm about to explain and show should hopefully be able to allow you to at least achieve 2D acceleration.

However, before we become too excited, let us take a step back first and examine the situation with nouveau on G5 PowerMacs.  As of today (7/5/2015), I'm the only other known individual who has been able to make this fix work with the other individual being the one who filled us (the Debian PowerPC mailing list) in on how to get it working.  To be clear, I'm using Late 2005 PowerMac (Identifier 11,2) using a Quadro FX4500 Nvidia card.

As already known from my previous post on a fresh install of Jessie on a G5, I had to pass in an extra yaboot parameter (nouveau.noaccel=1) that would disable any acceleration with the Nvidia card using the nouveau driver. This would at least give us G5 owners with an Nvidia card a usable system, although all graphics rendering was happening on the CPU.  Not the most terrible thing in the world when using a dual-core G5, but definitely disappointing knowing how much power the graphics cards have to offer. 

Since the release of Jessie, there have been a handful of threads on the mailing list about issues other users were having when trying to use the nouveau driver.  Many people, myself included, recommended the yaboot parameter fix due to lack of expertise and knowledge of the nouveau driver, graphics programming, and troubleshooting.  Just this past week or so, another Debian user posted a thorough analysis on why the nouveau driver was having issues with the Debian 3.16.0-4 powerpc64 kernel and what could be done as a workaround to overcome the issues and at least achieve 2D acceleration. Notice that I said "workaround" and not "fix."

Basically, it came down to one or two different kernel configurations or both.

1) Right now, only a 4Kb pagesize configuration in the kernel will work with the 64-bit G5 kernel running the nouveau driver. The default pagesize of the included kernel-image (again 3.16.0-4-powerpc64 in Debian Jessie) is 64kb, which as mentioned by the poster improves performance of the driver, but again is not supported on G5 PowerMacs. To check the pagesize in use by your running kernel run the following command in a terminal:

getconf PAGESIZE

This will likely either return 4Kb or 65536Kb. 

2) The kernel configuration might also be set to have the nouveau driver use MSI interrupts.  As quoted by the poster regarding these interrupts:

The newer nouveau drivers in more recent kernels default to using MSI interrupts, however with the PPC G5, when using MSI interrupts, the powerpc FCODE rom on Nvidia cards does not correctly set up the MSI address (or vector).

To verify if you are using MSI interrupts or not, run the following command in a terminal:

cat /proc/interrupts

Look for the nouveau entry and confirm whether it is MSI or MPIC.

What the poster ended up doing was rebuilding a newer 3.18.16 kernel, disabling MSI interrupts as well as adjusting the pagesize in the kernel configuration to 4kb.  Not only that, but he has also posted a copy of this kernel image and headers for G5 owners to download and test on their G5 machines.

So this is a call to all other G5 owners running the latest Debian Jessie release and using an Nvidia graphics card.  Download and install the files linked above and post your results to the Debian PPC mailing list ASAP!  If need be, drop a comment with your results, and I will plug them into the aforementioned thread on the mailing list.  I would recommend downloading and installing this newer kernel image and headers on a brand new Jessie install if possible.

Remember to add in a new kernel configuration in your /etc/yaboot.conf file that links to the newly installed kernel and run sudo ybin -v to wrap it all up. From there, go ahead and reboot to the new kernel and test things out.

I can vouch that the above kernel does allow 2D acceleration now on my G5 PowerMac. Also, as I mentioned in the mailing list thread, I had to load the i2c-powermac module to stop the fans from sounding like a 747 ready for takeoff.  Now that I have 2D acceleration, I can now use xrandr and arandr to set my dual monitors up properly in an extended desktop setup that spans across both of them.  Now if we could only figure out how to achieve 3D hardware acceleration us G5 owners would be set for a little while longer.

Bug reports for these two problematic issues and configurations have been filed here and here.  From the sounds of it, you would not be able to make these two configuration changes work on G5 with the current Debian kernel 3.16.0-4 so do not pull out your hair trying.

I did some browsing around on the nouveau website and found that this G5 PPC pagesize issue is listed as a DRM to-do on this page.  My plan is to touch base with them about it again and see what, if anything, I can do to help. In the meantime, I've been reading up more and more on the nouveau driver and Linux graphics in general, so here is to hoping I'll be able to assist in some small way.  The developers of nouveau have some excellent documentation over at their site so I encourage you to check that out if you would like to also assist in any way.

Also, and lastly, it appears that 4.0+ kernels present all sorts of new issues with nouveau and G5s, but if nothing else, this small bit of information outlined above is hopefully a good sized step in the right direction!  We need to continue to do our duty of reporting any bugs we find regardless of whether anybody who currently is a developer wants to devote any time to them.  It helps just to have that information out there and available.

Best Under the Radar Linux Apps


Now that Jessie's dropped and PowerPC users are more or less working out the kinks, I thought it was time to share some of our favorite under the radar Linux apps that don't get the publicity they deserve. By "under the radar," I mean applications that generally don't get bundled with full desktop environments like Gnome or LXDE. So no VLC, no Evince, no Abiword, no default applications or anything like that. Instead, these are apps you had to hunt down yourself and were rewarded with unexpectedly great features and ease of use.

So here are a few of my favorites:

Qalculate! – This is a calculator app that's as comprehensive as I've seen. Currency exchange, functions of every kind, and graphing are among the many features.

Xournal – Seems to be primarily a handwriting app, but it also features simple PDF editing. This is great for filling out government forms where you only have to enter some text and a signature and you don't want to deal with LibreOffice.

Artha – An offline dictionary, you can also have it running in the background and call it up by highlighting a word and hitting a key-combo. Really comprehensive information, and did I say it was an offline dictionary

Shutter – Zen loves this and so do I. It's a screenshot plus markup utility and uploader. So it's a lot like Skitch.

LMMS – Linux Multimedia Studio, this is actually distributed with some audio production-centered distros, but in my opinion it should be distributed with every distro (like a Garageband for Linux). It's that good, and it's perhaps the best example of open source software, one that's intuitive and fun like classic Mac software used to be.

What are your favorite under the radar Linux apps?

Xorg bug lands in testing


One month and eight days, that is how long it took before an update to Stretch brought in a nasty bug. Here is a little background, back in the early part of the year a lot of people were excited about Ubuntu-MATE announcing plans to support PowerPC. The guys involved in the project did a great job with the distro. A lot of us were testing the 15.04 release while it was in beta. Then an upgrade in beta brought in a lot of trouble.

The main issue was the change to version 1.17 of Xorg. There is a bug in this release that serisouly distorts the colors and graphics of the DE in PowerPC. You can read about it here in the Ubuntu forums. So now it has reached Debian Stretch(testing). I have placed a bug report to Debain (#787965) and also notified the Debian PowerPC mailing list of the issue. The brightside is that it landed early so I am hoping this will give the developers plenty of time to work on it and find a solution.

I will keep you all updated.

UPDATE: It looks like the Xorg bug has been fixed! The latest version (1.17.2-1) has resolved the graphics issue. Good times are back again :) 

Jessie meets BigMac


UPDATE 7/5/2015 - I referenced the improper SMP kernel for G5 machines.  This has been corrected.

UPDATE 2 7/18/2015 - Added section for resolving high RPMs from the G5's fans.

As almost all of us know, Debian's latest stable release, Jessie, went live this past month.  I debated whether I would do an in place upgrade using apt-get or if I would just start from scratch with a fresh new install on my dual-core G5.  The latter option won for a couple of reasons, the biggest being that I wanted to see what worked and didn't work right out of the gate with this latest release.

The install was straightforward and almost identical to the installer for Wheezy with one major noticeable difference. The Jessie installer will give you the option to select your preferred desktop environment you would like installed. Of course, the ability to add in the necessary yaboot parameters for indicating your preferred desktop environment when running the installer have existed previously and still do, but it is a nice change for those not quite as technically minded.  Personally, I prefer LXDE, so I went with that.  If you like to live on the edge, go ahead and select more than one. Otherwise, everything else again, is almost identical.

One other thing to keep in mind if installing this on a G5 PowerMac is that you will want to make sure you are installing the 64-bit version of Jessie as well as installing the SMP (symmetric multi-processor) kernel so that it can take advantage of either your multiple CPUs or cores.  Just to put your mind at ease if you are still unsure, every model of G5 is 64-bit capable. Jessie would run on the non-SMP kernel, but only one core/CPU would be utilized. However, if you just load the installer up with the defaults you shouldn't really even need to worry about these two things.  If you've already installed Jessie and want to make sure you are running the system with both of these features run the following command:
uname -a

You should get something similar to the following with both SMP and ppc64 included in the results:
Linux BigMac 3.16.0-4-powerpc64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) ppc64 GNU/Linux

If for some reason, the SMP kernel was not installed, you can still install and enable it by installing the linux-image-3.16.0-4-powerpc-smp linux-image-3.16.0-4-powerpc64 package along with its headers and other dependencies.  You can substitute the appropriate image version for your system if different from what I have above.

While on the topic of installation, if you are new to Debian/Linux and/or Debian on PPC, I would encourage you to read through the install guide found here. I consider myself very well versed and experienced when it comes to working with Linux, but this guide taught me many things I previously did not know or never really fully understood.   The guide is available in several formats, so feel free to use your preferred choice. There are still many hyper-links I'd like to follow within that guide to further my knowledge and understanding of Debian/Linux and running it on the PPC architecture.

Once the install was complete, I rebooted to the login screen and was greeted with screwy looking and unusable results.  In regards to graphics, keep in mind that I have a flashed nVidia Quadro 4500 FX card so I'm free from the Radeon/KMS madness, but that's not to say noveau has several issues of its own. After just a tiny bit of reading on the PowerPCKnownIssues page, I learned I would likely have to disable hardware acceleration for things to work. By the way, I would definitely check out that page as well regardless as it covers many if not all issues affecting PowerPC users and most of it pertains to Debian installs as well.

So in my yaboot.conf I added the following line after the initrd line of my main Linux image and ran sudo ybin -v afterwards:
append="nouveau.noaccel=1"

I was then able to reboot in a working desktop environment. Despite the lack of 3D acceleration, the software rasterized graphics felt incredibly fluid (especially after installing and running compton) with still plenty of CPU cycles still leftover for a plethora of other tasks. Running glxgears givings me on average only about 116 FPS, which I know the nVidia card could crush if it could be put to use with 3D acceleration.

On the same graphics front, I have not yet been able to enable both of my 20" Apple Cinema displays so right now they are mirroring each other (the default behavior). I went ahead and installed arandr (a GUI-wrapper to xrandr) to try and enable both monitors, but each time I try to apply the changes after positioning the displays in the desired fashion, I'm logged out of my desktop session. So at this point, that aspect is still ongoing project.

Of course, I still had to install the necessary firmware for the G5's Airport card, but info on installing it can be found on the Ubuntu PowerPC FAQ page.  Another piece of hardware that was not working off the bat was sound, but running alsamixer and hitting the 'M' key to un-mute the Master Volume took care of that.  My 5 USB port Sonnet PCI card worked from the get go, but I have not yet tested connectivity with the Sonnet E4i card and G5 Jive, but will post results once I have done so.

Lastly, in regards to any issues up front with installation, a few have reported uncontrollable fans revving up to max RPMs.  If you happen to be one of these unlucky few, run the following command to load the necessary module that controls fan speed.

sudo modprobe i2c-powermac


If that resolves the issue, be sure to add these modules to /etc/modules so it is loaded at startup.

Other than that, I'm still in the process of customization, but for the most part have not ran into anything else unusual or come across any other unknown and unreported bugs.  Overall, apart from the no 3D acceleration, I'm quite impressed and look forward to using it daily on as one my main workhorses. In regards to graphics, I have not lost faith that some day in the future I will once again have 3D acceleration.  I was reading it possible get 3D acceleration back by compiling and installing an updated version of the nouveau driver.  I see that as quite a hill to climb, but at the same time I view this as another opportunity to learn and expand my knowledge of computing.  As has been said here and on many Linux forum posts all over the web, Linux is not for the faint of heart.

Here is a screen shot showing a few running applications. Notice the video I somehow randomly stumbled upon while putting together this post.


If you have a G5 you've recently installed Jessie on, feel free to share your experiences, bugs, or fixes in the comments below. If I discover anything else that could be useful or helpful when doing an install on a G5 I'll update this post unless the fix and/or info warrants an individual post.  Also, just know I'd be glad to help anybody who runs into any other issues with Jessie on their G5.

Oh Radeon..to patch or not to patch


As it has been well documented if you are using a radeon video card while running Linux on your PowerPC then you are in for a few hurdles. Things now are a lot more complicated with the changes from Wheezy to Jessie. In the past you really did not need KMS or accelerated hardware graphics to have a good, working, stable machine. Now with Jessie you at the least need KMS enabled if you want to have a usable desktop. If you are running a G4 following the boot parameters I laid out previously should get you going. However if you running a G3, Dan has a great walk through over here. Now that you have KMS enabled the next question is do you want accelerated graphics. It may not be important to most but there are some open source games in repositories that you can still play as long as you have 3D graphics enabled. You could set your default depth to 16 in xorg.conf, or you can install an already patched mesa package, or you could be more adventurous and try to patch the source and recompile yourself. I chose to patch and recompile the source. I wanted to see if I could do it and also I did not want to wait on others to produce a new patch version every time there is a new version on mesa. There are no plans to produce a final fix for this on PowerPC anytime soon. The current patch available is not suitable for final inclusion into upstream but it does get 3D working. So here is what you do.

First there are two resources you should read closely to understand patching and compiling deb build in Debian. The first is a great walk though on building packages which can be found in the Debian Forums. The second is a tutorial on apply patches in Linux, which can be found here. The next thing to obtain the patch files. These files can be found here. Jessie uses mesa version 10.3.2, which requires an additional patch to prevent the build from crashing during compile time. Now you will need to install the following packages that will allow you to compile into .deb packages:

sudo apt-get install build-essential fakeroot devscripts

The next step is to install the dependencies needed to build mesa and the source code of mesa itself. This is done by running the following commands (note from the install of the build dependencies till the time the .deb file are to be installed all the commands need to be done as regular user and not root):

sudo apt-get build-dep mesa
apt-get source mesa

Now to proceed to applying the patches. The patch file 08_packed_RGB_formats.diff patches the following, dri_drawable.c and dri2.c. You will need to be in the directory where the files to be patch are located. See below:

cd mesa-10.4.2/src/gallium/state_trackers/dri/
patch -p6 --dry-run < ~/Public/08_packed_RGB_formats.diff
checking file dri_drawable.c
checking file dri2.c
Hunk #1 succeeded at 163 (offset 34 lines).
Hunk #2 succeeded at 289 (offset -114 lines).
Hunk #3 succeeded at 699 (offset 150 lines).
Hunk #4 succeeded at 820 (offset 150 lines).


patch -p6 < ~/Public/08_packed_RGB_formats.diff
patching file dri_drawable.c
patching file dri2.c
Hunk #1 succeeded at 163 (offset 34 lines).
Hunk #2 succeeded at 289 (offset -114 lines).
Hunk #3 succeeded at 699 (offset 150 lines).
Hunk #4 succeeded at 820 (offset 150 lines).

The first time I ran the patch command I used the --dry-run option. This verifies the patch is good before actually applying it. This is a good habit to get into since messing up patch means deleting the source code and starting over. If you do not get the output shown above and instead are asked for the location of the file needing then patch, then this usually means you have the incorrect -p option. Please read the tutorial linked about for more detail on how to properly use it. The next patch file 09_r300g_big_endian_fixes.diff patches the following, r300_blit.c, r300_texture,c, r300_texture.h, r300_transfer.c, r300_context.h, r300_state.c, r300_state_dervied.c. This is how I applied this patch:

patch -p5 --dry-run < ~/Public/09_r300g_big_endian_fixes.diff
checking file r300_blit.c
checking file r300_context.h
checking file r300_state.c
Hunk #4 succeeded at 1659 (offset -7 lines).
Hunk #5 succeeded at 1675 (offset -7 lines).
checking file r300_state_derived.c
checking file r300_texture.c
checking file r300_texture.h
checking file r300_transfer.c


patch -p5 < ~/Public/09_r300g_big_endian_fixes.diff
patching file r300_blit.c
patching file r300_context.h
patching file r300_state.c
Hunk #4 succeeded at 1659 (offset -7 lines).
Hunk #5 succeeded at 1675 (offset -7 lines).
patching file r300_state_derived.c
patching file r300_texture.c
patching file r300_texture.h
patching file r300_transfer.c

If you are running Jessie then you are using mesa 10.3.2 with requires an additional patch to keep the compiler from crashing during build. Below are the commands:

cd mesa-10.3.2/src/mesa/main
patch -p4 --dry-run < ~/Public/dbc2d81d2ba12354876eb67c79e8a71e57e97f3c..cfeb394224f2daeb2139cf4ec489a4dd8297a44d.patch
patch -p4 < ~/Public/dbc2d81d2ba12354876eb67c79e8a71e57e97f3c..cfeb394224f2daeb2139cf4ec489a4dd8297a44d.patch

Now that the patches are applied the next was to change the version number of mesa to preserve the upgrade path. Since the current version of mesa for Stretch is 10.4.2-2, this how I changed it:

debchange -b -v 10.4.2-2a~patch1

The takes you to the changelog in a nano session. There edit the log if you want then save and exit. Now you are ready to compile your .deb packages! Just run the following:

dpkg-buildpackage -rfakeroot -us -uc

This will take a few hours to complete. So go have a drink and watch a movie while the packages are building. Then when it is completed you will see in the directory above all the .deb files. The build make the install, dev, and debug packages. I normal move them to a separate directory then segregate them into separate folders. So I then just install the packages like this:

sudo dpkg -i *.deb

Finally reboot and test! You should run the command LIBGL_DEBUG=verbose glxinfo |grep render and see this output "OpenGL renderer string: Gallium 0.4 on ATI RV350". If you do then congrats you just successfully installed a patch!

UPDATE I: It looks like starting with Mesa 10.5.5 the patches above are starting to fail. I am seeing this on Stretch. This should be expected since these patches are just really 'workarounds' and were never going to implemented upstream. You could still set the DefaultDisplay to 16 in xorg.conf to get 3D if you run into this.

These are exciting times


The title says it all friends. We are living in very exciting times.

The first reason for my excitement is the wildly talented team I have the honor and pleasure to work with. We truly have a phenomenal team of writers here. I have learned and am learning so much from all of you.

My second reason for excitement is that Jessie has gone stable (I know I'm late to the party) and has presented some challenges. Sure, installing wheezy and having sound just work on my PowerBook was nice. Challenges are good, they are opportunities to learn. They make you a better power user or driver. If you are never challenged you do not grow. I have also learned that, in the face of a challenge, things are rarely hopeless. The PowerBook sound issue is no exception. I have been given two patches to test on my PowerBook. At the time of writing this I do not know how to patch or compile a kernel. That's whats exciting, I get to learn how. In addition to learning some new skills, I get to actually help in the development process.

I know this post is rather abstract, I just wanted to drop in and share my excitement. Now I'm off to go dive into manuals and or Google.

Debian Testing for my iBook G4


I was thinking about which OS to install on iBook yesterday. I just got over a pretty frustrating experience in that department and was looking for something not too easy but more enjoyable. So Jessie is now stable and since my iBook is my "testing" machine why not install Stretch on it? The freeze is probably lifted for testing so I want to see how long I can ride before my sudo apt-get update && sudo apt-get upgrade results in me getting hit with a serious bug. This is what a "testing" machine is for right? ;-) So I went and got the netinst iso from Debian and began the install. When the cd boots it asks how you want to install and I chose the options install desktop=xfce. I really like XFCE, it is not as lightweight as LXDE but it has some more features that I prefer on my DE. The rest is pretty much what you would expect on a Debian install. It just worked. Once your system reboots remember you need to enable KMS if you have any desire for a good DE experience. I use the following setting on my iBook:

Linux radeon.modeset=1 video=offb:off video=1024x768-32 video=radeonfb:off radeon.agpmode=-1

Then when your login to the desktop you will need to make the changes permanent. Sudo does not come installed you can su to root and install it or you could just run nano -w /etc/yaboot.conf as root and add those parameters like below:

image=/boot/vmlinux
label=Linux
read-only
initrd=/boot/initrd.img
append="quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32 radeon.agpmode=-1"

image=/boot/vmlinux.old
label=old
read-only
initrd=/boot/initrd.img.old
append="quiet splash radeon.modeset=1 video=radeonfb:off video=offb:off video=1024x768-32 radeon.agpmode=-1"

If you want to find out what screen resolution you need to set for your machine it can be fount at the everymac website. Remember to run this command after you finish editing to apply your changes sudo ybin -v. Setting up wireless was pretty straight forward. You will need to add contrib and non-free to the /etc/apt/sources.list file and run sudo apt-get update. Since I have Broadcom BCM4318 chip I just need to install the firmware-b43-installer package and reload the b43 module. On G4 iBooks and PowerBooks to get sound to work you will need to manually load the snd-aoa-i2sbus module and add it to the /etc/modules file. Then run the command alsamixer to set the PCM channel to 80. You need to install the pauvcontrol package as well. I also added the pmu_battery module so I can have a working battery indicator. This basically what I did to get a working system. The only issue I ran across was the xfdesktop4 service was consuming 100% cpu when I would right click on the desktop. There was already a related bug that I added my comments. I spent the rest of the evening theming my desktop. I am huge fan of Numix themes and icons so below are some screenshots. BTW does anyone want to take a guess as to how long I can ride in testing before an upgrade really hurts me?


Hello from Texas!


Thanks zen for the intro. Here is a brief summary about me and how I got here.

I am a network engineer in the Dallas/Ft. Worth area. I have been doing networking since about 2008 mostly on Cisco routers, switches, and firewall appliances. I have ventured to other network/security platforms since my start. I administer Big-IP F5 appliances, Check Point and  Juniper firewalls. I really love being a network engineer. I find the whole field fascinating.

I really got into working with PowerPC just because I wanted to get PowerBook G4 working again. It was my first computer I bought in 2006. I just loved it, then Apple moved on to Intel and you saw support for it just go away. I bought a MacBook Pro in 2009 but I never could get rid of my PowerBook. So fast forward to 2014, I pulled it out again and decided to try to see what could I use it for. Leopard was unsupported so I wanted a modern OS hence Linux. I got Xubuntu installed and working pretty easy, but there were still some issues I was working through. The biggest was video playback. Then someone on the Ubuntu forms recommended Dan's site PPC Luddite. I was blown away with what I found there. Talk about a wealth of information! Then I discovered that there was a whole community of people out there keeping this platform (which contrary to Apple is NOT dead) going. Through Dan I found PowerPC Liberation where I came accross Zen's post,  "Claim your computing freedom". It is probably one of my favorite posts on what Linux offers, freedom on your computer! So this is where how I got to where I am on PowerPC.

My blog  covers my exploring other distros and how they work on PowerPC. I do not really consider myself an expert, I like to say I am an adventurous noob :-) So far I have dealt with Debian, the Ubuntu flavors, and just recently Gentoo. I plan to cover OpenSUSE and the BSDs as well in the future. I will also eventually cover networking and security related issues as well since that what I mostly do at my job.

My main machine was a PowerBook G4 1.67Ghz running Debian, but it just died this morning. So time to look for another. I have an iBook G4 that i use for testing and a PowerMac G4 that needs some work to get going, I hoping in time to get a G5 and possibly a mac mini to add to my collection.

I am looking forward to contributing and learning from everyone here.

Yet another author, and a new view on images


As I have said before...  we will always be adding new authors here.  The author of IT musings on Linux, PowerPC, Networking, and Security, rican-linux, is the latest to join the fold, so please help me welcome him.

He is a Network Engineer, and has been a very fast learner with Linux.  Seems like the type that just gets Linux from the start.  He recently successfully installed Gentoo on his iBook, which if you've tried that you know is no small feat.


A note to all authors about the image policy here

For the entire life of this blog I have kept a no embedded images or video policy for all the authors.  After some time and reflection I have realized that this may hold you back to some degree; in regard to expressing something fully without being limited to text only.  We are largely visual creatures after all.

The goal was to keep the blog as light to load as possible for older systems, but a few screens can't hurt anyone.  So to all the authors - you now have total image freedom in your posts.  Share your screens, window grabs, whatever.

Feel free to embed video also, but just don't go crazy.

I wanted to address this publicly because several readers have asked why we never show screens directly in posts, but now we will.

Debian Jessie becomes the new stable


Yesterday (Apr. 25), Debian released Jessie (version 8) as the new stable edition of their Linux OS.  I have yet to try it as a stable release, but plan on installing soon.

Being that this is a Linux-heavy blog, you can expect a lot of new content about the Jessie stable release from our authors here - when we have time of course - so keep checking back in to catch it.  Once I give it a thorough once over, I will be sure to share my thoughts on it.

For now - try it and share any findings.

By the way...  the new testing release is named "Stretch".  I wonder if that name has a deeper meaning?  As in to really "stretch" the time it spends in testing.

When You Need to Memtest Your RAM


My Powerbook recently suffered a mild health crisis. It started when I woke it from sleep one morning and it immediately gave me a kernel panic. I rebooted and got another immediate kernel panic, at which point I sighed and thought, "Here we go..." I actually thought I fixed the problem by reseating the RAM, since the kernel panic plastered a bunch of helpful text across my screen saying something about "illegal memory instruction." But alas it was only a short-lived fix as the kernel panics returned soon after.

It turned out the lower RAM slot was dying, and in fact it finally died permanently later that day and now the Powerbook was only reading 512 MB of memory (the upper slot). Dead lower memory slots were a common problem in aluminum Powerbooks, though Apple's AppleCare extension program for this model is long past. I could either re-solder the slot joints back in place or replace the entire logic board. Since I don't have soldering skills handy, replacing the logic board it was!

Fortunately I have a spare, identical Powerbook for just such an occasion. For awhile, I've wanted to take apart both Powerbooks and combine the best parts from each, so events provided the impetus. After much surgery (basically moving the hard drive, trackpad case, and LCD display to the spare which had a good bottom case and logic board), the patient came out more-or-less intact. I used these iFixIt tutorials, which I can't recommend enough. If any of you want to do something like this, let me offer a tip. When following the tutorials, always refer back to each step one-by-one, even if you've done it a few times before and think you have the hang of it. Because eventually you'll overlook a step and wonder why the trackpad case won't pull off the left side even though you're bending it out of shape and then you realize you forgot to take that side's screws out. Now, I didn't do this myself, of course. That would make me the stupidest person on the planet. I'm merely writing to enlighten you, dear reader.

Unfortunately this wasn't the end of my adventures. I also ordered a pair of one gig RAM DIMMs to max out my memory. I'm starting a family photo scanning project and I'll be working with some very large picture files. So naturally I installed the new RAM and got a kernel panic. Then I rebooted and the System Profiler's diagnostics showed the bottom slot failed and was only reading 512 MB. At this point I'm thinking this isn't my lucky week. After reseating the RAM, everything seemed to work until more kernel panics returned. At this point it was finally time to test the RAM (when Darth Vader targets me in his cross hairs, he says, "The ennui is strong in this one.").

To test, you need a unix program called memtest. An installer is available for download at Command-Tab, which installs the executable into your /usr/local/bin. Version 4.22 supports both PowerPC and Intel. Once you have it, you can reboot into single user mode (command-s at the chime) and run the command "memtest all 2". Over the next couple of hours you'll see either a bunch of "ok"s or a bunch of failures. I saw failures. The good news is the seller agreed to give me a refund almost instantly after I sent a request.

Memtest is also bundled with Applejack, another troubleshooting utility that runs in single user mode. I saw other sites trying to sell memtest for a fee, but it's freeware so I don't know what that's about.

I'll try my luck with new RAM again, but right now I'm glad to have two functioning slots even if they're housing my old 512 MB DIMMs. Finally on the subject of scanning, check out these posts at Quadras, Cubes, and G5s about digital photography and scanning on a 7300. Very interesting.

Aloha from South Dakota


Thanks to everyone for the warm welcome and the kind introduction from Zen! I really do appreciate it. I'll likely keep this post short and sweet.

A little about myself.  My full-time job is as a network administrator, but I also manage the IT infrastructure of another growing company part-time.  My real passion is with programming, but I leave myself too little time to do it unfortunately.  Using PPC hardware has helped keep that passion alive and strong though.  Other than that, I love virtualization technologies and spend a lot of time learning the ins and outs of them.  I still consider myself very new to PowerPC hardware, so if anything is ever out of line or incorrect, don't be afraid to correct me.  I consider it a valuable part of my learning experience.

When writing for my blog, PowerofPowerPC, I try incredibly hard to stick mostly to the facts and I plan on doing the same here. I'll be focused mostly on G5 content as other hardware is already covered by the other writers. This works out well as I have not done anything G5 related on my own blog up to this point. There, I mostly stick with older PPC portables and G4 desktops and that will likely not change anytime soon.

I currently own 3 G5 Power Macs, all of which have been freely donated to me through various means.  If it wasn't so incredibly expensive to ship these heavy beasts, I'd be more than willing to donate the other two to individuals who would put them to every day use.

My daily G5 is a 2.3 GHz dual core running with 16 GB of RAM.  You can read more about this machine's specs on the hardware page. The machine's hostname is appropriately set to (in my opinion) BigMac.

If you have any post ideas, topics, or issues related to the G5 Power Mac we could try to work through together, please let me or one of the other writers know. I'm looking forward to further expanding and sharing my knowledge of both PPC hardware and software.

The Humble Luddite


Dan DeVoto is the greatest thing that ever happened to the post-Apple PowerPC user base, and this post will explain why - both to Dan and the readers who may not understand the full extent of how committed, selfless, inclusive and balanced this guy is.  Because Dan is so humble, I want to apologize to him up front if this causes any embarrassment, but the people need to know the true extent of your greatness.

Firstly, the obvious...  he writes for two PowerPC blogs and is a science fiction author on top of that.  I mean...  come on; it's as if he's the chosen one.  Since PowerPC hardware goes to space in real life it's only fitting.  In my personal opinion, PPC Luddite is the greatest PowerPC resource out there.  Why?  Because he never has an agenda, is inclusive with all users (even the fanboys), and he's just an all-round gentlemanly good guy.  Most importantly though, is that he is beyond competent in experience and foresight.  The thing is, I don't think he has any clue about all this, which makes him even more likable.

I offered to buy him a G5...  he politely declined.  I offered to give him more RAM for his Sawtooth..  he again politely declined.  If that doesn't show commitment to the cause of helping PowerPC users, I don't know what does.  He has no interest in free things or accolades - only helping people and writing about his love of PowerPC.

Many in the remaining PowerPC user base might think of Cameron Kaiser as the greatest thing that ever happened to our old Macs, and while I acknowledge his contribution with respect, he doesn't touch Dan DeVoto's vast, dynamic and all-encompassing arsenal of assistance to users.

Anyway Dan, I've embarrassed you enough, but I have been left with a big void of not being able to give back to you, and this was the only way I could think of.  To tell the entire PowerPC community that you are the the greatest resource we have.

New author arrives, and a shout-out to Michigan


B-rock, the author of Power of PowerPC, has joined the PowerPC Liberation author team, so please help me welcome him.  As a G4 and G5 user, he will be able to provide both a similar and unique perspective compared to the preexisting G3/G4 authors here.

He's a computer science grad and has a big passion for Linux, software development, and PowerPC of course.  I don't mean to sound cocky...  but this is now the most well-armed PowerPC blog out there author-wise.  It will only grow from here.  Remember - PowerPC is only dead at Apple.  We shall live on as long as there are users to write for.


Lastly, I want to give a friendly hello to the people of the US state of Michigan.  Not only are Americans the largest audience here, but the state of Michigan is responsible for at least 20-30% of all hits from the USA.  There are at least 100 there who are regular visitors here, and from every corner of the state.  So to the people of Michigan I say thanks for the loyalty and sheer number of you still interested in PowerPC.  They must put something PowerPC-friendly in the water there.

Are you a driver or a passenger?


There are really only two types of computer users in the world, and some good analogies to explain these two types are drivers and passengers.  Some insist on driving their hardware, while others are content to just be along for the ride.  This post is made with the intent of helping us all understand how and why we individually ended up being one or the other, or maybe you share some traits with both.  Think of this post as a computer culture research venture, but one that will also have a strong intent to inspire others by sharing personal stories.


My definition of the two types:


Drivers

These are people who aren't content with the Apple and Microsoft abilities/limitations, and desire more control and capability from their hardware.  These are people who don't settle for what the mainstream industry spoon-feeds them, and demand more from themselves and the people they share knowledge and helpfulness with.  People who refuse to stagnate or devolve their computing education and journey as they continue computing throughout their life.


Passengers

People who are content with pretty much any solution that just works, regardless of limitations.  They will happily sacrifice ability and skill evolution by always choosing the path of least effort.  Many of them also like to encourage others not to bother evolving; without realizing that no one needs help to not learn something.  Basically...  people who don't like to combine computing with too much thinking.  This is not to say they are dumb - certainly not - but rather that they have been conditioned to believe the two (computing and genuine thinking) don't go together.



What I need from you:

I want to know which you consider yourself to be and why, along with a brief history of how you arrived there.  This will also help guide us here to a better understanding of what type of new content to write in the future.  I personally have not made a truly meaty post in a while, and would like to have a better understanding concerning the current state of the audience here.


My (zen's) story:

I consider myself a driver, and I arrived there naturally by UNIX/BSD being the first OS I ever used, and continue using today, both personally and professionally. I started in the mid-80's on UNIX and didn't use another OS (full-time) until the early 90's.  So I started as a driver and stayed that way.


Please share your user type and story in comments.  I look forward to reading them.