GithubHelp home page GithubHelp logo

cdemu / cdemu Goto Github PK

View Code? Open in Web Editor NEW
64.0 8.0 11.0 4.72 MB

CDEmu code

CMake 2.89% Shell 0.50% Makefile 0.09% Roff 0.53% Python 9.61% C 86.39%
cd-rom dvd-rom device-emulation optical-drive virtual-drive linux

cdemu's People

Contributors

andreafioraldi avatar anssih avatar bernhardu avatar dsboger avatar greisch avatar haaninjo avatar heftig avatar jengelh avatar jopadan avatar kekun avatar mgorny avatar michelmno avatar moordev avatar nickl- avatar nickninetheeagle avatar rokm avatar stefand avatar tetromino avatar unixgeek avatar zeromus avatar zhasha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cdemu's Issues

I need help to fix it

Hi there, i had do the follow :

# Obtener la Arquitectura
Arquitectura=$(uname -m)
case "$Arquitectura" in
	x86)    Arquitectura="x32"						;;
	i?86)   Arquitectura="x32"						;;
	amd64)  Arquitectura="x64"						;;
	x86_64) Arquitectura="x64"						;;
	* ) echo    "Tu Arquitectura '$Arquitectura' -> NO ESTA SOPORTADA."	;;
esac

#Definir Variables :
PREFIJO="/usr"

#Crear directorios
mkdir -p /tmp/cdf 
mkdir -p "$PREFIJO"
cd /tmp/cdf

#Descargar (Requiere git preinstalado)
git clone https://github.com/cdemu/cdemu


# Establecer Optimizaciones
if [ "$Arquitectura" = "x64" ]; then
	export {C,CXX}FLAGS='-O2 -fPIC -march=native -mtune=native -pipe'
	export OPTFLAGS='-O2 -fPIC -march=native -mtune=native -pipe'
fi
if [ "$Arquitectura" = "x32" ]; then
	export {C,CXX}FLAGS='-O2 -march=native -mtune=native -pipe'
	export OPTFLAGS='-O2 -march=native -mtune=native -pipe'
fi

#Ingresar al directorio del codigo fuente

#Primero : El modulo para linux
cd cdemu/vhba-module ; make ; make install ; cd ..

#Segundo : La libreria para el sistema
cd libmirage ; mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX:PATH="$PREFIJO" .. ; make ; make install ; cd ../../

#Tercero : El Demonio
cd cdemu-daemon ; mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX:PATH="$PREFIJO" .. ; make ; make install ; cd ../../

#Cuarto : Analizador de Imagenes de disco
cd image-analyzer ; mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX:PATH="$PREFIJO" .. ; make ; make install ; cd ../../

#Quinto : Cliente cdemu
cd cdemu-client/ ; mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX:PATH="$PREFIJO" .. ; make ; make install ; cd ../../

#Sexto : Applet gcdemu [No me gustan que estas cosas esten hechas en python]
cd gcdemu/ ; mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX:PATH="$PREFIJO" .. ; make ; make install ; cd ../../

ldconfig

Ok the thing is when i try to use cdemu or gcdemu appears this errors 👍

cdemu add-device
ERROR: Failed to connect to CDEmu daemon: g-dbus-error-quark: Error calling StartServiceByName for net.sf.cdemu.CDEmuDaemon: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process net.sf.cdemu.CDEmuDaemon exited with status 255 (25)

$ gcdemu

on Terminal :

AppIndicator tray icon mode
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

(gcdemu:18782): Gdk-CRITICAL **: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed

on Desktop Envoronment appears a dialog error with the follow message :

Daemon autostart failed. Error:
g-dbus-error-quark: Error al llamar StartSrviceByName para net.sf.cdemu.CDEmuDaemon:
GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited:
Process net.sfcdemu.CDEmuDaemon exited with status 255 (25)

I am using distro : Devuan ASCII [Basically Debian Stretch without systemd, because i use OpenRC, well if the user don't specify during the installation the default init be sysvinit]

Hibernation is not possible with gcdemu and cdemu-daemon running. (wq_busy=1)

Hello lately I was retrying again to hibernate my system, and found a hint this might be related to cdemu.

And indeed, having gcdemu and cdemu-daemon stopped before issuing a systemctl hibernate command makes it succeed (with the kernel module still loaded).

I found this old bug at the sourceforge project page, which describes a similar problem. But focusses at the vhba kernel module and got closed being not reproducible.

This is the dmesg part of a failing suspend attempt:

[Mo Okt 18 11:32:28 2021] PM: hibernation: hibernation entry
[Mo Okt 18 11:32:28 2021] Filesystems sync: 0.063 seconds
[Mo Okt 18 11:32:28 2021] Freezing user space processes ... (elapsed 0.002 seconds) done.
[Mo Okt 18 11:32:28 2021] OOM killer disabled.
[Mo Okt 18 11:32:28 2021] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
...
[Mo Okt 18 11:32:28 2021] PM: hibernation: Basic memory bitmaps created
[Mo Okt 18 11:32:28 2021] PM: hibernation: Preallocating image memory
[Mo Okt 18 11:32:33 2021] PM: hibernation: Allocated 3045052 pages for snapshot
[Mo Okt 18 11:32:33 2021] PM: hibernation: Allocated 12180208 kbytes in 4.66 seconds (2613.77 MB/s)
[Mo Okt 18 11:32:33 2021] Freezing remaining freezable tasks ... 
[Mo Okt 18 11:32:53 2021] Freezing of tasks failed after 20.008 seconds (0 tasks refusing to freeze, wq_busy=1):
[Mo Okt 18 11:32:53 2021] Showing busy workqueues and worker pools:
[Mo Okt 18 11:32:53 2021] workqueue events_freezable: flags=0x4
[Mo Okt 18 11:32:53 2021]   pwq 12: cpus=6 node=0 flags=0x0 nice=0 active=0/0 refcnt=2
[Mo Okt 18 11:32:53 2021]     delayed: pci_pme_list_scan
[Mo Okt 18 11:32:53 2021] workqueue events_freezable_power_: flags=0x84
[Mo Okt 18 11:32:53 2021]   pwq 14: cpus=7 node=0 flags=0x0 nice=0 active=1/0 refcnt=2
[Mo Okt 18 11:32:53 2021]     in-flight: 375194:disk_events_workfn
[Mo Okt 18 11:32:53 2021] pool 14: cpus=7 node=0 flags=0x0 nice=0 hung=0s workers=3 idle: 374084 371819
[Mo Okt 18 11:32:53 2021] Restarting kernel threads ... done.
[Mo Okt 18 11:32:53 2021] PM: hibernation: Basic memory bitmaps freed
[Mo Okt 18 11:32:53 2021] OOM killer enabled.
[Mo Okt 18 11:32:53 2021] Restarting tasks ... done.
[Mo Okt 18 11:32:53 2021] PM: hibernation: hibernation exit

Properly-dumped copylok-protected images work mounted in daemon tools/alcohol but not in cdemu.

Tested with various copylok-protected images, but primarily the original European release of Tropico http://redump.org/disc/53929/, as it has been verified by 4 people, one of which was able to confirm that a matching dump was produced using an ASUS/LG jb8 chipset drive using the older clonecd method, as well as via typical Redump methods with DiscImageCreator, and the current standard program Redumper. (Prior to the research and allowance of ASUS/LG drives for data track CDs on redump, copylok discs had to be dumped via clonecd instead of preferred programs because the discs generated an error pattern the normal Plextor drives couldn't handle). Daemon tools and alcohol 120% are able to properly run these images when mounted, but cdemu is unable to. I understand that DT/alcohol sometimes do things like runtime patching or other compensation for known copy protection to get them to work, but I have no idea if that is the case here.
Likely not a proper explanation, as I don't entirely understand the intricacies of copy protection, but copylok has "soft" ring protection- as in, opposed to something like SafeDisc's purposefully (usually 312-bit) C2 erroneous sectors, it works the same as ring protection, and is read by a given drive the same as regular ring protection, the difference there being that copylok lacks an actual physical ring on the disc.

Operating System: Linux Mint 21.2.
cdemu Version: Tested using both latest apt cdemu packages, and also via pulling/building/installing the latest commit. Tested with bad sector emulation, transfer rate emulation, and dpm emulation all on just in case. Also tested via ccd/img/sub just in case. Same results with everything mentioned.
Tested via passthrough to VMware v17 running windows XP SP3 plus all subsequent updates, as well as VirtualBox 6.1 running Windows 7 Ultimate SP1 plus all subsequent updates.
Tested using a variety of different DT/alcohol versions.

Please let me know if I can provide any more information.

cdemu dont install on linux kubuntu with bullseye 11

cdemu dont install - see below.

uname -a
Linux eliasc 5.11.0-18-generic #19-Ubuntu SMP Fri May 7 14:22:03 UTC 2021 x86_64 GNU/Linux

lsb_release -a
LSB Version:  core-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID:    Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:    bullseye

ls -la /lib/modules/`uname -r`/build
lrwxrwxrwx 1 root root 40 May  7  2021 /lib/modules/5.11.0-18-generic/build -> /usr/src/linux-headers-5.11.0-18-generic

sudo make
rm -f .cdemu*.{ko,mod.o,o}.cmd cdemu*.{ko,o,mod.{c,o}} *.pyc core *~
rm -rf .tmp_versions Modules.symvers
rm -f docs/cdemu.{dvi,pdf}
rm -f docs/cdemu.{info,txt,html}

BUG?

sudo make install
**** Installing files ****
install -D -m 644  /lib/modules/5.11.0-18-generic/misc/
install: missing destination file operand after '/lib/modules/5.11.0-18-generic/misc/'
Try 'install --help' for more information.
make: *** [Makefile:100: install] Error 1

Does this support with WSL?

I keep getting errors when I try to add-device with the following error:
ERROR: Failed to connect to CDEmu daemon: g-io-error-quark: Error calling StartServiceByName for net.sf.cdemu.CDEmuDaemon: Timeout was reached (24)

Loading TOC / BIN files doesn't work ( FC rawhide - copr )

I've used cdemu a year back, and loading TOC / BIN audio cd image was working perfectly in my debian unstable. Now, I tried the same in FC rawhide in virtualbox ( installed from copr - https://copr.fedorainfracloud.org/coprs/rok/cdemu/ ) with the same TOC / BIN files. But, nothing is loaded in nautilus / rhythmbox. Nothing changes even after reboot.

[root@localhost ~]# ps -aef | grep cdem
crvi        2669    2493  0 16:52 pts/1    00:00:21 /usr/bin/python3 /usr/bin/gcdemu
crvi        2679    1579  0 16:52 ?        00:00:03 cdemu-daemon --ctl-device=/dev/vhba_ctl --bus=session --num-devices=1 --audio-driver=default --logfile=/home/crvi/.cdemu-daemon.log
root       12056    2994  0 22:43 pts/3    00:00:00 grep --color=auto cdem
[root@localhost ~]# cat /home/crvi/.cdemu-daemon.log
Starting CDEmu daemon with following parameters:
 - num devices: 1
 - control device: /dev/vhba_ctl
 - audio driver: default
 - bus type: session
 - default CDEmu debug mask: 0x0
 - default libMirage debug mask: 0x0

_g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’

Thanks !!

vhba: Fails to build on kernel v5.15

I build mainline kernels and up through v5.14 the module builds correctly. Today, with v5.15-rc6 it fails to build:

DKMS make.log for vhba-20210418 for kernel 5.15.0-rc6-soggy-00004-gfb2264f46ac0-dirty (x86_64)
Mon 18 Oct 21:08:09 BST 2021
make -C /lib/modules/5.15.0-rc6-soggy-00004-gfb2264f46ac0-dirty/build M=/var/lib/dkms/vhba/20210418/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-rc6-soggy-00004-gfb2264f46ac0-dirty'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Debian 10.2.1-6) 10.2.1 20210110
  You are using:           gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
  CC [M]  /var/lib/dkms/vhba/20210418/build/vhba.o
/var/lib/dkms/vhba/20210418/build/vhba.c: In function ‘vhba_device_queue’:
/var/lib/dkms/vhba/20210418/build/vhba.c:206:30: error: ‘struct scsi_cmnd’ has no member named ‘request’
  206 |     vcmd->metatag = vcmd->cmd->request->tag;
      |                              ^~
In file included from ./include/linux/printk.h:555,
                 from ./include/linux/kernel.h:19,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:12,
                 from /var/lib/dkms/vhba/20210418/build/vhba.c:26:
/var/lib/dkms/vhba/20210418/build/vhba.c: In function ‘vhba_queuecommand’:
/var/lib/dkms/vhba/20210418/build/vhba.c:476:48: error: ‘struct scsi_cmnd’ has no member named ‘request’
  476 |     scmd_dbg(cmd, "queue %p tag %i\n", cmd, cmd->request->tag);
      |                                                ^~
./include/linux/dynamic_debug.h:134:15: note: in definition of macro ‘__dynamic_func_call’
  134 |   func(&id, ##__VA_ARGS__);  \
      |               ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:2: note: in expansion of macro ‘_dynamic_func_call’
  166 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:2: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
./include/scsi/scsi_device.h:257:2: note: in expansion of macro ‘dev_dbg’
  257 |  dev_dbg(&(sdev)->sdev_gendev, fmt, ##a)
      |  ^~~~~~~
./include/scsi/scsi_device.h:278:4: note: in expansion of macro ‘sdev_dbg’
  278 |    sdev_dbg((scmd)->device, "[%s] " fmt,  \
      |    ^~~~~~~~
/var/lib/dkms/vhba/20210418/build/vhba.c:476:5: note: in expansion of macro ‘scmd_dbg’
  476 |     scmd_dbg(cmd, "queue %p tag %i\n", cmd, cmd->request->tag);
      |     ^~~~~~~~
/var/lib/dkms/vhba/20210418/build/vhba.c:476:48: error: ‘struct scsi_cmnd’ has no member named ‘request’
  476 |     scmd_dbg(cmd, "queue %p tag %i\n", cmd, cmd->request->tag);
      |                                                ^~
./include/linux/dynamic_debug.h:134:15: note: in definition of macro ‘__dynamic_func_call’
  134 |   func(&id, ##__VA_ARGS__);  \
      |               ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:2: note: in expansion of macro ‘_dynamic_func_call’
  166 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:2: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
./include/scsi/scsi_device.h:257:2: note: in expansion of macro ‘dev_dbg’
  257 |  dev_dbg(&(sdev)->sdev_gendev, fmt, ##a)
      |  ^~~~~~~
./include/scsi/scsi_device.h:281:4: note: in expansion of macro ‘sdev_dbg’
  281 |    sdev_dbg((scmd)->device, fmt, ##a);  \
      |    ^~~~~~~~
/var/lib/dkms/vhba/20210418/build/vhba.c:476:5: note: in expansion of macro ‘scmd_dbg’
  476 |     scmd_dbg(cmd, "queue %p tag %i\n", cmd, cmd->request->tag);
      |     ^~~~~~~~
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/vhba/20210418/build/vhba.o] Error 1
make[1]: *** [Makefile:1868: /var/lib/dkms/vhba/20210418/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-rc6-soggy-00004-gfb2264f46ac0-dirty'
make: *** [Makefile:14: modules] Error 2

Update / remove source tarballs information in cdemu download page

https://cdemu.sourceforge.io/project/#download

Source tarballs

Official tarballs:
Here is the official source tarballs for our latest release.

Core software:
vhba-module [20190831]
cdemu-daemon [3.2.3]
libmirage [3.2.3]

Client applications:
gCDEmu [3.2.3]
cdemu-client [3.2.3]

Image analyzer:
image-analyzer [3.2.3]

The above information is old and the links point to a different version. Update the page or remove them, as the link to sourceforge download page ( https://sourceforge.net/projects/cdemu/files/ ) should suffice.

Settlers 2 CDDA tracks crash cdemu-daemon at the end of the track

I am using dosemu2 to play Settlers 2. The game's CD contains audio tracks. When Audio playback is turned on in the game, dosemu2 will forward the request to cdemu and cdemu plays one track fine.

At the end of one track cdemu-daemon dies with a failed assertion due to a CDEMU_DEBUG(DAEMON_DEBUG_ERROR) line. The attached diff fixes the assert. I tried to debug the underlying cause a little, and it seems libmirage's mirage_sector_get_data returns a len of -1, which is obviously rejected by ao_play.

The attached patch downgrades the error to a warning, fixing the crash and making the game proceed to the next track. Interestingly, it also skips to the next track now if some other process accesses the drive (e.g. I mount it, dd if=/dev/sr1 of=/dev/null or something like it). I haven't yet tried with a different CDDA player (I have to find one) to see if a dosemu2 problem is involved too. Either way I think cdemu-daemon shouldn't just dump core and potentially leave a mounted drive dangling.

cdemu.txt

Can't add new device (gcdemu) OpenSUSE Tumbleweed

 gcdemu 
AppIndicator tray icon mode
Traceback (most recent call last):
  File "/usr/bin/gcdemu", line 1949, in on_connection_established
    self.add_device(i)
  File "/usr/bin/gcdemu", line 1995, in add_device
    device = self.create_device(self.cdemu, num)
  File "/usr/bin/gcdemu", line 2099, in create_device
    return gCDEmuDevice_Indicator(cdemu, d)
  File "/usr/bin/gcdemu", line 1737, in __init__
    gCDEmuDevice.__init__(self, cdemu, d)
  File "/usr/bin/gcdemu", line 1490, in __init__
    self.file_chooser = gCDEMuFileChooserDialog(cdemu.supported_parsers, cdemu.supported_filter_streams)
  File "/usr/bin/gcdemu", line 1005, in __init__
    self.add_buttons(_("Cancel"), Gtk.ResponseType.CANCEL, _("Open"), Gtk.ResponseType.ACCEPT)
AttributeError: 'gCDEMuFileChooserDialog' object has no attribute 'add_buttons'

Here is my .spec https://build.opensuse.org/package/view_file/home:ukbeast89:branches:X11:Utilities/gcdemu/gcdemu.spec
You can also read my buildlog here https://build.opensuse.org/package/live_build_log/home:ukbeast89:branches:X11:Utilities/gcdemu/openSUSE_Tumbleweed/x86_64

MDX file fails to load.

This file fails to load.

$ cdemu load 0 001008_1514.mdx
ERROR: Failed to load image: g-io-error-quark: GDBus.Error:net.sf.cdemu.CDEmuDaemon.errorMirage.ParserError: No parser can handle the image file! (36)

DaemonTools/MDX files are supposed to be supported so I don't know what the problem is.

Daemon refuses to load, complains of permissions.

I installed cdemu cdemu-daemon gcdemu and vhba-kmp-default from the openSUSE Tumbleweed repositories.
Right off the bat, it's missing the udev rules and the vhba conf file. No problem those can be generated.
After creating them as suggested in this openSUSE forum post from 2014 ( https://forums.opensuse.org/t/cdemu-how-do-i/99781/4 ) the daemon still refuses to load.
Yes, I am part of the "users" group.

This is the error description:

Starting CDEmu daemon with following parameters:
 - config file: (null) (exists: 0)
 - num devices: 1
 - control device: /dev/vhba_ctl
 - audio driver: null
 - bus type: session
 - default CDEmu debug mask: 0x0
 - default libMirage debug mask: 0x0

Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: Permission denied!
cdemu: Daemon: failed to start device #0!
cdemu: Daemon: failed to create device!
Daemon initialization and start failed!

Any ideas why it fails?

[Feature Request] Support redump-style multisession images.

I understand that it wouldn't be a priority, but it would be nice if cdemu supported redump-style multisession images, since at the moment, they usually need to be converted via isobuster or another tool before a virtual drive will accept them. Currently, mounting one will handle most of the audio tracks fine, but the last audio track in session 1 will be broken and not function; the data track on session 2 will attempt to be mounted, but will give the error Error mounting /dev/sr0 at /media/[username]/[volume name]: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error. Attached is an example of a cuefile for said format.
example.zip

Additionally, the redump website strips a few lines from the end of the cuefile when hosting the cues:

REM LEAD-OUT 01:30:00

REM LEAD-IN 01:00:00
REM PREGAP 00:02:00

as can be seen in this additional example:
example2.zip

As far as I understand, these lines should consistently be the same, and could be assumed to be there if not. However, if the cdemu developers decide that they don't want to add compensation for redump.org unnecessarily removing some lines, that's perfectly understandable. Additionally, I understand not wanting to spend time adding the format in general, even if it would be nice, hence labeling it a feature request.

If any other information needs to be provided, whether here or on another platform, please let me know, and I will happily do so

libmirage-apple.xml is too broad

Installing libmirage breaks fwupd. The latter has a quirks file with this content:

/usr/share/fwupd/quirks.d/redfish.quirk

# Lenovo ThinkSystem
[42f00735-c9ab-5374-bd63-a5deee5881e0]
Flags = wildcard-targets,reset-required

[REDFISH\VENDOR_Lenovo&ID_BMC-Backup]
ParentGuid = REDFISH\VENDOR_Lenovo&ID_BMC-Primary
Flags = dual-image,is-backup

[REDFISH\VENDOR_Lenovo&ID_BMC-Primary]
ParentGuid = REDFISH\VENDOR_Lenovo&ID_BMC-Primary
Flags = dual-image

[REDFISH\VENDOR_Lenovo&ID_LXPM]
Flags = ~updatable
[REDFISH\VENDOR_Lenovo&ID_LXPMLinuxDriver]
Flags = ~updatable
ParentGuid = REDFISH\VENDOR_Lenovo&ID_LXPM
[REDFISH\VENDOR_Lenovo&ID_LXPMWindowsDriver]
Flags = ~updatable
ParentGuid = REDFISH\VENDOR_Lenovo&ID_LXPM

Unfortunately, this file happens to be covered by the <match value="PM" type="string" offset="512"/>, turning it into application/x-apple-diskimage instead of the expected text/plain.

Timeout was reached (24) error on startup Ubuntu 20.04

Hi, I'm having issues using cdemu after installing using cdemu PPAs.

I've checked and it appears I'm using the latest / correct versions of both cdemu and gcdemu -

kapper@xps:~$ cdemu --version
cdemu 3.2.5 - (C) 2006-2022 Rok Mandeljc

gcdemu shows version 3.2.6 using the 'about' context menu option.

I was able to use cdemu for maybe a day or so before this started to happen. I found Bug # 1926303 on launchpad is very similar, except that the solution there doesn't work, as dbus-service-session is not an ubuntu package.

kapper@xps:~$ sudo apt install dbus-service-session
[sudo] password for kapper:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dbus-service-session
kapper@xps:~$ sudo apt search dbus-service-session
Sorting... Done
Full Text Search... Done

Did a quick google search and I can't find anything on dbus-service-session, only dbus-user-session, which is already installed with no pending updates.

Here's the contents of journalctl --user-unit cdemu-daemon across two separate reboots. This is especially odd because I never configured cdemu to start on boot - but it (gcdemu) does start on boot and errors out.

-- Reboot --
Jan 19 23:18:33 xps systemd[2369]: Starting CDEmu daemon...
Jan 19 23:18:33 xps cdemu-daemon[5111]: Starting CDEmu daemon with following parameters:
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - config file: /home/kapper/.config/cdemu-daemon (exists: 0)
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - num devices: 1
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - control device: /dev/vhba_ctl
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - audio driver: null
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - bus type: session
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - default CDEmu debug mask: 0x0
Jan 19 23:18:33 xps cdemu-daemon[5111]:  - default libMirage debug mask: 0x0
Jan 19 23:18:33 xps cdemu-daemon[5111]: cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: >
Jan 19 23:18:33 xps cdemu-daemon[5111]: cdemu: Daemon: failed to start device #0!
Jan 19 23:18:33 xps cdemu-daemon[5111]: cdemu: Daemon: failed to create device!
Jan 19 23:18:33 xps cdemu-daemon[5111]: Daemon initialization and start failed!
Jan 19 23:18:33 xps systemd[2369]: cdemu-daemon.service: Main process exited, code=exited, status=255/EXC>
Jan 19 23:18:33 xps systemd[2369]: cdemu-daemon.service: Failed with result 'exit-code'.
Jan 19 23:18:33 xps systemd[2369]: Failed to start CDEmu daemon.

# NOTE: I attempt to manually start gcdemu here

Jan 19 23:22:50 xps systemd[2369]: Starting CDEmu daemon...
Jan 19 23:22:50 xps cdemu-daemon[22667]: Starting CDEmu daemon with following parameters:
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - config file: /home/kapper/.config/cdemu-daemon (exists: 0)
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - num devices: 1
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - control device: /dev/vhba_ctl
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - audio driver: null
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - bus type: session
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - default CDEmu debug mask: 0x0
Jan 19 23:22:50 xps cdemu-daemon[22667]:  - default libMirage debug mask: 0x0
Jan 19 23:22:50 xps cdemu-daemon[22667]: cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl:>
Jan 19 23:22:50 xps cdemu-daemon[22667]: cdemu: Daemon: failed to start device #0!
Jan 19 23:22:50 xps cdemu-daemon[22667]: cdemu: Daemon: failed to create device!
Jan 19 23:22:50 xps cdemu-daemon[22667]: Daemon initialization and start failed!
Jan 19 23:22:50 xps systemd[2369]: cdemu-daemon.service: Main process exited, code=exited, status=255/EXC>
Jan 19 23:22:50 xps systemd[2369]: cdemu-daemon.service: Failed with result 'exit-code'.
Jan 19 23:22:50 xps systemd[2369]: Failed to start CDEmu daemon.
-- Reboot --
Jan 20 12:16:44 xps systemd[2456]: Starting CDEmu daemon...
Jan 20 12:16:44 xps cdemu-daemon[3156]: Starting CDEmu daemon with following parameters:
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - config file: /home/kapper/.config/cdemu-daemon (exists: 0)
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - num devices: 1
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - control device: /dev/vhba_ctl
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - audio driver: null
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - bus type: session
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - default CDEmu debug mask: 0x0
Jan 20 12:16:44 xps cdemu-daemon[3156]:  - default libMirage debug mask: 0x0
Jan 20 12:16:44 xps cdemu-daemon[3156]: cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: >
Jan 20 12:16:44 xps cdemu-daemon[3156]: cdemu: Daemon: failed to start device #0!
Jan 20 12:16:44 xps cdemu-daemon[3156]: cdemu: Daemon: failed to create device!
Jan 20 12:16:44 xps cdemu-daemon[3156]: Daemon initialization and start failed!
Jan 20 12:16:44 xps systemd[2456]: cdemu-daemon.service: Main process exited, code=exited, status=255/EXC>
Jan 20 12:16:44 xps systemd[2456]: cdemu-daemon.service: Failed with result 'exit-code'.
Jan 20 12:16:44 xps systemd[2456]: Failed to start CDEmu daemon.

Attempting to start gcdemu manually produces this error

Daemon autostart failed. Error: g-io-error-quark: Error calling StartServiceByName for net.sf.cdemu.CDEmuDaemon: Timeout was reached (24)

Attempting to start the daemon manually produces this error

kapper@xps:~$ cdemu-daemon
Starting CDEmu daemon with following parameters:
 - config file: (null) (exists: 0)
 - num devices: 1
 - control device: /dev/vhba_ctl
 - audio driver: null
 - bus type: session
 - default CDEmu debug mask: 0x0
 - default libMirage debug mask: 0x0

cdemu0: Kernel I/O: failed to open control device /dev/vhba_ctl: No such file or directory!
cdemu: Daemon: failed to start device #0!
cdemu: Daemon: failed to create device!
Daemon initialization and start failed!

Not really sure where to go from here, any help would be appreciated. Let me know if any further information is needed, I'd be happy to run some commands or tests and provide output.

kapper@xps:~$ uname -a
Linux xps 5.11.0-46-generic #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Support for MAME Compressed Hunk of Data CHD

glob *.chd, application/x-mame-chd

Was originally developed by MAME, as HDD and CDROM media started appearing on the arcade machines turning up for emulation. As an in-house developed product catering for specific needs, there aren't of course too much documentation around. Even the name is doused in obscurity with the mime type referring to "Compressed Hard Drive" but that is not what others say.

Basically it is a compressed block device with LBA support which has had some time to mature. It originally had cylinders, heads, and sectors which evolved into maps and hunks as the technology matures heading towards a 6th itteration. It has both compressed (read-only) and uncompressed (read-write) support with the MAME emulator implementing COW (copy on write) for transparent write-ability while maintaining the integrity of the original dumps.

With the help of Libretro, part of the bigger RetroArch project, assisting with the development of the new rtissera/libchdr library, has seen CHD gaining new popularity as more and more emulators are starting to adopt the format and old ROM sets are getting converted.

The only thing that is missing now is how to mount your CHMs, which reminded me, cdemu is the place to go for all things mountable and then some.

Hoping this peaked some interests =)

Illegal Audio-MPEG-Header 0x00000000 at offset 2104 (libmpg123) using image with audio tracks

I used to mount correctly a CUE/BIN image with audio tracks which doesn't mount anymore and crash the cdemu-daemon: I can't load any images after this crash without having to restart the system.

The file is an image of the game 'Re-Volt', fetched from archive.org. Its a "Redump" dump so the file is clean (and worked well before).

$ cdemu load 0 /path/to/cue-file
   ERROR: Failed to load image: g-io-error-quark: Timeout was reached (24)

I have some others images which mount well so my cdemu install is probably OK.

The daemon reports lots of libmpg123 errors before crashing like this (full log attached as file:

Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: src/libmpg123/layer1.c:I_step_one():56] error: 256 bits needed, 32 available
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:INT123_do_layer1():228] error: Aborting layer I decoding after step one.
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:I_step_one():56] error: 256 bits needed, 32 available
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:INT123_do_layer1():228] error: Aborting layer I decoding after step one.
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:I_step_one():56] error: 256 bits needed, 32 available
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:INT123_do_layer1():228] error: Aborting layer I decoding after step one.
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:I_step_one():56] error: 256 bits needed, 32 available
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:INT123_do_layer1():228] error: Aborting layer I decoding after step one.
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:I_step_one():56] error: 256 bits needed, 32 available
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:INT123_do_layer1():228] error: Aborting layer I decoding after step one.
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:I_step_one():56] error: 256 bits needed, 32 available
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: [src/libmpg123/layer1.c:INT123_do_layer1():228] error: Aborting layer I decoding after step one.
Aug 08 11:01:56 dellxps13 cdemu-daemon[2609]: Note: Illegal Audio-MPEG-Header 0x00000000 at offset 48.

cdemu.log

I'm on archlinux, package version: cdemu-daemon 3.2.6-1

According to Arch package page, it has been updated at 2023-05-19 15:43 UTC.
I suspect the issue appeared after this update.

The file layout of the image file:

-rw-r--r-- 1 ben ben      1723 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1).cue'
-rw-r--r-- 1 ben ben 170790480 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 01).bin'
-rw-r--r-- 1 ben ben  57584016 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 02).bin'
-rw-r--r-- 1 ben ben  51863952 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 03).bin'
-rw-r--r-- 1 ben ben  41319936 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 04).bin'
-rw-r--r-- 1 ben ben  43599024 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 05).bin'
-rw-r--r-- 1 ben ben  31820208 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 06).bin'
-rw-r--r-- 1 ben ben  36909936 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 07).bin'
-rw-r--r-- 1 ben ben  31824912 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 08).bin'
-rw-r--r-- 1 ben ben  42164304 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 09).bin'
-rw-r--r-- 1 ben ben  64282512 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 10).bin'
-rw-r--r-- 1 ben ben  37643760 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 11).bin'
-rw-r--r-- 1 ben ben  34508544 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 12).bin'
-rw-r--r-- 1 ben ben   4148928 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 13).bin'
-rw-r--r-- 1 ben ben   3913728 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 14).bin'
-rw-r--r-- 1 ben ben  21417312 Jan 22  2022 'Re-Volt (Europe) (En,Fr,De,Es,It) (Rev 1) (Track 15).bin'

I don't share image file download link here but let me know if want it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.