You are not logged in.
I've been breaking my head over this, and was hoping someone else could give me a pointer on how to debug this issue further. I'm not sure how important this is, but this issue did not occur on the same machine running Ubuntu or OpenSUSE.
Since I use display scaling, I prefer starting electron applications in Wayland mode (if they support it), as they will look nice and crisp. But on my intel graphics card, those applications are extremely slow to start.
So far, I've found out the following:
* Launching electron applications with the following arguments is slow: --enable-features=UseOzonePlatform --ozone-platform=wayland
* My desktop, installed precisely the same way, does not have this issue on an AMD card
* My laptop has intel + nvidia graphics. If I launch applications using prime-run, they start instantly
* Specifically for vscode; if I add the argument --disable-gpu, the application launches instantly as well
This all leads me to believe it has *something* to do with the intel card or drivers, but I am unsure what it could be. All pointers are welcome!
Perhaps interesting:
$ pacman -Qs | grep intel
local/intel-ucode 20240531-1
local/vulkan-intel 1:24.1.4-2
local/xf86-video-intel 1:2.99.917+923+gb74b67f0-2 (xorg-drivers)
$ cat /proc/cmdline
initrd=\intel-ucode.img initrd=initramfs-linux.img root=/dev/mapper/system rw quiet splash nvidia_drm.modeset=1
$ inxi -G
Graphics:
Device-1: Intel Raptor Lake-P [Iris Xe Graphics] driver: i915 v: kernel
Device-2: NVIDIA AD107M [GeForce RTX 4060 Max-Q / Mobile] driver: nvidia
v: 555.58.02
Device-3: Microdia Integrated_Webcam_HD driver: uvcvideo type: USB
Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.1
compositor: kwin_wayland driver: X: loaded: intel,nvidia
unloaded: modesetting dri: i965 gpu: i915,nvidia resolution: 1: 2560x1440
2: 2304x1440
API: EGL v: 1.5 drivers: iris,nvidia,swrast
platforms: gbm,wayland,x11,surfaceless,device
API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: intel mesa v: 24.1.4-arch1.2
renderer: Mesa Intel Graphics (RPL-P)
API: Vulkan v: 1.3.279 drivers: nvidia,intel surfaces: xcb,xlib,wayland
Last edited by kyentei (2024-08-24 23:11:21)
Offline
Get rid of xf86-video-intel it's basically unmaintained for any iGPUs newer than 2011ish and will enforce a software renderer with current mesa versions.
If it's specifically for wayland clients, that could also be up to how kwin_wayland sets up rendering in the multiple GPU case, where I'm not entirely sure whether it might not try to uselessly invoke the dedicated GPU regardless.
Last edited by V1del (2024-08-02 21:17:35)
Offline
Alright, I'll remove xf86-video-intel again. Though I've only installed it as an attempt to see if it might resolve the issue. The issue is specifically for electron wayland clients. All other native wayland applications run absolutely fine
Offline
This is reminiscent of this thread: https://bbs.archlinux.org/viewtopic.php … 3#p2188033 -- if you export the environment variables mentioned in that last codeblock to an affected electron client, does the issue persist?
Offline
Sadly, the proposed solution in the other post seems to have to do with booting with the GPU enabled or not, and not enabling it simply by using prime-run. But setting the environment variables doesn't resolve the issue for me either, though it does indeed look very similar.
Offline
Even with those environment variables, it still takes about 1m40s for an application to show its graphical frontend. Output shows the following:
[4946:0805/175615.346703:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=512
[4946:0805/175647.146469:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=512
[4946:0805/175718.934438:ERROR:gpu_process_host.cc(989)] GPU process exited unexpectedly: exit_code=512
[5018:0805/175719.067319:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
Offline
Resolved!
Due to this post on the Archlinux forums, I started digging in journalctl and found a lot of the same lines coming by:
[..]
Aug 24 23:50:26 xps kernel: [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000000001aaea
Aug 24 23:50:26 xps kernel: [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000000001aaea
Aug 24 23:50:26 xps systemd-journald[1098]: Missed 1 kernel messages
Aug 24 23:50:26 xps kernel: [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000000001aaea
Aug 24 23:50:26 xps systemd-journald[1098]: Missed 9 kernel messages
Aug 24 23:50:26 xps kernel: [drm:__nv_drm_gem_nvkms_memory_prime_get_sg_table [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Cannot create sg_table for NvKmsKapiMemory 0x000000000001aaea
[..]
Googling for this issue brought me to the nvidia forums and someone suggested that maybe, the i915 module wasn't present in the dracut config. So I verified mine, and indeed it wasn't there:
$ cat /etc/dracut.conf.d/myflags.conf
hostonly="yes"
compress="lz4"
omit_dracutmodules+=" brltty "
force_drivers+=" nvidia nvidia_modeset nvidia_uvm nvidia_drm "
I've changed the force_drivers line to look like the following:
force_drivers+=" i915 nvidia nvidia_modeset nvidia_uvm nvidia_drm "
And regenerated my initramfs after:
dracut --force --no-hostonly-cmdline --hostonly "/boot/initramfs-linux.img" --kver "$(uname -r)"
Lo and behold, after a reboot my chromium based applications start instantly when using the ozone command line options.
Offline