Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Wayland - Delay launching apps after upgrade to 6.1
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
genericusername56
n00b
n00b


Joined: 20 Jan 2023
Posts: 8

PostPosted: Tue Jan 31, 2023 2:12 pm    Post subject: [SOLVED] Wayland - Delay launching apps after upgrade to 6.1 Reply with quote

Hello,

I recently switched to ~amd64 to solve another issue and since then there is a noticeable delay when starting apps under wayland. I can confirm this is a wayland issue when comparing Gnome under Xorg and Wayland, as well as sway vs Cinnamon. In Cinnamon and Gnome on Xorg apps open basically instantly. Firefox ~1 sec and alacritty is instant, compared to 1-2 seconds for alacritty and 5-7 for Firefox under Wayland. I don't notice any performance difference when using the apps after they are launched, it's just the launching that is slow. Which is very annoying since things like rofi also take a second or so to launch.

I don't know where to begin troubleshooting this. Launching e.g. Firefox with journalctl -f running I don't notice any difference other than wayland throwing this out (which Xorg does not)

jan 31 15:00:19 gentoo kernel: nvidia: Unknown symbol sme_me_mask (err -2)
jan 31 15:00:19 gentoo kernel: nvidia: Unknown symbol pv_ops (err -2)

I'm not sure if it's relevant. Could it be that wayland tries to talk to my nvidia driver while the GPU is using vfio-pci? I have set my AMD GPU as primary in Xorg but I'm not sure if this can be done in Wayland too. If there is a way to make Wayland completely ignore the Nvidia GPU? I only want to use it for PCI passthrough so Wayland doesn't really need to be concerned with it.

I'm using gentoo-kernel-dist for the 6.1.8 kernel and was using it for 5.15.88 too, but I can't try booting the old kernel (because it hangs during boot now) so I can't tell if this is a kernel issue or an issue with something else that has gotten updated to unstable.

Any suggestions would be greatly appreciated. I've seen people complain about slowness after upgrading their kernel but then it has been the CPU governor being set to something that limits it, but that's not an issue for me (and I don't think it would be so wayland specific if it was).


Last edited by genericusername56 on Tue Jan 31, 2023 7:39 pm; edited 2 times in total
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Jan 31, 2023 3:00 pm    Post subject: Reply with quote

Welcome to Gentoo,

https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start

search for WLR_DRM_DEVICES
Code:
# Multi-GPU

export WLR_DRM_DEVICES=/dev/dri/card0

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
genericusername56
n00b
n00b


Joined: 20 Jan 2023
Posts: 8

PostPosted: Tue Jan 31, 2023 4:18 pm    Post subject: Reply with quote

CooSee wrote:
Welcome to Gentoo,

https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start

search for WLR_DRM_DEVICES
Code:
# Multi-GPU

export WLR_DRM_DEVICES=/dev/dri/card0

8)


Thanks! I'll check it out!

I can confirm btw that this error message is posted in journalctl every time an app is slow to start

Code:
jan 31 15:00:19 gentoo kernel: nvidia: Unknown symbol sme_me_mask (err -2)
jan 31 15:00:19 gentoo kernel: nvidia: Unknown symbol pv_ops (err -2)


With rofi as an example it will not always start slow, sometimes it's instant. But every time it's slow it posts this in the error log.

I'll report back after having had time to try your suggestion!
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Jan 31, 2023 4:39 pm    Post subject: Reply with quote

i have no idea regarding nvidia :roll:

the issue with delay starts, maybe this will help https://github.com/swaywm/sway/wiki#gtk-applications-take-20-seconds-to-start

which GUI are you using?

Quote:
I recently switched to ~amd64

there's no need to switch completely - you can use some ebuilds from ~amd64 (testing), please look here https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Branches

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2006

PostPosted: Tue Jan 31, 2023 6:14 pm    Post subject: Reply with quote

FWIW, I'm using kernel 6.1.8 and Wayland on AMD chipsets and not seeing any delay of this sort.
_________________
Greybeard
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Tue Jan 31, 2023 6:46 pm    Post subject: Reply with quote

If you are only using the nvidia card for passthrough, you don't need the nvidia driver for linux, kernel, etc.
And without the driver being loaded none of the linux programs will see the card.

I've got an rx 560 for my main window driver and a 1060 ti for passthrough (doesn't have a driver, passes through to windows which uses windows drivers)
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
genericusername56
n00b
n00b


Joined: 20 Jan 2023
Posts: 8

PostPosted: Tue Jan 31, 2023 7:30 pm    Post subject: Reply with quote

CooSee wrote:
Welcome to Gentoo,

https://github.com/swaywm/sway/wiki#i-have-a-multi-gpu-setup-like-intelnvidia-or-intelamd-and-sway-does-not-start

search for WLR_DRM_DEVICES
Code:
# Multi-GPU

export WLR_DRM_DEVICES=/dev/dri/card0

8)

Code:

lrwxrwxrwx 1 root root  8 31 jan 15.45 pci-0000:01:00.0-card -> ../card0
lrwxrwxrwx 1 root root 13 31 jan 15.45 pci-0000:01:00.0-render -> ../renderD128

Code:
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] (rev e1)

Doesn't seem as if my Nvidia card is listed there so I'm assuming it would default to the AMD card. And it is, since this is working at all (booting with the Nvidia card active on display means the display will freeze after the message that VFIO kicked in)
CooSee wrote:
i have no idea regarding nvidia :roll:

the issue with delay starts, maybe this will help https://github.com/swaywm/sway/wiki#gtk-applications-take-20-seconds-to-start

which GUI are you using?

GUI?
CooSee wrote:
Quote:
I recently switched to ~amd64

there's no need to switch completely - you can use some ebuilds from ~amd64 (testing), please look here https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Branches

8)

I know, it was a drastic measure out of desperation. It did work to solve the initial problem though 8) :lol:
Goverp wrote:
FWIW, I'm using kernel 6.1.8 and Wayland on AMD chipsets and not seeing any delay of this sort.

I'm thinking the blame is on Nvidia on this one. It did work just fine on 5.15.88 though which is odd, but seeing as I merged 350 packages at once it's likely to have nothing to do with the kernel

Anon-E-moose wrote:
If you are only using the nvidia card for passthrough, you don't need the nvidia driver for linux, kernel, etc.
And without the driver being loaded none of the linux programs will see the card.

I've got an rx 560 for my main window driver and a 1060 ti for passthrough (doesn't have a driver, passes through to windows which uses windows drivers)

So basically just unmerge the entire Nvidia driver? I'll try that!

EDIT: Presto! Removing the nvidia driver completely solved the issue. Thanks for the help!
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Jan 31, 2023 7:47 pm    Post subject: Reply with quote

great idea by removing the modules for the second Graphics :!:

GUI = graphical user interface

have fun with Gentoo

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
genericusername56
n00b
n00b


Joined: 20 Jan 2023
Posts: 8

PostPosted: Tue Jan 31, 2023 8:00 pm    Post subject: Reply with quote

Short lived happiness, now Windows bluescreens referencing the nvidia driver when booting. God damn you, Windows.

Oh well, at least I didn't run out of things to troubleshoot :)
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Tue Jan 31, 2023 8:21 pm    Post subject: Reply with quote

Windows - yes, i have Windows in my flat and that's it :lol:

i don't use Windows since 10 came out and i'll never care, even if it's for Free - just my 2 cents.

my HackinTosh works OOTB on my PC - please don't tell anyone :wink:

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
genericusername56
n00b
n00b


Joined: 20 Jan 2023
Posts: 8

PostPosted: Tue Jan 31, 2023 11:23 pm    Post subject: Reply with quote

CooSee wrote:
Windows - yes, i have Windows in my flat and that's it :lol:

i don't use Windows since 10 came out and i'll never care, even if it's for Free - just my 2 cents.

my HackinTosh works OOTB on my PC - please don't tell anyone :wink:

8)

Well, if you want to play some games and want to use DLSS and Raytracing and not have to bother with vulkan, lutris, troubleshooting a lot etc for every game you want to play then running Windows with VFIO and looking-glass is a very nice solution.

And now it works again, without slowdowns in Wayland. All I had to do was uninstall the nvidia driver in Linux, realize Windows now bluescreens, boot into Windows natively and purge the Nvidia driver and reinstall it, realise that my computer no longer recognizes Grub and refuses to boot it, boot an Ubuntu live CD I had laying around to reinstall Grub from chroot, reconfigure the boot options again to isolate my GPU with vfio, remerge wayland and sway, reinstall looking-glass, troubleshoot why it crashes immediately, delete my virtual machine from qemu, reconfigure it with an old backup I had from a while ago, and reboot about 50 times and now it's working again.

And apps no longer take a few seconds extra to start.

This might sound as if I'm annoyed, but I'm not. It's fun to solve problems

EDIT: One thing I can't be assed to find out at the moment though, in case someone reads my ramblings, is why my VM is called w10-3 because I can't name it w10 due to "domain already exists". If you know how to delete domains from virtd/qemu, please drop a comment.

And again, thanks for everyone that helped me out with this, it's very much appreciated!
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Wed Feb 01, 2023 1:28 am    Post subject: Reply with quote

I would uninstall the windows drivers and then reinstall them.

And if you have any pkgs on linux that were compiled with nvidia, they need to be rebuilt without the nvidia use flag
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1438
Location: Earth

PostPosted: Wed Feb 01, 2023 2:08 am    Post subject: Reply with quote

Quote:
It's fun to solve problems

yes, this is the spirit.

maybe this will help https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-virsh-delete

and https://wiki.gentoo.org/wiki/Virsh

8)
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
genericusername56
n00b
n00b


Joined: 20 Jan 2023
Posts: 8

PostPosted: Wed Feb 01, 2023 9:19 pm    Post subject: Reply with quote

Anon-E-moose wrote:
I would uninstall the windows drivers and then reinstall them.

And if you have any pkgs on linux that were compiled with nvidia, they need to be rebuilt without the nvidia use flag


I ended up re-emerging the nvidia driver in Gentoo because I just could not get Windows to play with the 3070 without them. Which makes no sense whatsoever to me, but reinstalling the driver did not work. I purged it and reinstalled it but the GPU threw a "device could not start" error and refused to talk to Windows. When booting Windows natively it worked just fine, but under qemu it just completely broke. But after re-emerging the nvidia driver the nvidia related errors in journalctl stopped and everything works just as before so I'm just not gonna bother anymore with it. It might have to do with me having blacklisted the module in modprobe.d (but doing JUST that didn't fix the issue previously).

CooSee wrote:
Quote:
It's fun to solve problems

yes, this is the spirit.

maybe this will help https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-virsh-delete

and https://wiki.gentoo.org/wiki/Virsh

8)

Cheers, I'll have a look!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum