[go: nahoru, domu]

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

[Bug]: Unusable Electron application on a scalled wayland display. #42351

Open
3 tasks done
GamePlayer-8 opened this issue Jun 3, 2024 · 2 comments
Open
3 tasks done

Comments

@GamePlayer-8
Copy link

Preflight Checklist

Electron Version

30.0.7

What operating system are you using?

Other Linux

Operating System Version

Alpine Linux x86_64 v.3.20

What arch are you using?

x64

Last Known Working Electron version

Expected Behavior

Electron app launches and it isn't glitching on window scalling / maximalization, when running on host with scalled wayland display.

Actual Behavior

Electron is misinterpreting input, not scaling it's app viewport more than the default screen resolution, regardless of screen scaling used.

Testcase Gist URL

No response

Additional Information

Problem can be reproduced with KDE Plasma with Wayland support and display scaling set to be lower than 100% in the display configuration. Electron ozone platform should be set as follows:

export ELECTRON_OZONE_PLATFORM_HINT="wayland"
@VerteDinde VerteDinde added the blocked/need-repro Needs a test case to reproduce the bug label Jun 4, 2024
@electron-issue-triage
Copy link

Hello @GamePlayer-8. Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

Now adding the blocked/need-repro Needs a test case to reproduce the bug label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.

@GamePlayer-8
Copy link
Author
  1. Download the latest Virt image at Alpine Linux download page.
  2. Launch it in qemu with:
qemu-img create -f qcow2 alpine.img 30G
qemu-system-x86_64 -cdrom alpinelinux.iso -hda alpine.img --enable-kvm -smp 4 -m 4096
  1. Install alpine through setup-alpine command (after logging in a password less root user).
  2. After installation boot up the installed system and run the snippet:
#!/bin/sh

echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.20/main' >> /etc/apk/repositories
echo 'https://dl-cdn.alpinelinux.org/alpine/v3.20/community' >> /etc/apk/repositories

apk update
apk upgrade
apk add shadow alpine-conf sudo
useradd electron
echo "electron:electron" | chpasswd
usermod -aG video electron
usermod -aG audio electron
usermod -aG tty electron
groupadd privileged
usermod -aG privileged electron
echo '%privileged ALL=(ALL:ALL) ALL' >> /etc/sudoers
mkdir /home/electron
chown -R electron:electron /home/electron

setup-wayland-base
setup-xorg-base
apk add linux-headers
apk add code-oss plasma sddm elogind plasma-wayland-protocols

echo 'ELECTRON_OZONE_PLATFORM_HINT="wayland"' >> /etc/environment

rc-update add sddm default
rc-update add elogind default
rc-service elogind restart
rc-service sddm restart
  1. Login to SDDM as electron with password electron and select Plasma Wayland session.
  2. Go to Display Configuration setting in the bottom left menu.
  3. Set Scale below 100% (i.e. 60%) -> Apply.
  4. Again from the application menu launch code-oss and try upscaling it.

hope this helps

@electron-issue-triage electron-issue-triage bot removed the blocked/need-repro Needs a test case to reproduce the bug label Jun 9, 2024
@mlaurencin mlaurencin added platform/linux has-repro-comment Issue has repro in comments labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: 👀 Unsorted Items
Development

No branches or pull requests

3 participants