Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] rgb_matrix effect confusion after breaking changes of 2021Q3 #14328

Closed
moyi4681 opened this issue Sep 6, 2021 · 14 comments
Closed

[Bug] rgb_matrix effect confusion after breaking changes of 2021Q3 #14328

moyi4681 opened this issue Sep 6, 2021 · 14 comments

Comments

@moyi4681
Copy link
Contributor

moyi4681 commented Sep 6, 2021

-keymap:
VIA

  • Keyboard:
    DZ60RGB , DZ60RGB ANSI, DZ60RGBWKL
    with source code after breaking change to compile a via firmware, the light effect is not correct
    with release 0.13.38 works fine
@That0ne-Guy
Copy link

Any updates to this? DZ60RGB ANSI V2_1 when flashed on QMK Configurator causes RGB to get messed up. Many lights don't light up and the other ones are inconsistent and wrong colors.

@kb-elmo
Copy link
Contributor

kb-elmo commented Nov 6, 2021

Can confirm this.
It's not just an issue with DZ boards.

It's the link time optimization that causes this.
Enabling LTO completely breaks the RGB matrix now!

@drashna
Copy link
Member

drashna commented Nov 6, 2021

Do you know what commit specifically breaks it?
And what specific modes/colors?

Because I haven't seen issues with rgb matrix and LTO being enabled.

Also: there have been a few new animation modes added. Is it possible that they are pushing the order out of place?

@kb-elmo
Copy link
Contributor

kb-elmo commented Nov 7, 2021

This doesn't exactly look like "out of order RGB animation".
It just doesn't work anymore at all.

It works perfectly fine with LTO disabled (which is only possible with the non-VIA firmware because with VIA it would be too big for the flash)

image

@drashna
Copy link
Member

drashna commented Nov 8, 2021

Could you try reverting 70fb3e1 and see if that fixes the issue?

@kb-elmo
Copy link
Contributor

kb-elmo commented Nov 8, 2021

Could you try reverting 70fb3e1 and see if that fixes the issue?

yup reverting those changes fixed it.

RGB works now with LTO enabled.

@sigprof
Copy link
Contributor

sigprof commented Nov 9, 2021

With what versions of avr-gcc does the problem appear? E.g., Debian/Ubuntu distros have 5.4 with significant Atmel/Microchip modifications; MSYS uses 8.4.0; on Arch Linux the distro-provided version is usually rather recent (11.2.0 at the moment), but the QMK install script for Arch Linux tries to install the 8.3.0 version from archive. There might be significant differences between the LTO implementations in these versions.

@kb-elmo
Copy link
Contributor

kb-elmo commented Nov 9, 2021

With what versions of avr-gcc does the problem appear? E.g., Debian/Ubuntu distros have 5.4 with significant Atmel/Microchip modifications; MSYS uses 8.4.0; on Arch Linux the distro-provided version is usually rather recent (11.2.0 at the moment), but the QMK install script for Arch Linux tries to install the 8.3.0 version from archive. There might be significant differences between the LTO implementations in these versions.

5.4.0 on Ubuntu WSL (in my case. No idea what version DZ uses)

@Andrew-Fahmy
Copy link

I also had an issue with the rgb matrix changes breaking lighting on my K-type (specifically commit 70fb3e1). I removed __flash and it seemed to fix my issue but I'm not really sure if this is a great way to solve it

@moyi4681
Copy link
Contributor Author

looks like the issue appears happen on IS31FL3733 microchip. IS31FL3741 works fine, I've not tested on other microchip.

@Andrew-Fahmy
Copy link

Andrew-Fahmy commented Nov 12, 2021

After more testing it seems like the problem was not at all related with the __flash and that it was just a coincidence that it worked when I changed that. I think it has something to do with flashing the firmware.

I build two versions of the firmware, one from master and the other from a older commit (70fb3e1). Both of them work fine, but if I flash the same firmware consecutively the lighting doesn't work at all.

Could this be a bug with the bootloader?

@kb-elmo
Copy link
Contributor

kb-elmo commented Nov 12, 2021

Could this be a bug with the bootloader?

Doesn't apply for me.

Only disabling LTO or removing the __flash fixes the issues here.

@Andrew-Fahmy
Copy link

Only disabling LTO or removing the __flash fixes the issues here.

Neither of these fixes my problem. There is another issue #11775 that seems to be more similar to mine.

@arnmar
Copy link

arnmar commented Nov 20, 2021

Removing __flash seems to fix the RGB issue for me on my DZ60RGB ANSI. Compiling with gcc 9.3.0 on WSL Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants