ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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:
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
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.