Linux Setup Notes

name and address
created sep 15, 2012; updated apr 12, 2013

Summary

Installing OpenSuse 12 on a Z420 was a major challenge because of Suse's inability to recognize the DVD drive. Suse's jump to systemd created even more problems. In Suse12 I also experienced Linux kernel crashes for the first time in years.

OpenSuse 12 Crash & Burn ! (OpenSuse 12.1 Review)

A few weeks ago, while I was working at my computer, it exploded. There was a loud bang and a dazzling flash coming from under my desk, followed by darkness, a faint ozone-like smell, and silence except for the beeping of my uninterruptible power supply.

Strange, I thought. It never did that before.

While I waited for the ringing in my ears to stop, I realized with dread that my beloved HP xw4600 Core2 Duo had been struck by lightning and that I would have to re-install Linux all over again.

So, when the new computer (an HP Z420, 6-core Xeon this time) finally showed up, I decided to install Suse 12 on it. It appears that the OpenSUSE maintainers are focusing on simplifying the distribution. That means throwing stuff out, some of which is not needed, and some of which is needed desperately. That especially means 32-bit libraries, LPRng, and the ability to install the weekly updates of Firefox. Bottom line: OpenSUSE still runs, but it's getting smaller, which means there's less difference between it and other distributions.

Installation of SUSE 12.2

I wiped the Windows 7 disk, downloaded the x86_64 version of OpenSUSE 12.2, and burned it onto a DVD. The installation proceeded normally to the installation screen (i.e., the first step), then it said:

Unable to create repository from URL 'cd:/?devices=/dev/disk/by_id/ata-hp_DVD-RAM_GH80N_223CD088246'
Valid metadata not found at specified URL
Can't hardlink /copy  /var/adm/mount/AP_0xpG0Fkz/suse/setup to /var/cache/zypp/raw/openSUSE-12.2-1.6Z|4Fm9
Can't provide /suse/setup/descr/app-icons.tar.gz

If I clicked 'Yes', it asked for a CD. Don't got. If I clicked 'No', it said

Failed to initialize the software repository
Aborting the installation

and crashed. So much for SUSE 12.2. Hey, those DVDs really do fly!

Update: Bill Dimm reports that this error message is due to corruption of the ISO that is downloaded and that the "validate media" option can detect this. However, this is unlikely, because I experienced this with two separate downloads. There were similar problems on this computer with the boxed commercial version of Suse 11, which installed with no problems on many other computers (see below). The most likely explanation is that there is something peculiar about how Suse recognizes CD-ROM drives. Sometimes it finds them, and sometimes not.

Installation of SUSE 12.1

Installation of 12.1 went smoothly, until it got to the online updates. It downloaded 6GB of updates, tried to reboot, then crashed:

Please supply a config file
Starting YAST2

At this point the system was locked up, so I yanked the power cable. The install recovered, downloaded the same 6 GB of updates again, and locked up again. The third time, it proceeded to the next step. Don't know what was happening there.

Changes

