User:Skierpage/CD drive woes: Difference between revisions

From KDE UserBase Wiki
m (→‎Solid!: add more output)
m (→‎Solid!: where's the source)
 
(3 intermediate revisions by the same user not shown)
Line 32: Line 32:
   StorageDrive.inUse = false  (bool)
   StorageDrive.inUse = false  (bool)
   StorageDrive.size = 572993536  (0x22273000)  (qulonglong)
   StorageDrive.size = 572993536  (0x22273000)  (qulonglong)
   OpticalDrive.supportedMedia = 'Cdr|Cdrw|Dvd|Dvdr|Dvdrw|Dvdplusr|Dvdplusrw|Dvdplusdl'  (0x1df
   OpticalDrive.supportedMedia = 'Cdr|Cdrw|Dvd|Dvdr|Dvdrw|Dvdplusr|Dvdplusrw|Dvdplusdl'  (0x1df)  (flag)
)  (flag)
   OpticalDrive.readSpeed = 0  (0x0)  (int)
   OpticalDrive.readSpeed = 0  (0x0)  (int)
   OpticalDrive.writeSpeed = 0  (0x0)  (int)
   OpticalDrive.writeSpeed = 0  (0x0)  (int)
Line 63: Line 62:
How do I tell Solid not to ignore the storage volume?!
How do I tell Solid not to ignore the storage volume?!


== Bug ==
Solid is in KDE Base.  I found [https://projects.kde.org/projects/kde/kdebase/kde-runtime/repository/revisions/master/entry/solid-hardware/solid-hardware.cpp the source] for this `solid-hardware` command line,
but all it does is call SolidHardware shell()'s shell.hwList() command.  There's an isIgnored in [http://api.kde.org/4.x-api/kdelibs-apidocs/solid/html/classSolid_1_1StorageAccess.html#a4b672885b61793873000aeb7f622a25c StorageAccess], but I can't find the source code for the implementation of this in the Udisks back-end.
 
=== udisks ===
Solid is probably (?) talking to udisks, I have a process
udisks-daemon: polling /dev/sr1 /dev/sdg /dev/sdd /dev/sdc /dev/sdf /dev/sde /dev/sr0
 
I ran <kbd>udisks --monitor-detail</kbd> and when I inserted a music CD I got
<pre>changed:    /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                /sys/devices/pci0000:00/0000:00:02.5/host1/target1:0:0/1:0:0:0/block/sr0
  device:                      11:0
  device-file:                /dev/sr0
    presentation:              /dev/sr0
    by-id:                    /dev/disk/by-id/ata-HP_DVD_Writer_640_CNL854011C
    by-path:                  /dev/disk/by-path/pci-0000:00:02.5-scsi-1:0:0:0
  detected at:                Fri 12 Aug 2011 01:45:08 PM PDT
  system internal:            0
  removable:                  1
  has media:                  1 (detected at Tue 16 Aug 2011 03:56:38 PM PDT)
    detects change:            1
    detection by polling:      1
    detection inhibitable:    1
    detection inhibited:      0
  is read only:                0
  is mounted:                  0
  mount paths:           
  mounted by uid:              0
  presentation hide:          0
  presentation nopolicy:      0
  presentation name:         
  presentation icon:         
  size:                        572993536
  block size:                  2048
  job underway:                no
  usage:                     
  type:                       
  version:                   
  uuid:                       
  label:                     
  optical disc:
    blank:                    0
    appendable:                0
    closed:                    0
    num tracks:                16
    num audio tracks:          16
    num sessions:              1
  drive:
    vendor:                    HP
    model:                    HP  DVD Writer 640
    revision:                  CS30
    serial:                    CNL854011C
    WWN:                     
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:              unknown
    ejectable:                1
    adapter:                  /org/freedesktop/UDisks/adapters/0000_3a00_3a02_2e5
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a02_2e5/host1
    similar devices:
    media:                    optical_cd
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_rw optical_mrw optical_mrw_w
    interface:                scsi
    if speed:                  (unknown)
    ATA SMART:                not available
 
Advanced probing on /dev/sr0 failed while reading block size</pre>
 
== Bugs ==
This sounds similar to [https://bugs.launchpad.net/kubuntu-ppa/+bug/709868 Launchpad bug 709868] "kde 4.6 device actions broken".
This sounds similar to [https://bugs.launchpad.net/kubuntu-ppa/+bug/709868 Launchpad bug 709868] "kde 4.6 device actions broken".


Line 72: Line 141:
: Solid does not anymore mount by label... namely should have mounted as /media/CDSTOMPER35 but mounts as /media/cdrom0
: Solid does not anymore mount by label... namely should have mounted as /media/CDSTOMPER35 but mounts as /media/cdrom0


But I have a /media/cdrom symlinks to /media/cdrom0 , so that's not it.
But I have a /media/cdrom symlinks to /media/cdrom0 , so that's not it. I have /dev/cdrom1 and cdrom2 symlinking to /dev/sr0 and /dev/sr1.  Do I need to create a
/media/cdrom1 ?
 
I filed [https://bugs.kde.org/show_bug.cgi?id=280229 KDE Bug 280229] "Device Actions don't trigger for my CD-ROM drives, StorageVolume.ignored"
 
Another bug TODO: none of the links on solid.kde.org work, they just redirect to the home page.


== Devices ==
System Settings > Multimedia > Audio CDs > General > Specify CD Device is <tt>/dev/cdrom</tt>.  I don't have this, I have /dev/cdrom1 and /dev/cdrom2.  Should I change this or '''TODO''' is it another bug that this is wrong?


I changed it to /dev/cdrom1 and that didn't seem to help, or change anything; VLC's Media > Open Disk > Audio CD Disc device is still /dev/cdrom by default.


== Other ==
''TODO'' Maybe I should create /media/cdrom1 and 2? udisks doesn't care, it's working at the /dev/sr0,1 level. I'm just guessing.
System Settings > Multimedia > Audio CDs > General > Specify CD Device is <tt>/dev/cdrom</tt>. I don't have this, I have /dev/cdrom1 and /dev/cdrom2. Should I change this or is it another bug that this is wrong?

Latest revision as of 01:04, 17 August 2011

Kubuntu 11.04 was working fine in one AMD64-bit PC. I swapped my hard drive into another PC, HP Pavilion a1012x, and it booted right up and everything works fine! Except... on the new PC no Device Actions trigger when I insert a data CD, music CD, or DVD into either of its CD-ROM drives.

I don't get the "Available Devices" menu of options to Open with File Manager/VLC /Dragon, and the USB icon says "No Devices Available". I have the usual rules for this in System Settings > Device Actions, but they don't fire.

Works

A music CD shows up fine in dolphin, device action "kioclient exec audiocd:/" works fine, vlc can File > Open Disk > /dev/cdrom1" fine...

Inserting a USB flash drive makes "Available Devices" appear with option to mount it.

Tried

I tried system settings -> removable devices > enable automatic mounting of removable media, didn't help

Solid!

Maybe some hardware didn't get reconfigured.

The problem seems to be in the Solid layer.

% solid-hardware list details
...
udi = '/org/freedesktop/UDisks/devices/sr0'
 parent = '/org/freedesktop/UDisks'  (string)
 vendor = 'HP'  (string)
 product = 'HP  DVD Writer 640'  (string)
 description = 'CD-RW/DVD±RW DL Drive'  (string)
 Block.major = 11  (0xb)  (int)
 Block.minor = 0  (0x0)  (int)
 Block.device = '/dev/sr0'  (string)
 StorageDrive.bus = 'Scsi'  (0x3)  (enum)
 StorageDrive.driveType = 'CdromDrive'  (0x1)  (enum)
 StorageDrive.removable = true  (bool)
 StorageDrive.hotpluggable = false  (bool)
 StorageDrive.inUse = false  (bool)
 StorageDrive.size = 572993536  (0x22273000)  (qulonglong)
 OpticalDrive.supportedMedia = 'Cdr|Cdrw|Dvd|Dvdr|Dvdrw|Dvdplusr|Dvdplusrw|Dvdplusdl'  (0x1df)  (flag)
 OpticalDrive.readSpeed = 0  (0x0)  (int)
 OpticalDrive.writeSpeed = 0  (0x0)  (int)
 OpticalDrive.writeSpeeds = {} (int list)
udi = '/org/freedesktop/UDisks/devices/sr0:media'
 parent = '/org/freedesktop/UDisks/devices/sr0'  (string)
 vendor = 'HP'  (string)
 product = 'HP  DVD Writer 640'  (string)
 description = 'CD-ROM'  (string)
 Block.major = 11  (0xb)  (int)
 Block.minor = 0  (0x0)  (int)
 Block.device = '/dev/sr0'  (string)
 StorageVolume.ignored = true  (bool)
 StorageVolume.usage = 'Other'  (0x0)  (enum)
 StorageVolume.fsType =   (string)
 StorageVolume.label =   (string)
 StorageVolume.uuid =   (string)
 StorageVolume.size = 572993536  (0x22273000)  (qulonglong)
 OpticalDisc.availableContent = 'Audio|Data'  (0x3)  (flag)
 OpticalDisc.discType = 'CdRom'  (0x0)  (enum)
 OpticalDisc.appendable = false  (bool)
 OpticalDisc.blank = false  (bool)
 OpticalDisc.rewritable = false  (bool)
 OpticalDisc.capacity = 572993536  (0x22273000)  (qulonglong)

Solid knows there's an Audio Optical Disc plugged in, but it's ignored, and the System Settings > Device Actions rules include "The devices Ignored must equal false".

How do I tell Solid not to ignore the storage volume?!

Solid is in KDE Base. I found the source for this `solid-hardware` command line, but all it does is call SolidHardware shell()'s shell.hwList() command. There's an isIgnored in StorageAccess, but I can't find the source code for the implementation of this in the Udisks back-end.

udisks

Solid is probably (?) talking to udisks, I have a process

udisks-daemon: polling /dev/sr1 /dev/sdg /dev/sdd /dev/sdc /dev/sdf /dev/sde /dev/sr0

I ran udisks --monitor-detail and when I inserted a music CD I got

changed:     /org/freedesktop/UDisks/devices/sr0
Showing information for /org/freedesktop/UDisks/devices/sr0
  native-path:                 /sys/devices/pci0000:00/0000:00:02.5/host1/target1:0:0/1:0:0:0/block/sr0
  device:                      11:0
  device-file:                 /dev/sr0
    presentation:              /dev/sr0
    by-id:                     /dev/disk/by-id/ata-HP_DVD_Writer_640_CNL854011C
    by-path:                   /dev/disk/by-path/pci-0000:00:02.5-scsi-1:0:0:0
  detected at:                 Fri 12 Aug 2011 01:45:08 PM PDT
  system internal:             0
  removable:                   1
  has media:                   1 (detected at Tue 16 Aug 2011 03:56:38 PM PDT)
    detects change:            1
    detection by polling:      1
    detection inhibitable:     1
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  size:                        572993536
  block size:                  2048
  job underway:                no
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  optical disc:
    blank:                     0
    appendable:                0
    closed:                    0
    num tracks:                16
    num audio tracks:          16
    num sessions:              1
  drive:
    vendor:                    HP
    model:                     HP  DVD Writer 640
    revision:                  CS30
    serial:                    CNL854011C
    WWN:                       
    detachable:                0
    can spindown:              0
    rotational media:          Yes, unknown rate
    write-cache:               unknown
    ejectable:                 1
    adapter:                   /org/freedesktop/UDisks/adapters/0000_3a00_3a02_2e5
    ports:
      /org/freedesktop/UDisks/adapters/0000_3a00_3a02_2e5/host1
    similar devices:
    media:                     optical_cd
      compat:                  optical_cd optical_cd_r optical_cd_rw optical_dvd optical_dvd_plus_r optical_dvd_plus_r_dl optical_dvd_plus_rw optical_dvd_r optical_dvd_rw optical_mrw optical_mrw_w
    interface:                 scsi
    if speed:                  (unknown)
    ATA SMART:                 not available

Advanced probing on /dev/sr0 failed while reading block size

Bugs

This sounds similar to Launchpad bug 709868 "kde 4.6 device actions broken".

He has the StorageVolume.ignored = true. He comments

Ok... experimented a bit about how solid-hardware works and found what the latest problem is
One needs to create /media/cdrom0 by hand.
Solid does not manage mount points automatically creating dirs in media at need
Solid does not anymore mount by label... namely should have mounted as /media/CDSTOMPER35 but mounts as /media/cdrom0

But I have a /media/cdrom symlinks to /media/cdrom0 , so that's not it. I have /dev/cdrom1 and cdrom2 symlinking to /dev/sr0 and /dev/sr1. Do I need to create a /media/cdrom1 ?

I filed KDE Bug 280229 "Device Actions don't trigger for my CD-ROM drives, StorageVolume.ignored"

Another bug TODO: none of the links on solid.kde.org work, they just redirect to the home page.

Devices

System Settings > Multimedia > Audio CDs > General > Specify CD Device is /dev/cdrom. I don't have this, I have /dev/cdrom1 and /dev/cdrom2. Should I change this or TODO is it another bug that this is wrong?

I changed it to /dev/cdrom1 and that didn't seem to help, or change anything; VLC's Media > Open Disk > Audio CD Disc device is still /dev/cdrom by default.

TODO Maybe I should create /media/cdrom1 and 2? udisks doesn't care, it's working at the /dev/sr0,1 level. I'm just guessing.