FS#66652 - [simplescreenrecorder] doesn't detect X session correctly

Attached to Project: Community Packages
Opened by viktor (dviktor) - Thursday, 14 May 2020, 22:01 GMT
Last edited by Kyle Keen (keenerd) - Tuesday, 19 May 2020, 02:51 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Kyle Keen (keenerd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

My last update was on 01.05.2020 and after that I've updated on 11.05.2020. Here are list of relevant packages which were updated (actually looks like simple `pkgrel` bump with the exception of `adwaita-qt` theme):
- qt5-base (5.14.2-1 -> 5.14.2-2)
- qt5-location (5.14.2-1 -> 5.14.2-2)
- qt5-webengine (5.14.2-1 -> 5.14.2-3)
- qt5-webkit (5.212.0alpha4-3 -> 5.212.0alpha4-4)
- adwaita-qt (1.1.1-1 -> 1.1.2-1)
- xorg-xset (1.2.4-1 -> 1.2.4-2)
- xorg-bdftopcf (1.1-1 -> 1.1-2)
- xorg-server-common (1.20.8-1 -> 1.20.8-2)
- xorg-server (1.20.8-1 -> 1.20.8-2)
- xorg-xmessage (1.0.5-1 -> 1.0.5-2)

I'm on cinnamon 4.6.0-2 (cinnamon-session 4.6.0-1) and it starts with `exec cinnamon-session` incantation in `.xinitrc`. Today when I started SimpleScreenRecorder (ver 0.4.1-1) it complained about non-X11 session:
```
You are using a non-X11 window system (e.g. Wayland) which is currently not supported by SimpleScreenRecorder. Several features will most likely not work properly. In order to solve this, you should log out, choose a X11/Xorg session at the login screen, and then log back in.
```

Some investigation lead me to a simplest check which gives false result:
```
#include <QtCore/QtCore>
#include <QtX11Extras/QX11Info>
#include <iostream>

int main(int argc, char *argv[]) {
std::cout << "Qt version: " << qVersion() << std::endl;
std::cout << "Are we using X11? " << QX11Info::isPlatformX11() << std::endl;

return 0;
}
```
After compiling it with `g++ -o main main.cpp -I/usr/include/qt -lQt5Core -lQt5X11Extras -fPIC` and running I have the following result:
```
Qt version: 5.14.2
Are we using X11? 0
```

Seems like a regression in some package after update
This task depends upon

Closed by  Kyle Keen (keenerd)
Tuesday, 19 May 2020, 02:51 GMT
Reason for closing:  Fixed
Additional comments about closing:  simplescreenrecorder 0.4.2-1
Comment by Antonio Rojas (arojas) - Friday, 15 May 2020, 09:44 GMT
Your test program is always going to return 0 since it's not using X

Also, there has just been a major cinnamon update, so what makes you think that this has anything to do with the Qt rebuild instead?
Comment by viktor (dviktor) - Friday, 15 May 2020, 09:48 GMT
Exactly the same method is used by SimpleScreenRecorder to detect whether X11 is used so I've just adopted it.
I'll post an issue on Cinnamon's GitHub too.
Comment by viktor (dviktor) - Friday, 15 May 2020, 11:42 GMT
I've filed a bug (https://github.com/linuxmint/cinnamon/issues/9309). They said that qt5-wayland should be removed. Unfortunately, doing this doesn't solve the problem
Comment by viktor (dviktor) - Friday, 15 May 2020, 12:12 GMT
Rebuild of git-version from AUR with new GCC solves the problem:

qt5ct: using qt5ct plugin
==================== Программа SSR запущена ====================
SimpleScreenRecorder 0.4.1
Compiled with GCC 10.1.0
Qt: header 5.14.2, lib 5.14.2
libavformat: header 58.29.100, lib 58.29.100
libavcodec: header 58.54.100, lib 58.54.100
libavutil: header 56.31.100, lib 56.31.100
libswscale: header 5.5.100, lib 5.5.100
[CPUFeatures::Detect] Характеристики ЦП: mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 bmi1 bmi2
[ALSAInput::GetSourceList] Создание списка источников...
[ALSAInput::GetSourceList] Найдена карта: [hw:0] HDA Intel PCH
[ALSAInput::GetSourceList] Найдено устройство: [hw:0,0] HDA Intel PCH: ALC255 Analog
[PulseAudioInput::GetSourceList] Создание списка источников...
[SourceNamesCallback] Найден источник: [alsa_output.pci-0000_00_1f.3.analog-stereo.monitor] Monitor of Встроенное аудио Аналоговый стерео
[SourceNamesCallback] Найден источник: [GQRX_out.monitor] Monitor of Output_from_GQRX
qt5ct: D-Bus system tray: no
Comment by Antonio Rojas (arojas) - Friday, 15 May 2020, 12:14 GMT
Rebuild of what?
Comment by viktor (dviktor) - Friday, 15 May 2020, 12:15 GMT
I've just built SimpleScreenRecorder (git version) from AUR with new compilers
Comment by viktor (dviktor) - Friday, 15 May 2020, 12:15 GMT
I think it's enough to rebuild SSR in official repos
Comment by Antonio Rojas (arojas) - Friday, 15 May 2020, 12:20 GMT
Please test if rebuilding the *official* package (not the git version) works.
Comment by viktor (dviktor) - Friday, 15 May 2020, 12:20 GMT
No, I was wrong. Rebuild from official repo still doesn't solve the problem

qt5ct: using qt5ct plugin
==================== Программа SSR запущена ====================
SimpleScreenRecorder 0.4.1
Compiled with GCC 10.1.0
Qt: header 5.14.2, lib 5.14.2
libavformat: header 58.29.100, lib 58.29.100
libavcodec: header 58.54.100, lib 58.54.100
libavutil: header 56.31.100, lib 56.31.100
libswscale: header 5.5.100, lib 5.5.100
[CPUFeatures::Detect] Характеристики ЦП: mmx sse sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2 bmi1 bmi2
[ALSAInput::GetSourceList] Создание списка источников...
[ALSAInput::GetSourceList] Найден подключаемый модуль: [samplerate] Rate Converter Plugin Using Samplerate Library
[ALSAInput::GetSourceList] Найден подключаемый модуль: [speexrate] Rate Converter Plugin Using Speex Resampler
[ALSAInput::GetSourceList] Найден подключаемый модуль: [jack] JACK Audio Connection Kit
[ALSAInput::GetSourceList] Найден подключаемый модуль: [oss] Open Sound System
[ALSAInput::GetSourceList] Найден подключаемый модуль: [speex] Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
[ALSAInput::GetSourceList] Найден подключаемый модуль: [upmix] Plugin for channel upmix (4,6,8)
[ALSAInput::GetSourceList] Найден подключаемый модуль: [vdownmix] Plugin for channel downmix (stereo) with a simple spacialization
[ALSAInput::GetSourceList] Найден подключаемый модуль: [usbstream] USB Stream Output
[ALSAInput::GetSourceList] Найдена карта: [hw:0] HDA Intel PCH
[ALSAInput::GetSourceList] Найдено устройство: [hw:0,0] HDA Intel PCH: ALC255 Analog
[PulseAudioInput::GetSourceList] Создание списка источников...
[SourceNamesCallback] Найден источник: [alsa_output.pci-0000_00_1f.3.analog-stereo.monitor] Monitor of Встроенное аудио Аналоговый стерео
[SourceNamesCallback] Найден источник: [GQRX_out.monitor] Monitor of Output_from_GQRX
qt5ct: D-Bus system tray: no
Comment by viktor (dviktor) - Friday, 15 May 2020, 12:25 GMT
Sure, here is (https://github.com/MaartenBaert/ssr/issues/781) issue about that

Loading...