LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-28-2011, 06:41 AM   #1
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Rep: Reputation: 15
Question CD/DVD contents are not auto refreshing


Hi,

When I eject CD from CDROM by pushing eject button(mounted on CDROM) it still shows CD and it's contents in nautilus file browser. If I replaced the CD it still shows contents of older CD.
If I eject CD manually by file browser then there is no such issue.
I know this is the kernel issue because this issue has come after updating my kernel from linux 2.6.33 to linux-netbook-2.6.35. I am using MeeGo.
I want to know which kernel parameter(or module) I have to add.

Thanks & Regards
K K Pal
 
Old 06-28-2011, 06:55 AM   #2
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
You should unmount the CD by using the umount command, just as you should mount a CD by using the mount command.

The command
Code:
df -h
will show you what is mounted, for example:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              19G  5.3G   13G  31% /mnt/hda1
To unmount that device you then enter the command
Code:
umount /dev/sda1

or

umount /mnt/hda1
In your case the command will probably be
Code:
umount /media/cdrom
It is very important to unmount devices thus, otherwise files may not get updated properly. Obviously this is not so much of an issue with read-only devices but, as you see, you can still get problems if you do not mount and unmount devices properly.

Last edited by harryhaller; 06-28-2011 at 06:58 AM.
 
Old 06-28-2011, 07:43 PM   #3
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Like Auke said, it's a bug in MeeGo.

I would expect the problem to be in HAL and not in the kernel. Have you verified by booting into the other kernel? Or did you do some kind of an upgrade, and only assumed it was a kernel issue? Note that even if you only select one package to be upgraded in your package manager, it may have to upgrade related packages too; you may not have noticed that.

If it really is a kernel configuration issue, it should be easy to compare the configuration between the working kernel and the nonworking kernel:
Code:
grep -ve '^#' /boot/config-*2.6.33* | sort -g > /tmp/config.working
grep -ve '^#' /boot/config-*2.6.35* | sort -g > /tmp/config.nonworking
diff -Naur /tmp/config.nonworking /tmp/config.working
The above outputs an unified diff, with - before settings only in the nonworking kernel config, and + before settings only in the working kernel config. Alternatively, it could be an issue with the cdrom sysctl defaults. You can see the settings the current kernel uses (usually 1 0 0 0) by running
Code:
cat /proc/sys/dev/cdrom/{autoclose,autoeject,check_media,lock}
and the capabilities for available cdrom drives using
Code:
cat /proc/sys/dev/cdrom/info
I suspect the problem is that somehow HAL mishandles the eject button event (or never receives it due to some kind of a conflict between HAL and the kernel), so that in the nonworking kernel, the button opens the tray (at the hardware level) without any kind of notification sent to applications.

Hope this helps.
 
Old 06-29-2011, 01:17 AM   #4
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Original Poster
Rep: Reputation: 15
Thanks @harryhaller for your reply but I am not looking for that kind of solution.

@Nominal Animal:
I didn't found hald daemon in both netbooks. I replaced the kernel 2.6.33 to 2.6.35 by using rpm -Uvh. I did it for some wlan drivers.
It didn't showed any error or conflict while upgrading.
I have already done diff thing but it was not helpful. I also matched the installed packages(rpm -qa) in both netbooks but everything are same except kernel.
The output of
cat /proc/sys/dev/cdrom/{autoclose,autoeject,check_media,lock}
is 1 0 0 1
is same in both netbooks.
Quote:
the button opens the tray (at the hardware level) without any kind of notification sent to applications.
You are absolutely correct. There is no dbus signal in nonworking kernel netbook if I push eject button.
Kernel loads "nls_utf8" module in both netbooks for CD/DVD but the module size is not same.
In working kernel size is 977 and in nonworking it is 989.
 
Old 06-29-2011, 06:00 AM   #5
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Quote:
Originally Posted by kkpal View Post
I didn't found hald daemon
I wonder if MeeGo uses DeviceKit instead of HAL? Does
Code:
devkit --monitor
work? Does it output anything on either netbook when you press the physical eject button?

Another possibility is that the button is handled via ACPI. Does
Code:
cat /sys/bus/acpi/devices/*/input/input*/name
differ on the two netbooks? If they do, you might try acpi=force or acpi=off kernel boot option.

A yet another is that the eject button is handled as a normal key. Does
Code:
cat /sys/class/input/*/*/name
differ on the two networks? Does
Code:
xev
output anything when you press the physical eject button?
 
Old 06-29-2011, 11:28 AM   #6
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Original Poster
Rep: Reputation: 15
Outputs of everything are same in both netbook except dbus-monitor.
Quote:
Does it output anything on either netbook when you press the physical eject button?
Yes dbus-monitor gives the output in 2.6.33 netbook but not in 2.6.35. It means application is not getting any notification from hardware.

nothing in xev in both netbook it(xev) may be MeeGo bug. I have already reported this bug to MeeGo. But I have to fix this issue asap.
 
Old 07-01-2011, 03:17 PM   #7
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
Can you see the event in the Linux input subsystem? This command will show a hex dump of all input events:
Code:
sudo sh -c 'for F in /dev/input/event* ; do dd if=$F of=/dev/stdout bs=16 & done | hexdump -x'
You should see absolutely all input events there. The output lines are struct input_event structures defined in /usr/include/linux/input.h .

If you can see it on both netbooks, then the problem is between kernel input mapping and DBUS. (The mapping for the eject button might have changed.) Seeing the relevant output from above, from working and nonworking netbooks, should make it easy to create a fix.

If you can see the event only on the working netbook, then it is a kernel issue, I think.
 
Old 07-04-2011, 01:58 AM   #8
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
sudo sh -c 'for F in /dev/input/event* ; do dd if=$F of=/dev/stdout bs=16 & done | hexdump -x'
There is no output in both netbooks. It's not giving any output for media insert/eject or hardware plugin.
It gives output only when I press any key(keypad/keyboard). Behavior is same for both netbooks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I disable auto start of totem after inserting a dvd in dvd rom awmian Fedora 8 09-07-2008 09:24 AM
How do I disable auto start of totem after inserting a dvd in dvd rom awmian Linux - Software 2 08-25-2008 12:23 AM
how to split a single DVD contents to two DVD ? deepugopi Linux - Desktop 3 07-18-2007 03:07 AM
Samba FreeBSD Problem: Folder contents/changes not refreshing Astryk *BSD 2 02-21-2005 04:18 PM
auto rename contents of a DIR bkeating Linux - General 1 11-05-2002 06:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration