waveboxapp icon indicating copy to clipboard operation
waveboxapp copied to clipboard

Picture in Picture not properly kept above all other windows on ozone-platform Wayland

Open bayazidbh opened this issue 2 years ago • 2 comments

  • Wavebox Version : flatpak [10.114.32-2 stable]

  • Operating System & Version: KDE neon (Ubuntu-based - Wayland display)

version details

Wavebox: 10.114.32-2 stable
Install Method: tar
Wire Config: 1.2.15
Chromium: 114.0.5735.199
OS: linux/undefined
$ flatpak info io.wavebox.Wavebox

Wavebox - The next generation of web-desktop communication

          ID: io.wavebox.Wavebox
         Ref: app/io.wavebox.Wavebox/x86_64/stable
        Arch: x86_64
      Branch: stable
     Version: 10.114.32-2
     License: LicenseRef-proprietary=https://wavebox.io/eula
      Origin: flathub
  Collection: org.flathub.Stable
Installation: user
   Installed: 31.7 MB
     Runtime: org.freedesktop.Platform/x86_64/21.08
         Sdk: org.freedesktop.Sdk/x86_64/21.08

      Commit: 9338b331ab5258b80d79815b12d7ce48a7a92bdeadb22865388b58acc392b84e
      Parent: 9b5784c6c499eb2225017f6bf8a6f550becb5abb0443aa013cc3303088702961
     Subject: Update wavebox.tar.gz to 10.114.32-2 (fbf59bd3)
        Date: 2023-06-28 08:48:25 +0000

system details

$ inxi -Faz
System:    Kernel: 6.1.37-x64v3-xanmod1 x86_64 bits: 64 compiler: gcc v: 12.3.0 
           parameters: BOOT_IMAGE=/@/boot/vmlinuz-6.1.37-x64v3-xanmod1 
           root=UUID=5bc07ff2-b8eb-4f27-bc9a-1bccc6ff089a ro rootflags=subvol=@ quiet splash vt.handoff=7 
           Desktop: KDE Plasma 5.27.6 tk: Qt 5.15.10 wm: kwin_wayland vt: 1 dm: SDDM Distro: KDE neon 22.04 5.27 
           base: Ubuntu Jammy 
Machine:   Type: Laptop System: HP product: HP Laptop 14s-fq2xxx v: N/A serial: <filter> Chassis: type: 10 
           serial: <filter> 
           Mobo: HP model: 89FE v: 12.15 serial: <filter> UEFI: AMI v: F.12 date: 10/24/2022 
Battery:   ID-1: BAT0 charge: 36.8 Wh (100.0%) condition: 36.8/36.8 Wh (100.0%) volts: 12.6 min: 11.3 
           model: HP Primary type: Li-ion serial: <filter> status: Full 
CPU:       Info: 6-Core model: AMD Ryzen 5 5625U with Radeon Graphics bits: 64 type: MT MCP arch: Zen 3 
           family: 19 (25) model-id: 50 (80) stepping: 0 microcode: A50000D cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 55096 
           Speed: 2661 MHz min/max: 1600/2300 MHz boost: enabled Core speeds (MHz): 1: 3985 2: 2891 3: 3454 4: 3248 
           5: 3889 6: 3132 7: 3455 8: 3352 9: 4198 10: 3451 11: 2851 12: 3561 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: mmio_stale_data status: Not affected 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: always-on, RSB filling, 
           PBRSB-eIBRS: Not affected 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Barcelo vendor: Hewlett-Packard driver: amdgpu v: kernel 
           bus-ID: 03:00.0 chip-ID: 1002:15e7 class-ID: 0300 
           Device-2: Quanta HP TrueVision HD Camera type: USB driver: uvcvideo bus-ID: 1-3:2 chip-ID: 0408:536c 
           class-ID: 0e02 serial: <filter> 
           Display: wayland server: X.Org 1.22.1.1 compositor: kwin_wayland driver: loaded: amdgpu,ati 
           unloaded: fbdev,modesetting,vesa display-ID: :1 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x286mm (20.0x11.3") s-diag: 583mm (23") 
           Monitor-1: XWAYLAND0 res: 1920x1080 hz: 60 dpi: 157 size: 310x170mm (12.2x6.7") diag: 354mm (13.9") 
           OpenGL: renderer: AMD Radeon Graphics (renoir LLVM 15.0.7 DRM 3.49 6.1.37-x64v3-xanmod1) 
           v: 4.6 Mesa 23.1.3 - kisak-mesa PPA direct render: Yes 
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] Renoir Radeon High Definition Audio vendor: Hewlett-Packard 
           driver: snd_hda_intel v: kernel bus-ID: 03:00.1 chip-ID: 1002:1637 class-ID: 0403 
           Device-2: Advanced Micro Devices [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor 
           vendor: Hewlett-Packard driver: snd_rn_pci_acp3x v: kernel 
           alternate: snd_pci_acp3x,snd_pci_acp5x,snd_pci_acp6x,snd_acp_pci,snd_rpl_pci_acp6x,snd_pci_ps,snd_sof_amd_renoir,snd_sof_amd_rembrandt 
           bus-ID: 03:00.5 chip-ID: 1022:15e2 class-ID: 0480 
           Device-3: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: Hewlett-Packard driver: snd_hda_intel 
           v: kernel bus-ID: 03:00.6 chip-ID: 1022:15e3 class-ID: 0403 
           Sound Server-1: ALSA v: k6.1.37-x64v3-xanmod1 running: yes 
           Sound Server-2: PulseAudio v: 15.99.1 running: no 
           Sound Server-3: PipeWire v: 0.3.48 running: yes 
Network:   Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter vendor: Hewlett-Packard 
           driver: rtw_8822ce v: N/A modules: rtw88_8822ce port: f000 bus-ID: 01:00.0 chip-ID: 10ec:c822 
           class-ID: 0280 
           IF: wlo1 state: up mac: <filter> 
           IF-ID-1: lxcbr0 state: down mac: <filter> 
           IF-ID-2: virbr0 state: up speed: 10 Mbps duplex: unknown mac: <filter> 
           IF-ID-3: vnet0 state: unknown speed: 10 Mbps duplex: full mac: <filter> 
Bluetooth: Device-1: Realtek Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 1-4:3 chip-ID: 0bda:b00c 
           class-ID: e001 serial: <filter> 
           Report: hciconfig ID: hci0 rfk-id: 1 state: down bt-service: enabled,running rfk-block: hardware: no 
           software: yes address: <filter> 
           Info: acl-mtu: 1021:6 sco-mtu: 255:12 link-policy: rswitch hold sniff park link-mode: peripheral accept 
Drives:    Local Storage: total: 476.94 GiB used: 400.81 GiB (84.0%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: PC SN530 SDBPNPZ-512G-1006 
           size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 rotation: SSD 
           serial: <filter> rev: HPS2 scheme: GPT 
Partition: ID-1: / raw-size: 460.17 GiB size: 460.17 GiB (100.00%) used: 382.62 GiB (83.1%) fs: btrfs dev: /dev/dm-0 
           maj-min: 253:0 mapped: luks-d945cafd-5150-4e0e-bbff-8ccd18088b17 
           ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%) used: 7.6 MiB (2.6%) fs: vfat 
           dev: /dev/nvme0n1p1 maj-min: 259:1 
           ID-3: /home raw-size: 460.17 GiB size: 460.17 GiB (100.00%) used: 382.62 GiB (83.1%) fs: btrfs 
           dev: /dev/dm-0 maj-min: 253:0 mapped: luks-d945cafd-5150-4e0e-bbff-8ccd18088b17 
Swap:      Kernel: swappiness: 30 (default 60) cache-pressure: 50 (default 100) 
           ID-1: swap-1 type: partition size: 16.47 GiB used: 7.35 GiB (44.6%) priority: -2 dev: /dev/dm-1 
           maj-min: 253:1 mapped: luks-16163b87-c20a-47e2-a2dd-49133f0a292e 
Sensors:   Missing: Required tool sensors not installed. Check --recommends 
Info:      Processes: 497 Uptime: 11h 43m wakeups: 53417 Memory: 14.97 GiB used: 10.12 GiB (67.6%) Init: systemd 
           v: 249 runlevel: 5 tool: systemctl Compilers: gcc: 11.3.0 alt: 11 Packages: 3668 apt: 2088 lib: 1104 
           nix-default: 46 nix-sys: 0 nix-usr: 1485 lib: 362 rpm: 0 flatpak: 49 Shell: Zsh v: 5.8.1 default: Bash 
           v: 5.1.16 running-in: konsole inxi: 3.3.04 

Bug/Feature description

When enabling picture in picture, on KDE (at least on Wayland) it seems to improperly not set the PiP window as Keep Above Other Windows.

https://github.com/wavebox/waveboxapp/assets/26621899/a1039fa8-cb50-4e4a-9f68-8c6ad7b33d05

Steps to reproduce (if applicable)

  1. Run Linux with KDE desktop environment
  2. Install Wavebox from Flatpak
  3. Open a page with a Video
  4. Enable Picture-on-Picture mode for the video.

I have not tested on other DE and distro other than KDE neon, which is Ubuntu-based. This behaviour have been tested to occur on both YouTube (via right-click menu) and Twitch (via its PiP mode button on the player).

bayazidbh avatar Jul 05 '23 13:07 bayazidbh

Hi, thanks for reporting. I've just tried here with the following configuration (both Flatpak and also just plain tar)... Screenshot 2023-07-06 at 10 25 46

... and it seems to work as expected. What other tools are you using to customize the windowing experience? I can see you've got macOS-style window controls and a top control bar rather than the standard window controls.

Thomas101 avatar Jul 06 '23 09:07 Thomas101

Hi, I'll test it on my Fedora PC later tonight, but as far as what might affect it, I use the WhiteSur Theme (should be installable through KDE Global Theme installer) and I use the following KWin scripts:

Scripts

image

As well as the following Window Rules:

Rules

image

And I use the following overrides for Flatpak:

Overrides

$ cat ~/.local/share/flatpak/overrides/io.wavebox.Wavebox
[Context]
sockets=wayland
devices=dri
features=bluetooth
filesystems=home

[Context]
filesystems=xdg-config/MangoHud:ro;~/Storage:rw;~/.themes:ro;~/.icons:ro;xdg-data/icons:ro;xdg-config/gtk-4.0:ro;xdg-config/gtk-3.0:ro;xdg-config/gtk-2.0:ro;xdg-config/gtkrc-2.0:ro;xdg-config/gtkrc:ro

[Environment]
GTK_THEME=WhiteSur-Dark-solid
GTK_THEME_VARIANT=dark

[Session Bus Policy]
org.kde.kconfig.notify=talk
org.kde.StatusNotifierWatcher=talk
org.kde.KGlobalSettings=talk
com.canonical.AppMenu.Registrar=talk
com.feralinteractive.GameMode=talk

And I launch Wavebox with the following command:

.desktop

$ cat /home/fenglengshun/.local/share/applications/io.wavebox.Wavebox-wayland-dark.desktop
[Desktop Entry]
Version=1.0
Name=Wavebox (Wayland)
GenericName=Web Browser
Comment=The next generation of web-desktop communication
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=wavebox --file-forwarding io.wavebox.Wavebox --extension-mime-request-handling=always-prompt-for-install --enable-features=WebRTCPipeWireCapturer,WebUIDarkMode,UseOzonePlatform,WaylandWindowDecoration --ozone-platform=wayland --force-dark-mode @@u %U @@
StartupNotify=true
Terminal=false
Icon=io.wavebox.Wavebox
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/mailto;
Actions=new-window;new-private-window;
X-Flatpak-RenamedFrom=wavebox.desktop;
X-Flatpak-Tags=proprietary;
X-Flatpak=io.wavebox.Wavebox

[Desktop Action new-window]
Name=New Window
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=wavebox io.wavebox.Wavebox --extension-mime-request-handling=always-prompt-for-install --enable-features=WebRTCPipeWireCapturer,WebUIDarkMode,UseOzonePlatform,WaylandWindowDecoration --ozone-platform=wayland --force-dark-mode

[Desktop Action new-private-window]
Name=New Incognito Window
Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=wavebox io.wavebox.Wavebox --incognito --extension-mime-request-handling=always-prompt-for-install --enable-features=WebRTCPipeWireCapturer,WebUIDarkMode,UseOzonePlatform,WaylandWindowDecoration --ozone-platform=wayland --force-dark-mode
Command shown on chrome://version

Wavebox | 114.0.5735.199 (Official Build) stable (64-bit)
-- | --
Revision | 581ada08cf738a4eb44f712c6f8cd40030e5c1a0-refs/branch-heads/5735@{#1395}
OS | Linux
JavaScript | V8 11.4.183.25
User agent | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Command Line | /app/extra/wavebox-launcher --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,WaylandWindowDecoration,WebUIDarkMode --disable-features=WebAssemblyTrapHandler,DesktopPWAsRunOnOsLogin --extension-mime-request-handling=always-prompt-for-install --ozone-platform=wayland --force-dark-mode --flag-switches-begin --enable-features=UseOzonePlatform,WebRTCPipeWireCapturer,WaylandWindowDecoration,WebUIDarkMode,EncryptedClientHello,ReadAnything --flag-switches-end
Executable Path | /app/extra/wavebox-launcher
Profile Path | /home/fenglengshun/.var/app/io.wavebox.Wavebox/config/wavebox/Default
Variations Seed Type | Null

Also, I have xwaylandvideobridge running, but that shouldn't affect anything.

Edit: Okay, I tested running with just flatpak run io.wavebox.Wavebox and the issue disappear. Maybe it's UseOzonePlatform or WaylandWindowDecoration.

Edit 2: Okay, yeah, disabling --ozone-platform=wayland fixes it. I suppose it's more of a Chromium issue?

Edit 3: Tested --ozone-platform=wayland with Brave and it seems to be an issue there too, so it seems to be a Chromium issue in general.

It shouldn't be too much of an issue for me to disable it, as xwaylandvideobridge works well on KDE, but does Wavebox runs on Wayland (not XWayland) without it? Otherwise, it might be an issue with screensharing as it can be difficult to share Wayland windows to XWayland app (xwaylandvideobridge was made for that, but it seems it has issues outside of KDE).

Edit 4: Yeah, confirmed this is a Chromium bug:

https://bugs.chromium.org/p/chromium/issues/detail?id=1076807 https://bugs.chromium.org/p/chromium/issues/detail?id=1151640 https://bugs.chromium.org/p/chromium/issues/detail?id=1193374

Not sure what to do with that, but I guess the issue can be kept open until it's fixed upstream so that people who noted the same issue can just find the history here?

bayazidbh avatar Jul 06 '23 10:07 bayazidbh