Bug 19799 - qt5 stack must be checked for sse2 code in 32bit builds
: qt5 stack must be checked for sse2 code in 32bit builds
Status: ASSIGNED
Product: Mageia
Classification: Unclassified
Component: RPM Packages
: Cauldron
: i586 Linux
: High Severity: normal
: Mageia 6
Assigned To: KDE maintainers
:
:
:
:
:
: 19258 19942
  Show dependency treegraph
 
Reported: 2016-11-16 16:06 CET by Thomas Backlund
Modified: 2017-03-22 14:02 CET (History)
4 users (show)

See Also:
Source RPM: qt5 stack
CVE:
Status comment:


Attachments
Plasma desktop png (831.31 KB, image/png)
2017-02-09 09:05 CET, Charles Edwards
Details

Description Thomas Backlund 2016-11-16 16:06:38 CET
qt5 stack nowdays defaults to sse2 support on 32bit builds.

But as Mageia supports i586 as our base 32bit platform, we cant require sse2 hw, as a lot of older i586 capable hw out there does not support sse2.

Now this seems to have been done properly in qtbase5
(see the references to https://bugreports.qt.io/browse/QTBUG-35430 in spec)

but other packages like qtdeclarative5 has references to sse2 in source, with no buildconf to disable sse2 in mageia build as fa as I can see...

So all qt packages should be reviewed and fixed for this as trying a sse2 command on non-sse2 can trigger segfaults /crashes also in other packages depending on qt
Comment 1 Nicolas Lécureuil 2016-12-03 22:05:07 CET
i think we need to add: 

%ifarch %ix86
    -no-sse2 \
%endif

in other qt5 packages
Comment 2 Charles Edwards 2016-12-11 19:09:23 CET
Something in the qt5 stack IS still requiring sse2.

On and up-to-date Mga6 i586 system with an Athlon XP 3200+ which Does Not support
sse2, plasma wil not run.

When I try to launch plasma from the DM all I get is a screen with the Mga background and a movable cursor nothing else.
I can switch to another tty and restart the DM launch gnome, xfce, lxde, etc;
and they all run without problem.

The issue also occurred when testing the pre-test Mageia-6-sta2-LiveDVD-Plasma-i586-DVD.
Comment 3 Martin Whitaker 2016-12-13 10:07:24 CET
Using QEMU, I have confirmed Charles's deduction that sse2 is to blame. Using

qemu-system-i386 -cdrom Mageia-6-sta2-LiveDVD-Plasma-i586-DVD/Mageia-6-sta2-LiveDVD-Plasma-i586-DVD.iso -m 4G --enable-kvm -vga std -cpu qemu32

and forcing xdriver=modesetting, I can boot to a working desktop. Changing the -cpu option to "qemu32,-sse2" reproduces the behaviour Charles reports (eventually the Mageia Welcome screen gets displayed, but no desktop).
Comment 4 Samuel Verschelde 2016-12-13 11:49:55 CET
Assigned to David Geiger as decided during the KDE Maintainer Group meeting.
Comment 5 Charles Edwards 2016-12-14 06:49:22 CET
Because it is built using the qt5 stack this bug applies also to sddm.
It will not work on a system whose CPU does not support see2.
Comment 6 Samuel Verschelde 2017-01-09 14:44:35 CET
David, Nicolas, any progress, any ETA?
Comment 7 David GEIGER 2017-01-11 17:40:06 CET
Sorry I don't know how to fix that properly, so if someone else can do this job it would be great.
Comment 8 Nicolas Lécureuil 2017-01-12 17:30:39 CET
i don't think we have any sse2 enabled now ( please test new rpms ).
Comment 9 Charles Edwards 2017-01-12 19:25:39 CET
The issue still very much exists.


I just tested on a drive with a new Mga6 install and tested again on this established and fully up-to-date Mga6 installation.
Both installations are on seperate drives in the same system.

[charles@XP3200 ~]$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Vendor ID:             AuthenticAMD
CPU family:            6
Model:                 10
Model name:            AMD Athlon(tm) XP 3200+
Stepping:              0
CPU MHz:               1837.000
CPU max MHz:           1837.0000
CPU min MHz:           1287.0000
BogoMIPS:              3674.02
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow eagerfpu 3dnowprefetch vmmcall

1st Big red flag....if I try to use sddm as DM all I get is is an empty black screen.

When I use lxdm I can select plasma and login....but then all I get is the default Mga6 background screen with a movable mouse cursor and nothing else.
If I continue to let it run a small black square eventually appears in the top left hand corner of the Mga6 background.

I can run gnome, xfce4, lxde, at el on this system, though gnome is sluggish so I primarily use xfce4 or lxde.
Comment 10 Marja van Waes 2017-01-12 22:51:52 CET
Btw, the 32bit and noarch packages provided by qtdeclarative5-5.6.2-2.mga6.srpm, that was pushed by neoclust to fix this issue, are:


    libqt5qml-devel-5.6.2-2.mga6.i586
    libqt5qml5-5.6.2-2.mga6.i586
    libqt5quick-devel-5.6.2-2.mga6.i586
    libqt5quick5-5.6.2-2.mga6.i586
    libqt5quickparticles-devel-5.6.2-2.mga6.i586
    libqt5quickparticles5-5.6.2-2.mga6.i586
    libqt5quicktest-devel-5.6.2-2.mga6.i586
    libqt5quicktest5-5.6.2-2.mga6.i586
    libqt5quickwidgets-devel-5.6.2-2.mga6.i586
    libqt5quickwidgets5-5.6.2-2.mga6.i586
    qtdeclarative5-5.6.2-2.mga6.i586
    qtdeclarative5-doc-5.6.2-2.mga6.noarch 

@ Charles

You knew that and you made sure you have version 5.6.2-2.mga6 for each of them that's installed, didn't you?
Comment 11 Charles Edwards 2017-01-12 23:07:59 CET
(In reply to Marja van Waes from comment #10)
> Btw, the 32bit and noarch packages provided by
> qtdeclarative5-5.6.2-2.mga6.srpm, that was pushed by neoclust to fix this
> issue, are:
> 
> 
>     libqt5qml-devel-5.6.2-2.mga6.i586
>     libqt5qml5-5.6.2-2.mga6.i586
>     libqt5quick-devel-5.6.2-2.mga6.i586
>     libqt5quick5-5.6.2-2.mga6.i586
>     libqt5quickparticles-devel-5.6.2-2.mga6.i586
>     libqt5quickparticles5-5.6.2-2.mga6.i586
>     libqt5quicktest-devel-5.6.2-2.mga6.i586
>     libqt5quicktest5-5.6.2-2.mga6.i586
>     libqt5quickwidgets-devel-5.6.2-2.mga6.i586
>     libqt5quickwidgets5-5.6.2-2.mga6.i586
>     qtdeclarative5-5.6.2-2.mga6.i586
>     qtdeclarative5-doc-5.6.2-2.mga6.noarch 
> 
> @ Charles
> 
> You knew that and you made sure you have version 5.6.2-2.mga6 for each of
> them that's installed, didn't you?

I made sure both the installation were fully up-to-date

[charles@XP3200 ~]$ rpm -qa |grep libqt5quick
libqt5quickparticles5-5.6.2-2.mga6
libqt5quick5-5.6.2-2.mga6
libqt5quickwidgets5-5.6.2-2.mga6
libqt5quicktest5-5.6.2-2.mga6
[charles@XP3200 ~]$ rpm -qa |grep qtdeclarative5
qtdeclarative5-5.6.2-2.mga6
[charles@XP3200 ~]$ rpm -qa |grep libqt5qml
libqt5qml5-5.6.2-2.mga6
Comment 12 Nicolas Lécureuil 2017-01-20 13:35:27 CET
how can i test this on VBox ?
Comment 13 Thomas Backlund 2017-01-20 13:47:12 CET
IIRC something like this to modufy the vm you are testing with:

VBoxManage modifyvm <vm_name> --cpuidremove sse2
Comment 14 Nicolas Lécureuil 2017-01-20 14:18:52 CET
does not work, i obtain 


VBoxManage: error: 

asking on VBox irc channel, they told me this is not possible to do this kind of actions :/
Comment 15 Martin Whitaker 2017-01-21 00:40:45 CET
Try using qemu, as described in comment 3. "-cpu qemu32,-sse2" emulates a CPU *without* SSE2 instructions.
Comment 16 Nicolas Lécureuil 2017-01-28 16:40:14 CET
testing now :)
Comment 17 Nicolas Lécureuil 2017-01-28 23:44:17 CET
just tried and in lscpu i don't have see2.

Plasma starts, i can open the menu, dolphin, etc.
Comment 18 Nicolas Lécureuil 2017-01-28 23:50:01 CET
# LC_ALL=C lscpu
Architecture:          i686
CPU op-mode(s):        32-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 5
Model name:            Pentium II (Deschutes)
Stepping:              2
CPU MHz:               1995.379
BogoMIPS:              3990.75
Hypervisor vendor:     KVM
Virtualization type:   full
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 mmx fxsr eagerfpu x2apic hypervisor
Comment 19 Charles Edwards 2017-01-29 01:16:26 CET
I don't know what to tell you.

I did a new clean install on a brand new drive on my test system this afternoon and still have the same issues.
Neither sddm or plasma will run|work on that system but other tested DMs and WMs
will work.

I'm not, but if you are convinced that there is no SSE2 issue you are welcome to close this bug as "Works for me"

We can look at re-opening should other users report similar problems.
Comment 20 Charles Edwards 2017-02-09 09:04:07 CET
I have not forgotten about this bug.

I just booted the pre-testing Mageia-6-sta2-LiveDVD-GNOME-x86_64-DVD.iso
on my Athlon XP3200+ to see if the outcome is the same.

Am attaching a picture taken from my phone of my plasma desktop.
How does it look to you?
Comment 21 Charles Edwards 2017-02-09 09:05:45 CET
Created attachment 8942 [details]
Plasma desktop png
Comment 22 Martin Whitaker 2017-03-14 23:49:51 CET
I've just tested this by building a 32-bit Live Plasma DVD and running in qemu with sse2 disabled. Everything works for me. Maybe what Charles is seeing is a video driver problem.

@Charles, is this the system which had problems when I switched the GNOME default from Wayland to Xorg?
Comment 23 Charles Edwards 2017-03-15 00:10:52 CET
(In reply to Martin Whitaker from comment #22)
> I've just tested this by building a 32-bit Live Plasma DVD and running in
> qemu with sse2 disabled. Everything works for me. Maybe what Charles is
> seeing is a video driver problem.
> 
> @Charles, is this the system which had problems when I switched the GNOME
> default from Wayland to Xorg?

Yes it is.

But as it applies to plasma I've tried with both nvidia cards, nouveau and nvidia304 driver, and with ati cards, ati driver; and none could run plasma
or sddm.

If no one else sees or can reproduce this problem I would have no issue with the bug being closed as "Works for me".
Comment 24 Nicolas Lécureuil 2017-03-21 14:49:20 CET
i don't pass to find any "non see2" machine here :(  i installed on really old machines ( like P4 2.8Ghz ) and it has sse2.

Note You need to log in before you can comment on or make changes to this bug.