Code Monkey home page Code Monkey logo

Comments (15)

andydotxyz avatar andydotxyz commented on August 22, 2024 1

I have tracked down the source of the issue - the screen is reported (to GLFW at least) as 6x6cm. Instead of being 15.6cm wide. So the scaling is off - it thinks the UI should be 4.5x normal.
If I "fix" that with a small hack in our driver then the scale is determined as 1.7 which sounds about right and gives a good resolution of text:
Screenshot_20240708_224020

I'm not sure how we can fix this at the GLFW layer though - if the XWayland wrapper is reporting it wrong...

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

I don't think this can be universally true as I have seen many apps running on the steam deck. Is it related to user configuration or is this a recent problem?

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

Any more information at all? Can the user run fyne_demo or otherwise collect scale data from the device?

from fyne.

Jacalz avatar Jacalz commented on August 22, 2024

I haven't quite had time to research this more. Maybe we can bring in @dalitz-bazalgette can chime in here?

from fyne.

dalitz-bazalgette avatar dalitz-bazalgette commented on August 22, 2024

I did a bit more testing with a fresh install and this scaling issue seems to only happen on X11 (which is what SteamOS uses).

I installed Fedora 39 (because it uses KDE 5.X like SteamOS) on my Steam Deck and found that Rymdport and Supersonic scale correctly in wayland but in X11 they exhibit the issue as they do in SteamOS.

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

There must be something more specific going on because X11 normally works really well.
Can you share what hardware / configuration you are testing the X11 with?

from fyne.

dalitz-bazalgette avatar dalitz-bazalgette commented on August 22, 2024

I'm using the Valve Steam Deck. I did a fresh install of SteamOS and Fedora to make sure it wasn't my configuration that caused it.

Perhaps it's a combination of X11 and the 800x1280 display that causes it.

from fyne.

Jacalz avatar Jacalz commented on August 22, 2024

For what it is worth, I saw that I have an old but similar report from another user having bad scaling in Rymdport:
image

from fyne.

Jacalz avatar Jacalz commented on August 22, 2024

@dalitz-bazalgette Thanks for the testing. Does Fedora 40 (with what I presume is the latest KDE Plasma 6.1 desktop) get the same behaviour? I also find it strange that X11 shows issues but not Wayland. As the app is rendering through XWayland, it is usually as good or slightly worse than a pure X11 session.

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

Perhaps it's a combination of X11 and the 800x1280 display that causes it.

The resolution should not matter - as long as the screen size is reported correctly... my guess is the RandR API has some incorrect data.

Is it possible to run the fyne_demo app on the device and choose "Advanced" so we can see what information is being detected?

from fyne.

Jacalz avatar Jacalz commented on August 22, 2024

Nice work looking into it. Is there any other way to look up scaling and screen sizes on X11? I mean, many of the other applications seem to be working as far as I understand it.

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

Is there any other way to look up scaling and screen sizes on X11?

That is what we are doing, it is being reported incorrectly (as is a known issue with some hardware - though I'm not sure if this is the XWayland or underlying hardware/OS at fault).

I mean, many of the other applications seem to be working as far as I understand it.

Yes. They are doing no attempt at scaling to fit the screen, they are simply 1:1 on pixels, leading to very small text because of the underlying hardware DPI. (see the image above - the desktop text is smaller than Fyne based on a scale of 1 whereas my hacked screen size fix works it out to be 1.7 for the right font size.

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

The PR has a workaround where the scaling isn't correct according to our aims, but is in-keeping with the tiny text of other apps on the system

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

OMG I am loving the simplicity of just dropping some Fyne game onto SteamDeck :)

IMG_4952

from fyne.

andydotxyz avatar andydotxyz commented on August 22, 2024

Fixed on develop for v2.5.0

from fyne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.