From owner-freebsd-gnome@FreeBSD.ORG Thu Dec 13 10:39:46 2007 Return-Path: Delivered-To: gnome@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F3D116A474; Thu, 13 Dec 2007 10:39:46 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 0B63B13C467; Thu, 13 Dec 2007 10:39:45 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 4159374401C; Thu, 13 Dec 2007 12:18:46 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fjSKkYo-Z62d; Thu, 13 Dec 2007 12:18:46 +0200 (EET) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 0A579744003; Thu, 13 Dec 2007 12:18:46 +0200 (EET) Message-ID: <47610705.90100@icyb.net.ua> Date: Thu, 13 Dec 2007 12:18:45 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.9 (X11/20071116) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <475FC26C.3030508@icyb.net.ua> <200712121555.24953.nvass@teledomenet.gr> <47601344.8020106@icyb.net.ua> <476025E1.7020200@icyb.net.ua> In-Reply-To: <476025E1.7020200@icyb.net.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: gnome@FreeBSD.org, kde@freebsd.org, Nikos Vassiliadis Subject: Re: mounted cd and tray locking X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2007 10:39:46 -0000 on 12/12/2007 20:18 Andriy Gapon said the following: [trimmed] > Investigated more and it seems that hald is a main culprit here. Without > it everything works reasonably well as long as I don't mix acd and cd > accesses. > That is, if I mount through acd, then trough cd, then unmount the cd > mount, then tray gets unlocked. In a perfect world I would like to fix > even this, but in real world this is OK. > But if mount only through one device then tray is locked. > > So, hald is doing something "wrong" here. I am not sure if it is by > design (to make the behavior mswindows-like) or if it is a bug or a > side-effect of something. Okey, I think I got it finally. There is a capability for ATAPI devices that I didn't know about before: there is a possibility to poll a device and check if physical eject button was pressed while tray was locked with "prevent" command. Hald does just this and then posts "EjectPressed" event. When KDE mediamanager gets this notification it tries to do various stuff which should ultimately lead to unmounting media in the device and ejecting the tray. This seems to work reasonably well if KDE knows something the mount, but this works miserably otherwise. Examples: 1. atapicam is enabled and media is manually mounted via acd device 2. media is mounted via user-land fuse-based filesystem driver In these cases "KDE" simply issues eject command and the drive is only happy to oblige. I wish that there was a way in KDE to configure handling of such events where I could select one of the following: 1. ignore eject button press 2. give me a notification about it but do not do anything 3. give me a dialog asking how to proceed 4. try to unmount media and eject tray but don't eject if proper unmount could not be done (unknown fs, etc) And, of course, if device was not locked (via prevent) for reasons of mounting media or otherwise opening device file or explicit command, then a drive itself should handle the button. It should not be "artificially" prevented from doing so. -- Andriy Gapon