Saturday Apr 05, 2008

Forward to the 32-bit past

After wrestling with incompatibilities of 64-bit Linux for a while, I finally downgraded my home PC to 32-bit Ubuntu 7.10 (Gutsy). I found some nice and less nice workarounds, like running the Windows version of Firefox under Wine in order to get Flash to work. I hadn't found a workaround for the Java browser plugin, or for Skype, and was considering a 32-bit chroot environment.

Finally one of those automatic updates decided it for me. You know the ones, the  messages offering later versions of software, critical security updates and recommended updates. Being able to just click OK to automatically be upgraded to the latest software is part of what makes Ubuntu so friendly. But this time it wasn't so friendly. Something left my PC unable to boot to multi-user, unable to start networking, and unable to start graphics. I don't know what because I didn't keep the disk image around for a post-mortem. It was much much faster simply to blow away my root partition with a complete new OS installation. So while I was at it, I dropped down to 32-bit.

Lots of things started working, but some got worse. I had always had a problem on Gutsy that after suspend/resume the Ethernet driver would get a reversed MAC address, complain that it was invalid, and switch to a new eth instance with a random MAC. Of course this played havoc with my router trying to keep track of where my PC was in order to provide DNS. This problem occurs in the forcedeth driver, reverse engineered for the nForce chipset. Some people worked around the problem with limited success by adding commands in the suspend/resume scripts to stop and restart networking.

But now on 32-bit Gutsy it got worse. Upon resuming the screen stayed black, and since the network seemed to be down I couldn't remotely login to find out what was wrong. I found lots of reports on the web about suspend/resume problems with the same error message in my .xsession-errors

Gtk-WARNING \*\*: This process is currently running setuid or setgid.

 

This seems related to my NVIDIA GeForce 6150 LE graphics. Like many others who posted their experiences, the problem occurred for me both with the generic open source driver and with the Nvidia proprietary accelerated driver. One person mentioned a workaround by logging out, logging in to a failsafe X-terminal, and suspending manually from there.

Irony: The main reason I'm running Ubuntu instead of Solaris is that Solaris doesn't yet have power management, and for a home PC, suspend and resume are essential. I've been eagerly watching the power mangement project Tesla at opensolaris.org, wondering why it's taking so long. I guess like most things it's easier to do, than it is to do right. By comparison, my PC's when running Windows 98SE often fail to wake up at all, and those running Windows XP tend to wake up by themselves, unbidden. The only systems where suspend/resume always worked were Linspire and, of course, MacOS.

Neither workaround by itself would work for me, but putting them both together I end up with a clumsy workaround that lets me suspend/resume, and may possibly point the way towards a less cumbersome workaround.

  1. Disable networking via gnome panel
  2. Logout
  3. Select failsafe X-terminal session
  4. Login
  5. sudo /etc/acpi/sleep.sh
  6. (system sleeps)
  7. (normal wakeup by pressing ENTER)
  8. Logout
  9. Select normal gnome session
  10. Login
  11. Enable networking via gnome panel

 



Friday Jan 04, 2008

more on 64-bit Linux

I've found good information by searching blogs, but never before had the information just come to me - in the form of comments on my blog. Thanks to everyone who offered advice! Mikael Gueck's fix sounds intriguing, but after blowing away one installation I'm hesitant to mess with the 64-bit libraries.

 Georgez is right that I'm not at all doing a feature to feature comparison of Solaris and Linux. I'm just trying to use my PC. And yes, my problems are mostly due to proprietary software.You guessed right that the VPN software is Cisco. I just hadn't wanted to single them out for criticism. It's their right to decide not to open source their software, and to decide which platforms to support and not to support. And yes, it was their decision not to support Solaris that moved me onto punchin, for which I'm grateful because I like it a lot better. I'll investigate vpnc to see if it's compatible with the VPN servers on the other end. I guess it ought to be if they're both implementations of a standard protocol (ipsec), but sometimes there's a gap between theory and practice.

I did try installing the non-Adobe flash (gnash) and the non-Sun Java plugin (Icedtea). Gnash plays youtube videos but the controls don't work; I have to close the tab or window to make it stop. I haven't made any Java applet work at all. I haven't looked yet inside Sun to see what the problem(s) are with providing 64-bit plugin support, and when I do I won't be able to write about it, assuming anything inside to be company confidential. But since Java is open source I have to think somebody must have gotten the idea they don't need to wait for Sun, and all the development process is open, so I bet that over in the Java forums I'll find lots of public information about the issues.

Perhaps the most promising answer to my 64-bit problems is a question. Dmitri asks why anyone would need a 64-bit browser. I'm pretty sure I don't. That's just what Ubuntu offered to install. But what about running a 32-bit Firefox on 64-bit Ubuntu? I don't see any such thing looking in Synaptic, or on mozilla.com. 

Searching around I found this posting by Rhaurison. He runs not only Firefox in 32-bit mode but also Opera, Skype, and other applications. He avoids conflicts by keeping 32-bit applications in a chroot environment, and points to this posting by Crad explaining how to set up such an environment.

When/if I try it I'll write about it. And if you've already done it, please post a comment. I love it when good information just comes right to me. Thanks again, people!
 


Wednesday Dec 12, 2007

taming Ubuntu packages 32/64

Thought you had escaped the old package dependency trap? Ubuntu and other Debian derived systems have nice package managers that automate all the dependency checking. But frequently they don't work because I have a 64-bit AMD Athlon and I get errors like this one for Skype:

package architecture (i386) does not match system (amd64)

Of course amd64 runs i386 just fine, but try telling that to the package manager. Well, if you run dpkg manually you can use the --force-architecture flag, but then it's up to you to sort out all the package dependencies. Worse, when you seem to have all the required libraries the executable may fail to run because a dynamic library is only available in 64-bit version and it wants 32-bit.

I finally got Skype running by tracking down all the required 32-bit libraries from http://packages.ubuntu.com/. But it seems there is a tool to make it much easier to manage a 64-bit Ubuntu in a world of 32-bit applications: getlibs. This utility examines an executable and finds all needed libraries. Thanks to Shameel Arafin for his posting that led me to this valuable information.

Indulging myself in a moment of grumpiness: I never have these problems in Solaris! Not on SPARC, nor on x86, nor on amd64. Indeed I never even have to think about whether I'm on SPARC, x86, amd64, or intel64. Grumpiness over, I still like Ubuntu a lot.


Update: Don't fool around with --force-architecture too much on system libraries. My PC wouldn't wake up. Networking and X were trashed, and I reinstalled the OS - quicker fix than troubleshooting. I guess Linux doesn't keep multiple versions of dynamic libraries like Solaris does, and if you get the wrong one you're in for trouble. I expect the getlibs utility, had I found it first, would have saved me from this. And yes, I still like Ubuntu.

 

 

Sunday Dec 09, 2007

MySQL default admin password on Ubuntu 7.10

After installing MySQL on Ubuntu 7.10 (Gutsy Gibbon) I couldn't connect to the database. Usually MySQL is installed with a blank root password which you should immediately change. Here the package I installed already had the password set to something, but what? I found many blog and forum postings telling how to change the password - assuming you already knew it. And I found many saying that you would be prompted for an initial password when you installed it. Not so for me.

 I found the solution that worked at linuxweblog, posted by sandip. You start the safe daemon with an option to disable grant tables, and set the password. Don't forget to kill the safe daemon and restart MySQL normally.
 

Tuesday Nov 20, 2007

Ubuntu 7.10 on an old PC

My little boy kept asking for Ubuntu on his PC, and I finally installed 7.10 Gutsy Gibbon last weekend. I ran into some problems I hadn't seen installing it on two newer PC's, so I thought I'd pass along some tips to others who may be making old systems brand new.

The first problem was that the GUI installer would not run on the small memory (256MB) system, so I had to use the alternate text installer. (Actually, as I found later, that may not have really been the problem.) The MD5 signature of the alternate installer ISO file I downloaded matched, and I burned a CD. That CD worked fine up through the point where it repartitioned the disk, blowing away the old working operating systems. But then the installation failed, on a CD read error.

I burned many more CD's of the older 7.04 Feisty Fawn as well as of 7.10, and all failed. First lesson learned too late: go ahead and spend the extra time letting the installer do the "verify CD" operation before you blow away your old OS. Finally I burned a brand new CD-RW (700MB - small ones won't hold it) at 4X speed, instead of the default "fastest possible speed" I had used earlier. It may have been the name brand (Maxell) CD-RW. Or it may have been writing at a slow speed (that was fast back in 1999 when the target PC was built). Anyway, that did the trick, and I had no more CD read errors. Maybe the original GUI installer would have worked if it had been burned on a high quality CD at low speed.

Once 700MB of software was installed, it immediately set about downloading updates to replace a great deal of what I had just installed. Sheesh, the OS is only a few weeks old and already everything is outdated. Why do they even bother with the CD image instead of just shipping a net bootloader?

The net update stalled - the screen seemingly frozen. After an hour of uncertain waiting, I broke out of it, killed a runaway process, and looked to see whether enough of the system was stable to allow it to recover. The problem was scrollkeeper. For some reason it causes no trouble on two newer PC's, but here it prevents software updates from completing.

http://ubuntuforums.org/showthread.php?t=50796

http://ubuntuforums.org/showthread.php?t=596182 

The draconian fix suggested in a forum, to make all scrollkeeper executables non-executable, took care of the problem and the new system now works fine. Cool games and all.




Tuesday Oct 09, 2007

Solaris OS on UltraSPARC T2

I take it for granted that the same Solaris interfaces and capabilities are available wherever I go, home, office, or travel, never worrying that behind one screen is an UltraSPARC processor, behind another an AMD Athlon processor, and behind another a SunRay server with who-knows-what in it. As Lily Tomlin said "We don't care, we don't have to care."

But today I salute the people who make sure I don't have to care.  Steve Sistare writes about how Solaris OS was optimized to run on the UltraSPARC T2 processor, scheduling for 64 hardware threads, taking best advantage of cache associativity and page mapping, using hardware acceleration, etc. And Ubuntu Linux runs as well.

