Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

XFCE 4.10, Thunar,drive access issue

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
thatguychuck
Posts: 52
Joined: 2013-03-25 00:49
Been thanked: 2 times

XFCE 4.10, Thunar,drive access issue

#1 Post by thatguychuck »

Description: Inserted optical media does not initially show on desktop or under devices in thunar. I have the relevant boxes checked in thunar-volman, and USB drives behave properly. If I run any command such as blkid or touch /dev/sr1, it will then detect that a disk has been inserted and it will show up. I initially thought it might be my particular drive geometry (dual CD/DVDRW) but my laptop displays the same behavior, so there is a setting or daemon I appear to be missing.

*Edit: Removed some useless info, barking up the wrong tree.
Last edited by thatguychuck on 2014-06-17 16:31, edited 3 times in total.

User avatar
thatguychuck
Posts: 52
Joined: 2013-03-25 00:49
Been thanked: 2 times

Re: SID, xfce 4.10.1, thunar 1.6.3-1, optical drive access i

#2 Post by thatguychuck »

I have since moved back to Wheezy where all is well. I'll go find myself a seat in the backport waiting room. :)

Alan Thew
Posts: 3
Joined: 2013-09-04 23:41

Re: SID, xfce 4.10.1, thunar 1.6.3-1, optical drive access i

#3 Post by Alan Thew »

