For the love of Mutt!


I have been trying to see how much I can get done just using the terminal. I have my Debian partition on my PowerBook G4 running Awesome. It is a very lightweight tiling window manager. It does take some practice getting use to but once you have it set up, navigating around is not hard. One tool that I have just come to love is the mutt email client.

I have found very few lightwieght email clients that are really good. Slypheed comes the closest at least in my experience. Thunderbird can be really resource intensive, especially if you are processing a lot of email. This is where the power of mutt comes in. It is simply fast. I can read, reply, delete, and save messages much faster than a gui mail client. This means less of a load on my PowerBook. It also has gpg support so you can sign and encrypt your messages if needed. It really customizable, all your setting are on a config file. What I would like to do is give a walk through on how I have mutt configured and suggest some additional plugins that will enhance the experience.

Install

If you do not have mutt installed in your system it is fairly simple.

apt-get install mutt mutt-patched

Set up and Configure

The package mutt will install the base application. The package mutt-patched install an add-on that allows you to have a sidebar for your folders. Once these install you will want to create a directory named .mutt. Here is where you will store your config files and directories. You can do most of this in one command.
mkdir -pv .mutt/{cache,certificates}

If you look in the /usr/share/doc/mutt/examples directory you will see some sample configuration files. The only one you really need to copy to .mutt/ is the gpg.rc file.

Now it is time to make our muttrc configuration file. I will be working under the assumption that gmail will be where the email is hosted.

The first thing you will want to do set up your credentials for imap and smtp. The imap credentials is what pulls down your emails and folders, whereas the smtp account allows mail to be sent through your provider's email system. Below is an example.

set realname = 'your name'
set from = 'your email'
set use_from = 'yes'
set envelope_from ='yes'
set imap_user = 'your gmail account'
set imap_pass = 'password'
set editor = vim
#smtp
set smtp_url = 'smtp://your email account'
set smtp_pass = 'your password'
set ssl_starttls = yes
set ssl_force_tls = yes

I would strongly recommend that if you are using gmail to enable 2-step authentication and application specific passwords. The next thing you might want to do is define your remote folders specifically you inbox, drafts, and trash.

# Folders
# REMOTE GMAIL FOLDERS
set folder = 'imaps://imap.gmail.com:993'
set spoolfile = '+INBOX'
set postponed ='+[Gmail]/Drafts'
set trash = '+[Gmail]/Trash'

When you want to save a draft in mutt, it will ask if you want to postpone it. Mutt will then save to where you defined in the code above. Also it would be a good idea to define local cache as well. Below is an example.

# Local cache
set header_cache =~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates

The next part is opitional and only needed if you want the sidebar and installed the mutt-patched package. If you did not you can still access your gmail folders by hitting 'c' then '?'. Below is what you will need to have the sidebar.

# Mailboxes to show in the sidebar.
mailboxes ="INBOX" ='[Gmail]/Drafts' ='[Gmail]/Sent Mail' ='label'
# Sidebar Patch --------------------------------------
set sidebar_delim = '│'
set sidebar_visible = yes
#set sidebar_width = 24
set sidebar_shortpath = yes
#Shortcuts
bind index CP sidebar-prev
bind index CN sidebar-next
bind index CO sidebar-open
macro index b 'toggle sidebar_visible'
macro pager b 'toggle sidebar_visible'
bind index B bounce-message

The first section defines the folders that will go into the sidebar, which gmail calls labels. Sublabels can also be added by using ='label/sublabel'. The second portion defines the look of the sidebar and the last portion defines the navigation shortcuts. Finally to enable gpg support do the following.

# GNUPG Config
source /home/user/.mutt/gpg.rc
set pgp_autosign = yes
# set pgp_replysignencrypt = yes
# set pgp_veryfy_sig = yes
set pgp_sign_as = gpg pub key

This will give a basic mutt interface with sidebar and gpg enabled. Now I want to share two addons that will really help enhance your experience in mutt.

goobook

Goobook is a simple utility that allows you to manage you gmail contacts from inside mutt. When it is time to compose a message just hit tab in the 'to:' field or just the begining of the name you want and hit tab. Goobook will present you a list of email addresses to choose from. The install of the package is pretty simple.

apt-get install goobook

Then create a .goobookrc file and add the following.

[default]
email: gmail account
password: password

Then run the command goobook authenticate to have gmail verify the tool has rights to manage you contacts. After you have authorized goobook then add the following to the muttrc file.

# Address book using goobook
set query_command="goobook query %s"
macro index,pager a "goobook add" "add sender to google contacts"
bind editor complete-query

urlview

This tool gives you the ability to open urls in messages with an external browser (ie luakit or w3m). The install is the same as the others.

apt-get install urlview

The config file is .urlview. Below is my setup.

#
# Sample urlview(1) configuration file
#

# regular expression to use to match URLs
REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^ .,;\t\n\r<">\):]

# command to invoke for selected URL
# COMMAND /etc/urlview/url_handler.sh
COMMAND luakit %s

# set to yes to enable menu wrapping
#WRAP Yes

The key portion is here COMMAND luakit %s. Luakit can be replaced with any browser desired. Finally just add the following section to the muttrc file.

# View URLs inside Mutt
macro index \cb "|urlview\n"
macro pager \cb "|urlview\n"

When a message is opened hit CTRL+b and you will be given a list of urls to open. Just select one and the browser will open.

I hope this tutorial is helpful. I have my entire muttrc file hosted on github if anyone wants to see what I have set up. If you are for looking a fast flexable email client that will not slow down your PowerPC machine then I would seriously consider giving mutt a try.

Looming on the horizon


This is likely at least 3-4 years away, but h.264 is on its way out, now that h.265 (HEVC) has been adopted by more and more people.  Just as XviD was dropped by most in 2012, the same fate is inevitable for h.264 within a few years.


There are two key issues that keep h.265 off PowerPC:

1. Playback - there are currently no available playback applications capable of playing the h.265 codec that would work on Mac OS PowerPC.  VLC started supporting it in version 2.1.12, but this is irrelevant, since most h.265 is 2160p, and out of the range of even a quad G5.  There is some 720p h.265 floating around that a quad could likely play if there was a playback option.

2. Encoding - and this is the bigger need, as there are also no Mac OS PowerPC encoding software capable of reading h.265 to transcode it to something else.  Since most PowerPC hardware wouldn't be able to play most h.265 anyway, the best need to fill for us is to get an encoding app on PowerPC that can transcode h.265 to h.264 or XviD/DivX.


So we need a Mac developer to port a newer version of Handbrake (or any other equally capable encoder) to Tiger and Leopard PowerPC.

There is no point in wasting time on a player, as I already mentioned, since 90% of these files will not play on even a quad G5.

Even a Linux solution would work, but one for Mac OS would be a much broader brush stroke. 

I wanted to bring this up long before it became a dire need.

Thoughts?

CorePlayer details


I have received numerous questions regarding the method of the CorePlayer crack. Now I would like to briefly describe the process.

PPC Reverse engineering on Mac OS can be an easy process if we know how to do it. There are several debugging and disassembler tools available for Mac OS that can be used for such purposes.  In this case I only used OTX v.16b disassembler and a simple hex editor 0xEd.

For me the easiest way is to look into the code itself produced by OTX. It is a simple GUI application and produces a text file of the application that we want to disassemble. The CorePlayer binary itself is only 5 MB but the text output produced by OTX is nearly 21 MB.

A part of the output looks like this:

  +188    0006e23c  409e0064    bne         cr7,0x6e2a0
  +192    0006e240  813f0000    lwz         r9,0x0(r31)
  +196    0006e244  a161003e    lhz         r11,0x3e(r1)
  +200    0006e248  80490000    lwz         r2,0x0(r9)
  +204    0006e24c  a0020074    lhz         r0,0x74(r2)
  +208    0006e250  7f8b0000    cmpw     cr7,r11,r0
  +212    0006e254  40be004c    bne+         cr7,0x6e2a0
  +216    0006e258  a0010040    lhz         r0,0x40(r1)
  +220    0006e25c  2f800001     cmpwi     cr7,r0,0x1
  +224    0006e260  40be0040    bne+         cr7,0x6e2a0
  +228    0006e264  80010044    lwz         r0,0x44(r1)
  +232    0006e268  80410038    lwz         r2,0x38(r1)
  +236    0006e26c  7f801000     cmpw     cr7,r0,r2
  +240    0006e270  419e0030    beq         cr7,0x6e2a0
  +244    0006e274  a0010042    lhz         r0,0x42(r1)
  +248    0006e278  805f00dc     lwz         r2,0xdc(r31)
  +252    0006e27c  5409073e    rlwinm     r9,r0,0,28,31
  +256    0006e280  7f824800    cmpw     cr7,r2,r9
  +260    0006e284  419e0034    beq         cr7,0x6e2b8
  +264    0006e288  3802ffff       addi         r0,r2,0xffff
  +268    0006e28c  2b800002    cmplwi     cr7,r0,0x2
  +272    0006e290  419d0010    bgt         cr7,0x6e2a0
  +276    0006e294  3809ffff       addi         r0,r9,0xffff
  +280    0006e298  2b800002    cmplwi     cr7,r0,0x2

Each line is one operation in the code. I do not want to go into details now of assembly coding. There are dozens of good sites dealing with programming.

So a very plain explanation of a line:

+240        0006e270  419e0030    beq         cr7,0x6e2a0

+240                               reference line number within a program block
0006e270                        overall line number
419e0030                        machine hex code
beq    cr7,0x6e2a0          assembly code


The registration of CorePlayer is linked to the unique Mac serial number of a particular machine where the player is installed. 

In the output of OTX we have to find the appropriate places where the software checks the registration status and decides whether it will run or not. CorePlayer uses a 3 level verification process:

1. is there a valid serial number entered and stored in the Users/user/.CorePlayer/config.xml file,
2. is there a valid user based on the Mac serial number and CorePlayer serial number to run the program and start the GUI,
3. is there a valid user based on the Mac serial number and CorePlayer serial number to start video playback.

As I had the valid CorePlayer serial numbers from the start I only had to find the places in the code where the Mac and CorePlayer serial number checks were executed. This is the hardest part but if someone has some experience in assembly language then it is relatively easy to find these places in the code. In this case for me the starting point was the place where the registration dialog is called:

 +1176    000139b0  7f801000    cmpw     cr7,r0,r2
 +1180    000139b4  409e0030    bne         cr7,0x139e4
 +1184    000139b8  a001005a    lhz         r0,0x5a(r1)
 +1188    000139bc  805d00dc    lwz         r2,0xdc(r29)
 +1192    000139c0  5409073e    rlwinm     r9,r0,0,28,31
 +1196    000139c4  7f824800    cmpw     cr7,r2,r9
 +1200    000139c8  419e00c0    beq         cr7,0x13a88
 +1204    000139cc  3802ffff       addi     r0,r2,0xffff
 +1208    000139d0  2b800002    cmplwi     cr7,r0,0x2
 +1212    000139d4  419d0010    bgt         cr7,0x139e4
 +1216    000139d8  3809ffff       addi     r0,r9,0xffff
 +1220    000139dc  2b800002    cmplwi     cr7,r0,0x2
 +1224    000139e0  409d00a8    ble         cr7,0x13a88
 +1228    000139e4  807e0044    lwz         r3,0x44(r30)
 +1232    000139e8  3ca05549    lis         r5,0x5549
 +1236    000139ec  3c80001f     lis         r4,0x1f
 +1240    000139f0  38c00000     li         r6,0x0
 +1244    000139f4  38845f94     addi     r4,r4,0x5f94      serialdialog
 +1248    000139f8  60a54744     ori         r5,r5,0x4744      'UIGD'
 +1252    000139fc  481556e5     bl         0x1690e0
 +1256    00013a00  7c7f1b79     or.         r31,r3,r3
 +1260    00013a04  4082001c    bne         0x13a20
 +1264    00013a08  48000068    b         0x13a70
 +1268    00013a0c  7fc3f378      or         r3,r30,r30
 +1272    00013a10  38800000    li         r4,0x0
 +1276    00013a14  38a0020c    li         r5,0x20c
 +1280    00013a18  4bfff879      bl         0x13290
 +1284    00013a1c  4800006c    b         0x13a88
 +1288    00013a20  3c400001    lis         r2,0x1
 +1292    00013a24  93c10058    stw         r30,0x58(r1)
 +1296    00013a28  38800217    li         r4,0x217
 +1300    00013a2c  38a10054    addi     r5,r1,0x54
 +1304    00013a30  38423290    addi     r2,r2,0x3290

If we do not want to call the registration dialog then we have to tell the program to jump over the registration call. So the actual place that we have to alter is before the dialog call:

+1180    000139b4  409e0030    bne         cr7,0x139e4

I have found 6 places where these or very similar verifications were executed and called. The basic pattern of the code looks like this:

  +240    0006e270  409e0030    bne         cr7,0x6e2a0
  +244    0006e274  a0010042    lhz         r0,0x42(r1)
  +248    0006e278  805f00dc     lwz         r2,0xdc(r31)
  +252    0006e27c  5409073e    rlwinm     r9,r0,0,28,31
  +256    0006e280  7f824800    cmpw     cr7,r2,r9

The easiest way is to alter the program flow and negate the relevant operations. In this way it skips the appropriate parts and will accept any Mac serial numbers and a valid CorePlayer serial number. In order to negate the operation we have to change the  line:

0006e270 409e0030        bne         cr7,0x6e2a0

into

0006e270 419e0030        beq         cr7,0x6e2a0


We have to use the hex editor to change the code at 6 different places in the binary and save the altered code. After this entering a valid serial will produce a fully working CorePlayer.

If someone wants to dive deeply into this topic I would recommend starting with this site: https://reverse.put.as/

CorePlayer file association icons


Now that CorePlayer has been in the wild for a few weeks, I'm sure you have noticed that its file association icon is the default blank one, which has no personality at all.

Well, an app this efficient deserves to have better than a blank file association icon, and thanks to Adam Albrec, the maker of PPC Media Center, it now has two custom icons.



 


   




Here is the readme file contents, for your convenience.  You need the first icon .dmg for the .plist file, even if only using the second.  If only interested in the first one, then you don't need the second.

Copy the cpDocument.icns file to the Resources folder within the CorePlayer package contents.

Then copy the new Info.plist to the Contents folder within CorePlayer.

Next copy CorePlayer to a new location and then back to re-initialize it.

When you restart, or relaunch Finder, all documents assigned to use CorePlayer will now have the custom icon.

If you wish to make your own icon, feel free and just give it the same file name as above and install as directed.


Feel free to leave any comments for Adam here.

Thanks again, Adam!

New admin


In the spirit of this blog always growing and staying around, I have decided we needed another admin here, and Mark (fiftysixk) is the natural choice as the longest member of the team after me, and the guy works for freaking NASA.  Do I really need to say more?  I didn't think so...

Life is a delicate thing, and if anything ever happened to me I want another admin around to take care of the place.  Mark is that guy.

Mark is at the exact same level of power and control that I am, and by Blogger's guidelines and rules, this also makes him a part-owner of the blog now.  He deserves it for his dedication.

So please join me in welcoming the new admin to his new role here.

CorePlayer and the guy who proved me wrong, so I asked him to join us


As I'm sure many of you know already, CorePlayer was cracked by a man named Lotvai, and after me claiming this was "impossible".  You see...  I was basing this on the basis of code, and how it is virtually impossible to truly alter closed software.  This, added with the fact that I'm certainly no Mac developer, and never have been, caused me to make a judgement on fundamental fact, rather than outside the box thinking.

I was wrong... period, and I own that.  I am a BSD coder, always have been, and have never had enough motivation to ever do anything with Mac software, and in turn have deprived myself of a truly vast understanding of the limits.  Lotvai's Mac OS kung-fu is the best I have ever seen, and he deserves credit for being so gifted.

Lotvai is so gifted in fact, that I offered him an author account here, and he accepted.  So the guy that proved me wrong and brought all of you CorePlayer is now part of this blog, and I am honoured to have him here.

He explained to me how it was done, and while I will let him explain it in his first post here, I just want to say it was extremely creative.  I wouldn't call it simple, certainly not, but i bet it's a lot simpler than many would have thought; like me.

So please join me in welcoming Lotvai, then sit back and heed his CorePlayer slaying words.  He is officially PowerPC royalty now.

Parts exchange is up


A very early and primitive version of the parts exchange is now online here.

This is something we will be making up as we go.  As of now there are few guidelines, because we need to figure out what they should be.

Feel free to leave feedback here, or on the PowerPC Parts Exchange page.

Happy exchanging!

G5: Nouveau & 3D Acceleration


UPDATE 1: Updated glxgears output after running it not synced to vsync

As many of our readers may already be aware, both 2D and now 3D acceleration are working with the nouveau driver on PPC!  However, with a couple of hopefully temporary caveats that should hopefully disappear over time.  The caveats include the following:

1. You can only try/test this out by upgrading your system to Stretch (the next stable release of Debian still in development/testing) or Sid ( forever unstable). Eventually Stretch will become the next stable release (sometime early 2017) and by then let us hope that whatever version of mesa and its related libraries  included in the release still has working 3D and 2D acceleration with nouveau.

You could also try to compile the latest versions yourself using the instructions here, but keep in mind this route is difficult even for more experienced Linux users.

2. As exciting as this news is, the current performance is still lacking, but with regards to G5 machines, this should also be improved with the move to 64 KB page sizes in the future among many other things relevant to just nouveau and PPC development in general. Sadly, still no update on the 64 KB page size mapping bug yet either, but I am trying to keep in touch with the developers.

As first reported, by again, Peter Saisanas, in a comment from my last post, it appears the fix was included in Mesa's 11.0.3 release back in November.  He has also posted about his testing on the Debian PPC mailing list here.  One of the included fixes that may have resolved the remaining issues with 3D acceleration with nouveau on PPC in that release by Mesa developer Ilia Mirkin was "nv30: always go through translate module on big-endian."  That is the current theory anyways as looking through the rest of the fixes over that same release as well other recent releases, this one appears to be the most relevant.

I figured I would conduct my own testing as well by first upgrading to Stretch from Jessie (8.3) to Stretch.  I skipped backing up my current install as nothing on it is all that crucial. Most of my crucial files and configurations live on my G4 QS at the current time.  Since Stretch or Sid can be (is) unstable at times, you may not want to use it on a production system.  Choose your set up wisely.  I plan to eventually either partition my current SSD to host both Jessie and Stretch on separate dedicated partitions or use a drive in each available drive bay to host each release of Debian (one for testing and one for stable) so I can always fall back to one or the other in case something breaks.

Speaking of instability, there are issues when doing upgrades to or fresh installs of Stretch as the current kernel included with the release is broken on PPC. So you if you want to test this out, I would highly recommend first instaling Jessie and then downloading and installing one of the pre-built kernels available from Peter's Google Drive before doing the upgrade. I opted to use his latest kernel (at the time of this writing) 4.5.0-rc2. Just download the kernel-image deb and install it using the following command:

sudo dpkg -i  linux-image-4.5.0-rc2-powerpc64_2_powerpc.deb

With that out of the way, you will want to update your /etc/yaboot.conf file to either contain a new entry for the newly installed kernel or replace your existing one.

Here is an excerpt from my yaboot.conf file with the new kernel configuration:
image=/vmlinux-4.5.0-rc2-powerpc64
    label=Linux
    read-only
    initrd=/initrd.img-4.5.0-rc2-powerpc64


Save your changes and run the following:
sudo ybin -v

Next, go ahead reboot to the new kernel using whatever label you assigned to it in your yaboot configuration.
 
The kernels he has available work with a wide range of G5 towers and nVidia cards but if you are curious to see what has worked for others up to this point, see this post on the Debian PPC mailing list.

Once that is out of the way, upgrading to Stretch was simple enough as all it requires is editing your /etc/apt/sources.list file by replacing all occurrences of the word Jessie with Stretch.  If you are using vim for your text editing tool you can use the following trick once you have the file opened for editing:

:%s/jessie/stretch/

The %s basically means every occurrence of the string jessie with the string stretch.  Easy enough.  Save your changes run apt-get update and apt-get dist-upgrade per usual. This will update the list of packages from the stretch repositories and start the upgrade to testing.

Once the upgrade is complete, I would recommend rebooting one more time for good measure.  Once logged in, make sure mesa-utils or hardinfo (if you prefer a GUI to view what currently active renderer) is installed. Here is the output from my system:

br0c0l1@TheMaster:~$ glxinfo | grep -i renderer
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer,
Extended renderer info (GLX_MESA_query_renderer):
OpenGL renderer string: Gallium 0.4 on NV47

As you can see we are using version 0.4 of Gallium on NV47 (my G5 machine's Quadro 4500FX nVidia card) to provide graphics rendering.

Here is the output when running glxgears:

br0c0l1@TheMaster:~$ vblank_mode=0 glxgears
ATTENTION: default value of option vblank_mode overridden by environment.
1840 frames in 5.0 seconds = 367.913 FPS
1861 frames in 5.0 seconds = 372.069 FPS
1828 frames in 5.0 seconds = 365.374 FPS
1823 frames in 5.0 seconds = 364.437 FPS

So again, not spectacular in terms of performance, but it is definitely a worthy start.  It is comforting and exciting to know we have made it this far. One thing I think I should make clear is that having 3D acceleration does not improve video playback performance as that is already optimized to its fullest with 2D acceleration.  3D acceleration helps considerably though if you are into gaming and OpenGL/WebGl projects.

I cannot thank Peter Saisanas enough for the work he puts into nouvea and PPC and kudos to the nouveau developers for not leaving us PPC users in the dust! 

I encourage you to try this out and report your findings with either 3D acceleration on nouvea and/or Peter's pre-built G5 kernels either here in the comments or on the Debian PowerPC mailing list.

And finally, as I always say, let the rest of us due our due diligence and report bugs!

Parts exchange brainstorm


After getting lots of interest from an earlier post about starting a parts exchange here - it is now time to start figuring out how to set it up best for everyone that desires to potentially use it one day.

Tell me what you would like it to both include and exclude, and any other details you can think of to create an exchange system that is efficient and beneficial to all.

This is for you guys...  all the PowerPC users that need help getting certain parts, whether the reason be geography or lack of money.  Lets make it the best it can be.

One thing I can tell you for sure is that you won't have to post personal details like address or full name to anyone but the person you're sending or receiving parts with.

Now lets fill the comments up with great ideas!

A summary of players


I'm a big advocate of Linux and BSD for security, but when it comes to offline things, like playing video files and DVD's, I am very pro-Mac OS PowerPC.  To me, there is no better OS to play video on than Mac OS X, and especially on Tiger (10.4) and Leopard (10.5), which as I'm sure you all know were the last two Apple OS to support PowerPC.

All my life I have been a big user and collector of video since before I ever even used computers, but from 2002 on I have been willingly engulfed in digital video on Mac OS X.  In all that time I have learned a thing or three about all the playback applications available, and the strengths and weaknesses of each.  These are my findings.


VLC

VLC is the all-round most stable and capable player ever made available on any OS in my opinion.  It's no MPlayer or CorePlayer in terms of CPU efficiency, but is still a lightweight compared to true resource hogs like Quicktime.  I recommend you use 0.9.10 on Tiger, and 1.1.12 on Leopard.  For Leopard users, the 2.xx versions are a bit more resource needy, and only worth running if you have a dual CPU system; because 2+ is more SMP optimized, but that is really the only true advantage.  So Leopard single CPU users should stick to 1.1.12.

Strengths:
  • stable
  • most codec capable player
  • most tweak-able player (via its vast extended preferences)
  • the best audio and subtitle sync repair of any player

Weaknesses:
  • not as resource efficient as others
  • the expanded preferences can really overwhelm some
  • the "Media library" below the playlist is sketchy at best


MPlayer

MPlayer is much more a lean and raw player compared to VLC and others, but it's quite resource efficient, and scrubs through video in a truly beastly manner.  There are various versions by various developers, but there are three versions that are very worth the HD space they use.  Those three are comprised of two versions of MPlayer OSX (one optimized for G3 and one for G4), and the rev14 version of MPlayer OSX Extended (Tiger users need rev11), which is by far the best thrid-party real media player.

I have some very old real player formatted video I downloaded years ago, but would never install Real Player on any system of mine, nor should you, as it is spyware VLC can play real media also, but it plays very jerky, and with lots of resources available.  The extended version, while newer, is less efficient and has some interlacing issues, so I use it strictly for real media, and a combo of MPlayer OSX and VLC for everything else non-HD.  Bottom line...  use extended for real media only, and the regular OSX version for all your other MPlayer needs.

Strengths:
  • efficient all-round
  • scrubs/scans through video better and more aggressively than any other player
  • frame dropping feature to help it smoothly play video that is slightly beyond your systems capability
  • very effective disk cache option which will offer smooth playback from very slow media, like old CD-R
  • very simple and straight forward preferences (if that's what you prefer)

Weaknesses:
  • struggles with some audio and some x264
  • not anywhere near as codec capable as VLC
  • limited preferences/settings
  • only the "Extended" version is really usable on G5's


CorePlayer

Even though this cannot be bought any longer, it's worth covering for those that do have it, and to help others gain more perspective with it.

CorePlayer OSX is the absolute champion of resource efficiency, and is a master of x264 codec playback, but to be honest, that is where its good qualities end.  The GUI is very sloppily put together, and just generally awkward to use, but not so bad that it's unusable; just clunky and oddball.  I guess this is what happens when you port cellphone software to the desktop, but forget to make it more desktop functional.  It also has little support for AC3 audio, or really any video wrapper that isn't AVI, MP4, M4V or MKV.

Strengths:
  • out of this world efficiency
  • a master at x264 playback

Weaknesses:
  • ugly as hell
  • clunky and awkward to use
  • limited codec support
  • most of the preferences do nothing in terms of producing noticeable results 
  • lack of proper subtitle support


Quicktime

QT is the undisputed champion of bloat when it comes to playback apps.  There is no other application that consumes more of your CPU than this one.

The only use I have for it is the editing feature in the pro version, which is actually quite simple and elegant, but still uses way too many resources.

Bottom line...  don't use it to play video.

Strengths:
  • simple and elegant video editor (with $30 pro version)

Weaknesses:
  • bloated garbage for playback
  • next to no codec support without third-party codecs installed


Apple DVD Player

Even though you can play DVD's in VLC, this application is more efficient at it, and makes the experience much more like using a real DVD player on a TV.  If you run Leopard, and have a CPU under 1GHz, then you should disable deinterlacing (in the "View" menu) for best results.

Since I cannot really find any weaknesses with this, I won't bother doing a strengths/weaknesses for it.  It plays DVD's really well and efficiently, and that's all you really need to know.


Wrapper Roundup

It makes sense to end this with a list of video wrappers, and which players are best for each.  Since this is all based on personal experience, I welcome any findings the readers have also.

Here is the list:

.AVI  -  VLC or MPlayer OSX
.MP4  -  VLC or CorePlayer
.M4V  -  VLC or CorePlayer
.MKV  -  VLC or CorePlayer
.MOV  -  VLC or CorePlayer
.MPG  -  VLC or MPlayer OSX
.WMV  -  MPlayer OSX
.ASF  -  MPlayer OSX or VLC
.FLV  -  VLC
.RM  -  MPlayer Extended
.RAM  -  MPlayer Extended

When it comes to HD, there really is no choice but CorePlayer without a G4 1.2GHz+.  A faster single G4 or dual 1GHz+ will play most 720p in VLC.  You may struggle with any 60fps content though.  As for 1080 without CorePlayer...  thats more for later duals and quad G5's.  On my single 1.8GHz G4 7448 I need CorePlayer to play 1080 smoothly.  60fps 720p h.264 is my limit without CorePlayer.  G4 1.2-1.5GHz would be limited to 24-30fps 720p.

Anyway...  that's about it for this summary.  If you require any additional info, please ask in comments, or add any of your experiences with the apps and codecs above, or others not mentioned.

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?