Thursday Oct 04, 2007

I'm unfair to HP

I measured electricity usage of our home computers using a cheap clamp-on ammeter from Radio Shack. I concluded that you need to make your own measurements because many of my preconceptions did not hold up to actual measurement. Since then I bought a more accurate and convenient Watts Up meter for $21 from amazon.com, and re-measured everything.

    To my colleagues at HP: I apologize for saying your PC used 300 watts.

100 watts is more like it. I likewise overstated the power usage of other PC's. I correct the measurements here, along with some discoveries about Windows and Ubuntu power management. You may be asking, why should I believe you now? Good question. You should not believe some random person you find on the net. You should get your own meter and measure your own equipment.

Why might you halfway believe me, enough to read a bit more? Well, Watts Up does seem to be a more reliable instrument, and unlike my earlier measurements it corrects for the power factor. It displays the power factor, which can vary greatly from one device to another. As a check on the new meter I measured a 3-way light bulb: the 60w setting measured 44w, the 100w setting measured 89w, and the 150w setting measured 135w. At least I'm assured it's not measuring high.

A colleague in the SPEC power committee laughed at my new meter, “You mean you trust a Watts Up meter?” For the upcoming SPEC power benchmarks that team of engineers from many companies, universities, and agencies has written elaborate requirements for the power meter and measurement protocol to be sure that results tested by one lab will be comparable to results tested by another lab. But for home, if you can get any information at all about the power your electronic gear uses, that's good.

First I looked at how many watts they used in normal home, light load operation. I switched the Linux distro on PC2002 to Ubuntu 7.04 Feisty Fawn, and its power management software seems to be the equal of Windows.


OS Computer Monitor Speakers Total
PC1999 Linux 39 26 1 66
PC1999 Windows 98 37 26 1 64
PC2002 Linux JDS 95 34 - 129
PC2002 Windows XP 61 34 - 95
PC2002 Linux Ubuntu 57 34 - 91
PC2006 Solaris 77 22 - 99
PC2006 Windows XP 67 22 - 89
 

Next I looked at how many watts they used under a heavy load. These weren't identical controlled loads, and workload really matters to how much power is used.


OS Computer Monitor Speakers Total
PC1999 Linux 46 26 1 73
PC1999 Windows 98 55 26 1 82
PC2002 Linux JDS 95 34 - 129
PC2002 Windows XP 100 34 - 134
PC2002 Linux Ubuntu 118 34 - 152
PC2006 Solaris ? 22 - ?
PC2006 Windows 115 22 - 137
 

How much of difference does workload make? Here is the power consumption of PC2002 running Ubuntu:

Operation

Watts (PC only)

download OS updates

70

system quiescent

57

100-Base-T file copies

80 - 100

Play Supertux arcade game

116

Scanning document with USB scanner and xsane

118

Afterwards [Note 1]

115

Killed mysqld

60

[Note 1] I don't know what set off the MySQL daemon, whether it was doing useful work, or had just run wild. But without the power meter, had I noticed anything amiss at all, I would have just been puzzled that the fan was running. When I stopped the daemon, power usage fell back down to normal levels.

Next I suspended each PC by pressing the sleep button as the system is configured out of the box.


OS Computer
PC1999 Linux 27
PC1999 Windows 27
PC2002 Windows 2
PC2002 Linux Ubuntu 2
PC2006 Windows 44
 

But wait, what's going on with that new HP PC taking so much more power suspended than the old HP PC? I looked at the Windows power management control panel and started reading the documentation. It turns out that the old PC was set by default for the sleep button to put it into what Windows calls “standby” state, while the new PC was set by default for the sleep button to put it into “away” mode. Away mode doesn't do much, and is intended for systems that might still be doing some processing without a person sitting there. So it's kind of like forcing it immediately into the quiescent state it would eventually go into if you just left it alone, and the monitor blanks. I changed it to go into suspend state, and then it used just 6 watts. Hibernate state used 4 watts. Michael Chu wrote a great description of how Windows XP power management works.

Here are some details of my configurations.


OS Computer Monitor Speakers
PC1999 Primary: Sun JDS3 Linux; Secondary Windows 98SE PC, Sony Vaio, Pentium III, 500MHz NEC, 14” LCD, 1024x768 Sony
M2000 Primary: Linspire Linux; Secondary: Windows 98SE Laptop, Sharp Actius, Mobile Pentium II, 300MHz integrated integrated
PC2002 Primary: Ubuntu 7.04 Linux; Secondary Windows XP Home PC, Compaq S6000Z, Athlon 2600XP, 1.9GHz Samsung 170MP, 17” LCD, 1280x1024 integrated
PC2006 Primary: Solaris Nevada; Secondary: Windows XP Media PC, HP a1540n, Athlon 64 x2 4200 dual core, 2.2GHz Sharp LL193A, 19” LCD, 1280x1024 integrated
M2007 Debian Linux Tablet, Nokia N800, TI OMAP 2420, 330MHz integrated integrated
 

About

I am a software engineer in San Diego, president of the Standard Performance Evaluation Corporation (spec.org), formerly a mathematician and a violist.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today