pop-os / cosmic-epoch

Next generation Cosmic desktop environment
3.19k stars 86 forks source link

DisplayLink support #135

Open acolombier opened 1 year ago

acolombier commented 1 year ago

Hi team,

Not sure if this is too early to report issue with Cosmic, so feel free to close my issue if it is! :)

I know the project isn't quite yet considered stable, but I wanted to have a look at it after all the excitement of reading the blog.

Unfortunately, I was unable to get it starting on my machine.

neofetch

``` ///////////// antoine@pop-os ///////////////////// -------------- ///////*767//////////////// OS: Pop!_OS 22.04 LTS x86_64 //////7676767676*////////////// Host: N8xxEP6 /////76767//7676767////////////// Kernel: 6.2.6-76060206-generic /////767676///*76767/////////////// Uptime: 49 mins ///////767676///76767.///7676*/////// Packages: 3889 (dpkg), 36 (flatpak), 3 (snap) /////////767676//76767///767676//////// Shell: bash 5.1.16 //////////76767676767////76767///////// Resolution: 2560x1440 ///////////76767676//////7676////////// DE: GNOME 42.5 ////////////,7676,///////767/////////// WM: Mutter /////////////*7676///////76//////////// WM Theme: Pop ///////////////7676//////////////////// Theme: Pop-dark [GTK2/3] ///////////////7676///767//////////// Icons: Pop [GTK2/3] //////////////////////'//////////// Terminal: terminator //////.7676767676767676767,////// CPU: Intel i7-8750H (12) @ 2.200GHz /////767676767676767676767///// GPU: Intel CoffeeLake-H GT2 [UHD Graphics 630] /////////////////////////// GPU: NVIDIA GeForce GTX 1060 Mobile ///////////////////// Memory: 7616MiB / 15699MiB ///////////// ```

Logs captured using journalctl --user -a -b0 _EXE=/usr/bin/cosmic-session is available here.

Looking forward to get my eyes on Cosmic DE!

RillonDodgers commented 1 year ago

Hey, I was browsing issues because I've had issues with nvidia and wayland, and I saw your logs and noticed Could not find wayland compositor that error. Is it possible you didn't/don't have a wayland compositor installed?

Aug 26 11:17:36 pop-os cosmic-session[57530]: Error: 
Aug 26 11:17:36 pop-os /usr/libexec/gdm-wayland-session[57530]: 2023-08-26T10:17:36.047831Z  WARN cosmic-bg: cosmic_session: Error:
Aug 26 11:17:36 pop-os /usr/libexec/gdm-wayland-session[57530]: 2023-08-26T10:17:36.047852Z  WARN cosmic-bg: cosmic_session:    0: wayland client connection failed
Aug 26 11:17:36 pop-os /usr/libexec/gdm-wayland-session[57530]: 2023-08-26T10:17:36.047885Z  WARN cosmic-bg: cosmic_session:    1: Could not find wayland compositor
Drakulix commented 1 year ago

@acolombier What packages exactly did you install to try cosmic?

acolombier commented 1 year ago

Hi, I have followed this Youtube video. After reading the comments, it looks like there could be an issue with NVidia. They seem to be an issue on libnvidia-egl-wayland1:1.1.9. Someone is saying it would be fixed in version 1.1.12 so potentially the issue will be resolved then?

Drakulix commented 1 year ago

Please don't follow youtube videos, they are bound to be outdated with time. We do have an official guide right in our readme: https://github.com/pop-os/cosmic-epoch#installing-on-pop_os

The libnvidia-egl-wayland package should be up-to-date and wouldn't cause the issue you are experiencing anyway.

acolombier commented 1 year ago

Hi team, I managed to narrow down the problem to DisplayLink device support: if I unplug my dock station which relies on evdi display, I can start the Cosmic perfectly fine. If I plug back the dock while Cosmic, after a few second, all screens become back. As soon as I unplug it again, screen become available, except that the tool bar duplicate itself.

The original lop I shared was only including cosmic logs, but I manage to find some kernel messages that may help debugging the issue

Oct 13 23:15:31 pop-os cosmic-comp[30528]: Unable to become drm master, assuming unprivileged mode
Oct 13 23:15:31 pop-os cosmic-comp[30528]: [EGL] 0x300c (BAD_PARAMETER) eglQueryDmaBufModifiersEXT: EGL_BAD_PARAMETER error: In eglQueryDmaBufModifiersEXT: Invalid format
Oct 13 23:15:31 pop-os cosmic-comp[30528]: [EGL] 0x300c (BAD_PARAMETER) eglQueryDmaBufModifiersEXT: EGL_BAD_PARAMETER error: In eglQueryDmaBufModifiersEXT: Invalid format
Oct 13 23:15:31 pop-os cosmic-comp[30528]: [EGL] 0x300c (BAD_PARAMETER) eglQueryDmaBufModifiersEXT: EGL_BAD_PARAMETER error: In eglQueryDmaBufModifiersEXT: Invalid format
Oct 13 23:15:31 pop-os cosmic-comp[30528]: [EGL] 0x300c (BAD_PARAMETER) eglQueryDmaBufModifiersEXT: EGL_BAD_PARAMETER error: In eglQueryDmaBufModifiersEXT: Invalid format
Oct 13 23:15:32 pop-os cosmic-comp[30528]: Unable to become drm master, assuming unprivileged mode
Oct 13 23:15:32 pop-os kernel: evdi: [I] (card3) Opened by Task 1628 (systemd-logind) of process 1628 (systemd-logind)
Oct 13 23:15:32 pop-os cosmic-comp[30528]: ignoring requested context priority, EGL_IMG_context_priority not supported
Oct 13 23:15:32 pop-os kernel: evdi: [I] (card3) Opened by Task 30528 (cosmic-comp) of process 30528 (cosmic-comp)
Oct 13 23:15:32 pop-os kernel: evdi: [I] (card3) Closed by Task 30528 (cosmic-comp) of process 30528 (cosmic-comp)
Oct 13 23:15:32 pop-os kernel: evdi: [I] (card3) Connector state: connected
Oct 13 23:15:32 pop-os cosmic-comp[30528]: Preferred format AB30 not available: NoSupportedPlaneFormat
Oct 13 23:15:32 pop-os cosmic-comp[30528]: Preferred format AR30 not available: NoSupportedPlaneFormat
Oct 13 23:15:32 pop-os cosmic-comp[30528]: thread 'main' panicked at 'called `Option::unwrap()` on a `None` value': /build/cosmic-comp-tiiYtA/cosmic-comp-0.1~1697056962~22.04~806e10f/vendor/smithay/src/backend/drm/gbm.rs:319
                                              0: <unknown>
                                              1: <unknown>
                                              2: <unknown>
                                              3: <unknown>
                                              4: <unknown>
                                              5: <unknown>
                                              6: <unknown>
                                              7: <unknown>
                                              8: <unknown>
                                              9: <unknown>
                                             10: <unknown>
                                             11: <unknown>
                                             12: <unknown>
                                             13: <unknown>
                                             14: <unknown>
                                             15: <unknown>
                                             16: <unknown>
                                             17: <unknown>
                                             18: <unknown>
                                             19: __libc_start_call_main
                                                        at ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
                                             20: __libc_start_main_impl
                                                        at ./csu/../csu/libc-start.c:392:3
                                             21: <unknown>
Oct 13 23:15:32 pop-os kernel: evdi: [I] (card3) Edid property set
Oct 13 23:15:32 pop-os cosmic-session[30500]: process ' COSMIC_SESSION_SOCK=11 cosmic-comp ' failed with code 101
Oct 13 23:15:32 pop-os /usr/libexec/gdm-wayland-session[30500]: 2023-10-13T22:15:32.349764Z ERROR launch_pad: process ' COSMIC_SESSION_SOCK=11 cosmic-comp ' failed with code 101
Oct 13 23:15:32 pop-os /usr/libexec/gdm-wayland-session[30500]: 2023-10-13T22:15:32.349801Z  INFO launch_pad: draining stdin receiver before restarting process
Oct 13 23:15:32 pop-os /usr/libexec/gdm-wayland-session[30500]: 2023-10-13T22:15:32.349873Z  INFO launch_pad: sleeping for 1ms before restarting process cosmic-comp (restart 0)
Oct 13 23:15:32 pop-os cosmic-session[30500]: draining stdin receiver before restarting process
Oct 13 23:15:32 pop-os cosmic-session[30500]: sleeping for 1ms before restarting process cosmic-comp (restart 0)

Appreciate you guys may not have an DisplayLink-ready device to test changes on so feel free to ping me so I can test patches or workaround!

Drakulix commented 1 year ago

I have recently acquired such a device, but haven't had the time yet to debug and fix this (and honestly, it is not very high on the priority list). Thanks for bringing this to my attention though, I'll ping once this situation has evolved and there are patches to test! :)

pyroraptor07 commented 7 months ago

For what it is worth, I've been seeing a similar issue as well for some time on a System 76 pango12 laptop; cosmic desktop works fine until the moment I plug in a USB-C dock with monitors connected that uses DisplayLink, after which the session just repeatedly seems to crash until the dock is unplugged. If it helps, here are the journalctl logs from when I last tried it a few days ago, otherwise I'll just keep an eye on this issue for a potential resolution. crash-logs.txt

Drakulix commented 7 months ago

Nothing new so far on this issue and this is very much a known limitation of cosmic-comp. There are plans to fix it, but I cannot promise anything regarding when.

pyroraptor07 commented 7 months ago

No worries, I figured y'all are really busy at the moment and USB dock support isn't as big a priority, especially pre-alpha. I just stumbled upon this issue and thought I'd provide some more up-to-date logs in case they would be any help at all.

alphabitserial commented 3 months ago

Under most circumstances, the external display connected to my DisplayLink dock won't work in COSMIC. I understand that this is a known limitation at the moment. I have discovered one strange, but consistent workaround.

If I plug the dock in immediately after powering on the laptop, while UEFI is doing its thing/before Linux is loaded, when I log into COSMIC the external display will be working. After that, if I ever unplug/replug the laptop from the dock, the external display will not work anymore.

Are there any logs I can provide which could help with resolving the issue? I am in a position to get logs while COSMIC is running.

exstntlmsnthrp commented 3 months ago

Under most circumstances, the external display connected to my DisplayLink dock won't work in COSMIC. I understand that this is a known limitation at the moment. I have discovered one strange, but consistent workaround.

If I plug the dock in immediately after powering on the laptop, while UEFI is doing its thing/before Linux is loaded, when I log into COSMIC the external display will be working. After that, if I ever unplug/replug the laptop from the dock, the external display will not work anymore.

Are there any logs I can provide which could help with resolving the issue? I am in a position to get logs while COSMIC is running.

@alphabitserial If it makes you feel any better, when I previously used a displaylink dock with more established Linux DE's, I frequently had the exact same problem you describe.

I don't doubt that it will be worked on eventually with cosmic, it's just not a problem unique to this new DE.

Darklesss commented 1 month ago

While understanding as well that this is probably not a high priority issue at present, I wanted to add my experience to inform future work on the problem. I too use a USB-C dock with external keyboard, mouse, speakers, and a monitor that connects through the Displaylink protocol. Unforuntately I haven't been able to replicate alphabitserial's workaround, so I can't use my external monitor without plugging it directly into the laptop. Not the end of the world by any means, but eventually it would be nice to be able to use the dock properly with this otherwise wonderful new DE.

The interesting part to me is that when I try to use the external monitor through the dock, Cosmic seems to "see" the monitor, but just can't enable it. When I go to Displays in the settings it shows tabs for both monitors, but the external one isn't enabled. In the window where you can rearrange the displays it only shows an image for the laptop screen, though it's off to the right of center as if the other display is invisibly taking up space to the left. When I try to slide the toggle to enable the external monitor it won't slide, but nonetheless the usual window pops up asking whether I want to keep my new display settings or revert back to the previous ones. Not sure if this information helps at all, but I thought I'd share it.

kocherjj commented 4 weeks ago

Since this issue is labeled generically, I am adding this here rather than creating a new issue although the specific problem I am seeing is different.

I have an Asus MB169B+ monitor and with a fresh install of Pop-OS 24.04 on my HP Laptop with a Ryzen 7 5825U CPU, after adding displaylink drivers and evdi as soon as I connect the monitor the desktop crashes, and a series of crash text shows up on my main monitor that repeats every 5 seconds or so.

If I unplug the monitor again quickly the desktop returns, but with all applications closed, including any terminal windows that might have been capturing live error logs. If I leave it plugged in for more than 20 seconds or so then after I unplug the monitor again it stays on the crash text and I have to hard reboot.

The dmesg record of this event looks like this:

  +0.320473] usb 2-1.1.2: new SuperSpeed USB device number 7 using xhci_hcd
[  +0.013022] usb 2-1.1.2: New USB device found, idVendor=17e9, idProduct=ff0b, bcdDevice=31.29
[  +0.000016] usb 2-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000007] usb 2-1.1.2: Product: ASUSTEK MB169B+
[  +0.000005] usb 2-1.1.2: Manufacturer: DisplayLink
[  +0.000005] usb 2-1.1.2: SerialNumber: MBLMTF166139
[  +3.103335] evdi: [I] Attaching to usb:2-1.1.2
[  +0.005760] evdi: [I] (card1) Opened by Task 7977 (DisplayLinkMana) of process 7976 (DisplayLinkMana)
[  +0.000619] evdi: [I] (card1) Added i2c adapter bus number 10
[  +0.000004] evdi: [I] (card1) Connected with Task 7977 (DisplayLinkMana) of process 7976 (DisplayLinkMana)
[  +0.000003] evdi: [I] (card1) Connector state: connected
[  +0.002911] evdi: [I] (card1) Connector state: connected
[  +0.000032] evdi: [I] (card1) Edid property set
[  +0.001078] evdi: [I] (card1) Opened by Task 7942 (tokio-runtime-w) of process 2319 (cosmic-applet-b)
[  +0.000010] evdi: [I] (card1) Opened by Task 7945 (tokio-runtime-w) of process 2392 (cosmic-applet-b)
[  +0.000007] evdi: [I] (card1) Closed by Task 7942 (tokio-runtime-w) of process 2319 (cosmic-applet-b)
[  +0.000007] evdi: [I] (card1) Closed by Task 7945 (tokio-runtime-w) of process 2392 (cosmic-applet-b)
[  +0.104287] evdi: [I] (card1) Notifying display power state: on
[  +0.000014] evdi: [I] (card1) Notifying mode changed: 1920x1080@60; bpp 32; pixel format AB24 little-endian (0x34324241)
[  +0.000004] evdi: [I] (card1) Notifying display power state: on
[  +0.032960] evdi: [W] evdi_painter_connect:897 (card1) Double connect - replacing 00000000d765c178 with 00000000d765c178
[  +0.000010] evdi: [I] (card1) Connected with Task 7977 (DisplayLinkMana) of process 7976 (DisplayLinkMana)
[  +0.000005] evdi: [I] (card1) Connector state: connected
[  +0.015210] evdi: [W] evdi_gem_mmap:408 Don't allow imported objects to be mapped: owner: amdgpu
[  +0.001007] evdi: [W] evdi_gem_mmap:408 Don't allow imported objects to be mapped: owner: amdgpu
[  +0.000364] evdi: [W] evdi_gem_mmap:408 Don't allow imported objects to be mapped: owner: amdgpu
[  +0.000063] evdi: [W] evdi_gem_mmap:408 Don't allow imported objects to be mapped: owner: amdgpu
[  +0.000013] evdi: [W] evdi_gem_mmap:408 Don't allow imported objects to be mapped: owner: amdgpu
[  +0.000017] evdi: [W] evdi_gem_mmap:408 Don't allow imported objects to be mapped: owner: amdgpu
[  +0.008283] llvmpipe-14[1920]: segfault at 300 ip 0000797d41032372 sp 0000797d14bff360 error 4
[  +0.000000] llvmpipe-12[1918]: segfault at 7800 ip 0000797d41032372 sp 0000797d15fff360 error 4
[  +0.000008]  likely on CPU 15 (core 7, socket 0)
[  +0.000001]  likely on CPU 2 (core 1, socket 0)

[  +0.000005] Code: eb c4 c2 55 40 f5 c5 d5 76 db c5 95 fe fe c5 ed fe ee c5 dd fe f6 c5 e5 df df c5 c1 ef ff c5 ed fe d3 c5 dd fe db c5 dd 76 e4 <c4> e2 5d 90 3c 2f c5 d1 ef ed c5 dd 76 e4 c4 e2 5d 90 2c 37 c5 c9
[  +0.000001] Code: eb c4 c2 55 40 f5 c5 d5 76 db c5 95 fe fe c5 ed fe ee c5 dd fe f6 c5 e5 df df c5 c1 ef ff c5 ed fe d3 c5 dd fe db c5 dd 76 e4 <c4> e2 5d 90 3c 2f c5 d1 ef ed c5 dd 76 e4 c4 e2 5d 90 2c 37 c5 c9
[  +0.003390] evdi: [I] (card1) Opened by Task 8048 (tokio-runtime-w) of process 8029 (cosmic-applet-b)
[  +0.000034] evdi: [I] (card1) Closed by Task 8048 (tokio-runtime-w) of process 8029 (cosmic-applet-b)
[  +0.038171] evdi: [I] (card4) Closed by Task 8157 ((sd-close)) of process 8157 ((sd-close))
[  +0.006050] evdi: [I] (card1) Notifying display power state: off
[  +0.000017] evdi: [I] (card1) Notifying mode changed: 1920x1080@60; bpp 32; pixel format AB24 little-endian (0x34324241)
[  +0.000004] evdi: [I] (card1) Notifying display power state: on
[  +0.000238] evdi: [I] (card1) Closed by Task 8164 ((sd-close)) of process 8164 ((sd-close))
[  +0.007352] evdi: [I] (card3) Closed by Task 8189 ((sd-close)) of process 8189 ((sd-close))
[  +0.000677] evdi: [I] (card2) Closed by Task 8190 ((sd-close)) of process 8190 ((sd-close))
[  +0.009247] evdi: [I] (card4) Closed by Task 1905 (Xwayland) of process 1905 (Xwayland)
[  +0.000017] evdi: [I] (card3) Closed by Task 1905 (Xwayland) of process 1905 (Xwayland)
[  +0.000009] evdi: [I] (card2) Closed by Task 1905 (Xwayland) of process 1905 (Xwayland)
[  +0.043888] evdi: [I] (card1) Closed by Task 1905 (Xwayland) of process 1905 (Xwayland)
[  +0.938744] usb 2-1.1.2: USB disconnect, device number 7

I like how performant the desktop feels and I'm interested in switching to Pop-OS and Cosmic if this bug gets worked out. Thanks for all your hard work on this project!