Now upgrading video cards…

I am having problems with my dated NVIDIA GeForce 5200 AGP (128MB) card in my son’s computer. Nothing past driver 8776 will work on it with any stability, and I cannot get 8776 to install on any kernel more recent than 2.6.18.6 (I tried symlinking /usr/src/linux-2.6.18.6/include/linux/autoconf.h to config.h in the same directory, as advised on one forum, but it made no difference). No changes I have made in xorg.conf have made a dent either – stability has become horrible with hardware acceleration enabled. AFAIK, everything else on the system is working fine, so I cannot blame any contributing factors on its apparent degredation.

Well, it _was_ a cheap card, and it held up pretty good over time. I am now shopping online for a 7300 GS AGP card – they go for about Y13,000 locally (maybe $110). I’ll see if I can find one online for less. I found a card for my main system, but it is about $380, a supoerclocked 7800 GS AGP (256MB) from EVGA. I lust for this card.

So, I will wait for prices to drop a little over the next couple months before I go for that one.

Registered Linux User….Finally.

I went ahead and registered on the Linux Counter, and put my three machines on there too. Interesting stuff, lots of statistics.

Unlocking URPMI…

Sometimes when using urpmi (command line or via a GUI mechanism), it can crash and leave you stuck with a cryptic message that the urpmi database is locked. When this happens, open a shell (Konsole, xterm, whatever), su to root, and navigate to “/var/lib/urpmi”. Look for and delete the hidden files (“ls -la” will show them) .LOCK and .RPMLOCK. Then retry urpmi.

I prefer using the command line, as it is more forgiving and informative than the GUI (rpmdrake), IMHO. In Mandriva Control Center, I have found that any error in the download step, aside from bad signature warnings, will usually result in the failure of all package install attempts (assuming you selected multiple packages), and the packages you had selected get unselected when you finally get back to the point of retrying. This really stinks if you had to wade through hundreds of entries to find the dozen or so packages you wanted to install.

However, stuff that downloaded is still there on your hard drive, provided you do not retry after an aborted package install attempt. Instead, open a shell as root, navigate to “/var/cache/urpmi/rpms”, and you should see all of the packages that did get downloaded, but not installed. Could be a lot of stuff if your install download almost made it to completion. Simply type in “urpmi ./*.rpm” while in the rpm directory to install what you downloaded. Any dependancies still required will be downloaded. If it fails on a package, narrow your parameters (“urpmi ./libj*.rpm” or “urpmi ./kde-*.rpm” for example), and install piecemeal around the offending package.

Note that having /var on its own partition is handy here, as it can fill up with uninstalled or partially downloaded packages (in the “/var/cache/urpmi/partial” directory). If that happens if /var is on the root partition, your system could have, uh, “issues”. If it starts to fill up as its own partition, the root partition is isolated from this, and resizing the /var partition is much less risky than resizing the root partition. Now you have a good place to start looking if /var starts to fill up without apparent reason.

Be aware that your update source files can also take up a lot of space, especially if you have a lot of them. I tend to keep at least two to three duplicate sets pointing to different urpmi repositories on hand, as if one download fails, urpmi will try the next, often successfully. Good places to find repositories are:

Hope this helps!

Installing Beryl on Mandriva 2007…

(Editorial note on May 22, 2007 – Since I wrote this article, Beryl had changed quite a bit, even merging with Compiz. I do not know how much of this is still accurate or relevant, so YMMV. When I get more time, I will put together more current instructions…. now, back to the article.)

This took a while – it was easy to get running, and I had none of the problems that seemed to be filling various Beryl forums, but troubleshooting and researching a few last tricky problems was tedious.

My setup before Beryl was:

  • Xorg 7.1.1
  • Vanilla kernel 2.6.18.2
  • NVIDIA-9746 (proprietary driver) with an XFX-6600GT AGP card (128 MB)
  • KDE 3.5.5
  • Mandriva 2007.1 (Cooker)
  • GDM (instead of KDM for the login manager – it just looks and seems to work better)

After getting everything working, my setup is the same.

The links I used to get started were:

I first started by running the following commands to install the needed Beryl components:

  • urpmi cgwd
  • urpmi beryl-manager
  • urpmi -a libbery

(An alternative would be to run “urpmi -a cgwd beryl-“.)
This installed everything called for, all dependencies, and the libberyl-core0-devel package as well (doesn’t hurt, but probably not needed).

I also made sure to turn off all composite effects (shadows and transparency) in KDE (Window Behavior), and turn off KDE Preloading under KDE Performance. You may want to turn off any special themes as well before going further, to ensure there is nothing that can gum up the works later.

I then edited my xorg.conf file (located at /etc/X11/xorg.conf). Here is what the relevant sections now look like:

Section “Module”
Load “dbe” # Double-Buffering Extension
Load “v4l” # Video for Linux
Load “extmod”
Load “type1″
Load “freetype”
# Load “glx” # 3D layer
Load “/usr/lib/xorg/modules/extensions/libglx.so”
SubSection “extmod” ## added for beryl
Option “omit xfree86-dga” # don’t initialise the DGA extension ## added for beryl
EndSubSection ## added for beryl
EndSection

Section “Device”
Identifier “device1″
VendorName “nVidia Corp.”
BoardName “NVIDIA GeForce FX (generic)”
Driver “nvidia”
Option “RenderAccel” “True”
Option “AllowGLXWithComposite” “true”
Option “Rotate” “off”
Option “DisableGLXRootClipping” “true” ## added for beryl
Option “BackStoring” “True” ## added for beryl
Option “TripleBuffer” “True” ## added for beryl
Option “AddARGBGLXVisuals” “True” ## added for beryl
EndSection

Section “Extensions”
Option “Composite” “Enable”
Option “RENDER” “Enable” ## added for beryl
EndSection

Note that this doesn’t completely agree with some of the instructions on the above links, but no change in functionality or stability was encountered by having an option in the “Device” section as opposed to the “Screen” section. I tried both, and ended up here, as other links I researched _did_ call for this.

I next had to edit /etc/sysconfig/compiz:

COMPIZ = no

and /etc/sysconfig/xgl:

XGL = no

and finally /etc/sysconfig/compositing-wm:

# COMPOSITING_WM_START values:
# yes: start compositing window manager on session start
# auto: start compositing window manager on session start
# if Xgl is started
# or if direct rendering and GLX_EXT_texture_from_pixmap are available
# no: do not start compositing window manager on session start
COMPOSITING_WM_START=yes

# if COMPOSITING_WM is not empty, it overrides the default compositing
# window manager (which is compiz)
COMPOSITING_WM=/usr/bin/beryl

# if COMPOSITING_WM_ARGS is defined, it is used as
# arguments for the compositing window manager
COMPOSITING_WM_ARGS=”–indirect-rendering –replace –use-tfp”

# if COMPOSITING_WINDOW_DECORATOR is defined, it overrides the default
# window decorator, the specified program will be run after
# compositing window manager
COMPOSITING_WINDOW_DECORATOR=/usr/bin/emerald

After restarting X (“init 3″ followed by “init 5″ as root at a console tty), I logged in and got the KDE splash, followed by the Beryl splash overlaid on it. The desktop came up and just looked fantastic as things zipped in (two superkaramba themes, yakuake, and gkrellm are running by default). Windows wobbled. Drop shadows and translucency worked. and CPU usage was *way* down from before, when I had been using shadows and transparency from within KDE (Window Behavior) via Composite.

The screen saver worked, GoogleEarth worked, everything seemed great. So I used “Switch User” from the KMenu, selected “Start New Session”, and logged into my wife’s desktop. Beryl worked there too (she is also running some superkaramba themes). Her screen saver worked too. Things were going great, right up until I switched back to my desktop session. No matter how I did it (CTRL-ALT-F7, ALT-F7, Switch User from KMenu or from the screensaver), all I got was a black screen with my cursor on it.

Sometimes the keyboard still worked, and I suspected that KDE was still running, I just couldn’t see it. Switching back and forth between desktop0 and desktop1 would usually cause the keyboard to lock, and I would have to use CTRL-ALT-SysRq-R to switch over to tty1 (CTRL-ALT-F1) and as root, type “init 3″ then “init 5″ to restart X and get back to the GDM login manager. Of course, session changes made in the desktops were lost. I also discovered that logging into just one desktop and switching to tty1 would also cause this behavior when attempting to switch back (CTRL-ALT-F1, then CTRL-ALT-F7). Black screen, only a cursor (which I could move around in vain), nothing else.

This really really sucked, because we always use the computer in this way, both of us logged into our desktops, and yet in 10 minutes of playing around with Beryl, I was thoroughly addicted. I did *not* want to go back.

I noticed that when starting the beryl-manager (from the “Run Command..” dialog instead of xterm as one link recommended), my desktop flashed black for a second, and anything I then opened had no window borders or decorations (such as the minimize/maximize/close buttons). Additionally, I was unable to select Beryl as my window manager – it was set to “Compiz with COW” instead. After closing beryl-manager, I would have to log out and log back in before things came back to normal, with any changes made in beryl-manager being applied at that time.

Some digging turned up that when running Beryl, it uses .beryl-managerrc and .beryl/, both located in $HOME. I “deleted” (renamed) both after logging out, logged back in, and a new file and folder were created, clearing up all the beryl-manager issues I had been having. Guess the .beryl folder contents got screwed up at some point.

Now, back to the problem of the black screen when switching back to a desktop session. Researching more finally got me to a site that said it was a known fault with NVIDIA drivers in the 96 series or higher, so I backed down to the 8776 driver. No luck, same problem, no change. Xorg.conf changes made no difference. I further read about removing the NVIDIA drivers, and using the PLF drivers instead (installed via urpmi). I have always had better results with the NVIDIA drivers than with the PLF urpmi drivers, so I did not try this.

Turns out the solution was in beryl-manager. Opening Beryl Settings Manager, selecting General Options in the left menu, and unchecking Sync to VBlank (which was checked by default), fixed it. After restarting X, I was able to switch between desktop sessions and tty sessions, with and without screen savers running. I upgraded to the 9746 NVIDIA driver, and everything still worked fine.

I did find out while playing around with screen savers that some non-GL screen savers in Mandriva can cause the desktop to lock up and spike the CPU, even when previewed in the configuration dialog. I selected non-GL, safe screensavers for both of us to avoid tempting fate with Beryl running. It is really cool, but somewhat quirky at times, and I have had Firefox lock up one time (so hard that I thought the magic keys weren’t going to work – I ended up doing a s-u-b reboot on that one). This happened on the 8776 NVIDIA driver – not sure if that had anything to do with it.

That hasn’t happened since, and I am rotating desktops and having a pretty good time playing around with this. I have seen and used Aero in Windows Vista, and it does not even compare to Beryl. Also, since using Beryl, glxgears now run at 2400 FPS. Before, if I used shadows and translucency, it would drop to 700 FPS or lower.

The only thing I miss is having different wallpapers on different desktops. Beryl treats all desktops as part of one desktop, so only one wallpaper image is shown. I have read about a Compiz plugin that gets around this (same in Compiz) and allows you to have a different wallpaper for each desktop, but haven’t seen anything for Beryl. Also, dragging open windows from the taskbar to the pager to move something to another desktop is gone – same for sending an app to a different desktop. If you open an app in a different desktop, it stays – clicking on it in the taskbar rotates the desktop into view.

Oh well, if this is the trade-off, I can live with it.

Hope this helps somebody out there.

Magic keys (updated Hot Keys)

I found a very good site on magic key sequences – “Debian Administration – The magic sysreq options introduced”. So, it would seem that a safer way of rebooting a locked system would be to include the “u” sequence, which unmounts and then remounts all of your partitions, but as read-only. Especially interesting is the ability to trigger actions at the command line, using “echo h > /proc/sysrq-trigger”. I found that using this option actually sent everything to dmesg, and that the “t” option greatly increased CPU usage by causing klogd and syslogd to each consume over 40% CPU utilization (shown by running “top”). Running “dmesg | less” will display pages of dump information. I ran “dmesg | tail -n 700 | less”, and still had nothing but stack trace entries.

Thank God for magic keys.

2007 – Happy New Year!

Akimashita omeddettou gozaimasu!

Follow

Get every new post delivered to your Inbox.