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:
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.