32-bit GLX on 64 bit system

Questions about Wine on Linux
Locked
devuanuser
Newbie
Newbie
Posts: 2
Joined: Thu Dec 28, 2023 5:12 pm

32-bit GLX on 64 bit system

Post by devuanuser »

Not really a wine topic, but I can't find any help on this elsewhere.

System: AMD64 based system with 32 bit binary support.
Distro: Devuan 5.0 (i. e. Debian without systemd).
Kernel with support for 32 bit executables
amd64 + i386 multiarch architecture
wine 32 bit executable installed (but not 64 bit - doesn't make a difference anyway)
wine version 8.0
i386 libraries and glx drivers installed (see list below)
(restarted the X server)

When "wine" is used to run some 32 bit executable, it produces this error message:

$ wine program32.exe
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 312
Current serial number in output stream: 313

The same occurs when running "glxinfo" from the mesa-utils:i386 package:

$ glxinfo
...
Minor opcode of failed request: 3 (X_GLXCreateContext)
...

On the other hand, glxinfo from the 64 bit package runs fine. So, I assume the program running in Wine uses the 32 Xlib libraries which speak the 32 bit version of the X protocol to talk with an Xorg server that only understands the 64 bit X protocol. (Xorg-7.7). The Xorg server has no config file and detects hardware and available modules on its own.

So, how can this situation be resolved?



------


Packages:
libabsl20220623:i386 20220623.1-1
libaom3:i386 3.6.0-1
libasound2:i386 1.2.8-1+b1
libasyncns0:i386 0.8-6+b3
libatomic1:i386 12.2.0-14
libavif15:i386 0.11.1-1
libblkid1:i386 2.38.1-5devuan1+b1
libbrotli1:i386 1.0.9-2+b6
libbsd0:i386 0.11.7-2
libbz2-1.0:i386 1.0.8-5+b1
libc6:i386 2.36-9+deb12u3
libc6-dev:i386 2.36-9+deb12u3
libcap2:i386 1:2.66-4
libcapi20-3:i386 1:3.27-3+b1
libcom-err2:i386 1.47.0-2
libcrypt-dev:i386 1:4.4.33-2
libcrypt1:i386 1:4.4.33-2
libcurl4:i386 7.88.1-10+deb12u5
libdav1d6:i386 1.0.0-2
libdb5.3:i386 5.3.28+dfsg2-1
libdbus-1-3:i386 1.14.10-1~deb12u1devuan1
libde265-0:i386 1.0.11-1+deb12u1
libdeflate0:i386 1.14-1
libdrm-amdgpu1:i386 2.4.114-1+b1
libdrm-intel1:i386 2.4.114-1+b1
libdrm-nouveau2:i386 2.4.114-1+b1
libdrm-radeon1:i386 2.4.114-1+b1
libdrm2:i386 2.4.114-1+b1
libdw1:i386 0.188-2.1
libedit2:i386 3.1-20221030-2
libegl-mesa0:i386 22.3.6-1+deb12u1
libegl1:i386 1.6.0-1
libelf1:i386 0.188-2.1
libelogind-compat:i386 246.10-5
libelogind0:i386 246.10-5
libeudev1:i386 3.2.12-4+deb12u1
libexif12:i386 0.6.24-1+b1
libexpat1:i386 2.5.0-1
libffi8:i386 3.4.4-1
libflac12:i386 1.4.2+ds-2
libfontconfig1:i386 2.14.1-4
libfreetype6:i386 2.12.1+dfsg-5
libgav1-1:i386 0.18.0-1+b1
libgbm1:i386 22.3.6-1+deb12u1
libgcc-s1:i386 12.2.0-14
libgd3:i386 2.3.3-9
libgettextpo0:i386 0.21-12
libgl1:i386 1.6.0-1
libgl1-mesa-dri:i386 22.3.6-1+deb12u1
libgl1-mesa-glx:i386 22.3.6-1+deb12u1
libglapi-mesa:i386 22.3.6-1+deb12u1
libgles2:i386 1.6.0-1
libglib2.0-0:i386 2.74.6-2
libglvnd0:i386 1.6.0-1
libglx-mesa0:i386 22.3.6-1+deb12u1
libglx0:i386 1.6.0-1
libgmp10:i386 2:6.2.1+dfsg1-1.1
libgnutls30:i386 3.7.9-2+deb12u1
libgphoto2-6:i386 2.5.30-1
libgphoto2-port12:i386 2.5.30-1
libgssapi-krb5-2:i386 1.20.1-2+deb12u1
libgstreamer-plugins-base1.0-0:i386 1.22.0-3+deb12u1
libgstreamer1.0-0:i386 1.22.0-2
libheif1:i386 1.15.1-1
libhogweed6:i386 3.8.1-2
libicu72:i386 72.1-3
libidn2-0:i386 2.3.3-1+b1
libjbig0:i386 2.1-6.1
libjpeg62-turbo:i386 1:2.1.5-2
libk5crypto3:i386 1.20.1-2+deb12u1
libkeyutils1:i386 1.6.3-2
libkrb5-3:i386 1.20.1-2+deb12u1
libkrb5support0:i386 1.20.1-2+deb12u1
libldap-2.5-0:i386 2.5.13+dfsg-5
liblerc4:i386 4.0.0+ds-2
libllvm15:i386 1:15.0.6-4+b1
libltdl7:i386 2.4.7-5
liblzma5:i386 5.4.1-0.2
libmd0:i386 1.0.4-2
libmount1:i386 2.38.1-5devuan1+b1
libmp3lame0:i386 3.100-6
libmpg123-0:i386 1.31.2-1
libnettle8:i386 3.8.1-2
libnghttp2-14:i386 1.52.0-1+deb12u1
libnsl-dev:i386 1.3.0-2
libnsl2:i386 1.3.0-2
libnuma1:i386 2.0.16-1
libogg0:i386 1.3.5-3
libopus0:i386 1.3.1-3
liborc-0.4-0:i386 1:0.4.33-2
libp11-kit0:i386 0.24.1-2
libpcap0.8:i386 1.10.3-1
libpciaccess0:i386 0.17-2
libpcre2-8-0:i386 10.42-1
libpng16-16:i386 1.6.39-2
libpsl5:i386 0.21.2-1
libpulse0:i386 16.1+dfsg1-2+b1
librav1e0:i386 0.5.1-6
librtmp1:i386 2.4+20151223.gitfa8646d.1-2+b2
libsasl2-2:i386 2.1.28+dfsg-10
libsasl2-modules-db:i386 2.1.28+dfsg-10
libselinux1:i386 3.4-1+b6
libsensors5:i386 1:3.6.0-7.1
libsndfile1:i386 1.2.0-1
libssh2-1:i386 1.10.0-3+b1
libssl3:i386 3.0.11-1~deb12u2
libstdc++6:i386 12.2.0-14
libtasn1-6:i386 4.19.0-2
libtiff6:i386 4.5.0-6+deb12u1
libtinfo6:i386 6.4-4
libtirpc-dev:i386 1.3.3+ds-1
libtirpc3:i386 1.3.3+ds-1
libunistring2:i386 1.0-2
libunwind8:i386 1.6.2-3
libusb-1.0-0:i386 2:1.0.26-1
libvorbis0a:i386 1.3.7-1
libvorbisenc2:i386 1.3.7-1
libvulkan1:i386 1.3.239.0-1
libwayland-client0:i386 1.21.0-1
libwayland-egl1:i386 1.21.0-1
libwayland-server0:i386 1.21.0-1
libwebp7:i386 1.2.4-0.2+deb12u1
libwine:i386 8.0~repack-4
libwine-dev:i386 8.0~repack-4
libx11-6:i386 2:1.8.4-2+deb12u2
libx11-xcb1:i386 2:1.8.4-2+deb12u2
libx265-199:i386 3.5-2+b1
libxau6:i386 1:1.0.9-1
libxcb-dri2-0:i386 1.15-1
libxcb-dri3-0:i386 1.15-1
libxcb-glx0:i386 1.15-1
libxcb-present0:i386 1.15-1
libxcb-randr0:i386 1.15-1
libxcb-shm0:i386 1.15-1
libxcb-sync1:i386 1.15-1
libxcb-xfixes0:i386 1.15-1
libxcb1:i386 1.15-1
libxdmcp6:i386 1:1.1.2-3
libxext6:i386 2:1.3.4-1+b1
libxfixes3:i386 1:6.0.0-2
libxml2:i386 2.9.14+dfsg-1.3~deb12u1
libxpm4:i386 1:3.5.12-1.1+deb12u1
libxshmfence1:i386 1.3-1
libxxf86vm1:i386 1:1.1.4-1+b2
libyuv0:i386 0.0~git20230123.b2528b0-1
libz3-4:i386 4.8.12-3.1
libzstd1:i386 1.5.4+dfsg2-5
linux-libc-dev:i386 6.1.67-1
mesa-utils:i386 8.5.0-1
mesa-utils-bin:i386 8.5.0-1
ocl-icd-libopencl1:i386 2.3.1-1
wine32:i386 8.0~repack-4
wine32-preloader:i386 8.0~repack-4
wine32-tools:i386 8.0~repack-4
zlib1g:i386 1:1.2.13.dfsg-1
invisible kid
Level 5
Level 5
Posts: 359
Joined: Tue Dec 24, 2019 3:23 pm

Re: 32-bit GLX on 64 bit system

Post by invisible kid »

<deleted> Hope you get it going!
devuanuser
Newbie
Newbie
Posts: 2
Joined: Thu Dec 28, 2023 5:12 pm

Re: 32-bit GLX on 64 bit system

Post by devuanuser »

No luck. I even tried tried to install the X server from the i386 repository instead of amd64, but still the GLX stuff fails to work. I think it just doesn't run in a multiarch setup.

The only solution was to install an i386 Linux on a spare partition on the main disk. This was a major challenge because the UEFI implementation of my hardware doesn't allow to boot from the USB stick (possibly fault of the stick), and also refused to boot the Devuan i386 live image from a DVD (USB too).

Solution step by step using a temporary VM:
Warning: These instructions require good knowledge of the console, virtualisation, boot loaders and the Linux system in general.

1) Downloaded the minimal live Devuan-5.0 (Deadalus) image for i386.

2) Prepared a spare external disk, i.e. erased the partition table. It does not matter what partition table format. Created a single partition without a file system using some system tool, e. g. fdisk or some graphical tool.

3) To get the name of the external disk, run

Code: Select all

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
...
sdf           8:80   0 111.8G  0 disk 
`-sdf1        8:81   0   100G  0 part 
...
This is the name outside of the VM

4) Make sure qemu for i386 guests is installed (packet qemu-system-x86 on Debian systems). (For further instructions on using and installing qemu, see its manual).

5) Use qemu to boot the downloaded image in a virtual machine (as root):

Code: Select all

 $ qemu-system-i386 -m size=1G -vga std -display gtk \
-enable-kvm -cpu host \
-drive file=devuan_daedalus_5.0.0_i386_minimal-live.iso,media=cdrom \
-drive file=device-name,media=disk -boot menu=on
(Use device-name from the lsblk outpu, e. g. /dev/sdf in this case)

6) That boots the live CD in the VM. The partition from the host system is now available as e. g. /dev/sda. Log in as root (password 'toor') and check the device name with lsblk again:

Code: Select all

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
...
sda           ...   0 111.8G  0 disk 
`-sda1        ...   0   100G  0 part 
...
7) Make double sure that the disk is the one you expect and has no listed partitions. Installation will erase that partition, and you don't want that happenung on the wrong partition of your running system disk.

