Ask Klaus!


Klaus Knopper is the creator of Knoppix and co-founder of the LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com

Rogue Screen Resolution

Question:

I need your help to overcome a problem with a rogue screen resolution using Ubuntu 8.04.

I might have caused the problem by pressing the ESC key when the Splash Screen was showing. This was in a doomed attempt to see what was loading, and thus learn some more about the problem.

The LCD screen I'm using supports a resolution of 1280x1024, but after I pressed ESC, the resolution changed to 1280x768 for the User/Password window and for all three of my user windows. I have looked at /etc/X11/xorg.conf, which now has a reasonable set of resolutions (1280x1024, 1280x960, 1152x864, 1024x768, 832x624, 800x600, 720x400, and 640x480).

However, in System | Preferences | Screen Resolution, the monitor is shown as UNKNOWN despite the name in xorg.conf being PLE1900 (for the iiyama E1900S LCD monitor), and the list of resolutions now reads 1280x1024, 1280x960, 1280x800, 1280x768, 1024x768, 800x600, and 640x480, though when things went wrong, 1280x1024 disappeared. The refresh rate is 60Hz.

Where is the system picking up these resolutions, and how can I eliminate the 1280x768?

I used sudo displayconfig-gtk and was able to select 1280x1024, and now two of my three users are OK, but although my root primary user desktop is now 1280x1024, it has white bars on the left and right of the screen, as well as the normal white bars on the top and bottom. The User/Password screen cannot be changed from a resolution that is vertically stretched, so a circle becomes an ellipse with the longer axis vertical. (I think the resolution here is 1280x768.) The Splash screen has remained OK with no distortion.

Can you please tell me what is happening and how to correct the fault? I have read that Ubuntu will soon abandon xorg.conf. How will I be able to control things under the new configuration system?

Answer:

I don't think that switching back from the boot splash screen to the readable text console by hitting ESC really caused a problem for the X server, unless it uses the framebuffer driver and is thus staying with the textmode resolution on the console.

The default and setup resolutions depend on your version of Xorg. I'm not sure which version of Xorg is used with your distribution, but if it is not older than about half a year, it should be using the randr extension, which means:

Please check to see whether such a desktop tool is running in your desktop panel. If it isn't, try starting, for example, krandrtray of KDE, which will place a small monitor settings applet in your desktop panel that you can control with left- or right-button mouse clicks. I believe your desktop configuration manager also uses the X server randr extension and stores a setting somewhere that will get activated on login.

The good news is that you don't have to change your X server configuration anymore. The bad news is, if you try, your attempt will probably be ignored.

You can force a specific resolution for a randr-enabled X server by using the xrandr utility as follows:

xrandr --output LVDS -s 1280x1024

or

xrandr --output LVDS --mode 1280x1024

One of these two commands should work.

You can also change resolutions for external monitors by using --output VGA instead of LVDS.

If you have problems with cut off borders of the screen, the most convenient way to fix these problems might be updating the Xorg server and the Xorg video chipset-specific modules needed for your card, rather than trying to set different options in /etc/X11/xorg.conf. Widescreen displays have much better support in newer Xorg versions.

Boot Issues

Question:

On the main drive, I have a small boot partition (akin to a boot CD) with vmlinuz/initrd installed in the /boot directory. Using grub's configuration file menu.lst, I specify the root device as /dev/sdbx for a distro installed on /dev/sdbx. But so far this only works with Ubuntu Ibex. Fedora and SUSE fail - why?

Answer:

You have to make sure that either the initial ramdisk or the kernel contains all USB drivers necessary to operate a USB-storage device. The necessary components include:

Depending on the kernel configuration, you might have to load dependencies, such as the USB device white/blacklists, as well. You can check modules with the modinfo modulename command to uncover such dependencies, though all modules might not fully support this command. If you have the opportunity to get some kind of emergency shell when the USB hard disk doesn't mount, check dmesg for a missing module load attempt.

In most cases, the initramfs-tools will take care of module dependencies in the initial ramdisk, but sometimes you have to help by adding them manually to /etc/initramfs-tools/modules prior to calling mkinitramfs or update-initramfs.

Also, the /dev/sd* device files should be included in the initial ramdisk, so that the disks actually get mounted.

In some cases, accessing a USB hard drive is simply a timing problem. The USB controller needs some time for detecting and activating a device - up to 20 seconds. If you have access to the boot scripts used with your distro, adding a sleep 10 before any mount attempt might help. Booting with kernel append= option:

usb-storage.delay_use=10

might produce the necessary delay on the kernel side when USB storage is compiled in.

Figure 1: The dmesg command outputs the contents of the kernel message buffer.

Laptop Sound Card

Question:

I recently installed Ubuntu 8.10 on my Medion MD 98300 laptop in an effort to get rid of the Windows Vista disaster that was delivered with my system. Almost everything works perfectly, but I am experiencing a few annoying problems. The biggest problem for the moment is the sound. Playing music from my external hard drive is no problem, but the music only plays through the built-in speakers. From the moment I plug into a jack (with the cable going to my stereo-system), I have no line out.

