Git Product home page Git Product logo

Comments (48)

marcan avatar marcan commented on August 9, 2024 3

Upstream bug: https://gitlab.freedesktop.org/mesa/drm/-/issues/85

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024 2

OK, the only thing that stands out there is what I found, so it might be the only thing.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024 1

Cool, let us know how that goes. The only real difference between my project and the Fedora one is really just the kernel. The mesa rpms used in my project are the same ones used Fedora Asahi Remix COPR repos.
https://copr.fedorainfracloud.org/coprs/g/asahi/mesa/

BTW, I'm part of that team
https://fedoraproject.org/wiki/SIGs/Asahi

Fedora Asahi Remix site
https://www.asahi-fedora-remix.org/

Feel free to provide any feedback on your experience here:
https://app.element.io/#/room/#asahi:fedoraproject.org

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024 1

I'll start using Fedora Asahi Remix once they publish a minimal image
https://pagure.io/fedora-asahi/kiwi-descriptions/c/d569746e810b95e04356eb0b55811cc96eff06f1?branch=rawhide

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024 1

@SamilKaraduman Plasma and Gnome should get the same performance but if on KDE, maybe force sddm to use Wayland. That's the one thing I'd probably recommend, you shouldn't really run Xorg at all on Asahi, which limits you to Gnome and KDE (and other DE's that move to Wayland), there are some known Xorg bugs but they really are a super low priority (it's a possibility they never get fixed) because it's a legacy compositor.

But Gnome and KDE are roughly identical performance, just use whatever you are more comfortable with.

And yes there are plenty from the actual Fedora team working on it, @leifliddy is one of them, as am I, as are many others....

This was the first decently functional version (and kudos to @leifliddy for that), the version @leifliddy mentioned above is more official, I guess, but it's technically a Fedora "Remix" and it's also technically unreleased for a few more days/weeks... And it is using a Fedora kernel with extra patches on top, 99% identical to the normal Fedora kernel...

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024 1

Still hasn't changed anything. :(

Applications still load slow, and this time they load slower.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024 1

Sorry, that was never going to sort out this current issue. I do think people might be more willing to help you out if you're only running Asahi Fedora Remix packages. An upstream ticket has been created -- and that's pretty damn good!!
Give it time for the process to work itself out....

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

When you login to GNOME , which session are you choosing: xorg or wayland?

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Wayland. And always Wayland.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

So I just performed the following tests (on my macbook M1 air)
I simply entered the stated command in the terminal,
and once the gui appeared -- I manually closed it with the mouse cursor.

So the real time below includes the time it took for the app to start + to close.

gnome + wayland

[leif.liddy@fedora ~]$ time gnome-control-center
real  0m1.672s
user  0m0.486s
sys   0m0.095s

[leif.liddy@fedora ~]$ time gnome-calendar
real  0m0.139s
user  0m0.031s
sys   0m0.009s

xorg (tested w/ cinnamon and gnome -- the launch times were identical)

[leif.liddy@fedora ~]$ time gnome-control-center
real  0m1.991s
user  0m0.641s
sys   0m0.144s

[leif.liddy@fedora ~]$ time gnome-calendar
real  0m2.081s
user  0m0.466s
sys   0m0.120s

So w/ xorg, it takes a full two seconds to launch gnome-control-panel and gnome-calander.
But, I was not seeing these times with wayland
gnome-control-center was always around 1.7 seconds which is comfortably below that 2 second threshold -- and nowhere near 4 seconds.

I'm running the same kernel, m1n1, and uboot version that you are.
I'm assuming that you have mesa version pre20230311-1 installed.

So I just installed glmark2, ran glmark2 and received the following scores
wayland and Gnome: 2667
Xorg and cinnamon: 2329

Perhaps you could perform these tests on your system and see what times you get...

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024

Testing on gnome + wayland on a slighly different version to @leifliddy, I get similarly quick times like Leif.

It would be curious to know if you are running accelerated graphics or not, although this may not be the issue:

Could you please run:

cat /proc/fb; eglinfo | grep driver

@SamilKaraduman ?

Also curious if you are running flatpaks as they are a little different, it sounds like you are not though...

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Sorry for the late response, but opening up a terminal window and using the "time" command, this is what I get:

`[samilk@fedora-asahi ~]$ time gnome-control-center

real 0m2.443s
user 0m0.580s
sys 0m0.145s
[samilk@fedora-asahi ~]$ time gnome-builder

real 0m2.923s
user 0m0.518s
sys 0m0.128s
[samilk@fedora-asahi ~]$ time gnome-maps

real 0m3.382s
user 0m0.684s
sys 0m0.131s
[samilk@fedora-asahi ~]$ time gnome-calendar

(gnome-calendar:3906): GcalWeatherService-WARNING **: 15:47:32.514: Could not create GCLueSimple: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Geolocation disabled for UID 1001

real 0m2.321s
user 0m0.565s
sys 0m0.093s
[samilk@fedora-asahi ~]$ time gnome-weather
Gjs-Message: 15:47:56.050: JS LOG: Failed to connect to GeoClue2 service: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Geolocation disabled for UID 1001
Gjs-Message: 15:47:56.930: JS LOG: Timeout during model load, perhaps the network is not available?

real 0m2.143s
user 0m0.565s
sys 0m0.068s
[samilk@fedora-asahi ~]$
`

@ericcurtin

I am running accelerated graphics, with full hardware acceleration. As for the command you suggested me to put in the terminal, this is what I get back:

`[samilk@fedora-asahi ~]$ cat /proc/fb; eglinfo | grep driver
0 appledrmfb
bash: eglinfo: command not found...
Install package 'egl-utils' to provide command 'eglinfo'? [N/y] y

Proceed with changes? [N/y] y

EGL driver name: apple
EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
EGL driver name: apple
EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
EGL driver name: asahi
EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
EGL driver name: apple
EGL_MESA_image_dma_buf_export EGL_MESA_query_driver
EGL driver name: swrast
EGL_MESA_query_driver
[samilk@fedora-asahi ~]$

`

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024

I'm not getting those gdbus errors, gdbus can be pretty critical for gnome, it would be interesting if you installed the Asahi Fedora Remix kernel and mesa would you see the issue:

https://copr.fedorainfracloud.org/coprs/g/asahi/mesa/
https://copr.fedorainfracloud.org/coprs/g/asahi/kernel-edge/

The kernel config is probably different to the one you are using

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

Screenshot from 2023-03-20 21-13-01
I'm not a "gnome user" but I'm pretty sure those dbus errors are due to not having location services enabled.

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024

I get the location errors, but not the gdbus ones, but yeah sure worth a try

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

@SamilKaraduman Could you please post the output of
echo $XDG_SESSION_TYPE

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

@ericcurtin,

I have run the commands you wanted me to run, and rebooted. Took a second reboot but the system booted up fine. Also turned on location services like @leifliddy said, and I no longer get the gdbus errors.

@leifliddy,

The output I get for the command you posted is wayland, like I said.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

@SamilKaraduman
I don't get what would cause that if we're running the same versions of the kernel, mesa, m1n1, and uboot. I'm not experiencing that issue at all.
I just pushed out a pre20230321 mesa update.
Can you upgrading mesa to that version and see if that helps with anything?
Also, can you run the glmark2 test that I referenced above and see what score you get?

The output I get for the command you posted is wayland, like I said.

I've only ever seen those > 2 second times with X11.
Doesn't hurt to check does it?

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Updated and upgraded my system, and once I run the glmark2 benchmark these are my results:

=======================================================
    glmark2 2023.01
=======================================================
    OpenGL Information
    GL_VENDOR:      Mesa
    GL_RENDERER:    Apple M1 (G13G B1)
    GL_VERSION:     2.1 Mesa 23.1.0-devel
    Surface Config: buf=32 r=8 g=8 b=8 a=8 depth=24 stencil=0 samples=0
    Surface Size:   800x600 windowed
=======================================================
[build] use-vbo=false: FPS: 3254 FrameTime: 0.307 ms
[build] use-vbo=true: FPS: 3174 FrameTime: 0.315 ms
=======================================================
                                  glmark2 Score: 3213 
=======================================================

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Interestingly, much higher than your score. This is probably due to the new asahi GPU update: https://asahilinux.org/2023/03/road-to-vulkan/

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

Odd, I'm consistently getting results in the 2600 and sometimes in the 2700 range. I'm never gotten higher then 3000.
@SamilKaraduman Can you post the output of the following two commands?

uname -a
rpm -q mesa-libglapi

@ericcurtin What glmark2 score are you seeing on your mac m1 mini?

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024

~3300 FPS

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

As for the uname command, this is what I get:

Linux fedora-asahi 6.2.7-450.asahi.fc37.aarch64 #1 SMP PREEMPT_DYNAMIC Sun Mar 19 18:19:50 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

And for the other command, this is what I get:

mesa-libglapi-23.1.0_pre20230311-1.fc37.aarch64

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

I'm considering waiting for the official Fedora apple silicon release, and maybe it will solve the issue I am currently having? I certainly hope so.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

As I said before, I pushed out a mesa 20230321 update yesterday. I would try upgrading mesa and see if that helps.
https://leifliddy.com/asahi-linux/37/aarch64/

Which involves this fix...
https://social.treehouse.systems/@marcan/110056888078399169

Remember to reboot after upgrading mesa...

On another note, I'll try out that 450 kernel tonight and see if that improves my glxmark2 score.

update
I get the same glxmark2 score with the fedora-asahi 6.2.7-450.asahi.fc37.aarch64 kernel.

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024

official has a different meaning to different people ๐Ÿ˜„ . Getting everything upstream is the best way to get Fedora support and that's happening, it is getting better all the time.

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Installed that mesa driver, and things are still looking at around 2 seconds to open, according to the time command. But nothing opens at more than 2 seconds, so that's some good news. Like I said, I'll probably wipe and install the official Fedora release, and by official, I mean the actual Fedora team getting involved. @ericcurtin. Correct me if I'm wrong though. I also might consider switching to Plasma (for more optimal performance) but the problem with that is it's fractional scaling is still a bit blurry for me, even with the new 5.27 update, I heard that they might do a small release that fixes this issue soon, but only time will tell.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

So my project will likely cease to exist once the Fedora Asahi Remix is officially released and a minimal image is included in the installer.

However, going back to the issue at hand.
Why is it taking > 2 seconds to launch gnome apps w/ gnome + wayland?
And....why is that issue not happening on my system?
The short answer, I have no idea. It's difficult to troubleshoot something if I can't reproduce it.
Perhaps we could analyze the output of strace gnome-maps??

But, you'd definitely get better support if you were running Fedora Asahi Remix so that's what I would do.
Install Fedora Asahi Remix, and if you continue to run into the same issue -- then post about it here: https://app.element.io/#/room/#asahi:fedora.im

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Sure, I'll install it when I have some free time available, but didn't you say it would be available by the end of March? (Or a bit later?)

from asahi-fedora-builder.

ericcurtin avatar ericcurtin commented on August 9, 2024

There's no announced date

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

There is no way this has anything to do with mesa. This is some GNOME thing, and randomly trying package updates isn't going to help. The correct way to debug these issues is to strace an app launching (with timestamps enabled, strace -s 1024 -tt app &>log) and look through the log and see what it's waiting on.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

@SamilKaraduman
Could you capture the output of strace -s 1024 -tt gnome-maps &> strace_gnome_maps.log and post that somewhere?

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024
Screencast.from.2023-03-24.18-56-22.webm

Pasted the command in the terminal, and didn't even get an output.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

It didn't create an strace_gnome_maps.log file?

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Never mind that, here it is.

strace_gnome_maps.log

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

Why the heck is it trying to open every possible numbered render node a bajillion times, with a 20ยตs delay in between every attempt? That's ridiculous, something is very wrong there. I don't see code that could do that in Mesa (it does try every render device in one codepath, but only once and with no sleeps and the total count is wrong). All in all there are 4500+ attempts to open nonexistent render devices, each followed by a 20ยตs nanosleep.

That's about 90 milliseconds of guaranteed wasted time - assuming the kernel actually wakes userspace up after 20 microseconds again. I bet Leif's kernel is compiled with server-style preemption/time settings which significantly reduce interactivity and bloat sleep time, making that take way longer than intended (looks like at least 150ยตs judging by strace, so that's at least 0.7 seconds of time wasted).

That said, I cannot reproduce that pathological behavior on Arch Linux ARM. Is there a chance this is a Fedora patch, or a different GNOME version?

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

Okay, I found the code, it's in libdrm. I'll see if I can figure out what's up.

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

Please run LIBGL_DEBUG=verbose gnome-maps &>log.txt and upload the log.

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

Oh god okay I see it. This is broken everywhere, I think it's just Leif's kernel config makes it worse. The reason why we don't get it is it does that pathological fail dance once for each kmsro mesa driver that's compiled in until it reaches asahi (which is last). Since we only compile asahi on our mesa edge package, we never see it.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

As for the uname command, this is what I get:

Linux fedora-asahi 6.2.7-450.asahi.fc37.aarch64 #1 SMP PREEMPT_DYNAMIC Sun Mar 19 18:19:50 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

@SamilKaraduman Were you using this kernel when performing the gnome-maps strace test?

Just for context, that is the Fedora Asahi Remix kernel. Although, I have no doubt that my kernel would suffer from the same issue.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

Just an FYI, I'm building the mesa packages from this
https://pagure.io/fedora-asahi/mesa/blob/asahi/f/mesa.spec

Which is being maintained by Neal Gompa.

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

Yeah, that builds all the drivers in. Which isn't wrong, though it's a total waste of build time if the package is only going to be used on asahi systems, of course. But this pathological wait is clearly an upstream bug.

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

@marcan,

here it is:
log.txt

Nothing funky going on with the Gnome or Fedora version. (Still Fedora 38 and Gnome 33) Never knew it was an actual upstream bug, interesting.

@leifliddy,

yes, I was using the same kernel when running the gnome-maps
strace test. Nothing new there.

from asahi-fedora-builder.

leifliddy avatar leifliddy commented on August 9, 2024

Just an FYI, I wrote a simple guide on how to transition over to Asahi Fedora Remix if you're interested.
#25

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

Thanks! I'll check it out and transition to it right now.

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

It's still possible there is more than one issue here. That upstream thing I opened is definitely a problem, but might not be the entirety of what is causing the delay here (especially if other people aren't seeing it, since that should affect everyone).

from asahi-fedora-builder.

marcan avatar marcan commented on August 9, 2024

Can you provide a strace log of another native app that loads slowly that doesn't access the internet or render a bunch of graphical stuff? gnome-maps is a pretty bad test case because it's doing a bunch of stuff that is expected to take time anyway.

from asahi-fedora-builder.

SamilKaraduman avatar SamilKaraduman commented on August 9, 2024

strace_gnome_control_center.log

strace_cheese.log

strace_gnome_calendar.log

from asahi-fedora-builder.

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.