Menu

Native Wayland Support

Mar Mel
2023-10-20
2023-11-26
  • Mar Mel

    Mar Mel - 2023-10-20

    I recently switched my display protocol to pure Wayland (no X11, no Xwayland).

    To my chagrin, Veracrypt is currently the only piece of software I have installed that fails to launch.

    It crashes immediately whether launching the GUI or from CLI.

    Strangely, I can't find a topic or a ticket for this, but figure it must exist, so trying the forums first.

    Hopefully there's an easy workaround.

    $ coredumpctl gdb 8335
               PID: 8335 (veracrypt)
               UID: 1000 (myusername)
               GID: 1000 (myusername)
            Signal: 6 (ABRT)
         Timestamp: Fri 2023-10-20 17:15:58 EDT (14s ago)
      Command Line: veracrypt
        Executable: /usr/bin/veracrypt
     Control Group: /user.slice/user-1000.slice/user@1000.service/session.slice/vte-spawn-ff8a84be-39c1-4bd0-ba9a-1ce9ed4bd7b4.scope
              Unit: user@1000.service
         User Unit: vte-spawn-ff8a84be-39c1-4bd0-ba9a-1ce9ed4bd7b4.scope
             Slice: user-1000.slice
         Owner UID: 1000 (marc)
           Boot ID: 5b42ada02b1841e3bc8d132f273250da
        Machine ID: b1fa067dbeb84216ab8d4c29c1b78033
          Hostname: myhostname
           Storage: /var/lib/systemd/coredump/core.veracrypt.1000.5b42ada02b1841e3bc8d132f273250da.8335.1697836558000000.zst (present)
      Size on Disk: 847.1K
           Message: Process 8335 (veracrypt) of user 1000 dumped core.
    
                    Stack trace of thread 8335:
                    #0  0x00007f60e80ac83c n/a (libc.so.6 + 0x8e83c)
                    #1  0x00007f60e805c668 raise (libc.so.6 + 0x3e668)
                    #2  0x00007f60e80444b8 abort (libc.so.6 + 0x264b8)
                    #3  0x00007f60e8045390 n/a (libc.so.6 + 0x27390)
                    #4  0x00007f60e80b67b7 n/a (libc.so.6 + 0x987b7)
                    #5  0x00007f60e80b8a74 n/a (libc.so.6 + 0x9aa74)
                    #6  0x00007f60e80bb353 free (libc.so.6 + 0x9d353)
                    #7  0x00007f60e8fcabbd n/a (libwx_gtk3u_core-3.2.so.0 + 0x5cabbd)
                    #8  0x00007f60e8fcad0a _ZN22wxSystemSettingsModule6OnInitEv (libwx_gtk3u_core-3.2.so.0 + 0x5cad0a)
                    #9  0x00007f60e871ee62 _ZN8wxModule18DoInitializeModuleEPS_R8wxVectorIS0_E (libwx_baseu-3.2.so.0 + 0x11ee62)
                    #10 0x00007f60e8722418 _ZN8wxModule17InitializeModulesEv (libwx_baseu-3.2.so.0 + 0x122418)
                    #11 0x00007f60e87157a0 n/a (libwx_baseu-3.2.so.0 + 0x1157a0)
                    #12 0x00007f60e8715faa _Z12wxEntryStartRiPPw (libwx_baseu-3.2.so.0 + 0x115faa)
                    #13 0x00007f60e8716360 _Z7wxEntryRiPPw (libwx_baseu-3.2.so.0 + 0x116360)
                    #14 0x000055653fcd59f7 n/a (veracrypt + 0xe89f7)
                    #15 0x00007f60e8045cd0 n/a (libc.so.6 + 0x27cd0)
                    #16 0x00007f60e8045d8a __libc_start_main (libc.so.6 + 0x27d8a)
                    #17 0x000055653fcdc775 n/a (veracrypt + 0xef775)
    
                    Stack trace of thread 8341:
                    #0  0x00007f60e80a7700 n/a (libc.so.6 + 0x89700)
                    #1  0x00007f60e80adf1a pthread_mutex_lock (libc.so.6 + 0x8ff1a)
                    #2  0x000055653fe0fa26 n/a (veracrypt + 0x222a26)
                    #3  0x000055653fddf3bb n/a (veracrypt + 0x1f23bb)
                    #4  0x000055653fdaeafe n/a (veracrypt + 0x1c1afe)
                    #5  0x00007f60e80aa9eb n/a (libc.so.6 + 0x8c9eb)
                    #6  0x00007f60e812e7cc n/a (libc.so.6 + 0x1107cc)
    
     

    Last edit: Mar Mel 2023-11-24
  • Mar Mel

    Mar Mel - 2023-10-22

    I posted about this crasher issue 2 days ago and it's still "awaiting moderation".

    Is this normal? Looks like this forum is active daily here.

     
    • Enigma2Illusion

      Enigma2Illusion - 2023-10-22

      Posts that need to be approved depend when either myself or the developer notice pending moderation in a separate tab by visiting each section of the VeraCrypt forum.

      There is no set timeframe since I volunteer to help moderate the forum and the developer keeps his focus on the software.

       
      • Mar Mel

        Mar Mel - 2023-10-22

        No worries, understood. Thanks for getting my post... posted!

        Also, I have a workaround, as cryptsetup allows for opening Veracrypt volumes these days.

         

        Last edit: Mar Mel 2023-10-22
  • Mounir IDRASSI

    Mounir IDRASSI - 2023-10-22

    @marmel99: Thank you for this report, and I apologize for the delay in moderation.

    The core dump indicates that the crash occurs within the system's wxWidgets library (libwx_gtk3u_core-3.2.so -> wxSystemSettingsModule -> UpdatePreferDark -> free => crash). This is an issue affecting the wxWidgets library, over which we have no control.

    A new version of the wxWidgets library, 3.2.3, was released on October 10, 2023, which seems to have resolved some Wayland-related crashes. Could you please confirm which version is installed on your system? You can find this information by typing wx-config --version in the terminal.

    Have you installed the latest updates for your Linux distribution?

    Could you also please provide instructions on how to set up a pure Wayland environment like yours so that I can attempt to reproduce the issue?

    Thank you for your assistance.

     
    • Mar Mel

      Mar Mel - 2023-10-22

      Thanks for getting back to me.

      Yeah, I was excited to see the latest wxWidgets mention those Wayland fixes recently, and running Arch Linux here, so yes wxwidgets-gtk3 3.2.3 installed.

      For a pure Wayland, at least as far as running in current Gnome 45, it's as simple as overriding the shell init with a systemd user service to start the shell thusly:

      $ systemctl --user edit org.gnome.Shell@wayland.service
      [Service]
      ExecStart=
      ExecStart=/usr/bin/gnome-shell --no-x11
      

      Log out/in and X11/Xwayland will no longer be available to the shell/apps.

      EDIT:

      To revert back to standard shell with Xwayland available, just remove the file:

      $ rm -r /home/your_username/.config/systemd/user/org.gnome.Shell@wayland.service.d
      
       

      Last edit: Mar Mel 2023-10-22
  • Mar Mel

    Mar Mel - 2023-10-22

    Another interesting thing I noted in the original description, is this same crash signature occurs when using veracrypt -t or veracrypt -h in a terminal or even TTY.

    Makes no sense why the CLI codepath would invoke anything to do with the GUI library.

     

    Last edit: Mar Mel 2023-10-22
  • Mar Mel

    Mar Mel - 2023-11-11

    Hi @idrassi, did you manage to get anywhere with this?

    Should I file a bug report? I search for 'wayland' in the tickets with zero results. Odd.

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2023-11-11

    @marmel99: Unfortunately, I haven't made progress on this issue as I've had to prioritize other more important tasks. Please feel free to file a bug report. It is indeed strange that this issue doesn't affect other applications, given that there is nothing special in VeraCrypt's usage of wxWidgets.

    Concerning your question about why the crash occurs even in VeraCrypt's text mode ("veracrypt -t"), it seems to indicate that wxWidgets tries to access Wayland resources even if the calling application doesn't make use of any UI classes or calls.

    Anyway, the best we can do is share a detailed core dump stack trace so that wxWidgets developers can locate the cause of the issue, unless it is something easy to fix.

     
    • Mar Mel

      Mar Mel - 2023-11-12

      It is indeed strange that this issue doesn't affect other applications, given that there is nothing special in VeraCrypt's usage of wxWidgets.

      This is not strange on my system, as it's the only installed application with a wxWidgets dependency.

       
  • Mounir IDRASSI

    Mounir IDRASSI - 2023-11-11

    @marmel99, could you open an issue for this on the VeraCrypt Github repo? Regular Linux contributors to VeraCrypt on Github, who might help investigate this issue, don't usually check the SourceForge forums.

    Alternatively, if you prefer, I can create an issue on your behalf.

    P.S.: There's an existing issue on GitHub regarding Wayland native compatibility (#184), but this particular crash seems to be a new one.

     
  • Mar Mel

    Mar Mel - 2023-11-11

    Thanks for your quick reply and pointing to the bug report.

    As it's currently open there's no point filing a duplicate.

    I've updated the report with the same details as found here.

     

    Last edit: Mar Mel 2023-11-11
  • Mar Mel

    Mar Mel - 2023-11-26

    This issue has been resolved with the following PR:
    https://github.com/veracrypt/VeraCrypt/pull/1264

    I built 1.26.7+#1264 and can confirm this also allows full GUI functionality under pure Wayland!

     

    Last edit: Mar Mel 2023-11-26

Log in to post a comment.