VirtualBox and PulseAudio in Fossapup64 (Solved)

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

VirtualBox and PulseAudio in Fossapup64 (Solved)

Post by sfein1000 »

I hope this isn't a duplicate post. My first attempt lost connection with the forum in the middle of submitting.

I am running fossapup64-9.5 as a live ISO. I am attempting to install virtualbox. I first tried QuickPet, but it complained that I didn't have a save file/folder setup and would not let me continue. I couldn't figure out where it would get virtualbox from so I couldn't go online to download it. I next tried the debs from ppm. They installed cleanly but complained about a missing vbxdrv when I tried to run a VM. I then went to virtualbox.org. They have a deb, but I was concerned about running into the same issue as when I used ppm. Instead I download the generic .run file.

I ran that file, no errors. I then used VBoxManage to apply the extension pack. I ran my VM and I ran into an issue. It complained about not being able to connect to PulseAudio and dowgraded to No Audio. Otherwise the VM ran fine. I looked at VBox logs and I saw an item related to PulseAudio stating the connection was refused.

I am wondering if this is related to using the generic run file on Puppy (maybe it expects certain permissions or user or groups to exist??).

Has anyone run into the issue with PulseAudio and know how to workaround it?

Thanks.

Last edited by sfein1000 on Fri Apr 01, 2022 7:19 pm, edited 1 time in total.
User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: VirtualBox and PulseAudio

Post by Phoenix »

You have to use apulse most likely, since puppy only have fragments of it included. Next, I strongly suggest you create a savefile or folder, so you can save your configuration. (There are tools and guides already present on how to do this)

P.S You have not duplicated, the forum was DDOS'd (basically gets flooded by worthless connections) and so they had to deal with that.

IRC: firepup | Time to hack Puppy!

Geek3579
Posts: 269
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 80 times
Been thanked: 68 times

Re: VirtualBox and PulseAudio

Post by Geek3579 »

I have run VirtualBox very successfully on Bionic64 with audio , but not with Fossapup64. take it for what its worth:

Download devx and kernel_sources from Quickpet and install.

Download the .deb version of VBox from the Oracle site. (Plus Extension Pack)
Install by clicking on it.the .deb.

** Then run vboxconfig in the terminal to setup the system.

Run VBox and add in Extension pack

LateAdopter
Posts: 122
Joined: Sat Aug 15, 2020 5:10 pm
Been thanked: 19 times

Re: VirtualBox and PulseAudio

Post by LateAdopter »

I use Virtualbox in Fossapup64 with audio.

Virtualbox seems very buggy and incomplete. I guess that it wasn't finished when Oracle took over Sun Microsystems and still isn't!

Anyway, Fossapup is using ALSA but, if you set Virtualbox to use ALSA, you don't get any audio, although other applications work OK with ALSA.

The solution was to set Virtualbox to use pulseaudio and set the Exec line in Vitualbox.desktop to:

Code: Select all

Exec=apulse Virtualbox %U

Note 1: I am using Virtualbox 6.1.6 on a MSI B450M Pro-VDH AM4 motherboard.
Note 2: I am using the generic version of Virtualbox that goes under /opt not the .deb version.

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: VirtualBox and PulseAudio

Post by sfein1000 »

@Geek3579
I did try the debs first. And I had no success running the VM. At least with the generic .run, the VM starts, just no sound

@Phoenix and @LateAdopter
I tried using apulse from command line (apulse VirtualBox) and I also updated the .desktop file as mentioned by LateAdopter and neither worked. I am seeing the following error when I start the VM:

Host audio backend (PulseAudio) initialization has failed. Selecting the NULL audio backend with the consequence that no sound is audible.

Error ID: HostAudioNotResponding
Severity: Warning

Any thoughts?

User avatar
Phoenix
Posts: 341
Joined: Fri Feb 12, 2021 2:03 am
Location: Canada
Has thanked: 4 times
Been thanked: 48 times

Re: VirtualBox and PulseAudio

Post by Phoenix »

