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

Screensharing broken on KDE Plasma 6 update #50326

Closed
z411 opened this issue May 14, 2024 · 13 comments
Closed

Screensharing broken on KDE Plasma 6 update #50326

z411 opened this issue May 14, 2024 · 13 comments
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed

Comments

@z411
Copy link
Contributor

z411 commented May 14, 2024

Is this a new report?

Yes

System Info

Void 6.6.30_1 x86_64 AuthenticAMD uptodate rrrmmnFFFFFFF

Package(s) Affected

plasma-desktop-6.0.4_1 and related

Does a report exist for this bug with the project's home (upstream) and/or another distro?

https://bugs.kde.org/show_bug.cgi?id=481058

Expected behaviour

Screensharing under KDE Wayland with PipeWire was working.

Actual behaviour

When attempting to screenshare, the portal window selection dialog appears with no images in it, and when choosing one I get "Failed to connect PipeWire context".

Steps to reproduce

  1. Try to screenshare from any application, example: obs
  2. Select window or screen to share
  3. Get "Failed to connect PipeWire context" error. obs output shows "warning: [pipewire] Failed to start screencast, denied or cancelled by user"
@z411 z411 added bug Something isn't working needs-testing Testing a PR or reproducing an issue needed labels May 14, 2024
@Luciogi
Copy link
Contributor

Luciogi commented May 14, 2024

start pipewire, wireplumber using runit user service

@SpidFightFR
Copy link
Contributor

start pipewire, wireplumber using runit user service

Hey.. I don't find these as services... I personally run them manually at the start of my plasma session. I have the same problem.

@classabbyamp
Copy link
Member

start pipewire, wireplumber using runit user service

the fact that people in the upstream bug report are using systemd and seeing this issue would suggest that it's probably not solved by doing that

@SpidFightFR
Copy link
Contributor

start pipewire, wireplumber using runit user service

the fact that people in the upstream bug report are using systemd and seeing this issue would suggest that it's probably not solved by doing that

so it's an upstream pipewire issue ?

@classabbyamp
Copy link
Member

look at the original post in this thread...

@Luciogi
Copy link
Contributor

Luciogi commented May 14, 2024

start pipewire, wireplumber using runit user service

the fact that people in the upstream bug report are using systemd and seeing this issue would suggest that it's probably not solved by doing that

it is workaround, i am using runit user service pipewire, it is working

@SpidFightFR
Copy link
Contributor

start pipewire, wireplumber using runit user service

the fact that people in the upstream bug report are using systemd and seeing this issue would suggest that it's probably not solved by doing that

it is workaround, i am using runit user service pipewire, it is working

How did you get these services? Am i missing something?

@Luciogi
Copy link
Contributor

Luciogi commented May 14, 2024

@SpidFightFR
I took services from https://github.com/Johnnynator/dotfiles/tree/master/.sv

/etc/sv/runsvdir-oggy/run contains following
you just change USER and HOME

#!/bin/sh
export XDG_RUNTIME_DIR="/run/user/1000"
export USER="oggy"
export HOME="/home/oggy"

groups="$(id -Gn "$USER" | tr ' ' ':')"
svdir="$HOME/.sv/service"

exec chpst -u "$USER:$groups" runsvdir "$svdir"

then you can interact with user services

sv start|stop|restart ~/.sv/services/pipewire

Note: git repo does not have service for wireplumber, you have to add it too

@Luciogi
Copy link
Contributor

Luciogi commented May 14, 2024

upstream bug seems to be fixed in this commit
bug: https://bugs.kde.org/show_bug.cgi?id=483137
commit: https://invent.kde.org/plasma/kwin/-/commit/013e69988ffdbed1d3c684a536c0d4b79c7de680

@z411
Copy link
Contributor Author

z411 commented May 14, 2024

Thanks for the quick reply and patch.

So it seems Plasma 6 can't handle having a PipeWire connection start after the session is started. Makes sense as I was also starting PipeWire through session autostart, which is the recommended way to do it in the Void wiki. Maybe we could include runit a user service for PipeWire and edit the wiki to redirect people to use it instead? Seems like a cleaner way to me, and it's probably what most desktop environments expect.

@z411
Copy link
Contributor Author

z411 commented May 14, 2024

@SpidFightFR I took services from https://github.com/Johnnynator/dotfiles/tree/master/.sv

/etc/sv/runsvdir-oggy/run contains following you just change USER and HOME

#!/bin/sh
export XDG_RUNTIME_DIR="/run/user/1000"
export USER="oggy"
export HOME="/home/oggy"

groups="$(id -Gn "$USER" | tr ' ' ':')"
svdir="$HOME/.sv/service"

exec chpst -u "$USER:$groups" runsvdir "$svdir"

then you can interact with user services

sv start|stop|restart ~/.sv/services/pipewire

Note: git repo does not have service for wireplumber, you have to add it too

You can set PipeWire to start WirePlumber and pipewire-pulse as child processes, so I think this service alone should be enough. Thanks a lot.

@classabbyamp
Copy link
Member

if you do that you need to kill those processes when stopped:

cat .config/service/pipewire/control/t 
#!/bin/sh
[ -r supervise/pid ] && kill -TERM -$(cat supervise/pid)

@Luciogi
Copy link
Contributor

Luciogi commented May 15, 2024

issue should be closed

@sgn sgn closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-testing Testing a PR or reproducing an issue needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants