PALACIO de CRISTAL
|
| |
 |
Just a place to write down my Linux experiences and if
I find some information or news items that I think are
really worthwile I'll probably mention them here as
well.
Ok, just learned that having two sound cards in your
system can lead to all kinds of trouble.
Some time ago I had bought some headphones from Altec
Lansing that came with an USB adapter. Not expecting
it to work in Linux I plugged it in, but lo and behold
it actually worked and I had now two sound cards in my
system according to Fedora's Soundcard Detection
utility. So far so good.
Soon after I removed the USB module and just connected
the headphones directly like I had always done and
life was perfect.
Until quite some time later I had to reboot my machine
and suddenly I was getting all these weird ALSA errors
from all kinds of programs (see for example the image
of the pop-up that appeared at KDE startup).
The strange thing was that the Soundcard Detection
program reported everything okay, the right sound card
was detected, I could hear the sample and on top of
that several programs did actually produce
sound. So what was going on here?
Finally today I got a hint trying to run
alsamixer when it gave me the following error:
alsamixer: function snd_ctl_open failed for default: No such device
Now this was something I could google for. So I ended
up with several leads of which two led to the final
solution:
- ALSA user list
which didn't really have a direct solution for
my problem, but it made me look at the modules
where I found snd-usb-audio. So what
was that doing there when I had removed that
USB adapter ages ago? Of course /etc/modprobe.conf
was the "culprit" here. Somehow plugging in
the USB adapter had inserted some lines into
the file but removing the adapter hadn't
deleted them! - LinuxQuestions.org
pointed me to some files
I had never heard off: /etc/asound.state and
/etc/asound.conf. The first didn't seem too
interesting, but the second had things like
card numbers which made me think that maybe
they had gotten mixed up somehow because for
a short time I had two sound cards in my
system. So I removed both and restarted the
Soundcard Detection program. And like I had
imagined the numbers were different in the
new asound.conf!
So everything seems to work again. Now to figure out
why the microphone only picks up sounds very faintly.
Well, at least we know now how Linus feels about Windows:
I'm not claiming that the current code cannot work. It clearly *does*
work for a lot of people. But I'm claiming that it's STUPID.
So don't argue that "it works". Windows works, kind of. That doesn't make
it less stupid and badly designed!
Linus must have been in one of his poetic moods again ;-)
It's one of those rare 'perfect' kernels. So if it doesn't happen to compile with your config (or it does compile, but then does unspeakable acts of perversion with your pet dachshund), you can rest easy knowing that it's all your own d*mn fault, and you should just fix your evil ways.
Yesterday I upgraded our Dell Latitude to FC6, it was running FC4 and
it was getting difficult to encounter some of the packages that I use
on the desktop system (like Twinkle for example).
Well I can tell you that the installation went a whole lot better
compared to the problems I had with the desktop machine!
There was just one thing that bothered me. Where the desktop actually
seemed faster (as it was supposed to according to
this ,
see the Performance section) the latop felt sluggish somehow.
Applications were taking too long to load. When I tried measuring
the drive's performance I got this:
root# hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads: 48 MB in 3.65 seconds = 13.15 MB/sec
which is way too slow for that drive. Then I remembered that I had the
same problem before with this laptop and it was because of the polling
KDED did of the CD rom drive (to detect media changes and such).
Stopping KDED (which you can do in the KDE Control Center -> KDE
Components -> Service Manager) would solve the problem.
But with FC6 this didn't seem to help. I found an option called
Enable CD polling in the Peripherals -> Storage Media of the
Control Center, but the option was grayed out so I couldn't change it.
I finally found out today that it is HAL
which does the polling nowadays, specifically the hald-addon-storage
module. Killing it restored the expected performance:
root# hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads: 106 MB in 3.02 seconds = 35.15 MB/sec
So now it was time to figure out if something could be done about it.
According to to this forum message
it is a known problem with Dell laptops but it seems that the
blacklisting it talks about doesn't work (anymore) in FC6.
In the end I found out that HAL uses a set of rules to determine
what to do with certain hardware which are stored in
/usr/share/hal/fdi. By doing a lshal I could get a list
of all the detected devices and find the information about the
particular CD drive used in the laptop:
udi = '/org/freedesktop/Hal/devices/pci_8086_248a_ide_0_1'
info.udi = '/org/freedesktop/Hal/devices/pci_8086_248a_ide_0_1' (string)
linux.subsystem = 'ide' (string)
linux.hotplug_type = 1 (0x1) (int)
info.product = 'IDE device (slave)' (string)
ide.channel = 1 (0x1) (int)
ide.host = 0 (0x0) (int)
info.linux.driver = 'ide-cdrom' (string)
info.parent = '/org/freedesktop/Hal/devices/pci_8086_248a' (string)
info.bus = 'ide' (string)
linux.sysfs_path_device = '/sys/devices/pci0000:00/0000:00:1f.1/ide0/0.1' (string)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1f.1/ide0/0.1' (string)
udi = '/org/freedesktop/Hal/devices/storage_model_HL_DT_STCD_RW/DVD_ROM_GCC_4240N'
org.freedesktop.Hal.Device.Storage.method_execpaths = {'hal-storage-eject', 'hal-storage-closetray'} (string list)
org.freedesktop.Hal.Device.Storage.method_argnames = {'extra_options', 'extra_options'} (string list)
org.freedesktop.Hal.Device.Storage.method_signatures = {'as', 'as'} (string list)
org.freedesktop.Hal.Device.Storage.method_names = {'Eject', 'CloseTray'} (string list)
info.interfaces = {'org.freedesktop.Hal.Device.Storage', 'org.freedesktop.Hal.Device.Storage'} (string list)
info.addons = {'hald-addon-storage'} (string list)
block.storage_device = '/org/freedesktop/Hal/devices/storage_model_HL_DT_STCD_RW/DVD_ROM_GCC_4240N' (string)
info.udi = '/org/freedesktop/Hal/devices/storage_model_HL_DT_STCD_RW/DVD_ROM_GCC_4240N' (string)
storage.cdrom.write_speed = 4234 (0x108a) (int)
storage.cdrom.read_speed = 4234 (0x108a) (int)
storage.cdrom.support_media_changed = true (bool)
storage.cdrom.hddvdrw = false (bool)
storage.cdrom.hddvdr = false (bool)
storage.cdrom.hddvd = false (bool)
storage.cdrom.bdre = false (bool)
storage.cdrom.bdr = false (bool)
storage.cdrom.bd = false (bool)
storage.cdrom.dvdplusrdl = false (bool)
storage.cdrom.dvdplusrwdl = false (bool)
storage.cdrom.dvdplusrw = false (bool)
storage.cdrom.dvdplusr = false (bool)
storage.cdrom.dvdram = false (bool)
storage.cdrom.dvdrw = false (bool)
storage.cdrom.dvdr = false (bool)
storage.cdrom.dvd = true (bool)
storage.cdrom.cdrw = true (bool)
storage.cdrom.cdr = true (bool)
storage.requires_eject = true (bool)
storage.hotpluggable = false (bool)
info.capabilities = {'storage', 'block', 'storage.cdrom'} (string list)
info.category = 'storage' (string)
info.product = 'HL-DT-STCD-RW/DVD-ROM GCC-4240N' (string)
storage.size = 0 (0x0) (uint64)
storage.removable = true (bool)
storage.removable.media_available = false (bool)
storage.physical_device = '/org/freedesktop/Hal/devices/pci_8086_248a_ide_0_1' (string)
storage.firmware_version = 'D110' (string)
storage.vendor = '' (string)
storage.model = 'HL-DT-STCD-RW/DVD-ROM GCC-4240N' (string)
storage.drive_type = 'cdrom' (string)
storage.automount_enabled_hint = true (bool)
storage.media_check_enabled = true (bool)
storage.no_partitions_hint = true (bool)
storage.bus = 'ide' (string)
block.is_volume = false (bool)
block.minor = 64 (0x40) (int)
block.major = 3 (0x3) (int)
block.device = '/dev/hdb' (string)
linux.hotplug_type = 3 (0x3) (int)
info.parent = '/org/freedesktop/Hal/devices/pci_8086_248a_ide_0_1' (string)
linux.sysfs_path_device = '/sys/block/hdb' (string)
linux.sysfs_path = '/sys/block/hdb' (string)
Using the information above I created my own fdi file
information/30private/10-crappy-dell-cddrive.fdi
with the following rules:
<deviceinfo version="0.2">
<device>
<match key="storage.model" string="HL-DT-STCD-RW/DVD-ROM GCC-4240N">
<merge key="storage.media_check_enabled" type="bool">false<merge>
<match>
<device>
<deviceinfo>
service haldaemon restart)
everything was back to normal. Of course the system won't automatically
detect any CDs being inserted into the drive, but I can live with that.
(And yes, of course I filed a bug report )
|