I tried to find a solution on the Ubuntu documentation pages, but the proposed remedies (like upgrading to the most recent ALSA driver) had no result. I can't use a headphone or line out.

I looked on several forums to find people with similar problems, but so far I haven't found a solution. I wonder whether you could give me any advice to get rid of this sound problem. (The sound card is Intel HDA with a Realtek ALC 883 audio-chip.)

Answer:

Your sound card might suffer from a faulty internal mixer configuration. I have seen this many times for the chipset you mention. The problem is that no matter which value you set for the line out volume, it does not change anything. In fact, this also sometimes happens with the Master and PCM settings.

The cause for this problem is often switched channels. In other words, the PCM or line out channel isn't really doing what the mixer program says it is doing. Instead, some other control on the mixer governs the function you are looking for. Often igain or phone out (really!) sets the value you would have expected to change when moving the line out slider.

To solve the problem, first start the mixer tool of your choice. The more buttons and sliders of different channels it has, the better. I usually try aumix or its graphical equivalent aumix-gtk first, but kmixer from KDE should do fine as well.

Now play a sound file with the output socket attached to the speakers. (I assume you did not accidentally plug the speakers into the microphone or line-in socket.) Set Master, PCM, and line out to significant values (80 percent should be sufficient), which will probably not solve the problem yet, and then also increase all other output channels to higher values.

Be careful with any so-called monitor or feedback settings, which could cause ugly noises when your laptop microphone starts picking up sound from the speakers.

If you have increased all output channel settings and still nothing happens, try the effect or amplifiers settings next. One of these settings might really be the output level control you are searching for. As a last resort, also try the input level settings, but be aware of the aforementioned loud resonance effects this can cause, especially when unplugging your stereo cable with the volume still set to maximum and the music still playing.

If these steps do not bring up the sound, you might really need a newer driver (or rather, kernel) for this sound card; however, it is rare for the internal speakers to work and the line out to fail. In most cases, sound cards simply don't work at all when drives or interrupts are not auto-detected correctly.

Another possibility is that the socket is simply broken, but this would cause problems when you are using other operating systems in addition to Linux.

Sometimes you can get fooled by an additional sound card (like a webcam with a mic), which claims to have the primary mixer setting. (In other words, you are just working on the wrong sound device.)

In that case, you will have to use a mixer that can handle more than a single sound card and switch settings to the real output device.

Yang MingQi, Fotolia

Linux OEM Software

Question:

I recently purchased a DVD burner for the Ubuntu Linux desktop computer in my home, which had the Nero OEM software Nero 7 Essentials included with it.

I know that I do not require Nero to burn DVDs on my Linux computer, but I was thinking that I already have the license for the software, and I am familiar with using it on Windows, so shouldn't I be able to use it?

I went to the Nero website and found that there has been a Linux version available since March of 2005.

I probed around the website looking for Linux downloads and couldn't find anything.

So, I pursued the problem further by sending an email to their customer support.

The response I received was, "Unfortunately your request is not possible. If you want the Linux version of Nero, you have to purchase it."

I replied to customer support and corporate headquarters, emphasizing my interest in Nero and that I already have a valid, unopened Windows license and I would merely like to exchange the Windows license for one of equal value on Linux.

Their response was that there is no Linux equivalent, only the full version is available for Linux, and I was offered an RMA letter to return the item to the retail store to exchange it. But, my problem wasn't with the hardware, it was with the Nero software.

So, I attempted to settle for an archived version of Nero 3, which is priced at the same monetary value as the Nero 7 Windows Essentials. The customer support response was, "Since OEM versions are designed to only be packaged with hardware and their costs are built in to the price of the hardware, which varies by manufacturer and retailer, there is no way to compare the value of an OEM program to that of a full retail product. Full versions include encoders/decoders and features that are not available in OEM versions."

In summary, I guess if I really want the Nero software for Linux I will have to purchase it.

I understand that there are open source solutions that could provide the functionality that I am looking for to burn DVDs. But, what about those corporate situations where technical support is a requirement and, just like everyone else, IT is on a tight budget?

My overall question is not really about software for the DVD burner, but about Linux software support in general. Typically, when you purchase hardware, you will receive supporting software that is compatible with Windows, and if you're lucky, Macintosh. If the software vendor already has Linux versions available, why wouldn't this be one of the operating systems that is supported with the OEM software?

Answer:

A remarkable story. First, I must admit that I know of no advantage that a proprietary CD/DVD burning program could give you compared to an open source program.

I use Cdrecord/wodim (or the graphical tool K3b) for burning CDs and growisofs for DVDs, and yet I have not missed anything.

DVDStyler can be used to create nice multimedia menus for video DVDs, and you will also find open source video processing and encoding/effects software such as Kino/Cinelerra and FFmpeg.

As for your question about support: Indeed, the open source community has no single proprietary vendor who could sell you commercial support. Instead, many professional firms can and will sell commercial support, and you can actually make a choice and take the one that fits your (or your company's) needs. The sservice ranges from a simple hotline, to training, to full 24/7 support where a technician flies to your site the moment you need one.

The part of the open source license that says "no warranty" might be confusing. Of course, commercial support is often available, just not necessarily directly from the individual programmer.