Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emulation doesn't start if optical drive is empty #1610

Closed
MASHtm opened this issue Jan 23, 2025 · 12 comments
Closed

emulation doesn't start if optical drive is empty #1610

MASHtm opened this issue Jan 23, 2025 · 12 comments
Assignees
Labels

Comments

@MASHtm
Copy link

MASHtm commented Jan 23, 2025

Describe the bug
On current HEAD (built a hour ago)... on my Fedora 41 Desktop with ASUS BR optical drive on /dev/sr0...

If I try to start a A2000 emulation the window never opens and amiberry hangs in "D" state. strace shows a loop on

openat(AT_FDCWD, "/dev/sr0", O_RDONLY)  = -1 ENOMEDIUM (No medium found)
openat(AT_FDCWD, "/dev/sr0", O_RDONLY)  = -1 ENOMEDIUM (No medium found)
openat(AT_FDCWD, "/dev/sr0", O_RDONLY)  = -1 ENOMEDIUM (No medium found)

Seems the new "physical drive support" fails to handle an empty drive?

It's enough to insert a medium (even an Audio CD) to fix the issue.

Expected behavior
No Loop. Starting Emulation

Desktop (please complete the following information):

  • OS: Fedora 41 on AMD 5600
@midwan midwan self-assigned this Jan 23, 2025
@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

@MASHtm
Thanks, this is most likely a bug I missed.

  • Do you have the optical drive connected in the emulation config?
  • Do you have the CD Drive enabled in the HDD Panel, and does it have your drive (/dev/sr0) selected?
  • Does this happen if you disable the CD drive in emulation also?

@MASHtm
Copy link
Author

MASHtm commented Jan 23, 2025

No! Nothing at all.
No drive added! The "Add CD Drive" is greyed out.
[ ] CDFS automount
[ ] CD drive/image
[ ] CDTV ....

I tried now to set
[X] CD drive ...
after selecting /dev/sg0 in the dropdown with empty drive amiberry freezes. And my whole desktop can't change focus anymore. Amiberry is in the same loop mentioned before and I can't even open the drive because it closes immediately again. Had to kill -9 amiberry in a VTE (ctrl-alt-Fx).

@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

Alright, thank you for the extra feedback.
I'll get this fixed ASAP.

@midwan midwan added the bug label Jan 23, 2025
@MASHtm
Copy link
Author

MASHtm commented Jan 23, 2025

just checked this config file. Only things matching "cd" are:
cd_speed=100
sound_volume_cd=0
wherever those are coming from;-)

And scsi=true ... nothing else regarding classic IO.

@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

What about if you start Amiberry and using the Quickstart, try to start a standard A500 or A1200 config. Does that work?

@MASHtm
Copy link
Author

MASHtm commented Jan 23, 2025

A500, A1200 quickstart works

@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

OK, can you send me your .uae config file here then? I can try using that to see if I can recreate the problem.

@MASHtm
Copy link
Author

MASHtm commented Jan 23, 2025

sure...
MASH-2000.uae.txt

@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

Does it work if you:

  • Load your config in the GUI
  • Go to Expansions panel
  • Disable uaescsi.device
  • Start

@MASHtm
Copy link
Author

MASHtm commented Jan 23, 2025

works

@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

Good, then I think the bug is triggered when:

  • uaescsi.device is enabled
  • You have a physical optical device in your system

Which narrows down the search somewhat. :)

@midwan midwan closed this as completed in 189ab7b Jan 23, 2025
@midwan
Copy link
Collaborator

midwan commented Jan 23, 2025

Fixed with the commit above.
This feature is not fully implemented yet, and I thought that having the button disabled in the GUI would be enough. It wasn't, as enabling uaescsi.device also triggered other code on startup, which caused the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants