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

Unable to run EAF on NixOS under Sway #1062

Open
onyxrain opened this issue Feb 19, 2023 · 3 comments
Open

Unable to run EAF on NixOS under Sway #1062

onyxrain opened this issue Feb 19, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@onyxrain
Copy link

Describe the bug
Attempting to use EAF under NixOS results in EAF buffers appearing blank. For example, when trying to use eaf-open-browser, the resulting buffer is blank.

To Reproduce

  1. Add the following to your NixOS config (derived from the wiki page):
environment.variables = {
  QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt6.qtwayland.outPath}/lib/qt-6/plugins/platforms";
};

environment.systemPackages = with pkgs; [
  git
  nodejs
  wmctrl
  jshon
  aria
  (python3.withPackages (p: with p; [
    pandas
    requests
    pyqt6 sip qtpy qt6.qtwebengine epc lxml pyqt6-webengine
    pysocks
    pymupdf
    markdown
  ]))
];
  1. Clone and then install EAF with ./install-eaf.py --ignore-core-deps
  2. Load EAF into Emacs as instructed and then M-x eaf-open-browser.

Expected behavior
EAF renders correctly.

Versions (please complete the following info):

  • Distro and DE/WM: NixOS + Sway
  • Versions of Dependencies:
    • Python 3.10.9
    • PyQt6 6.4.0
    • jshon 20131105
    • wmctrl 1.07
    • qtbase 6.4.1
    • qtwayland 6.4.1
  • M-x emacs-version: GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.16.0)

Error logs

qt.qpa.wayland: Failed to load client buffer integration: "wayland-egl"
qt.qpa.wayland: Available client buffer integrations: QList()
qt.webenginecontext: 

GL Type: disabled
Surface Type: DefaultRenderableType
Surface Profile: NoProfile
Surface Version: 2.0
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: no

Init Parameters:
  *  application-name eaf.py 
  *  browser-subprocess-path /nix/store/4wka7snl0hvapzbzskj07y99vn27crs7-qtwebengine-6.4.1/libexec/QtWebEngineProcess 
  *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-gpu  
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  in-process-gpu  
  *  use-gl disabled 

QRhiGles2: Failed to create temporary context
QRhiGles2: Failed to create context
Failed to create QRhi for QBackingStoreRhiSupport
QRhiGles2: Failed to create temporary context
QRhiGles2: Failed to create context
Failed to create QRhi for QBackingStoreRhiSupport
QQuickWidget: Failed to get a QRhi from the top-level widget's window
QRhiGles2: Failed to create temporary context
QRhiGles2: Failed to create context
Failed to create QRhi for QBackingStoreRhiSupport
QQuickWidget: Failed to get a QRhi from the top-level widget's window
QQuickWidget::resizeEvent() no QRhi
QQuickWidget: Attempted to render scene with no rhi
No suitable graphics backend found

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
QQuickWidget: Attempted to render scene with no rhi
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
[EAF] Browser https://duckduckgo.com/ loading time: 3.0081546306610107s

Screenshots
N/A

Additional context
The reason for setting QT_QPA_PLATFORM_PLUGIN_PATH is as described on the NixOS wiki page, albeit for the Wayland platform plugin rather than xcb. I know this is more of a NixOS problem than EAF's fault, but I'd love to try out EAF on NixOS and I'm stuck on Wayland for HiDPI. Thanks!

@manateelazycat
Copy link
Member

It looks your qt or pyqt can't work, I don't use Nix, can't help you.

@onyxrain
Copy link
Author

No worries, I understand NixOS tends to cause problems. However, I've managed to set QT_PLUGIN_PATH to make EAF find the required library, but the buffer is still totally blank. *eaf* looks like this:

qt.webenginecontext: 

GL Type: desktop
Surface Type: OpenGL
Surface Profile: CompatibilityProfile
Surface Version: 4.6
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes

Init Parameters:
  *  application-name eaf.py 
  *  browser-subprocess-path /nix/store/4wka7snl0hvapzbzskj07y99vn27crs7-qtwebengine-6.4.1/libexec/QtWebEngineProcess 
  *  create-default-gl-context  
  *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-setuid-sandbox  
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  in-process-gpu  
  *  use-gl desktop 

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
[EAF] Browser https://duckduckgo.com/ loading time: 0.8540608882904053s
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

@onyxrain
Copy link
Author

After adjusting the two scripts in swaymsg-treefetch to use #!/usr/bin/env bash instead of #!/bin/bash, it almost works. It initially appears blank, but renders in like this after eaf-toggle-fullscreen. It seems to fight with sway quite a bit as well.

image

@manateelazycat manateelazycat added the help wanted Extra attention is needed label Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants