Update QT under Windows

Well, another lesson in How To Complicate Things ™. Could be as easy as pacman -Syu, run qmake and recompile all, but far from it 🙁

  1. Run MaintenanceTool.exe. Of course it has no entry in the start menu, why should it. But it’s easy to find: C:\Qt\MaintenanceTool.exe
  2. Skip the first page, you don’t need an account. God, how I hate this shit!
  3. On the next page, select “Add or remove components”. “Update components” will only update your *current* version. To install a *new* version, you have select the first option.
  4. Wait…
  5. Select the version you want to install and wait, but take a look while it’s installing. Ignore the errors, it’ll work anyway

Once the installer finished with errors, open QtCreator and load your project. Now you have to manage your “Kit”. Select “Project” on the left sidebar, “Build & Run” on top and then click “Manage kits…”

  • Click “Add” and select the new version for “Debugger” and “Qt version”
  • Give it a “Name:”. Best to copy the string from the Auto-detected version
  • Apply
  • Now change the Kit of your project to the new one. The thingy above “Build|Run” right beside “Manage Kits…” is a drop down box, even if it doesn’t look like it
  • Change the build directory accordingly
  • Clear the environment by selecting “Build” instead of “Run”. Then expand “Build Environment” at the bottom and check “Clear system environment”
  • Select “Run” and set “Base environment for this configuration” to “Build environment”

If you don’t need SQL-Plugins, clean all, run qmake and compile. If you need access to, say, a Postgres-DB, the fun doesn’t end yet. To connect to the database, you have to add the directory with libpq.dll to the PATH. Yes, to the PATH environment variable! WTF? For now that would be “C:\psql\9.5\bin”.

If you create a new project, don’t forget to add

QT       += sql
LIBS     += "C:\psql\9.5\lib\libpq.lib"

to you .pro-file.

If you build a release, don’t forget to copy the dll-files to the release directory. For a QT-Gui application those would be at least:

  • libeay32.dll
  • libecpg.dll
  • libecpg_compat.dll
  • libgcc_s_dw2-1.dll
  • libiconv-2.dll
  • libintl-8.dll
  • libpgtypes.dll
  • libpq.dll
  • libstdc++-6.dll
  • libwinpthread-1.dll
  • libxml2.dll
  • libxslt.dll
  • Qt5Core.dll
  • Qt5Gui.dll
  • Qt5Sql.dll
  • Qt5Widgets.dll
  • ssleay32.dll
  • zlib1.dll

Well, I hope I didn’t forget anything. See you next time!

NVIDIA: Failed to initialize the GLX module

Another fallout from the dbus adventure: After I had othalla up and running again, I noticed that the graphic performance was really bad. Playing movies wasn’t moving at all, it was more like a slideshow.

Xorg.0.log said:

[  4978.363] (EE) NVIDIA(0): Failed to initialize the GLX module; please check in your X 
[  4978.363] (EE) NVIDIA(0):     log file that the GLX module has been loaded in your X 
[  4978.363] (EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If 
[  4978.363] (EE) NVIDIA(0):     you continue to encounter problems, Please try 
[  4978.363] (EE) NVIDIA(0):     reinstalling the NVIDIA driver.

Strange… Turns out X loaded the xorg glx module from /usr/lib/xorg/modules/extensions instead the right one from /usr/lib/nvidia/xorg. No idea why, but adding:

Section "Files" 
    ModulePath      "/usr/lib/nvidia/xorg"
    ModulePath      "/usr/lib/xorg/modules"
...
EndSection

to xorg.conf before the regular path /usr/lib/xorg/modules fixed it.

 

BIOS Update

Since installing my new Ryzen System, hadante is acting up a little. Spontaneous reboots or crashes, things like that. During my latest debugging session I thought that maybe a BIOS/UEFI update would help. Sure enough ASUS provided one for my superduper PRIME X370-PRO board. Changelog: “Improve system stability”. Wow, any more information and my brain would explode! Anyway, worth a try…

This UEFI-Crap-Thingy said that it could connect to the Internet via DHCP. Since Vodafone does DHCP it shouldn’t be a problem, right? WRONG! After freezing for a minute or two it says that there’s no network connectivity. Silly me, what did I expect?

OK, there’s an option for USB-devices. FAT32 with a single partition only, but fortunately I have such a beast. So download the new BIOS, copy it to the USB-stick, reboot and… Nothing! Nothing but a black screen after pressing F2 and/or DEL. Cold sweat, Shit! Did I just brick my board? No, after unplugging the USB-stick I can enter the BIOS again, and it even boots. Phew!

But I’m adventurous. New idea: The board only has USB3.0 slots, so let’s try an USB3-stick. So reboot, mount everything, copy the BIOS image to the USB3-stick, reboot, and cross fingers.

Lo and behold: The BIOS has landed! I can select the USB-Stick from the EZ-Update-Tool and see the image file. It gets even better: The UEFI-Crap installs it without complaints!

All settings are reset to default, but I didn’t change much. Just turn on SVM again, fix the boot order and set all SATA ports except the SSD’s to hotplug. Exit and reset, crossing fingers and… PXE boot. WTF? Another hard reset later we have GRUB!

Let’s hope the update keeps its promises!

[UPDATE 2017/06/18 4:40AM]: Well, it doesn’t 🙁 I was working with libreoffice when suddenly the system lost power. It just turned off, like pressing the power button. The LED-thingy on the motherboard was still on, but nothing more. To turn it on again, I had to flip the switch on the PSU first. Just pushing the ACPI-Power-Button wouldn’t revive the system. Fortunately the RAID survived it. Has to be some BIOS setting. Can’t be the temperature, though. Voltage, maybe?

DBUS Crap

After today’s (2017/06/16) usual pacman -Syu & systemctl reboot the shit hit the fan. SDDM started up fine, but when I tried to login, nothing happened for a while until I got a nice X11-Widget right from the 80’s telling me that something “could not sync environment to dbus”. Yeah, sure! WTF!?

First stop: Google. I’m not the only one. For some reason I can’t just “startkde” any more, but have to use “dbus-launch startkde” in /usr/share/xsessions/plasma.desktop (that’s where SDDM gets the sessions from). Easy enough. KDE loads and seems to work, but it doesn’t really. Any connection attempt to the session bus fails: can’t connect to the ssh-agent even though it’s started, can’t do systemctl –user <something>, pulseaudio doesn’t work and so on… Craptastic!

Maybe it’s some cruft in ~/.config or ~/.session. Move both away, and just to make sure, ~/.cache, too. One swift reboot later it’s work… Fuck, same shit! While skimming through wiki-pages and forum-posts on my mobile, I read the suggestion to try a new user. OK, can’t hurt, can it?

Yes, it kinda can! Of course that works! Well, at least one way out. So, create a new user and port all settings there. Oh what fun! Well, I learned a lot of lessons, like:

  • If you have an USB2 stick plugged in, entering the UEFI-Crap-Thingy what’s now called BIOS doesn’t work (or takes an eternity, maybe I didn’t wait long enough). At least it still boots if you don’t hit DEL or F2
  • The ssh-agent.service for users is hand-crafted (or stolen from somewhere, I don’t remember). You must have $SSH_AUTH_SOCK set in your .bashrc (the latter is sourced by SDDM, BTW) to make it work.
  • Sometimes it ain’t so bad to have Google accounts. After logging in with Chromium, my bookmarks and extensions were back almost immediately.
  • To start a synergy Server, all you have to do is “systemctl –user enable synergys.service”, if you have a working config in /etc/synergys.conf. Starting the client is another beast, though…
  • How to copy and modify the beet database (stored in $HOME/.config/beets/musiclib.blb in my case):
$ ~/.config/beets $ sqlite3 musiclib.blb
SQLite version 3.19.3 2017-06-08 14:26:16 
Enter ".help" for usage hints. 
sqlite> update items set path = replace(path, '<oldhome>', '<newhome>');
  • You don’t have to fire up QtCreator if rdpk starts and exits immediately. If you tell xfreerdp to use pulseaudio and there’s no daemon running, it will do just that…
  • For some reason, letting minidlnad reindex everything is much, much faster than letting it read the database on startup
  • LibreOffice macros are stored in $HOME/.config/libreoffice/4/user/basic/Standard/Module1.xba for now. You can just copy that file to the new $HOME and have fun with it after restarting it

Maybe it was a good thing ™ to get rid of all the baggage, I don’t know… Sure enough, it happened on othalla, too 🙁