Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
77 user(s) are online (58 user(s) are browsing Forums)

Members: 0
Guests: 77

more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 10 11 12 (13)
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
These are some tests I'm doing with the SUDO command.

I haven't mounted the GPU because if I use the normal Qemu command with sudo, the audio doesn't play.

So I assume that if the audio plays with SUDO, it should still work with the GPU mounted.

I'll post here if anyone has any suggestions, and I'll put them into practice.

systemctl --user status pipewire pipewire-pulse

result:

systemctl --user status pipewire pipewire-pulse
● pipewire.service - PipeWire Multimedia Service
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; preset: e>
Active: active (running) since Sun 2025-08-17 21:04:30 CEST; 5min ago
Invocation: 1b503a46ace14b2bb6040b1b0c5309bc
TriggeredBy: ● pipewire.socket
Main PID: 11156 (pipewire)
Tasks: 3 (limit: 36969)
Memory: 6.5M (peak: 6.8M)
CPU: 52ms
CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewi>
└─11156 /usr/bin/pipewire

ago 17 21:04:30 emulazione systemd[8174]: Started pipewire.service - PipeWire M>

● pipewire-pulse.service - PipeWire PulseAudio
Loaded: loaded (/usr/lib/systemd/user/pipewire-pulse.service; enabled; pre>
Active: active (running) since Sun 2025-08-17 20:45:09 CEST; 24min ago
Invocation: b0585c86d66a49dfb79442e18fd61aeb
TriggeredBy: ● pipewire-pulse.socket
Main PID: 8195 (pipewire-pulse)
Tasks: 3 (limit: 36969)
Memory: 5.5M (peak: 5.9M)
CPU: 129ms

white@emulazione:~$ ls -l /run/user/$(id -u)/pulse/native
srw-rw-rw- 1 white white 0 ago 17 20:45 /run/user/1000/pulse/native

qemu-system-ppc --version
QEMU emulator version 10.0.92 (v10.1.0-rc2-9-ga74434580e)
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
If I use:

qemu-system-ppc -M amigaone -kernel "/home/white/.kyvos/bboot" -device loader,addr=0x600000,file=/home/white/Scaricati/amiga-one/kickstart.zip -rtc base=localtime -vga none -accel tcg -device rtl8139,addr=0x0a,netdev=nic -netdev user,id=nic,hostname=amiga-one -serial stdio -device es1370,addr=0x09 -device sm501 -m 2048M -name amiga-one -drive if=none,id=cd -device ide-cd,drive=cd,bus=ide.1 -drive if=none,id=hd0,file=/home/white/Scaricati/amiga-one/hd0.qcow2,format=qcow2 -device ide-hd,unit=0,drive=hd0,bus=ide.0 -pidfile kyvos.amiga-one.pid -display sdl

The audio works.

If I add SUDO, the audio doesn't work.

And the following messages appear in the qemu window:

BBoot 0.8 (15.3.2025)
/pci@80000000: io fe000000/c00000 mem 80000000/7d000000
0:0.0 10cc:0660 6000000 0000 0
0:0.1 10cc:0661 6000000 0000 0
0:7.0 1106:0686 6010040 0000 8
0:7.1 1106:0571 1018a06 000e 80
0:7.2 1106:3038 c030001 0400 0
20 1 800000 20 ffffffe1
0:7.3 1106:3038 c030001 0400 0
20 1 800020 20 ffffffe1
0:7.4 1106:3057 6800040 0000 0
0:7.5 1106:3058 4010050 0300 4
10 1 800100 100 ffffff01
14 1 800200 4 fffffffd
18 1 800204 4 fffffffd
0:7.6 1106:3068 7800030 0300 30
0:8.0 126f:0501 3800000 0000 0
10 0 80000000 4000000 fc000000
14 0 84000000 200000 ffe00000
0:9.0 1274:5000 4010000 0100 0
10 1 800300 100 ffffff01
0:a.0 10ec:8139 2000020 0100 0
10 1 800400 100 ffffff01
14 0 84200000 100 ffffff00
Checking initrd at 0x600000-0x942180 (3416448 bytes)
Found zip with 64 entries
Parsing Kicklayout at 0x942180 (3385 bytes)
Booting config 1: AmigaOS 4.1 Final
Loading loader
Loading kernel
Loading FastFileSystem
Loading SmartFilesystem
Loading JXFileSystem
Loading a1floppy.device.kmod
Loading a1ide.device.kmod
Loading battclock.resource.kmod
Loading biosversion.resource.kmod
Loading bootmenu.kmod
Loading bootimage
Loading CDFileSystem
Loading con-handler.kmod
Loading console.device.kmod
Loading diskboot.kmod
Loading diskboot.config
Loading diskcache.library.kmod
Loading dos.library.kmod
Loading elf.library.kmod
Loading env-handler.kmod
Loading FileSystem.resource.kmod
Loading gadtools.library.kmod
Loading gameport.device.kmod
Loading graphics.library.kmod
Loading hunk.library.kmod
Loading input.device.kmod
Loading intuition.library.kmod
Loading it8212ide.device.kmod
Loading keyboard.device.kmod
Loading keymap.library.kmod
Loading lsi53c8xx.device.kmod
Loading mounter.library
Loading newlib.library.kmod
Loading nonvolatile.library.kmod
Loading nvram.resource.kmod
Loading ps2.resource.kmod
Loading ram-handler.kmod
Loading ramdrive.device.kmod
Loading ramlib.kmod
Loading shell.kmod
Loading sii0680ide.device.kmod
Loading sii3112ide.device.kmod
Loading sii3114ide.device.kmod
Loading sii3512ide.device.kmod
Loading strap.kmod
Loading timer.device.kmod
Loading PCIGraphics.card
Loading ATIRadeon.chip
Loading 3dfxVoodoo.chip
Loading 3DLabsPermedia2.chip
Loading siliconmotion502.chip
Loading petunia.library.kmod
Loading usbresource.library
Loading usbsys.device
Loading uhci.usbhcd
Loading ehci.usbhcd
Loading hub.usbfd
Loading bootmouse.usbfd
Loading bootkeyboard.usbfd
Loading massstorage.usbfd
Loading ohci.usbhcd
Loading mounter.library
Starting exec
couldn't open play stream: No such file or directory
sndio: failed to open device
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `es1370.dac2'
couldn't open rec stream: No such file or directory
sndio: failed to open device
couldn't open rec stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `es1370.adc'
couldn't open play stream: No such file or directory
sndio: failed to open device
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `via-ac97.out'
couldn't open play stream: No such file or directory
sndio: failed to open device
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `via-ac97.out'

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
sudo dmesg | grep -i audio

[ 5.618700] snd_hda_intel 0000:04:00.1: Handle vga_switcheroo audio client
[ 5.667305] snd_hda_codec_realtek hdaudioC1D0: ALCS1200A: picked fixup for PCI SSID 1043:8797
[ 5.667309] snd_hda_codec_realtek hdaudioC1D0: ALCS1200A: SKU not ready 0x00000000
[ 5.667785] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALCS1200A: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line
[ 5.667788] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 5.667790] snd_hda_codec_realtek hdaudioC1D0: hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[ 5.667792] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
[ 5.667793] snd_hda_codec_realtek hdaudioC1D0: dig-out=0x1e/0x0
[ 5.667795] snd_hda_codec_realtek hdaudioC1D0: inputs:
[ 5.667797] snd_hda_codec_realtek hdaudioC1D0: Rear Mic=0x18
[ 5.667800] snd_hda_codec_realtek hdaudioC1D0: Front Mic=0x19
[ 5.667801] snd_hda_codec_realtek hdaudioC1D0: Line=0x1a
[ 5.681767] input: HD-Audio Generic Rear Mic as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input14
[ 5.681852] input: HD-Audio Generic Front Mic as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input15
[ 5.682889] input: HD-Audio Generic Line as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input16
[ 5.682970] input: HD-Audio Generic Line Out Front as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input17
[ 5.683063] input: HD-Audio Generic Line Out Surround as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input18
[ 5.683123] input: HD-Audio Generic Line Out CLFE as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input19
[ 5.683189] input: HD-Audio Generic Front Headphone as /devices/pci0000:00/0000:00:08.1/0000:08:00.4/sound/card1/input20

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
I checked these files:

/etc/systemd/user/sockets.target.wants/pipewire-pulse.socket
/usr/lib/systemd/user/pipewire-pulse.service
/usr/lib/systemd/user/pipewire.socket
/usr/lib/systemd/user/pipewire.service

they are all marked as !root

ConditionUser=!root

example:

[Unit]
Description=PipeWire PulseAudio

# We require pipewire-pulse.socket to be active before starting the daemon, because
# while it is possible to use the service without the socket, it is not clear
# why it would be desirable.
#
# A user installing pipewire and doing `systemctl --user start pipewire-pulse`
# will not get the socket started, which might be confusing and problematic if
# the server is to be restarted later on, as the client autospawn feature
# might kick in. Also, a start of the socket unit will fail, adding to the
# confusion.
#
# After=pipewire-pulse.socket is not needed, as it is already implicit in the
# socket-service relationship, see systemd.socket(5).
Requires=pipewire-pulse.socket
ConditionUser=!root
Wants=pipewire.service wireplumber.service pipewire-media-session.service
After=pipewire.service wireplumber.service pipewire-media-session.service
Conflicts=pulseaudio.service

[Service]
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
RestrictNamespaces=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=simple
ExecStart=/usr/bin/pipewire-pulse
Restart=on-failure
Slice=session.slice

[Install]
Also=pipewire-pulse.socket
WantedBy=default.target

--------------------------------------------------------------

this one instead does not report any entry:

etc/systemd/user/pipewire.service.wants

[Unit]
Description=Multimedia Service Session Manager
After=pipewire.service
BindsTo=pipewire.service
Conflicts=pipewire-media-session.service

[Service]
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
Type=simple
ExecStart=/usr/bin/wireplumber
Restart=on-failure
Slice=session.slice
Environment=GIO_USE_VFS=local

[Install]
WantedBy=pipewire.service

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
I tried completely deleting the entry:

ConditionUser=!root

in:

/etc/systemd/user/sockets.target.wants/pipewire-pulse.socket
/usr/lib/systemd/user/pipewire-pulse.service
/usr/lib/systemd/user/pipewire.socket
/usr/lib/systemd/user/pipewire.service

but it doesn't work.

If I use SUDO, the audio still isn't heard.

Suggestions, thanks

Here's the link:

https://forums.fedoraforum.org/showthr ... boot-when-logging-as-root

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Quite a regular
Quite a regular


See User information
@white
Quote:
I tried completely deleting the entry:

ConditionUser=!root

in:

/etc/systemd/user/sockets.target.wants/pipewire-pulse.socket
/usr/lib/systemd/user/pipewire-pulse.service
/usr/lib/systemd/user/pipewire.socket
/usr/lib/systemd/user/pipewire.service

but it doesn't work.

If I use SUDO, the audio still isn't heard.

Have you tried that after rebooting? If you edit systemd config you need to restart these services but it's easier to just reboot the whole machine.

Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
@Balaton

Yes, I rebooted, and it's also checked in:
/usr/lib/systemd/user/

The entry ConditionUser=!root
is no longer there.

Now I'm shutting down the machine, and I'll try that too.

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
@Balaton
I rebooted and even shut down the system.

I don't have a GPU installed, so I'm simply using SM501

I also tried simply setting:

ConditionUser=true

but it doesn't work

if anyone wants to try it there is no need for real GPU



sudo qemu-system-ppc -M amigaone -kernel "/home/white/.kyvos/bboot" -device loader,addr=0x600000,file=/home/white/Scaricati/amiga-one/kickstart.zip -rtc base=localtime -vga none -accel tcg -device rtl8139,addr=0x0a,netdev=nic -netdev user,id=nic,hostname=amiga-one -serial stdio -device es1370,addr=0x09 -device sm501 -m 2048M -name amiga-one -drive if=none,id=cd -device ide-cd,drive=cd,bus=ide.1 -drive if=none,id=hd0,file=/home/white/Scaricati/amiga-one/hd0.qcow2,format=qcow2 -device ide-hd,unit=0,drive=hd0,bus=ide.0 -pidfile kyvos.amiga-one.pid -display sdl

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
The latest available version has also been compiled

qemu-system-ppc --version
QEMU emulator version 10.0.93 (v10.1.0-rc3-5-g5836af0783)
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers

Audio can only be heard without SUDO.

I'll try setting a GPU rule like this to see if it gets passed without SUDO.

ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:06:00.0", RUN+="/bin/sh -c 'echo 0000:06:00.0 > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null || true'" ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:06:00.1", RUN+="/bin/sh -c 'echo 0000:06:00.1 > /sys/bus/pci/drivers/vfio-pci/unbind 2>/dev/null || "True"

I don't have any other ideas.

Obviously, VFIO and everything else are already configured.

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
I had the USB audio stick for Morphos routed this way.

It should probably work for the GPU too.

https://eab.abime.net/showthread.php?t=106392&page=5

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Home away from home
Home away from home


See User information
@white
If your are unable to get pipewire working as root user on your system try any of the multiple other Unix sound systems instead, for example ALSA.

Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
@joerg

I also tried Ubuntu Studio a while back.
It asks you which audio environment you want to use.
But the problem is always the same: as soon as I use SUDO, the audio is lost.

I've used at least 10 distributions, including Arch.
Same problem with all distributions.

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
The error is always the same that appears in the qemu window:

Starting exec
couldn't open play stream: No such file or directory
sndio: failed to open device
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `es1370.dac2'
couldn't open rec stream: No such file or directory
sndio: failed to open device
couldn't open rec stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `es1370.adc'
couldn't open play stream: No such file or directory
sndio: failed to open device
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `via-ac97.out'
couldn't open play stream: No such file or directory
sndio: failed to open device
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `via-ac97.out'

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
Here a bug that looks something like this:

https://gitlab.com/qemu-project/qemu/-/issues/2812



Crash initializing audio device

ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for 0
couldn't open play stream: No such file or directory
sndio: failed to open device
ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for 0
couldn't open play stream: No such file or directory
sndio: failed to open device
audio: Could not create a backend for voice `asc.out'

Thread 1 "qemu-system-m68" received signal SIGSEGV, Segmentation fault.
AUD_get_buffer_size_out (sw=0x0) at ../src/audio/audio.c:908
908 return sw->hw->samples * sw->hw->info.bytes_per_frame;

In hw/audio/asc.c, asc_realize,

655 s->voice = AUD_open_out(&s->card, s->voice, "asc.out", s, asc_out_cb,
656 &as);
657 s->shift = 1;
658 s->samples = AUD_get_buffer_size_out(s->voice) >> s->shift;


ETC. ETC.

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top
Re: QEMU GPU vfio-pci pass through
Home away from home
Home away from home


See User information
@white
- You are the only one with such a problem.
- It's not related to QEmu.
- It's not related to the AmigaOS 4.x/PPC emulation nor it's audio drivers either.
- You should get exactly same problems with anything else trying to play audio as root user, for example "sudo vlc ...".
-> Nobody on this forum can help you with your strange Linux system specific problems, try asking for help on Linux forums instead.

Go to top
Re: QEMU GPU vfio-pci pass through
Just can't stay away
Just can't stay away


See User information
@joerg

Here a bug that looks something like this:

https://gitlab.com/qemu-project/qemu/-/issues/2812

I don't know if it's related or if it's been resolved.

I can't say anything else.

Just as a day well spent brings a happy sleep, so a life well used brings a happy death.

Leonardo da Vinci
Go to top

  Register To Post
« 1 ... 10 11 12 (13)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project