Basic Linux Problems with Solutions

by Subramanian 2012-09-26 19:18:10

These are some various linux/unix problems

Problem:
Network interface (or anything else on the pci bus) says "SIOCSIFFLAGS: Resource temporarily unavailable"
Cause:
No IRQ assigned to the device, check /proc/pci (irq says 0)
Solution:
Enter the bios setup (F1 or Del on boot), disable the option 'Plug n Play OS'.


Problem:
USB mouse using /dev/psaux, the ps/2 mouse device.
Cause:
Bios usb legacy support in action, probably because Linux didn't probe for USB devices (which causes the bios to release control of them).
Solution:
Compile the kernel with USB support, Input Core and USB HID.


Problem:
USB mouse still doesn't work on /dev/input/mice, but /dev/psaux, even when USB support is compiled in.
Cause:
Legacy USB support again. You might not have compiled in support for your USB chipset (the UHCI parts in USB support).
Solution:
Compile UHCI. If not working, try the alternate drivers.


Problem:
Accidentally a binary file causes the all the characters you type next to show up as odd symbols.
Cause:
The binary file contained a 016 (so, Shift Out) character.
Solution:
Run 'reset'. You can alsO specifically print a 017 (Shift In) character using echo -e '\017'.


Problem:
You scanned an ext3 file system with fsck.ext2/e2fsck, and now you can't boot.
Cause:
fsck.ext2 deleted the journaling inode, essentially making it an ext2 fs.
Solution:
Either use tune2fs -j device to add the journal node again, or use [c]fdisk to set the partition type to ext2 instead of ext3.
Reason:
tune2fs -j will fix the fs back to ext3 journaling mode, cfdisk will have the system use it as unjournaled ext2.

Problem:
Some program (especially older ones like RealPlayer, and other multimedia tools/players) hangs when loading, or give a message like "Can't open audio device /dev/dsp: Resource temporarily unavailable." or "No Sound"
Cause:
Trying to open /dev/dsp (the sound device), but it's busy already taken so the program waits or fails.
Solution:
Kill whatever might be hogging it, like artsd. You can find the specific PID using fuser /dev/dsp.
Reason:
The app will now have exclusive sound access, and will load without waiting for the device to be free.

Problem:
Lilo doesn't boot your new kernel, giving you odd boot signature messages.
Cause:
It can't find the 0xAA55 byte at the end of the boot sector, probably because you didn't run 'lilo' after updating lilo.conf or replacing the kernel file.
Solution:
Run lilo. Get a rescue floppy if needed.
Reason:
Lilo will now store the correct abs disk location for the kernels.

Problem:
The localhost loopback address 127.0.0.1 doesn't work, and so some servers stop functioning and you can only connect to yourself through your lan address.
Cause:
The lo interface might not be configured right.
Solution:
Run "ifconfig lo up 127.0.0.1"
Reason:
The loopback interface should now be up and configured with the standard loopback address.

Problem:
CUPS printer claim to be ready, but is turned off when you start a job, and deletes the job when you start the printer.
Cause:
You've upset the manual gods.
Solution:
Curse, read the manual, delete all the cups files, read the manual, download and compile cups, read the manual, try again.
Reason:
The manual gods will be happy with your sacrifice and will allow you to print (worked for me atleast Smile

Problem:
When using the disk kupdated hogs the cpu, making the system slow to a crawl. The mouse stops responding for several seconds at a time. Serial comm gives errors like "/dev/ttyS0: 1 input overrun(s)".
Cause:
Slow IDE throughput due to unsupported chipset. Run 'hdparm -t /dev/hda' to make sure (it will be really low, around 2-6mb/s)
Solution:
Compile a kernel that supports your IDE chipset (just enable them all).
Reason:
koala_man: Btw, the 'reason' part for the 'kupdated hogs CPU because of disk usage' thing is because the system runs in PIO mode, meaning the main CPU have to manage all reading and writing, rather than letting the chipset use busmastering.

Problem:
Konqueror doesn't show gif images.
Cause:
No gif support in QT
Solution:
Edit $QTDIR/src/kernel/qgif.h, define QT_BUILTIN_GIF_READER as 1 (tiny file, plenty of comments). configure with -qt-gif. No need to recompile konqueror.
Reason:
The QT library now supports gif, and konqueror can use it.

Problem:
GTK apps like gimp and xchat suddenly got disgusting fonts.
Cause:
Something changed the settings, possibly an install of another gtk version.
Solution:
Make a
~/.gtkrc file:

style "user-font"
{
font="-misc-fixed-medium-r-normal-*-14-*-*-*-c-*-iso8859-1"
}
widget_class "*" style "user-font"

Replace the font if that doesn't suit you.


Problem:
Konqueror is slow when browsing FTP sites.
Cause:
The icon preview feature occupies the connection, forcing a relogin when changing directories.
Solution:
Uncheck 'ftp' in the KDE Control Center under Previews in File Manager.
Reason:
Konqueror will now use the connection it made for browsing, rather than showing icon previews.

Problem:
When starting Half-Life in Wine, a message comes up saying "Could not open MCI file for playback: 279: Cannot use 'all' as the device name with the specified command"
Cause:
Dunno.
Solution:
Run as "wine hl.exe -- -console"


Problem:
Half-Life in Wine has no sound.
Cause:
DirectSound errors?
Solution:
Try setting voice_enable "0" in config.cfg


Problem:
When running Half-Life in Wine, pressing Tab causes the screen to go black (but displays "Half-Life" in the left corners).
Cause:
Locked up Alt key perhaps
Solution:
Click somewhere, then click the top left corner. Press Escape then Resume Game. Then hit Alt.


Problem:
Sendmail ignores aliases in /etc/mail/aliases, even after sighups.
Cause:
Sendmail reads from a database, not that file.
Solution:
Use the -bi option (or even better, run newaliases).
Reason:
It'll update the database (/etc/mail/aliases.db).

Problem:
KMail's menu bar is missing.
Cause:
I dunno, messing with styles and themes possibly.
Solution:
Set MenuBar=Disabled in ~/.kde/share/config/kmailrc to, yes, Enabled.


Problem:
Mounting of NFS shares is slow, taking exactly five minutes.
Cause:
Not quite sure.
Solution:
Install Portmap on both client and server.


Problem:
Apache's mod_proxy won't allow CONNECTs on vhosts.
Cause:
I think the manual lies. Mod_proxy doesn't seem to like vhosts.
Solution:
Make it server wide.


Problem:
Can't figure out how to whitelist sites using Apache proxies (but can blacklist with ProxyBlock)
Cause:
Not pondering long enough.
Solution:

Order Deny,Allow
Deny from all



Order Allow,Deny
Allow from all



Problem:
nvtv only gives black/white output (on an old TV using an s-video to scart converter).
Cause:
Cheap converter
Solution:
Set the Connector to Convert.
Reason:
Quoth the faq, "You have a SVideo (S-VHS) to Composite connector that uses only the luminance (Y) line of the SVideo connection."

Problem:
Quick access to the konqueror options for changing browser identification and enabling/disabling Java/plugins/javascript not present in the Tools menu.
Cause:
These are additional plugins not present in all default installs.
Solution:
Install konq-plugins in debian, or the kde addons module from the source tree.


Problem:
Can't make KDE display an html web page as desktop background wallpaper. (Redundant wording for google's pleasure)
Solution:
kwebdesktop

Problem:
Neverwinter Nights crashes [on debian], giving only "Error" as a message.
Cause:
Running in 16bit mode.
Solution:
Run X in 24bit mode.


Problem:
Irssi or anything else just hangs, and Ctrl+Q doesn't fix it. And you're using screen.
Cause:
Screen has an [ES]TX feature too. Perhaps you managed to trigger it.
Solution:
Ctrl-A Q


Problem:
The Cisco vpnclient says "Could not attach to driver. Is kernel module loaded?", and yes, the module's loaded.
Cause:
Nowhere to route packets.
Solution:
Check that your nic is listed in ifconfig (if it's not and it's usb, try [re]loading usb-ohci or ohci-hcd). And up it with dhcpcd or something.


Problem:
atitvout says "VBE call failed", esp on Radeon Mobility 7500 (M7 LW).
Cause:
Something about the card not detecting tv-out by itself.
Solution:
Turn the box off. Plug in TV-out. Boot. Start X, and put it in 640x480 (or 800x600). atitvout auto pal; atitvout -f t
Reason:
The card will sense the TV and allow you to turn on tv output.

Problem:
DVD playing using mplayer and TV-out sucks. With mplayer -vo xv, only the top half of the image is shown. With x11 it only occupies a small area, and with -zoom it runs crap slow and the interlacing is just awful.
Cause:
Dunno
Solution:
Set X to 640x480, mplayer -noframedrop -vo x11 -fs file
Reason:
Dunno, but it looks really great.
Problem:
UXterm doesn't show bold fonts (or xterm with wideChars (-wc))
Solution:
Set a wideFont ala "xterm*VT100*wideFont: -efont-biwidth-medium-r-*-*-14-*-*-*-*-*-*-*"

Problem:
Compiling irssi says "/bin/sh: 0: not found" (OpenBSD).
Solution:
Does your locale exist? Try unsetting all the LC_* variables, configure and make again.

Problem:
IMAP (imaps) hangs in kmail.
Cause:
kdelibs built without SSL, the imaps kioslave is built but just hangs.
Solution:
Recompile with ssl.

Problem:
Gentoo says "* error scanning /etc" whenever emerge does something.
Cause:
'find /etc' said modules.conf was there, but wasn't there. An xfs corruption, obviously.
Solution:
booted from a rescue cd and did xfs_repair. Everything worked smoothly after that.

Problem:
(ok, so this isn't linux) On Solaris on a sun-ray thin client, xlocks locks the screen when you pull out the smart card and I want to change or disable this.
Solution:
Kill your existing utaction process, and/or start a new one with the desired action in -d. (/opt/SUNWut/lib/utaction -d command). Also note the -e if you want the action to only run once.

Problem:
(Solaris again) While compiling OpenGL applications using GLU on solaris, linking failes with Undefined symbol: __1cG__CrunKpure_error6F_v_ __1cG__CrunMex_rethrow_q6F_v_ c::c(N6, (int0_t)) c::c(N6, (int0_t)), ld: fatal: Symbol referencing errors. No output written to fluffy
Cause:
GLU requires libCrun which in turn requires libstdc++.
Solution:
Link with both these libs, -lCrun -lstdc++

Problem:
Cinelerra just hangs with a blank window titled "x".
Solution:
Try it in another wm. Or for Ion, use a FloatWS.

Problem:
Getting accelerated X-video output on a UniChrome Pro CN700 on Ubuntu 7.04 (Feisty Fawn) on an EPIA EN12000EG for TV-out playback.
Solution:
As of 2007-05-11, OpenChrome supports the CN700 in svn (but not in the stable release). Get and compile the driver (requires automake1.9, not the fancy new stuff), replace via_drv.so in /usr/lib/xorg/modules/drivers with the OpenChrome one. Optionally load the 'drm' and 'via' kernel modules. Then configure X to use the 'via' driver. Here's my xorg.conf, for a widescreen PAL TV. Hope you have an easier time than I did.

Problem:
irrecord fails on lirc 0.8.2, with kernel 2.6.22.1. It when a button is pressed, it exits immediately but claims "irrecord: no data for 10 secs, aborting, irrecord: gap not found, can't continue"
Solution:
lirc 0.8.2 doesn't support this kernel (it's probably fixed in the latest version by the time you read this). Downgrade to 2.6.20 and it works like a charm.

Problem:
Keyboard shortcuts for internet/multimedia keys (Volume Up/Down) don't work in games/rdesktop/stepmania.
Cause:
Games tend to grab the keyboard for exclusive access, so no other apps including the shortcut daemon can get to them.
Solution:
Use actkbd
Reason:
actkbd uses the evdev interface (/dev/input/event*), so it gets events regardless of the X server.

Problem:
Aplay/mplayer only plays 48000 Hz stereo files, saying "[AO_ALSA] Unable to set hw-parameters: Invalid argument" and "aplay: set_params:961: Unable to install hw params:" irrespectively. No mono and no non-48kHz files work.
Cause:
Alsa doesn't know how to resample, but doesn't mention that even when you specifically ask it to in .asoundrc.
Solution:
Rebuild alsa-libs to include all the pcm plugins. In Gentoo, this means sticking ALSA_PCM_PLUGINS="*" in make.conf and emerge alsa-lib.
Reason:
Alsa should now be able to resample audio and magically play all the other formats, even without ~/.asoundrc or /etc/asound.conf

Problem:
Latex on Ubuntu says

kpathsea: Running mktexmf ptmr8t
! I can't find file `ptmr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input ptmr8t
(for pslatex) or
kpathsea: Running mktexmf pplr8t
! I can't find file `pplr8t'.
<*> ...:=ljfour; mag:=1; nonstopmode; input pplr8t
(for pdflatex)
Cause:
Missing fonts
Solution:
Install texlive-fonts-recommended

Problem:
When trying to automake something, it says

src/Makefile.am:85: Libtool library used but `LIBTOOL' is undefined
src/Makefile.am:85: The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'
src/Makefile.am:85: to `configure.ac' and run `aclocal' and `autoconf' again.
src/Makefile.am:85: If `AC_PROG_LIBTOOL' is in `configure.ac', make sure
src/Makefile.am:85: its definition is in aclocal's search path.
and AC_PROG_LIBTOOL is indeed in configure.ac.

Cause:
libtool was not installed
Solution:
apt-get install libtool

Problem:
GtkRadiant 1.5 (64bit) maps render and play fine in Quake 3 / OpenArena, but the lighting is all wrong/bright/shadowless and vis says

--- BasePortalVis (80) ---
0...1...2...3...4...5...6...7...8...9...************ ERROR ************
pthread_join failed
2.5.17
threads: 4
Q3Map - v1.0r (c) 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.17
GtkRadiant - v1.5.0 Aug 7 2008 02:15:55
Last one turns the lights off
...
--- TraceGrid ---
0...1...2...3...4...5...6...7...8...9...************ ERROR ************

pthread_join failed

Cause:
Something is broken in the Q3Map2 SMP support.
Solution:
Add "-threads 1" to both the vis and the light steps to force single-threading, which does work.

Problem:
OpenWRT/Tomato on a WRT54GL fails to get DHCP on eth0.1, while a computer works fine on the same cable.
Cause:
The ISP might be limiting by MAC to one box per customer.
Solution:
Wait some hours without using the computer, then try the router again. Or for instant gratification, set the mac address of eth0.1, eth0.0 and eth0 to the computer's.

Problem:
Postfix SMTP auth fails with "5.7.8 Error: authentication failed: authentication failure" and a mail.log full of

postfix/smtpd[5227]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
postfix/smtpd[5227]: warning: SASL authentication failure: Password verification failed
postfix/smtpd[5227]: warning: 217-14-10-74-dhcp-osl.bbse.no[217.14.10.74]: SASL PLAIN authentication failed: authentication failure
even though /etc/sasldb2 exists. This is on Debian 5.0, lenny.
Cause:
SASL thinks it has to look for /etc/sasldb2 in its chroot dir, while we really want it to use saslauthd.
Solution:
Stick the following in /etc/postfix/sasl/smtpd.conf:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
log_level: 5
Now Postfix/SASL should use the daemon rather than the file.

Problem:
glxinfo (and opengl apps) crashes X, using OpenChrome on VIA hardware. glxinfo says

name of display: :0.0
libGL error: open DRM failed (Operation not permitted)
libGL error: reverting to (slow) indirect rendering
display: :0 screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
And the X server says "getDrawableInfo failed to look up window".
Cause:
Bad owner/permissions on /dev/dri/card*
Solution:
chown root:video /dev/dri/card*
chmod 660 /dev/dri/card*

Problem:
'hunt' says "hunt: Can't find myself" when starting
Cause:
Your local hostname fails to resolve
Solution:
Add your `hostname` to /etc/hosts
1296
like
5
dislike
2
mail
flag

You must LOGIN to add comments