8) Run the tool to install the live image on the partition.

Code: Select all

$ refractainstaller
It asks a lot of questions about the system setup:

* Don't install a bootloader.
* Use /dev/sda (see lsblk output) as the installadion device.
* Use /dev/sda1 (see above) as the target partition.
* Don't repartiotion the external disk.
* Tell it to not use UUIDs in /etc/fstab. (This is because the system will be moved to the primary hard disk later.)

9) Finish the installation, wait until everything has been synced to the external disk and shut down the vm ("halt" command as root).
Last edited by devuanuser on Wed Jan 03, 2024 5:00 am, edited 2 times in total.
devuanuser
Newbie
Newbie
Posts: 2
Joined: Thu Dec 28, 2023 5:12 pm

Re: 32-bit GLX on 64 bit system

Post by devuanuser »

10) Go back to the host system and prepare a spare partition on the internal disk, say "/dev/sda7" with an ext4 filesystem.

11) Mount the internal and external partitions on some mountpoints, say

(as root)

Code: Select all

$ mkdir /mnt.int
$ mkdir /mnt.ext
$ mount /dev/sda7 /mnt.int
$ mount /dev/sdf1 /mnt.ext
Double check that /mnt.ext contains the newly installed i386 system and /mnt.int is empty.

12) Copy the system from the external disk to the internal partition:

Code: Select all

$ cd /mnt.ext
$ cp -aR . /mnt/int
13) Sync and unmount both disks.

14) Configure the bootloader on your system to boot the i386 partition with the Linux kernel that was installed on that partition. Sorry, no instructions here, depends on the boot loader.

15) Boot the i386 system, install a display manager, wine, configure the system etc.
Last edited by devuanuser on Wed Jan 03, 2024 5:05 am, edited 1 time in total.
invisible kid
Level 5
Level 5
Posts: 359
Joined: Tue Dec 24, 2019 3:23 pm

Re: 32-bit GLX on 64 bit system

Post by invisible kid »

Here is a simple hello world program built in 32 bit and 64 bit versions, if this will help debug your issue(it might not help).

Code: Select all

tar -xvf files.tar.gz
./hello_world-32_bit
./hello_world-64_bit
Attachments
files.tar.gz
(6.29 KiB) Downloaded 115 times
Locked