Okay then. So it may be worthwhile downloading the package for PulseAudio again since that will bring in everything that comprises PulseAudio and not the fragments that Puppy uses. (Why wasn't the entire PulseAudio built in? Size/nescessity issue) Then try again.

IRC: firepup | Time to hack Puppy!

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: VirtualBox and PulseAudio

Post by sfein1000 »

I tried reinstalling PulseAudio, but it didn't help. Still getting the same error. I don't see any sign that PulseAudio itself is running and when I try to run PulseAudio, I am getting error messages like the following:
root# pulseaudio
W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified).
E: [pulseaudio] ltdl-bind-now.c: Failed to open module /usr/lib/pulse-13.99.1/modules/module-device-restore.so: /usr/lib/pulse-13.99.1/modules/libprotocol-native.so: undefined symbol: pa_iochannel_socket_get_peer_apparmor_label
E: [pulseaudio] module.c: Failed to open module "module-device-restore".
E: [pulseaudio] ltdl-bind-now.c: Failed to open module /usr/lib/pulse-13.99.1/modules/module-stream-restore.so: /usr/lib/pulse-13.99.1/modules/libprotocol-native.so: undefined symbol: pa_iochannel_socket_get_peer_apparmor_label
E: [pulseaudio] module.c: Failed to open module "module-stream-restore".
E: [pulseaudio] ltdl-bind-now.c: Failed to open module /usr/lib/pulse-13.99.1/modules/module-native-protocol-unix.so: /usr/lib/pulse-13.99.1/modules/libprotocol-native.so: undefined symbol: pa_iochannel_socket_get_peer_apparmor_label
E: [pulseaudio] module.c: Failed to open module "module-native-protocol-unix".
E: [pulseaudio] module-console-kit.c: GetSessionsForUnixUser() call failed: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
E: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.

If I try pulseaudio --system it fails to find user 'pulse' so that doesn't work either.

It seems like apulse is supposed to emulate PulseAudio, but it is not working for VirtualBox.

User avatar
mikeslr
Posts: 2960
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 914 times

Re: VirtualBox and PulseAudio

Post by mikeslr »

My reading of this thread is that pulseaudio sufficiently buggy that it won't function under Virtualbox. LateAdopter provided the solution:

The solution was to set Virtualbox to use pulseaudio and set the Exec line in Vitualbox.desktop to:

Code: Select all

Exec=apulse Virtualbox %U

(Emphasis supplied)."

Under the hood pulseaudio and apulse interact with the same hardware. pulseaudio provides more 'bells & whistles' -- greater control when/if it works. Greater control requires more coding, and more links between code sections.

Uninstall pulseaudio as what it's installation may have done is interfere with the proper functioning of apulse.

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: VirtualBox and PulseAudio

Post by sfein1000 »

Strange, but getting closer.

The reason I tried the redownload of PulseAudio was when I tried apulse yesterday it wasn't working. I tried uninstalling PulseAudio, and it uninstalled what I downloaded, but still did not work. So, time to try a clean slate and start all over. I rebooted from Live ISO - no save file. I installed VirtualBox again.

I then modified the virtualbox.desktop file. I went to /usr/share/applications, but that was just a symbolic link to /opt/VirtualBox. I modified Exec=VirtualBox to be Exec=apulse VirtualBox %U

Still didn't work. So I decdied what output would I see on command line and just typed apulse VirtualBox %U on the command line. I did this yesterday, but for some reason, today, it worked. I got sound. No errors.

I went back to using menu and still, doesn't work. I tried fixmenus form the menu and then remembered it might not work well so typed fixmenus on commandline. Still didn't work. I opened the .desktop file again and found 2 more lines containing VirtualBox. Another exec and a tryexec. So I changed both bof those to be apulse VirtualBox %U. Went through the fixmenus process again. But still no success.

I went back to command line and tried apulse VirtualBox %U and it still worked.

So not sure why command line is working today, maybe I did some other things yesterday and needed a clean start. But the menu option is not working yet.

At least I can get it to work when needed. So I'm a good way there.

User avatar
rockedge
Site Admin
Posts: 6538
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2746 times
Been thanked: 2619 times
Contact:

Re: VirtualBox and PulseAudio

Post by rockedge »

Try this in the desktop file:
change:

Code: Select all

Exec=apulse VirtualBox %U

to

Code: Select all

Exec=apulse <path_to_VBox>/VirtualBox

then in a terminal:

Code: Select all

fixmenu
jwm -reload
jwm -restart
sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: VirtualBox and PulseAudio

Post by sfein1000 »

I did try the full path to VirtualBox already, but the reload/restart was new. I tried that and now the menu option is gone. I checked /usr/share/applications and the desktop file is still there. I checked all menu choices, no idea where it went. I modified the Categories to match existing menus and tried the commands again, but the menu choice is still gone.

sfein1000
Posts: 96
Joined: Fri Mar 25, 2022 1:38 am
Been thanked: 4 times

Re: [Solved] VirtualBox and PulseAudio

Post by sfein1000 »

OK. I decided maybe I should learn a little about these desktop files. Did a little research and it looks like when I changed tryexec, that's why it disappeared from the menus. I changed that back to a full path to VirtualBox and got rid of everything else.

I did the
fixmenus
jwm - reload
jwm -restart

And now menu entry is back and it worked correctly. I have sound.

This leads me to believe, my past attempts were possibly not picked up, so I thought I had put in apulse, but Puppy probably did not agree. I've written all this down and I'm going to try again tomorrow after a reboot to verify everything still works. But I think it is all set now.

I appreciate the help everyone has provided.

Post Reply

Return to “Users”