The biggest change is that Suse 12 now uses systemd instead of sysvinit. Systemd is a strictly Linux-specific thing, which means that Linux is now even more incompatible with other Unixes. While systemd is unquestionably better in some respects, it could also be a sign that Unix is starting to fragment again. The older files (inittab, /etc/init.d/*, etc) are still there, but it's unclear how many of them still work. What is clear is that if you try the old way of putting your init script in /etc/init.d, and linking to it as before, it is now ignored. What documentation there is seems to be incomplete and inconsistent, such as man pages referring to commands that don't work. The only other information I could actually find is on the author's web page. I got the impression that systemd is still a work in progress. But why in the hell are the system service initialization scripts in /lib? That's just bizarre. Debian, which still uses sysvinit, is looking pretty good right now.

There's another problem for people who keep their systems running for years at a time: while the boxed DVD has both 32- and 64-bit versions, the downloaded version requires that you decide in advance whether to download one or the other. This couldn't have been to make downloads faster, because Suse now downloads gobs of stuff from their server after you install it. This could be a big problem if you come back five years from now and try to re-install it—much of what you need won't be there anymore. This happened to some extent with Suse 11, but it's getting worse.

More Changes

There are a lot of other changes. Take /etc/mtab, which contains lines like this:

cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0

What on earth is this? Of course the kernel has to change, but is it asking too much to have a man page, or is Google our man page now? Read the source, I guess.

Can't start X11

Once I got Suse 12.1 installed, the first thing I noticed was that I could not start X11 from the command line (using startx) unless logged in as root:

Cannot create /var/log/Xorg.0.log
Cannot overwrite Xorg.0.log.old

Ah, the good old days are back. It was necessary to change /etc/permissions.local and to change the permissions on /usr/bin/Xorg to 4711 (making it suid) before it would start. If you use a display manager, by setting your default runlevel to 5, this step is not necessary, because X11 is already running as root.

Keyboard problems

Once I got X11 running, it immediately became apparent that the keyboard didn't work in X11 quite the way it's supposed to. Xorg seems to have changed the keymaps again. The old keymapping file no longer worked. It was necessary to create a new one, using xmodmap -pke > keymaps, edit it to assign functions to the keys, and install it using xmodmap keymaps. If you boot directly into KDE, you might not notice this. But little things, like the fact that the computer beeps at you if you backspace on an empty line, or the fact that it takes half an hour of tweaking to get the arrow keys to work, or the fact that the Del key deletes characters until the line is empty, and then deletes your terminal window, which are easy for experienced users to fix, are the things that make newbies hate Unix's guts.

Firefox crashes

The biggest problem in Suse 12.1 was with Firefox. Firefox crashed every single time I used it. Normally when that happens, you just download a new one. Since Firefox is a 32-bit app, you would need the 32-bit libraries to run it. Unfortunately, they've been tossed out. Downloading a new Firefox was a disaster: the new version from mozilla.org was a 32 bit binary and could not be executed. No matter where I put the libraries, and no matter what I put in ld.so.config, Firefox couldn't find them. SUSE gets around this by installing a special Firefox, which means you're stuck with one version.

Another problem with Firefox was that every time I started up Firefox, going to certain common websites caused the sound card to stop working. The only way to regain the use of the sound card was to reboot.

This was caused when dbus tried to start something called RealtimeKit1. The following messages would appear in the logs right before the sound card locked up:

Oct  9 07:25:31 oxygen dbus-daemon[1204]: Activating service name='org.freedesktop.RealtimeKit1' (using servicehelper)
Oct  9 07:25:31 oxygen dbus-daemon[1204]: Successfully activated service 'org.freedesktop.RealtimeKit1'
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Sucessfully called chroot.
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Sucessfully dropped privileges.
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Sucessfully limited resources.
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Running.
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Canary thread running.
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Failed to make ourselves RT: Operation not permitted
Oct  9 11:25:31 oxygen rtkit-daemon[2232]: Watchdog thread running.

Notice that for some odd reason rtkit-daemon, whatever that is (man page? what's that?), prints the incorrect time as well. Killing it off and restarting alsasound had no effect. Even wiping the rtkit directory didn't help, which means the problem is in dbus-daemon. The only solution is to reboot.

Update: Killing dbus-daemon after the system boots fixed the problem. You can't simply delete dbus-daemon, or the system will fail to boot. However, using yast2, you can stop it from launching when the system enters runlevels 2, 3, and 5. To to this, you also have to disable bluez-coldplug, avahi-daemon, and xdm, which means you lose Bluetooth and the graphical login manager. The only other drawback so far is an increased lag time when Firefox first starts up.

A simpler solution is to manually kill dbus-daemon as soon as you boot up. It will be launched again the first time you run Firefox, but for whatever reason the sound card is spared. But the system seems mightily pissed about it. There are angry messages in the system logs about daemons crashing, missing actions, and so forth. At least now, after I close Firefox, the sound card starts working again ... after about ten minutes ... sometimes.

Update #2: Finally got an error message:
ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
play FAIL formats: can't open output file `default': snd_pcm_open error: Device or resource busy

This means something in Firefox is grabbing control of the sound card. Reloading alsa still has no effect. Killing off dbus-daemon at boot-up and again just as Firefox starts up solves the problem. Getting rid of libflashplayer.so might also help.

Update #3: The problem has been verified to still be present in Firefox 20.0. If dbus-launch and dbus-daemon are manually killed off, Firefox and the sound card eventually recover.

Opera worked fine, except that, even after all these years, it still has trouble selecting appropriately-sized fonts. Some web pages are rendered okay, while in others the text is unreadably small. The main advantage that Opera used to have, which was that you could disable Flash with a single click, is gone. Linux Opera needs a little tweaking before it can handle PDF files, and it doesn't work with some online e-commerce sites.

Newer versions of Opera also ran, but the new version no longer remembers its screen geometry. The Windows 8-style interface of Opera 12.11 was so mind-bogglingly ugly that I deleted it almost immediately. Ditto for Chromium, which has trouble with fonts. So it looks like Linux is entering a lean period for browsers. If Dillo starts handling html5 and css3, I'm off!

For Web developers, it's useful to keep old versions of Firefox around so you can run your add-ons, and to make sure your web pages still work in old browsers. That's no longer possible in Opensuse. I had to modify a copy of HTML Tidy to get around the absence of the HTML Validator add-on, which stopped working somewhere around Firefox 3.6.6.

It turned out that it was not Firefox that was crashing, but something called "crashreporter" that was being called inappropriately by Firefox. What do you do when the crash reporter crashes? Dunno. Deleting crashreporter stopped the problem (not the sound problem or the problem of Firefox crashing, but at least the annoying crash screen is gone).

Firefox Crash Screen

After grabbing a copy of the 32-bit version of libdbus-glib-1.so.2 from an old 32-bit Suse 11 machine, putting it in the firefox directory, and adjusting /etc/ld.so.conf, I was finally able to get a generic downloaded version of firefox 15.0.1 to start up. However, it still caused my sound card to stop working.

C++

The C++ compiler has been changed again. It was necessary to debug our programs again to stop the the finicky new compiler from complaining.

warning: variable ?k? set but not used [-Wunused-but-set-variable]
warning: variable ?a? set but not used [-Wunused-but-set-variable]
warning: variable ?b? set but not used [-Wunused-but-set-variable]
warning: variable ?c? set but not used [-Wunused-but-set-variable]
...

Of course, the compiler is right. We shouldn't set variables without using them. Another minor thing is that one of the system include files, pngconf.h, still has this default junk in it:

           __pngconf.h__ in libpng already includes setjmp.h;
           __dont__ include it again.;

There's not much programmers can do to avoid this: some libraries include setjmp.h for their own purposes. You're supposed to remove these two lines when you install libpng. Guess they forgot.

LPRng

Lprng, the thing that's supposed to let you print, is no longer available in Suse 12. Only Cups was available. I believe the Cups philosophy is misguided, so I downloaded Lprng from its home page, but it wouldn't compile. In fact, none of the versions 3.8.22 through 3.8.35 would compile, all of them causing make to segfault:

kernel:  [86826.864032] make[24833]: segfault at 0 ip 00007fdd2646fbdf sp 00007fff4814f4c8 error 4 in libc-2.14.1.so

For versions 3.8.21 and below, the configure script could not recognize x86_64, so you don't even get that far. I finally downloaded lprng-3.8.C-rc1 from Sourceforge, which compiled and installed.

Why is Cups a mistake? It requires a special driver for each different model of printer. If you buy a new printer but can't find the right driver (see linuxsetup126.html for an example), you can't print, even if it has native PostScript support. This idiocy is one of the reasons Windows sucks so bad. If Linux continues along this route, there would be no advantage to sticking with it.

Motif

Something is wrong with the version of Motif (2.3.2) that's installed. Motif applications are now acting funny, with window positions not being updated when you move them around. Some apps just lose keystrokes. Others crash. It's true that few people create new programs in Motif anymore, but there are still many very expensive Motif apps out there.

Solution: read the review linked at Motifdeveloper.com about the problems with OpenMotif 2.2 and 2.3. Although this page is quite old, it seems to be still accurate. Uninstalling Motif did not work: Yast2 complained mightily about doing it, and even then, some of the old libraries remained in place.

Nedit crashes

Old versions of Nedit don't like the new Motif at all, and crash almost instantaneously. Luckily, there's a version 5.6 out there somewhere called nedit-5.6-sources-HEAD.tar.gz, which works well.

The file selection box in Nedit 5.6 has been changed, and no longer takes the nedit*XmFileSelectionBox*listVisibleItemCount: 30 option. So you get a tiny file selection box when you try to open a file. You can't change this in your .Xdefaults file anymore; you need to edit the source code. Edit nedit.c and change the default height:

    "*XmFileSelectionBox.height: 700",

and recompile nedit.

Since the fonts of the top menu bar are now hard-coded, it's also necessary to edit nedit.c to change those fonts. However, the fonts in the menus do recognize the .Xdefaults settings.

xmgr crashes

See here for a complete list of my bugfixes for xmgr, which is still the best drawing program available for Linux.

Ghostscript doesn't work

Ghostscript, which is used by pstogif and similar programs, gives the following error when trying to convert a postscript file:

GPL Ghostscript  9.00: Error: Font Renderer Plugin ( FreeType ) return code = -1

When the output is a gif file, the resulting image file is unusably bad. This is supposedly a bug in freetype. Installing freetype-2.4.10 and typing ldconfig got rid of the error message, but did not solve the problem. Evidently gif is no longer a priority. It was necessary to use TIFF or PNG format to get acceptable image quality.

Desktop

Opensuse gives you a choice between Gnome and KDE. I can't comment on either of them, as I find "desktops" annoyingly Windows-like. I see Linux machines essentially as servers, and I just use e16 and a bunch of urxvt terminals. Neither was on the DVD, but they compiled and installed without crashing.

Adobe Acrobat Reader

Adobe Acrobat reader still has the same font problem that it's had since Opensuse 11 came out. Some documents are rendered properly, while others have strange fonts with tall capitals. Acroread for Windows, and other Linux PDF readers such as Evince, render the documents properly.

Acroread font problem

And all this time I thought the Dean was just weird.

No Open Office

Something called Libre Office, which looks exactly the same as Open Office except for saying "Libre" instead of "Open", is installed instead. Those damn lawyers again. In fact, Libre Office has been greatly improved over the previous OO versions. You might not want to write a research grant or a mission-critical Windows document in it, but for casual replacement for Word it's not too bad. I didn't find any page rendering errors even in our most complex Word documents. Even the Powerpoint clone is almost good enough to use at real presentations, if you're careful enough to check the slides beforehand. In the presentations I compared, about half the slides had some error, usually just labels overlapping, images being weirdly stretched out, and things like that.

Libre Office 4 is an improvement over the version included in Suse, but spell-check still didn't work in Libre Office Writer out of the box, so in my documents about half the words had the same red squiggles under them each time you opened the document. The new spellings are saved in .config/libreoffice/4/user/wordbook/standard.dic but they aren't read by default as they are in MS Word. I eventually discovered that clicking randomly on a bunch of spell-related icons starts it working. Once this happens, it works from then on. Unfortunately, I can't be more specific than that. With all those ugly icons Libre Office is not exactly nice looking, but it finally does work.

Weird messages all over the place

I get the following message printed on my screen at random times:

NOTE: child process received `Goodbye', closing down

What process is closing down? What is the parent? Who knows? Firefox prints strange messages on start-up as well, such as

 *** nss-shared-helper: Shared database disabled (set NSS_USE_SHARED_DB to enable).

Editing /etc/nsswitch.conf had no effect. To fix it, I put

 export NSS_USE_SHARED_DB=true 
in the script that starts firefox.

There's also a lot more noise in the logs than there was in Suse 11. Most of it pertains to daemons that, for all intents and purposes, are undocumented. Sure, I could look up on the Internet to find out what rtkit-daemon is, and why it's unsuccessfully trying to run a "canary thread." But how come there's no man page for it?

Every 30 minutes, I get about 20 cryptic messages from dbus-daemon and 8 more from ctl_cyrusdb. Something else to figure out how to fix. It makes it that much harder to see any real problems. Here's a typical one:

oxygen dbus-daemon[1177]: **** EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:1f.2/host3/target3:0:0/3:0:0:0/block/sdb

Update: Killing off dbus-daemon after the system boots, which was needed to get the sound card to work, also took care of these messages.

Weird files

And what the heck is this:

C:\nppdf32Log\debuglog.txt

This file, with an obviously invalid filename, is showing up in numerous directories. It doesn't look like it's coming from a Win 7 machine, because the contents look like debugging information from Acrobat reader.

SSH Peculiarities

Ssh and sftp use different options to select the port: ssh uses "-p" and sftp uses "-P". That's not Suse's fault, of course. But it's still very annoying. If I had the time, I'd recompile sftp myself to fix it.

The new version of sftp has a few problems. It unexpectedly closes the connection if you resize its window. It uploads files faster than the old version to some servers, but stalls indefinitely with others. It's obviously trying to do something fancy, but some servers aren't cooperating. Here are some numbers:

Outgoing sftp data rates
Destination openssh-5.0p1 New sftp
Server A 75.6 KB/s 179.6 KB/s
Server B 448.1 KB/s 0 KB/s

Unfortunately, Server B is on a machine over which I have no control. The file was only 5 megabytes, but it took over a half hour to send 20% of it to server B, at which point I killed the transfer and copied an old version of sftp from a Suse 11 machine.

Kernel crashes

The stock kernel (3.1.10-1.16-desktop #1 SMP PREEMPT) has this great new feature where you can reboot it just by plugging in a USB Bluetooth adapter. At least ... I think it's a feature.

Kernel BUG at /home/abuild/rpmbuild/BUILD/kernel-desktop-3.1.10/
linux-3.1/mm/slab.c:501!
Invalid opcode: 0000 [#1] PREEMPT SMP 
...
Panic occurred, switching back to text console

At this point the operating system is in text mode, requiring a hardware reset. This kernel panic is highly reproducible.

Attempting to perform a system backup with an external USB drive also caused a total system shutdown, but with no error messages. The last entries in the log were
Mar 26 20:24:06 oxygen ctl_cyrusdb[1010]: done checkpointing cyrus databases
Mar 26 20:24:06 oxygen master[1419]: process 1010 exited, status 0

This happened after about 700 GB had been copied, slightly more than halfway through the backup.

Improvements

There are a few improvements. Sftp now handles the up-arrow command properly, and retrieves the previous command instead of printing garbage on the screen. (If only it would transfer files!) And the new Xorg now has the video option installed. Also, Suse12 now installs Enlightenment, so you no longer have to scrounge around the Internet looking for that RPM that disappeared when they removed it from the Opensuse 11 archive. And so far, I haven't had the kernel trash my disk (which happened a few years ago when I put reiserfs on one computer). Suse has finally ditched Grub; it's still an option, but the default boot loader is now Elilo.

The Opensuse 12.1 DVD also had a bunch of scientific applications, inclucing pymol, Gromacs, and even Rasmol. But the math applications are all gone: octave, and the graph-drawing program xmgr (which has been replaced by xmgrace) aren't there anymore. When I installed xmgrace, Yast2 automatically re-installed the buggy Openmotif that I had laboriously deleted instead of noticing that I had installed a better one. It would be nice if there were some way to integrate manually installed packages into Yast's menu—or better yet, if it would check and ask.

Opensuse 11

Suse 11 was the most reliable version of Opensuse ever. Some of our (very expensive) commercial molecular modeling software only runs under Suse 11. So after a week of trying to solve all the problems in 12.1, I tried to downgrade to OpenSuse 11 using the green boxed DVD that I've used on over a dozen other machines. Unfortunately, it could not be installed on this computer. After displaying the green Suse install screen, it suddenly dropped to text mode, with this message printed in a little text box:

 Make sure that CD #1 is in your drive! 

The other screen (Ctrl-Alt-F9) said:

 Looking for CD/ ... No repository found 

No amount of tweaking the BIOS or swapping SATA ports could fix this. While it seems moderately stable (well, except for the kernel), the opensuse developers have, in my opinion, thrown out too much stuff. It seems to me that the adoption of systemd, in particular, was premature, considering that few people (and I include myself in that group) seem to understand how to make it work.

Despite its improvements, Linux is still very much for experimenters only. Maybe it's my imagination, but the system does not feel as solid as Suse 11 did. With Suse 12, I can't print, programs crash all over the place, sound only works occasionally, and until I tried the "old library" trick I was locked into one version of the Firefox browser. So, things are back to normal already. But I'm having flashbacks to 1993.

Back