Closed MattiaSilvestri closed 3 years ago
As already written in https://github.com/awesomeWM/awesome/issues/3394#issuecomment-882297613: LGI does not work with Gtk 4 and this is a duplicate of #226. Sorry.
This case might be a bit different, GTK4 (4.2.1 in my example) installed alongside GTK3 (3.24.30)
After temporarily removing gtk4 package ( pacman -Rdd gtk4
), and while not changing anything else in the system LGI works fine on my system.
Then I noticed that gtk4 adds files to girepository so I installed gtk4 back and removed those typelibs:
/usr/lib/girepository-1.0/Gdk-4.0.typelib
/usr/lib/girepository-1.0/GdkWayland-4.0.typelib
/usr/lib/girepository-1.0/GdkX11-4.0.typelib
/usr/lib/girepository-1.0/Gsk-4.0.typelib
/usr/lib/girepository-1.0/Gtk-4.0.typelib
And that makes chdkptp
work with both gtk3 and gtk4 installed!
After failing to mask those files (with GI_TYPELIB_PATH
), I got an error that points to lgi/namespace.lua:158
loading both GTK3 and GTK4 typelibs which seems to be a root cause of the issue
Then I took example from /samples/gtkhello.lua
and modified it to specify a version of gtk:
local Gtk = lgi.require('Gtk', '3.0')
And that works with both gtk3 and gtk4 installed! (that includes gtk4 typelibs)
And with my original issue, I modified /usr/lib/chdkptp/lua/gtk_gui.lua
in following way to make it work with gtk4 installed
--Gtk = lgi.Gtk
Gtk = lgi.require('Gtk', '3.0')
--Gdk = lgi.Gdk
Gdk = lgi.require('Gdk', '3.0')
I use Manjaro with awesome-git as window manager (v4.3-1066-g832483dd6) and until now it always worked fine. However, I recently ran an update and now I'm not able to access awesome anymore because I get this error message at login:
/usr/share/lua/5.3/lgi/override/Gdk.lua:23: bad argument #1 to 'registerlock' (userdata expected, got nil)
I opened an issue on the awesome github page and, since apparently it already happened to another Manjaro user in the past, they say the problem it's not related to the WM but to either Manjaro or LGI itself. I still didn't get much help from the Manjaro community and now I'm quite desperate because it's more than a week that I cannot access my WM (using Gnome in the meanwhile). I'm not a tech expert and I don't even know what LGI does for awesome, but my understanding is that the problem seems to be related to this package. Any insight is really appreciated! And please tell me if you think this issue is not strictly related to LGI and therefore should not be solved here.