Gajim - 2023-07-15


  1. wakeupp

    hi guys when i chat with someone im gettin messages from strangers are rejected what do i dp

  2. wakeupp

    hi guys when i chat with someone im gettin messages from strangers are rejected what do i do

  3. why

    wakupp, does your server have spam protection

  4. ☭Mike Yellow

    > hi guys when i chat with someone im gettin messages from strangers are rejected what do i do Add to contact and share online status with each other.

  5. why

    Mike Yellow, where can I join a fellow communist group I'm sick and fed up with capitalists and fascists?

  6. why

    wakeupp, explain more what u mean

  7. lissine

    why: did you solve your dns issue?

  8. ☭Mike Yellow

    > Mike Yellow, where can I join a fellow communist group I'm sick and fed up with capitalists and fascists? There is no English communist public group chat on XMPP platform for now.

  9. why

    lissine, yeah it has been solved

  10. why

    > There is no English communist public group chat on XMPP platform for now. damn we should make one.

  11. Novice8

    Hello. *Question*: Is there a way to tell the 1:1 chat window to remove the downloaded messages and again download the same from the server? (My Gajim version is 1.8.0 running in Manjaro Linux Xfce). *Background* I restored my Manjaro Linux VM to an earlier state (snapshot), and Gajim downloaded a bunch of messages from the server to a 1:1 chat window. Only, because I had a fingerprint issue, they were downloaded as error messages, "This message was encrypted with OMEMO and could not be decrypted." I have now fixed the fingerprint issue and would like to download actual message contents. Thanks.

  12. lovetox

    Novice8: no

  13. Novice8

    @lovetox, thanks. If I uninstall and reinstall gajim, will that work? (I presume on a reinstall I would be on blind trust if I can manage to uninstall all settings and config files, i.e. a clean uninstall.)

  14. lovetox

    No you need to set back the encryption state

  15. lovetox

    Which you can only do with a backup

  16. Novice8

    @lovetox. Thank you, but I don't know what "backup" means in this context. But that's okay. It's not that critical for me to get back the old messages.

  17. Novice8

    Instead, is there just a way to delete the error messages? I see "Delete message locally" for individual messages. But a way to do it en masse?

  18. lovetox

    You can clear the chat history per contact

  19. lovetox

    Check the contact settings

  20. Novice8

    "Remove history" worked. Thanks. But did that remove history just from my 1:1 window or from the server as well?

  21. lovetox

    Only local

  22. lovetox

    There is no protocol to remove history from server

  23. fjklp

    kind of surprising

  24. fjklp

    XEP-0424: Message Retraction doesn't seem to mention if it can apply to only last message, single message, or multiple messages

  25. fjklp

    but it seems to potentially remove messages from the server

  26. Novice8

    For a future version of Gajim, it may be nice to be able to start the download (from server to your chat window) manually at a time you choose. Then you could enable OMEMO, take care of trusting fingerprints, etc. before the download happens. I understand the team cannot tweak the app for every contingency. It's a great app already.

  27. jstein

    Hi, what does gajim mean with "No devices found. Query in progress..."?

  28. Link Mauve

    Novice8, the issue here is that OMEMO is a protocol with forward secrecy, which means the keys used for encryption change for almost every message, and your client throws away the old key when it receives the next message, making it impossible to decrypt the same message twice.

  29. Link Mauve

    You seem to want an encryption mechanism without forward secrecy, so check out OX for instance.

  30. Link Mauve

    It uses the same key for all chats, an obvious downside is that if an attacker manages to obtain your key they can decrypt all past, present and future messages.

  31. Link Mauve

    So it’s up to you, whether you want to weaken your encryption and allow rollbacks in time and new devices to be able to decrypt past messages, or if you want forward secrecy and thus pick OMEMO and cry for lost history whenever something bad happens.

  32. Novice8

    @Link Mauve. Thanks for the heads-up. But on "impossible to decrypt the same message twice," that cannot entirely true. When restored my Manjaro Linux to a date in the past, Gajim downloaded and decrypted the messages in all the 1:1 chatroom that did not have a fingerprint issue. That's the second time, the first time being when the messages went back and forth real time. The decrypt failed only in the 1:1 room that had a fingerprint issue (I had to re-trust it). So, a way to tell Gajim, "Hold your horses till I take care of the fingerprint," would make it possible to download and decript past messages a *second* time even if there is a fingerprint issue.

  33. Novice8

    By "decrypting the same mesage twice," you must have in mind something else, and I am sure I was not suggesting that that be changed.

  34. Link Mauve

    Novice8, there is no room involved with 1:1 chats, fyi.

  35. Link Mauve

    It all goes through directly to your contact.

  36. Novice8

    Sorry. I should have said "1:1 window."

  37. Link Mauve

    But no, I stand by it, when your client changed its OMEMO key, you can’t roll back.

  38. Novice8

    "changed its OMEMO key." Ah. That's not my scenario. When I roll back the machine to a time in the past, the keys are all the same. Only, there was a problem with a contact's fingerprint.

  39. Novice8

    Since you seem interested, I will tell you the whole story. The problem was that, even though the contact's fingerprint had been trusted, the decrypt failed. This happened let us say on July 1. I fixed (per instructions I got in this room), on July 5 (it basically involves deleting the contact's fingerprint and sending a message and re-trsuting).

  40. Novice8

    But on July 15, I turn the clock back and restore my Manjaro to the state it on June 1. Now that before July 1, but it so happened that the same problem was there again.

  41. Novice8

    So, when I clicked into the affected 1:1 chat window, the usual download from server happened, and the decrypt failed, obliging me to use the same fix again.

  42. Novice8

    So for the whole time, there was no change of OMEMO key. And if only the 1:1 window said, when there was history to download, "Hey, you've got history. You want to download now?" and you could say no and fix the problem before downloading, the affected 1:1 window would behave just like all the other 1:1 windows. I.e. be able to download and decrypt history just fine using the same respective keys.

  43. Link Mauve

    Novice8, you still seem to believe OMEMO keys are immutable, they are not.

  44. Novice8

    Now, that's all I meant. And since this redownloading and redecrypting of history happens all the time, I am sure it's not what you meant when you said something was impossible.

  45. Link Mauve

    On first exchange with a new contact they will pick one of the many prekeys you published, and on every subsequent message you will throw away the key and derive a new one.

  46. Link Mauve

    There is no redecryption possible with OMEMO.

  47. Novice8

    If OMEMO keys change on their own all the time, that's fine with me. All I meant by "same" was that I didn't delete or change any key.

  48. Link Mauve

    You don’t do it manually, your client does it for you on almost every message.

  49. Novice8

    Fine. I will say that redownloading and the representation of legible messages happen all the time and cannot be impossible.

  50. Novice8

    It just happened today before my very eyes. The same OMEMO encrypted messages are presented to me for a second time in a legible form. And I could cause that to happen a 100 times just by restoring the computer to a timein the past. You are going to deny the term "decrypted" to an encrypted message that has become legible to human eyes?

  51. Link Mauve

    Ok, I’m out of this conversation then.

  52. Novice8

    I am sure you had a valid technical point which, when properly stated, is consistent with what happens all the time before my very eyes.

  53. lovetox

    You can decrypt old messages if you set your omemo state also back in time

  54. lovetox

    Which is only possible with a backup of said state

  55. lovetox

    If you use a old backup of your VM I think decryption should work, would be interesting what the actual error in the logs was

  56. lovetox

    But fingerprints don't matter for decryption

  57. lovetox

    They only matter when we decide to encrypt for what device

  58. Novice8

    I'll be happy to upload my log if you tell me where it is.

  59. Novice8

    (Manjaro. Gajim 1.8.0,)

  60. mjk

    Link Mauve: the omemo messages in MAM are static, they were already encrypted, with some session key(s). if you rewind your session key on the receiving side, you should at least be able to decrypt the messages that were encrypted for that session key. I'm not really sure if session key rotation is deterministic, so dunno whether it would rotate into a different state in the new timeline. if it is deterministic, maybe it's possible to decrypt all of the following history

  61. mjk

    but I'm inclined to think it's random

  62. mjk

    so the messages that happened to be decrypted "twice" were all encrypted with one session key

  63. lovetox

    mjk to my knowledge there is a ratchet

  64. lovetox

    and this is changed each time i send a messge to the contact

  65. lovetox

    hm i asked some other colleagues, and they told me that im wrong, backup/restore does actually not work

  66. lovetox

    or only for the very first message

  67. lovetox

    so to simplify it, if you only receive messages, this could work with a backup, to receive and decrypt them again

  68. lovetox

    but as soon as you reply, the session state is non-deterministicly changed

  69. lovetox

    and you cannot replay this

  70. lovetox

    so it can look like some messages are decryptable after backup/restore

  71. lovetox

    so in general we can say, except for a very limited edge case, omemo messages cannot be decrypted twice, even with backup/restore

  72. Novice8

    In that case (with so many voices against my case), I must have been wrong. I will let Gajim accummulate messages for a while and try another restoration. If I am wrong, the feature I requested above cannot exist.

  73. mjk

    > but as soon as you reply, the session state is non-deterministicly changed thanks for confirming 👍

  74. lovetox

    Novice8, i dont think you need to test this

  75. lovetox

    also message your wrote yourself are impossible to decryp

  76. lovetox

    because they are not encrypted to "self" in the first place

  77. mjk

    ^ good point

  78. mjk

    only the recipient devices can decrypt them

  79. mjk

    (including your own devices, but excluding the sending device)

  80. lovetox

    what i notice Gajim becomes conisderable slower if my laptop goes into Power Saver mode

  81. lovetox

    probably normal, but shows that some actions like switching Chat are CPU bound

  82. mjk

    I think that was always reported as a computational issue ^^'

  83. mjk

    but to add a +1 to it, switching chats maxes out one of the raspberry pi 4's cores here for over a second

  84. mjk

    recently I actually wanted to suggest keeping a cache of 2 or 3 populated chat views, so that at least switching between often used chats is fast

  85. mjk

    I also wonder if keeping a pool of constructed message widgets and just changing their content would improve perf when populating chat view

  86. mjk

    a reminder that constructing a new code snippet widget takes about 50 ms here

  87. mjk

    other widgets are much less intensive, but are still in milliseconds

  88. mjk

    this is insane, but idk if it's fixable from Gajim's side

  89. Link Mauve

    mjk, fyi that’s exactly what GTK 4 brings to the table.

  90. Link Mauve

    And part of why it’s so much faster with extremely long list of widgets where only a small fraction of them are displayed.

  91. mjk

    cool, but... I think Gajim only loads, what, 20 messages at first? if *that* takes more than a second, I don't think any list widget magic would help

  92. lovetox

    We load anyway not much that's not on screen

  93. mjk

    yeah

  94. Link Mauve

    What makes it slow then?

  95. lovetox

    Slow is relative, it depends on the CPU power and when we talk about it we never talk about the CPUs used

  96. Link Mauve

    lovetox, mjk mentioned it was on a Cortex-A72.

  97. lovetox

    ok and how do i compare this now to what i have?

  98. Link Mauve

    You can’t, barring buying the exact same CPU.

  99. Link Mauve

    But most CPU-bound tasks scale approximately the same no matter the CPU used.

  100. Link Mauve

    That is, if you improve the task by 50% on your CPU, it will improve it by approximately 50% on mjk’s CPU as well.

  101. lovetox

    ok .. i would have expected that

  102. lovetox

    but this does not help

  103. lovetox

    if i use a cpu benchmark site

  104. Link Mauve

    Those are mostly garbage tbh.

  105. lovetox

    a cortex A72 2GHZ has 720 points

  106. lovetox

    my cpu

  107. lovetox

    Intel Core i5-8250U @ 1.60GHz

  108. lovetox

    has 6000 points

  109. lovetox

    so its more than a factor of 10

  110. lovetox

    and my laptop is 4 years old, and was never a high end model even back then

  111. Link Mauve

    lovetox, yup, sounds about right.

  112. Link Mauve

    Cortex-A72 is an embedded CPU from 2015.

  113. lovetox

    ok, good, see thats what i mean, we need to start trying to get objective data for these reports that something is "slow"

  114. lovetox

    and sometimes the answer is, yes you have a slow ass cpu

  115. Link Mauve

    lovetox, well, sure, but I’ve seen people with much better CPUs already complain about Gajim’s speed.

  116. Link Mauve

    So if you improve it for everyone, even such slow ass CPUs will benefit.

  117. lovetox

    of course, i will try to improve once i see that something is inefficient

  118. mjk

    just to add a couple more cents: chat switching is slow _relative_ to pretty much everything Gajim does (not counting python compilation at startup). e.g., scrolling the chat view is very smooth and doesn't have any noticeable lag. and that is being rendered on cpu

  119. mjk

    resizing the window horizontally could be smoother, but it's still multiple updates per second

  120. Link Mauve

    mjk, Python compilation is usually pretty fast, and when installed it doesn’t happen at all since the .pyc files are already on disk. From previous benchmarking I did, it is loading the module files at all which is slow.

  121. mjk

    Link Mauve: loading the modules is more than compiling?

  122. Link Mauve

    Yup.

  123. mjk

    ok

  124. Link Mauve

    And it only happens once per module when it gets modified, which is a pretty rare event.

  125. Link Mauve

    On subsequent loads the compilation won’t happen.

  126. mjk

    once per module per process lifetime?

  127. Link Mauve

    Not per process lifetime, per the .py file hasn’t changed on disk.

  128. mjk

    ah

  129. mjk

    then I have no idea why literally every python program I run has time-to-any-signs-of-activity in multi-second range

  130. lovetox

    of course hard disk could also a problem, if you run debug you will see how much the database query consumes

  131. mjk

    but db isn't cpu bound in Gajim, is it?

  132. lovetox

    its not, but if you say normal loading of messages while scrolling is fast

  133. lovetox

    maybe the problem is something else

  134. lovetox

    as for python startup, its slow, the reason is that python loads many modules

  135. mjk

    no, not loading, I mean scrolling the view with already loaded messages

  136. lovetox

    but if you scroll, more messages are loaded

  137. mjk

    loading more messages from the db is still noticeable, but not a whole second

  138. lovetox

    why would scrolling be slow? its not the gtk drawing that is slow

  139. lovetox

    its the object creation the widget creation that is slow

  140. mjk

    > why would scrolling be slow? its not the gtk drawing that is slow because of the "slow-ass cpu" :P

  141. lovetox

    i think drawing stuff in a scrolled view is trivial

  142. mjk

    I'm pointing out that it's plenty fast for all activities except chat widget creation

  143. lovetox

    even on a old cpu

  144. mjk

    🤷

  145. lovetox

    its the widget creation that can be slow, because we run much code until a widget is finally created

  146. lovetox

    and also the gtk layout engine, if the widget is shown, it needs to be calculated with all other widgets etc etc

  147. lovetox

    but in a scrolled view, simply scrolling, there is no resizing going on, there is no creation going on

  148. lovetox

    its just the info what pixels need to be drawn next on some canvas

  149. mjk

    ok, but as I said, resizing the chat horizontally is still pretty fast

  150. mjk

    > gajim.c.storage.archive Execution time for get_conversation_before_after: 28 ms that's the greatest I see

  151. lovetox

    looks not bad

  152. mjk

    and often it's less

  153. lovetox

    and you say it takes one second to switch?

  154. mjk

    > its the widget creation that can be slow, because we run much code until a widget is finally created ohh, right, there's a bunch of python code

  155. mjk

    > and you say it takes one second to switch? yes

  156. Link Mauve

    lovetox, note that on a Cortex-A53, which is even slower than mjk’s Cortex-A72, scrolling with GTK 3 was slow and I managed to make it about twice as fast in GTK 4 using its GL renderer.

  157. Link Mauve

    Despite my GPU also being quite slow.

  158. Link Mauve

    It was about 20 fps on GTK 3, at 720×1440.

  159. lovetox

    Link Mauve, im sure GTK 4 has improvements

  160. mjk

    yeah, I also remember scrolling on a raspberry pi 3 being unbearably slow

  161. Link Mauve

    It was just an answer to “20:00:58 lovetox> why would scrolling be slow? its not the gtk drawing that is slow”.

  162. clown

    Is there any work being done or plans on migrating to gtk4?

  163. Link Mauve

    No.

  164. lovetox

    no

  165. clown

    Just not enough resources for now or is there something wrong with it?

  166. lovetox

    cost / benefit is not right

  167. lovetox

    its better to implement features that people actually use for chatting

  168. lovetox

    working a year on a gtk4 port, to tell people, hey we worked a year, and some of you on slow cpus might feel its now a bit faster

  169. lovetox

    is not worth it in my book

  170. lovetox

    there are even dealbreakers like no status icon anymore on Windows

  171. mjk

    "oh btw, you don't have a spellchecker anymore" :D

  172. lovetox

    and i bet X more if i get into the docs what they all removed

  173. lovetox

    probably a handful features would need to be removed from Gajim to make it even work

  174. mjk

    yeah, I vote for features and slow-but-steady perf improvement

  175. mjk

    to that effect, reactions when? :D

  176. lovetox

    yeah .. i need to finish the database rework

  177. mjk

    right. godspeed!

  178. lovetox

    but it will be a big big change, and i hope the migration will work

  179. mjk

    uh-oh, does Gajim need integration testing now?

  180. lovetox

    we added some database tests now

  181. lovetox

    but someusers have really old databases

  182. lovetox

    and i think it will be a suprise what we find in some :D

  183. mjk

    lol

  184. mjk

    maybe require an upgrade to 1.8 before upgdading to 1.9?

  185. mjk

    random thought regarding performance: I wonder how much time _cleaning up_ a chat view takes. probably less than creation, but I've seen some unexpected things in my life

  186. Link Mauve

    mjk, you can profile. :)

  187. lovetox

    yes thats also a place i would look into

  188. lovetox

    because switching means cleaning up first

  189. mjk

    > mjk, you can profile. :) nahh, too busy procrastinating

  190. debacle

    Why does my contacts avatar suddenly get missing in my Gajim? But not in my Dino? I'm pretty sure, my contact did not change anything in their setup (Conversations, jabber.de), because they is not very "technical".

  191. debacle

    Why does my contacts avatar image suddenly get missing in my Gajim? But not in my Dino? I'm pretty sure, my contact did not change anything in their setup (Conversations, jabber.de), because they is not very "technical".

  192. cal0pteryx

    mjk: right, clean up can be expensive as well. For the search view for example, I noticed that disabling the sorting mechanism before removing rows would speed up the clean up significantly.. But yes, profiling helps pinning it down. The wiki has some answers on how to do that. It's actually quite fun to view it in Snakeviz :) and rewarding if you can improve speed!

  193. fjklp

    sometimes I get "Error: You are not currently connected to this chat" in the chat view

  194. fjklp

    1. what causes this 2. why doesn't the disconnected status icon show in the chat list 3. if gajim knows it's disconnected, why doesn't it reconnect?