LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   KDE automounting problem (or HAL problem?) (https://www.linuxquestions.org/questions/slackware-14/kde-automounting-problem-or-hal-problem-670488/)

brixtoncalling 09-17-2008 06:55 AM

KDE automounting problem (or HAL problem?)
 
This is a branch of the thread http://www.linuxquestions.org/questi...esktop-662319/ since I believe my problem is substantially different (though at first I thought that it was the same problem).

The problem is KDE no longer automounts either a CD/DVD or a USB device when they are plugged in. This suddenly stopped working shortly after updating my KDE to slackware-current, although this may well not have been the problem. I can't recall whether anything successfully automounted between that update and the time that things definitely went wonky.

My user is in all the requisite groups. I can manually mount everything. Running ps ax | grep hald gives:
2798 ? Ss 0:00 /usr/sbin/hald --daemon=yes
2799 ? S 0:00 hald-runner
2803 ? S 0:00 hald-addon-input: Listening on /dev/input/event5 /dev/input/event4 /dev/input/event3 /dev/input/event2
2810 ? S 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket

If relevant in Control Centre -> Peripherals -> Storage Media -> Advanced, the options for Enable HAL backend and Enable CD polling are greyed out (though they are checked).

I'm not sure what else could be useful to finding the problem. This one has been puzzling me for some time. Any help would be grand.

Woodsman 09-17-2008 12:32 PM

Some things to check:

Open the KDE Control Center. Open the KDE Components/ Service Manager section. Verify BOTH the KDE Media Manager and Media Notifier Daemon are enabled and running.

Find the file $HOME/.kde/share/config/mediamanagerrc. If you want a fresh start, then delete the file. Otherwise open with a text editor and delete any device references with which you are having problems.

brixtoncalling 09-17-2008 02:00 PM

Thanks for the response. Both of the services you mentioned are running. For good measure I stopped and re-started them, but no luck.

I don't have a $HOME/.kde/share/config/mediamanagerrc or something similar.

Also I forgot to mention that the Konqueror's "Storage Media" on the "System" tab in the Navigation Panel is empty. My harddisk partitions used to show up there but now there's nothing.

I tried another user account and it has the same problem so it's not as though I messed up my personal config files. But it is a KDE problem, no?

Woodsman 09-17-2008 02:20 PM

Quote:

I tried another user account and it has the same problem so it's not as though I messed up my personal config files. But it is a KDE problem, no?
There are the obvious checks: /etc/rc.d/rc.udev, /etc/rc.d/rc.hald, and /etc/rc.d/rc.messagebus all are executable and actually running. Use the ps ax command to verify the services are running.

Also from a command line, run ps ax | grep polling to verify the hal daemon is watching those devices.

Another easy check is to run Xfce and then notice whether automounting is working there. If not (and Xfce is configured correctly) then the problem is more fundamental. If the device automounts then focus on KDE.

You can insert a USB stick and then run lsusb to verify the stick is recognized.

A wild guess. Check /etc/hal/fdi/information for any configuration files. If you find any, open them to see whether the enable option is set to false. If the device is set to false then hal will not monitor those devices.

brixtoncalling 09-17-2008 03:11 PM

Of your suggestions, the only one that points to a problem is that hald is not polling. Is this why "Enable HAL backend" and "Enable CD polling" are greyed out in the KDE Control Centre?

brixtoncalling 09-18-2008 04:49 AM

I installed xfce and tried it as well, but no luck there either.

Could a recent install of iscan be behind this? I'm racking my brains for what has changed on the comp. that would suddenly make automount/HAL stop working.

duryodhan 09-18-2008 08:56 AM

ok first check if hal is the problem or not -

do a "lshal -m" and then plugin in your device. Does it show anything ?

If it doesn't , then problem is hal. If it does then problem is somewhere else.

install ivman & pmount and see if they are able to mount (at command line , there must be some million how-tos for this )
if they can't mount either then it is a problem with DBUS probably.

pwc101 09-18-2008 09:11 AM

Ah, I see you found my thread :)

I never resolved the problem, although in xfce, the automounting started working again (and I have now switched to it permanently as a result), after I accidentally formatted one of the external disks that wasn't showing up. I think it was something wrong with udev and that particular drive that broke everything; at least, that's my gut feeling. I know it's probably not a solution, and since everything started working after I did that, I haven't bothered to find out exactly what changed (if it ain't broke...).

I don't know if there's a way of clearing all the udev "caching", but perhaps that's something to look into, since when the disk changed significantly, it all started working again...

brixtoncalling 09-18-2008 10:02 AM

pwc101 - my fingers are crossed that it will spring back to life as yours did ... i even unplugged my ide dvd drive and rebooted since it's been a bit flaky of late. no luck though. one difference is that hald is not polling anything -- with you it was.

anyhow, i used lshal -m and my usb is picked up immediately there. should there be a reaction from the dvd/cd drive as well? because there wasn't (yes i tried _before_ unplugging it :) ). i'm trying ivman & pmount next ...

Woodsman 09-18-2008 01:51 PM

Did you check /etc/hal/fdi/information for any configuration files? That your USB stick appears but CDs and DVDs do not, and that you stated hald is not polling the drive, indicates that polling is disabled. A likely culprit is a configuration file in /etc/hal/fdi/information.

The file will look something like this:

Code:

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
  <device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/storage_model_ATAPI_DVD_A_DH20A4P">
      <merge key="storage.media_check_enabled" type="bool">true</merge>
    </match>
  </device>
</deviceinfo>


brixtoncalling 09-18-2008 03:33 PM

Hi Woodsman,
There are no files in /etc/fdi/infomation. In fact the entire /etc/fdi tree only has empty directories.

okos 09-18-2008 06:33 PM

I also have the same problem since upgrading to current.
So far I have not been able to find a solution either.

Woodsman 09-18-2008 08:16 PM

Try the following:

/usr/bin/hal-disable-polling --device /dev/hdc --enable-polling

Substitute hdc with the appropriate device. If I recall correctly, running this command will create a config file in /etc/fdi/infomation similar to the one I posted.

Notice that if the --enable-polling option is not used, then the device is disabled from polling.

After running this command, run ps ax | grep polling to see whether the device is being polled.

okos 09-18-2008 09:37 PM

Quote:

Originally Posted by Woodsman (Post 3285073)
Try the following:

/usr/bin/hal-disable-polling --device /dev/hdc --enable-polling

Substitute hdc with the appropriate device. If I recall correctly, running this command will create a config file in /etc/fdi/infomation similar to the one I posted.

Notice that if the --enable-polling option is not used, then the device is disabled from polling.

After running this command, run ps ax | grep polling to see whether the device is being polled.

A couple questions

1. Since I have three partitions on my hd, cdrom, a camera, and a three partition usb drive; do I have to do this for every device?

Or maybe something like this:
/usr/bin/hal-disable-polling --device /dev/hdc* --enable-polling

2.I tried it and got the following error:
Code:

root@geoff /usr/bin/hal-disable-polling --device /dev/hdc1 --enable-polling
Following symlink from /dev/hdc1 to /dev/hdc1.
Cannot find storage device /dev/hdc1.

However
Code:

root@geoff# fdisk -l

Disk /dev/hdc: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x02670266

  Device Boot      Start        End      Blocks  Id  System
/dev/hdc1  *          1        5840    46909768+  83  Linux
/dev/hdc2            5841        5948      867510  82  Linux swap
/dev/hdc3            5949        7296    10827810  83  Linux


Woodsman 09-18-2008 11:07 PM

Just a thought: if you have the DVD/CD drive mounted in /etc/fstab, even with the noauto option, then hald is not going to poll that device.

Quote:

Substitute hdc with the appropriate device.
Looks like your hard drive is device hdc. What device is your DVD/CD drive? Use that device node.

Quote:

/usr/bin/hal-disable-polling --device /dev/hdc* --enable-polling
Use only the device, not the partition. A CD or DVD is not going to have partitions. USB flash drives can, but the polling is at the device level.


All times are GMT -5. The time now is 12:15 AM.