Closed isage closed 6 months ago
Telegram 4.16.2 from static binary seems to start faster and does have tray icon.
nvidia driver is known to have long start, nothing could be done about that as it's proprietary. Switch to nouveau or disable OpenGL.
Why does statically built version works fine then?
i don't know :(. There were reports static binary hangs with nvidia just as well.
Welp, just great. It worked just fine with 4.8.4
Yeah, fixes for one kind of things break other things... Linux moment.
Also works fine under wayland KDE session (no tray icon, though).
Switch to nouveau
Thanks, but no, thanks. Already have one burned gpu by nouveau.
or disable OpenGL
How would i go about disabling opengl for telegram?
How would i go about disabling opengl for telegram?
The switch is straight in advanced settings...
Yeah, that helped. Thanks.
So i dug a little deeper.
It hangs in lib_ui/ui/gl/gl_detection.cpp
on new QOpenGLWidget()
(this also explains why it hangs on nvidia, despite gl being force-disabled there anyway. disabling from settings just skips the check altogether)
However, i did minimal test-case with code from gl_detection, and it doesn't hang.
#include <QApplication>
#include <QSurfaceFormat>
#include <QtOpenGLWidgets/QOpenGLWidget>
#include <QOpenGLContext>
#include <QOpenGLFunctions>
int main(int argc, char *argv[])
{
/*
auto format = QSurfaceFormat::defaultFormat();
format.setSwapInterval(0);
format.setAlphaBufferSize(8);
QSurfaceFormat::setDefaultFormat(format);
qWarning("Set def format");
*/
QApplication a(argc, argv);
auto format = QSurfaceFormat();
const auto tester = [&] {
std::unique_ptr<QObject> result;
const auto w = new QOpenGLWidget(nullptr);
qWarning(("OpenGL: new QOpenGLWidget(widget);"));
w->setFormat(format);
w->grabFramebuffer(); // Force initialize().
qWarning(("OpenGL: Force initialize()"));
if (!w->window()->windowHandle()) {
w->window()->createWinId();
}
qWarning(("OpenGL: Force makeCurrent()."));
result.reset(w);
qWarning(("OpenGL: reset(w)"));
return result;
}();
qWarning(("OpenGL: testerWidget"));
const auto testerWidget = static_cast<QOpenGLWidget*>(tester.get());
const auto context = testerWidget->context();
qWarning(("OpenGL: got context"));
if (!context
|| !context->isValid()/*
// This check doesn't work for a widget with WA_NativeWindow.
|| !context->makeCurrent(testerQWindow)*/) {
qWarning(("OpenGL: Could not create widget in a window."));
return {};
}
const auto functions = context->functions();
qWarning(("OpenGL: got functions"));
using Feature = QOpenGLFunctions;
if (!functions->hasOpenGLFeature(Feature::NPOTTextures)) {
qWarning(("OpenGL: NPOT textures not supported."));
return {};
} else if (!functions->hasOpenGLFeature(Feature::Framebuffers)) {
qWarning(("OpenGL: Framebuffers not supported."));
return {};
} else if (!functions->hasOpenGLFeature(Feature::Shaders)) {
qWarning(("OpenGL: Shaders not supported."));
return {};
}
qWarning(("OpenGL: checked functions"));
const auto supported = context->format();
qWarning(("OpenGL: got format"));
switch (supported.profile()) {
case QSurfaceFormat::NoProfile: {
if (supported.renderableType() == QSurfaceFormat::OpenGLES) {
qWarning(("OpenGL Profile: OpenGLES."));
} else {
qWarning(("OpenGL Profile: NoProfile."));
}
} break;
case QSurfaceFormat::CoreProfile: {
qWarning(("OpenGL Profile: Core."));
} break;
case QSurfaceFormat::CompatibilityProfile: {
qWarning(("OpenGL Profile: Compatibility."));
} break;
}
return a.exec();
}
Yeah, it hangs in combination with scudo allocator from LLVM project. Removing the scudo allocator leads to memory never being released to the system when scrolling media in chats.
Okay, so it's a duplicate of https://github.com/telegramdesktop/tdesktop/issues/27618 (sorry, my google-fu failed to find that one initially)
Steps to reproduce
Expected behaviour
Telegram starts, tray icon is shown
Actual behaviour
Telegram takes like a minute to start. No tray icon
Tray icon appears after another few minutes or when someone sends you a message
Operating system
Fedora Linux KDE
Version of Telegram Desktop
4.16.2
Installation source
Flatpak
Crash ID
No response
Logs
relevant journalctl logs
This also happens with 4.15.2 from distro repo. log.txt from that version