This reply may be a bit late for you, but hopefully useful to others experiencing the same problems, who have landed here by searching. I was having the same problem as yours until I uninstalled tumbler, which is a daemon for generating thumbnails. It has been causing other big problems on my system (I've had to kill it half a dozen times for throttling my CPU, using 95% of my memory and filling my swap partition).

I'm running Debian testing, xfce 4.10 and Thunar 1.6.3, and removing tumbler doesn't cause any dependency problems for me. If you're running something else (Xubuntu or whatever) then proceed at your own risk. There is more information here. Since removing tumbler, my CD drive and SD card reader are behaving once again like they used to in Squeeze.

elboulangero
Posts: 10
Joined: 2011-06-21 06:25

Re: [solved] SID, xfce 4.10.1, thunar 1.6.3-1,drive access i

#4 Post by elboulangero »

Hi,

same problem here,
the optical drive is missing from Thunar devices list, EXCEPT when I boot the system with a disc in the optical drive. In this case, I can see, and mount, and use the optical drive. But after I eject the disc, and insert it again, the optical drive never re-appears in the devices list.

In this case, if I touch /dev/sr0, the disk appears, as thatguychuck indicates.

Code: Select all

$ ls -l /dev/sr0 
brw-rw----+ 1 root cdrom 11, 0 Sep 25 00:28 /dev/sr0
$ touch /dev/sr0 
$ ls -l /dev/sr0 
brw-rw----+ 1 root cdrom 11, 0 Sep 25 08:08 /dev/sr0
I looks like changing the date of the device makes it appear in Thunar. It's very magical to me. Does Thunar use inotify on /dev/sr0, and get notified when the date is changed ?


Now, I followed the advice from Alan Thew. It doesn't work for me.

It's weird, I'm pretty sure I installed the package thunar-thumbnailers, but now I can't find this package anymore in the list of installed packages...
I remember installing that, along with tumbler, and after that a new setting appeared in Thunar, " Preferences -> Display", where I could activate the thumbnails.

Now, after disinstalling tumbler, libtumbler, ffmpegthumbnailer, and reinstalling Thunar... well, the thumbnail option is still there in Thunar, and the optical media is still missing from the devices list.


Help needed !

elboulangero
Posts: 10
Joined: 2011-06-21 06:25

Re: [solved] SID, xfce 4.10.1, thunar 1.6.3-1,drive access i

#5 Post by elboulangero »

So, I'm on another computer now, and I noticed that, each time I eject or insert a disk in the optical drive, the timestamp associated with the device is updated.

On my laptop which have the problem mentioned, the timestamp doesn't change. I think the problem comes from that. And now I'm wondering what is responsible for that behavior... Some udev rule maybe ?

elboulangero
Posts: 10
Joined: 2011-06-21 06:25

Re: [solved] SID, xfce 4.10.1, thunar 1.6.3-1,drive access i

#6 Post by elboulangero »

I found out that it's a udisks related problem.

I have both udisks and udisks2 installed on my system.
The normal situation on my system looks like that:

Code: Select all

$ ps fax | grep udisks
 4601 pts/0    S+     0:00  |   \_ grep udisks
 3327 ?        Sl     0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
 3330 ?        Sl     0:00 /usr/lib/udisks2/udisksd --no-debug
In this situation, I can insert/eject a drive, nothing happens in Thunar. I can monitor the udev events, and confirm that there is no activity from udev.

Code: Select all

$ udevadm monitor
But then, I found out that issuing a single udisks command unblock everything. For example:

Code: Select all

$ udisks --enumerate
This command will in fact launch the udisks daemon:

Code: Select all

$ ps fax | grep udisks
 4614 pts/0    S+     0:00  |   \_ grep udisks
 3327 ?        Sl     0:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
 3330 ?        Sl     0:00 /usr/lib/udisks2/udisksd --no-debug
 4604 ?        Sl     0:00 /usr/lib/udisks/udisks-daemon
 4605 ?        S      0:00  \_ udisks-daemon: polling /dev/sr0
From this point, I have the two daemons (udisks and udisks2) running in parallel, and now it works. I see udev events. My optical drive appears in Thunar device list. Well, two devices appear instead of one in fact... Well, let's say it works good enough.

So, my conclusion at this point is that:
+ udisks2 is always running, but doesn't do its job.
+ udisks must be launched manually.
+ when both are running, it kinda works.
+ I'd like to get rid of the useless udisks2, but apparently it's a dependency of the gvfs-stuff. And the gvfs-stuff is a dependency of Thunar. So I'm screwed.

I think that's all for tonight.

Alan Thew
Posts: 3
Joined: 2013-09-04 23:41

Re: [solved] SID, xfce 4.10.1, thunar 1.6.3-1,drive access i

#7 Post by Alan Thew »

Well, it's broken again for me. Insert a CD or DVD and nothing appears on the desktop or in Thunar. Exactly as per thatguychuck's original post, if I run a command such as touch or blkid, or an application such as VLC or a CD ripper, the CD/DVD then appears in Thunar and on the XFCE desktop.

If I run

Code: Select all

udevadm monitor
to monitor udev events, inserting the DVD into the drive shows absolutely nothing. But then if I force the drive to be scanned, as described above, I see

Code: Select all

KERNEL[3128.764669] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
UDEV  [3130.585806] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
Unlike elboulangero, I don't have both udisks and udisks2 installed, only udisks2. This was working fine a couple of days ago so I'm guessing an update broke it. Reinstalling tumbler didn't make any difference.

I've been googling around this for an hour and a half and haven't found any leads. I don't really know where to go next.

Alan Thew
Posts: 3
Joined: 2013-09-04 23:41

Re: [solved] SID, xfce 4.10.1, thunar 1.6.3-1,drive access i

#8 Post by Alan Thew »

Here is some further information. As I mentioned before, if I monitor udev and kernel events with

Code: Select all

udevadm monitor
I see absolutely nothing when I insert a DVD into the drive and eject it. However, if I open my CD ripping program (Asunder) and insert the DVD again, magically I see these events:

Code: Select all

KERNEL[240.558512] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
KERNEL[246.624673] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
UDEV  [247.866651] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
UDEV  [248.288233] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
... when I put the disk in, and then ...

Code: Select all

KERNEL[302.723213] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
KERNEL[306.782811] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
UDEV  [306.788294] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
UDEV  [306.871604] change   /devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:0/0:0:0:0/block/sr0 (block)
... when I eject it. And, needless to say, the disk appears correctly on my desktop and in Thunar, the correct directory is created in /dev/disk/by-label/ etc. when Asunder is running. Now if I close Asunder, the kernel and udev events stop being reported, and everything is broken again.

Any ideas anyone what is going on? Can anyone else repeat this?

elboulangero
Posts: 10
Joined: 2011-06-21 06:25

Re: [solved] SID, xfce 4.10.1, thunar 1.6.3-1,drive access i

#9 Post by elboulangero »

Hi,

same thing for me, when asunder is launched it solves the problem. I imagine that there is some kind of incompatibility between thunar and udisks2 at the moment.

elboulangero
Posts: 10
Joined: 2011-06-21 06:25

Re: SID, xfce 4.10.1, thunar 1.6.3-1,drive access issue

#10 Post by elboulangero »

Lately I started to use PCManFM instead of Thunar, and there is the same problem. So definitely a udisks2 problem...

User avatar
thatguychuck
Posts: 52
Joined: 2013-03-25 00:49
Been thanked: 2 times

Re: SID, xfce 4.10.1, thunar 1.6.3-1,drive access issue

#11 Post by thatguychuck »

Recently I returned to testing and found I still have this issue, so I started digging. What initially has worked for me was this:
Bug report #713877 https://bugs.debian.org/cgi-bin/bugrepo ... bug=713877
#25
this solution works for me without disturbing whole block subsystem or the rest of the system: rule /etc/udev/rules.d/61-removable-storage-polling.rules with content:

ACTION=="add", ATTR{removable}=="1", ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2500"


I had to do a restart for it to take effect, just using udevadm control --reload-rules and udevadm trigger didn't work, I think because it only reloads when the device is reattached.

Some users were saying that enabling kernel polling helped, but just using the rule above has worked for me so far and was said to be more direct than polling everything.

#50
Thanks for the link. Kernel polling can also be enabled with this in /etc/rc.local: echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs
#71 Was a post from a maintainer stating that they believe that have fixed the issue on the systemd side, however I haven't moved to systemd yet.

Some bits from bug report #725978 https://bugs.debian.org/cgi-bin/bugrepo ... bug=725978

This looks like the root of the issue:
#10
udisks2 no longer does any media polling itself, but relies on the kernel afaik. If the kernel doesn't generate any uevents on media changes, this is where you should be investigating.
Another user appears to confirm the fix with systemd
#60
In my case, with systemd, the problem disappears and changes in a udev rule (or creating a new one in accordance with [1]) are no longer needed.

$ cat /etc/default/init
INIT="/lib/systemd/systemd"

I'm using Udisks2 + Jessie

Another idea from bug report that I haven't really investigated yet, but wanted to share in case it helps someone else.

Bug report #721996 https://bugs.debian.org/cgi-bin/bugrepo ... bug=721996


#40
This bug as well as #731652 and #718049 may be related to the default udev rule for udisks2, located in /lib/udev/rules.d/80-udisks2.rules. Whoever wrote that rule had the brilliant idea to hide certain devices (such as iso9660 filesystems) from view. Volman chokes on that and spews out the indescript error messages mentioned here. I couldn't get most of my USB sticks to show in Thunar, until I deleted that rule.
Anyway, I haven't had to use a lot of external media lately so I won't call it confirmed, but my DVD's actually show up in thunar now. From what I've read it appears to be fixed in systemd but not for users on systemv. If anyone else has success chime in and I'll mark the thread solved.

User avatar
FreewheelinFrank
Global Moderator
Global Moderator
Posts: 2109
Joined: 2010-06-07 16:59
Has thanked: 38 times
Been thanked: 230 times

Re: SID, xfce 4.10.1, thunar 1.6.3-1,drive access issue

#12 Post by FreewheelinFrank »

thatguychuck wrote:
Another idea from bug report that I haven't really investigated yet, but wanted to share in case it helps someone else.

Bug report #721996 https://bugs.debian.org/cgi-bin/bugrepo ... bug=721996


#40
This bug as well as #731652 and #718049 may be related to the default udev rule for udisks2, located in /lib/udev/rules.d/80-udisks2.rules. Whoever wrote that rule had the brilliant idea to hide certain devices (such as iso9660 filesystems) from view. Volman chokes on that and spews out the indescript error messages mentioned here. I couldn't get most of my USB sticks to show in Thunar, until I deleted that rule.
Anyway, I haven't had to use a lot of external media lately so I won't call it confirmed, but my DVD's actually show up in thunar now. From what I've read it appears to be fixed in systemd but not for users on systemv. If anyone else has success chime in and I'll mark the thread solved.
Interesting.

The code seems to suggest that isohybrids should not be hidden,

Code: Select all

# Content created using isohybrid (typically used on CDs and USB
# sticks for bootable media) is a bit special insofar that the
# interesting content is on a DOS partition with type 0x00 ... which
# is hidden above. So undo this.
But I've scrathing my head for days wondering why a USB drive was not showing up in Thunar in Jessie. It is an isohybrid and I just checked and confirmed that a normal USB thumb drive shows up when plugged in. Could it be that the bit of code that is meant to unhide isohybrids doesn't work?

I had the same issue with an external optical drive not showing up a few days ago. Enabling kernel polling fixed it. I will check if switching to systemd is a fix too.

Edit: oops, sorry, this is SID, I'm tired I hadn't noticed: I look forward to systemd fixing the issue in Jessie.

iainm
Posts: 1
Joined: 2017-09-02 15:52

Re: SID, xfce 4.10.1, thunar 1.6.3-1,drive access issue

#13 Post by iainm »

thatguychuck wrote:Recently I returned to testing and found I still have this issue, so I started digging. What initially has worked for me was this:
Bug report #713877 https://bugs.debian.org/cgi-bin/bugrepo ... bug=713877
#25
this solution works for me without disturbing whole block subsystem or the rest of the system: rule /etc/udev/rules.d/61-removable-storage-polling.rules with content:

ACTION=="add", ATTR{removable}=="1", ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2500"


I realise this is a really old thread but the issue reported, and suggested solution, by thatguychuck is still current in Debian Stretch (at least for me). I am using Xfce 4.12, Thunar 1.6.11-1, udev 232-25+deb9u1 and kernel 4.9.0-3-amd64. I don't have tumbler installed as it was causing problems, sometimes running at 95%+ CPU & RAM. I don't use a display manager and call Xfce from ~/.xsession.

Exactly as thatguychuck describes Thunar didn't see CDs or DVDs that were inserted in the drive. If however I started, for example, Xfburn then suddenly the drive would appear in Thunar and it could be mounted as normal. Applying the udev rule (quoted above) fixed the problem but I would love to know the real cause, if for no other reason so I could file a bug report in the right place.

Finding this thread was a real time saver, thanks folks :D

Post Reply