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

Cannot play streams or videos in qubes connected to GUI domain (sys-gui) #7367

Closed
ZYousef opened this issue Mar 22, 2022 · 13 comments
Closed
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: gui-domain P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: not applicable E.g., help/support requests, questions, discussions, "not a bug," not enough info, not actionable. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@ZYousef
Copy link

ZYousef commented Mar 22, 2022

How to file a helpful issue

Qubes OS release

Qubes release 4.1.0

Brief summary

GUI-domain seems to be unable to render videos with audio streams, PulseAudio setup seems to be incomplete, (no autostart & when started manually says no cards available). Looking to ~/.xsession-errors says sys-gui AUDIO connected to None. Skipping
. I tried playing muted videos and it works fine, I suspect that the issue is coming from PulseAudio

Steps to reproduce

sudo qubesctl top.enable qvm.sys-gui
sudo qubesctl top.enable qvm.sys-gui pillar=True
sudo qubesctl --all state.highstate

((wait for a long time)

sudo qubesctl top.disable qvm.sys-gui
set default gui:
qubes-prefs default-guivm sys-gui

Expected behavior

Logging to GUI-Domain works fine.

Actual behavior

GUI-Domain works reasonably well regardless of some cluttering, however, it cannot render videos or streams with audio.
((videos not rendered at all unless it has no audio))

@ZYousef ZYousef added P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Mar 22, 2022
@DemiMarie
Copy link

On the one hand this is definitely a bug, but on the other hand I am curious why you are trying to play videos in the GUI domain. The GUI domain is highly privileged (via qrexec policy) and videos are generally considered untrusted.

@ZYousef
Copy link
Author

ZYousef commented Mar 22, 2022

I am sorry I wasn't clear in my OP. I meant to say that the video is played within a qube/appVM on the sys-gui environment.
When I log into the sys-gui and run say youtube on any qube, the video gets stuck and doesn't play (this isn't the case with dom0) . The audio icon on the top right of sys-gui has an x-mark with a pop-up message: "Not connected to the PulseAudio server". I will share some logs shortly.

@ZYousef
Copy link
Author

ZYousef commented Mar 22, 2022

Below you can find some logs from:
sudo pulseaudio --system & ~/.xsession-errors

What I've noticed from these logs is that pulseaudio isn't set up correctly and is unable to connect.
Interesting line from xsession: sys-gui: AUDIO connected to None. Skipping.

As for pulseaudio --system command I noticed this different behavior W: [pulseaudio] protocol-native.c: Denied access to client with invalid authentication data.

xsession.txt
pulseaudio --system.txt

@andrewdavidwong andrewdavidwong added C: gui-domain needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Mar 22, 2022
@andrewdavidwong andrewdavidwong added this to the Release 4.1 updates milestone Mar 22, 2022
@ZYousef
Copy link
Author

ZYousef commented Apr 3, 2022

Update
Surprisingly if you start the machine while you're in dom0 environment then switch to the sys-gui environment, and use it to run some videos it will play fine!

@DemiMarie
Copy link

@ZYousef Have you set sys-gui to also be the AudioVM?

@ZYousef
Copy link
Author

ZYousef commented Apr 4, 2022

@DemiMarie do you mean setting default-audiovm to be sys-gui?
if so, yes! however, after setting it as audiovm, ~/.xsession-errors now fails
at sys-net: Starting AUDIO with Task exception was never retrieved ... qvm_start_daemon.py:576> exception=FileNotFoundError(2,'No such file or directory'">

Update
I've installed qubes-audio-daemon to fix the previous error, now it says: sys-gui connected to None.
please note that I'm only using sys-gui without sys-audio being set up.

@DemiMarie
Copy link

Update
I've installed qubes-audio-daemon to fix the previous error, now it says: sys-gui connected to None.
please note that I'm only using sys-gui without sys-audio being set up.

What happens if you set sys-gui’s AudioVM to dom0?

@ZYousef
Copy link
Author

ZYousef commented Apr 5, 2022

Update
I've found a workaround to solve this issue with the help of @DemiMarie, however, I'm concerned about the security implications of the solution.

  1. Setup sys-gui as mentioned before

Steps to reproduce

sudo qubesctl top.enable qvm.sys-gui
sudo qubesctl top.enable qvm.sys-gui pillar=True
sudo qubesctl --all state.highstate

((wait for a long time)

  1. Change the preferences:
qubes-prefs default-guivm sys-gui
qubes-prefs default-audiovm sys-gui
qvm-prefs sys-gui audiovm dom0
  1. install qubes-audio-daemon on fedora-34-xfce (sys-gui's template)
  2. Create an autostart for pulse-audio-with-vchan or edit /etc/xdg/autostart/qubes-pulseaudio.desktop on fedora-34-xfce
    (existing autostart doesn't initiate with boot up

[Desktop Entry]
Name=Pulseaudio
Comment=Starts Pulseaudio
Icon=qubes
Exec=start-pulseaudio-with-vchan
Terminal=False
Type=Application
NotShowIn=KDE;

Voilà you should be able to enjoy YouTube on GUI-domain!

@DemiMarie
Copy link

I've found a workaround to solve this issue with the help of @DemiMarie, however, I'm concerned about the security implications of the solution.

I don’t see any security implications of this, it looks fine (assuming you trust your fedora-34-xfce template).

@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
@andrewdavidwong andrewdavidwong removed this from the Release 4.1 updates milestone Aug 13, 2023
@ben-grande
Copy link

From reading #7367 (comment), I believe this was solved and this issue can be closed.

I am sorry I wasn't clear in my OP. I meant to say that the video is played within a qube/appVM on the sys-gui environment.

I just recommend correcting the title for people searching for it.

Recommended title:

Can't play streams on qubes connected to GUI-domain (sys-gui)

@andrewdavidwong
Copy link
Member

andrewdavidwong commented Jul 18, 2024

From reading #7367 (comment), I believe this was solved and this issue can be closed.

That comment says that a workaround was found. Also, it appears that there was no actual change to code or documentation, which suggests that the issue is not actually completed. (If it should still be closed, maybe it should be closed with another resolution, like R: not applicable E.g., help/support requests, questions, discussions, "not a bug," not enough info, not actionable. ?)

I just recommend correcting the title for people searching for it.

Done.

@andrewdavidwong andrewdavidwong changed the title Cannot play streams or videos in GUI-domain (sys-gui) Cannot play streams or videos in qubes connected to GUI domain (sys-gui) Jul 18, 2024
@ben-grande
Copy link

(If it should still be closed, maybe it should be closed with another resolution, like R: not applicable ?)

Yes.

@andrewdavidwong andrewdavidwong added R: not applicable E.g., help/support requests, questions, discussions, "not a bug," not enough info, not actionable. and removed needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jul 21, 2024
Copy link

This issue has been closed as "not applicable." Here are some common examples of cases in which issues are closed as not applicable:

We respect the time and effort you have taken to file this issue, and we understand that this outcome may be unsatisfying. Please accept our sincere apologies and know that we greatly value your participation and membership in the Qubes community.

Regarding help and support requests, please note that this issue tracker (qubes-issues) is not intended to serve as a help desk or tech support center. Instead, we've set up other venues where you can ask for help and support, ask questions, and have discussions. By contrast, the issue tracker is more of a technical tool intended to support our developers in their work. We thank you for your understanding.

If anyone reading this believes that this issue was closed in error or that the resolution of "not applicable" is not accurate, please leave a comment below saying so, and we will review this issue again. For more information, see How issues get closed.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: gui-domain P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. R: not applicable E.g., help/support requests, questions, discussions, "not a bug," not enough info, not actionable. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

4 participants