todbot / Blink1Control2

Blink1Control GUI to control blink(1) USB RGB LED devices.
http://blink1.thingm.com/
Apache License 2.0
154 stars 26 forks source link

Ubuntu 22 issues: Crash during initialization on Ubuntu Kinetic #166

Closed mhalano closed 2 years ago

mhalano commented 2 years ago

When I execute Blink1Control2 on Ubuntu Kinetic I got this error:

➜ blink1control2             
isDevelopment: false
Blink1Control2: config file:/home/mhalano/.config/Blink1Control2/blink1control2-config.json
Gtk-Message: 09:44:49.936: Failed to load module "xapp-gtk3-module"
global shortcut: CommandOrControl+Shift+R
globalShortcut key registered: true
loadurl:file:///opt/Blink1Control2/resources/app.asar/index-prod.html
[12560:0626/094450.326640:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.

Unexpected crash report id length
Failed to get crash dump id.
Report Id: 

Unexpected crash report id length
Failed to get crash dump id.
Report Id: 
[1]    12560 illegal hardware instruction  blink1control2

If I execute blink1control2 --no-sandbox it opens correctly. I don't know for sure, but IIRC a update in the Electron platform would fix it.

todbot commented 2 years ago

I'm not familiar with Ubuntu Kinetic. Is that the same as Ubuntu 22.10?

But on first blush, it looks like you don't have the xapp-gtk-module library installed.

todbot commented 2 years ago

Actually looks like other users have this problem on older versions of Ubuntu, depending on what kind of GPU they have.

What hardware are you running this on?

Also, do one of these allow the app to start:

./blink1control2 --force_low_power_gpu
./blink1control2 --force_high_power_gpu
./blink1control2 --disable-gpu
todbot commented 2 years ago

Looks like maybe installing gir1.2-xapp-1.0 can solve this:

sudo apt install gir1.2-xapp-1.0

But I'm still researching why this is popping up now. Thanks for the issue.

mhalano commented 2 years ago

@todbot Ubuntu Kinetic is 22.10, but is still in development. I have a pretty new GPU, NVIDIA RTX 3060 laptop version. I found this issue about it: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1944468

todbot commented 2 years ago

Ah perfect! I was in that general area in the Electron issues page. Okay looks like a general Electron problem that requires an update to Electron in Blink1Control2 to fix.

Unfortunately, that's not an easy thing but should be possible in a week or so.

mhalano commented 2 years ago

Looks like maybe installing gir1.2-xapp-1.0 can solve this:

sudo apt install gir1.2-xapp-1.0

But I'm still researching why this is popping up now. Thanks for the issue.

As you see, this problem is benign and not related to the crash. GTK can be picky sometimes

todbot commented 2 years ago

I've got a Ubuntu 22.04 ("Jammy Jellyfish") VM running now and am seeing weird (probably related) but different startup issues with the app. I'm off to do further testing. Normally I build & test on 20.04.

mhalano commented 2 years ago

Could you share the new error?

todbot commented 2 years ago

It apparently starts up but both the About window and the main GUI window are blank. Usually this means either Electron died at some point after making the window or Electron cannot find the app's files. Not a normal error case that's for sure. I'm doing a build on Ubuntu22 now to see what that's like.

todbot commented 2 years ago

Hi! I think this issue is now resolved in 2.2.8, just released: https://github.com/todbot/Blink1Control2/releases/tag/v2.2.8

Please let me know how it works for you.

mhalano commented 2 years ago

Now the app opens correctly, but it shows no device connected. Downgrading to 2.2.7 and using --no-sandbox option shows the device connected, so it's not related to udev rules (even it is shown in another application, OpenRGB)

todbot commented 2 years ago

Interesting. I thought I eliminated the need for that but clearly not. Thank you for testing.

todbot commented 2 years ago

Could you please retry your test? Perhaps you had another app open that was claiming the device? (or previous Blink1Control2 hadn't quit cleanly)

I just tested on my Ubuntu 22.10 with real devices and Blink1Control2 2.2.8 works. (normally I run Ubuntu 20)

mhalano commented 2 years ago

I can use blink1-tool correctly but no device detected when using blink1control2. There is any way to improve the debug messages?

mhalano commented 2 years ago

I also got this line in dmesg:

[178323.382439] traps: blink1control2[1890264] trap int3 ip:55ebcfa39eab sp:7ffcf3ff7ec0 error:0 in blink1control2[55ebcc9d4000+6ae6000]
todbot commented 2 years ago

No clue what that error is, likely some weird Electron error. All Blink1Control2 debug/error messages are in the DevTools console once the app is open.

todbot commented 2 years ago

This is what I'm working with:

Screen Shot 2022-07-03 at 5 31 28p
mhalano commented 2 years ago

Is this make sense for you? image

mhalano commented 2 years ago

Is this make sense for you? image

That is my serial number, but not with lowercase, just uppercase (as showed by blink1-tool --fwversion). I saw in this version you resolved a problem involving serial number's upper/lower case. I have an old mk2 (firmware v204). It could be an incompatibility because the case?

todbot commented 2 years ago

Thank you! I think I see where the problem might be.

todbot commented 2 years ago

Could you send me your blink1control2-config.json file? If you don't feel comfortable including it here, you can email it to me at "tod at thingm.com"

mhalano commented 2 years ago

Just sent you my config file over email.

todbot commented 2 years ago

Thank you for your email, it was helpful. It eliminated something in your config as a possible problem.

A new release with this change will be out in few days.

Thank you again for your wonderful assistance during this. I notice you have a blink(1) mk2.
If you'd like a free blink(1) mk3 (excluding any customs duties), send me your preferred shipping address with phone number and we'll get one shipped out to you.

mhalano commented 2 years ago

@todbot Thank you for the complementary Blink(1) mk3. I already sent to you my address. Can you share what the problem was?

todbot commented 2 years ago

Oh it was a dumb mistake on my part on how I was falling back when creating the Blink1 object for devices. (Forgot that new Blink1() throws instead of returns undefined)

mhalano commented 2 years ago

I think I will wait until next release to validate and close, because of the regression. I could close now because the original issue was resolved, unless we open a new issue just to treat the regression. What you think, keep open or close and open a new issue for regression?

todbot commented 2 years ago

(All the mk2 blink(1)s I had when testing originally had serial numbers that happened to not have any A-F hex digits)

todbot commented 2 years ago

Yes, let's keep this open. Just as a reminder.

mhalano commented 2 years ago

@todbot I tested today the release 2.2.9 and worked fine with my mk2 devices. Thank you.