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

[Apple Silicon] Keyboard unusable after failed remap #58

Open
pashkes opened this issue Aug 12, 2023 · 24 comments
Open

[Apple Silicon] Keyboard unusable after failed remap #58

pashkes opened this issue Aug 12, 2023 · 24 comments
Labels
bug Something isn't working 🍎 Silicon Issues related to running Nudelta on Apple Silicon-based macs

Comments

@pashkes
Copy link

pashkes commented Aug 12, 2023

Version

0.7.2

Operating System

MacOS 13.5
but it doesn't work for everyone

Description

I instaled the app on my mac m1 and try to set up key, after save I get an error that the shortcut can't save and now my keyboard don't connect to any device, light is not on, reset (fn, tab, r) can't be helped
I also try to connect via a console on Win but device didn't detect

When I try to update firmware I always see text waiting and nothing happen 😭

@pashkes pashkes changed the title Error after update hot key for scissors key Error after remap hot key for scissors key Aug 12, 2023
@donn
Copy link
Owner

donn commented Aug 13, 2023

Air or Halo? Also, can you send a photograph of the metal plaque on the back of the keyboard

Also, try the Windows firmware updater (if applicable) - Mac one never worked for me.

This is serious- if the software is somehow corrupting the bootloader then something is going horribly wrong

@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

Air or Halo? Also, can you send a photograph of the metal plaque on the back of the keyboard

Also, try the Windows firmware updater (if applicable) - Mac one never worked for me.

This is serious- if the software is somehow corrupting the bootloader then something is going horribly wrong

Air. I tryed to update on Windows
PXL_20230813_040512633.MP.jpg

@donn
Copy link
Owner

donn commented Aug 13, 2023

That does match mine... welp.

The last thing I can ask you to try is https://github.com/carlossless/sinowealth-kb-tool. If you can download the Windows version and it can recognize your keyboard, I can send you a firmware dump from my own keyboard so you can try to flash and fix it.

For now, I'll add an advisory for M1 Macs to the Readme. Sorry about this

@donn donn added bug Something isn't working 🍎 Silicon Issues related to running Nudelta on Apple Silicon-based macs labels Aug 13, 2023
@donn donn changed the title Error after remap hot key for scissors key [Apple Silicon] Keyboard unusable after failed remap Aug 13, 2023
@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

That does match mine... welp.

The last thing I can ask you to try is https://github.com/carlossless/sinowealth-kb-tool. If you can download the Windows version and it can recognize your keyboard, I can send you a firmware dump from my own keyboard so you can try to flash and fix it.

For now, I'll add an advisory for M1 Macs to the Readme. Sorry about this

I'm trying to start the tool on Windows under admin with connected the keyboard but nothing happen. Any dialogs don't bubble. Maybe I do something wrong or should try macOs version?

@donn
Copy link
Owner

donn commented Aug 13, 2023

@pashkes It's a CLI tool: I'll give you some instructions in a moment

@donn
Copy link
Owner

donn commented Aug 13, 2023

  1. Download and decompress sinowealth-kb-tool-x86_64-pc-windows-msvc-v0.0.2.tar.gz. There should be exactly one file, called sinowealth-kb-tool.exe.
  2. Shift + right click the Windows button in your task bar, and press "Windows Powershell (Administrator)"
  3. Navigate to the folder containing sinowealth-kb-tool.exe using cd.
  4. Execute this command: .\sinowealth-kb-tool.exe -r --part nuphy-air75 out.ihex

Report back with a screenshot of your full window.

@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

  1. Download and decompress sinowealth-kb-tool-x86_64-pc-windows-msvc-v0.0.2.tar.gz. There should be exactly one file, called sinowealth-kb-tool.exe.
  2. Shift + right click the Windows button in your task bar, and press "Windows Powershell (Administrator)"
  3. Navigate to the folder containing sinowealth-kb-tool.exe using cd.
  4. Execute this command: .\sinowealth-kb-tool.exe -r --part nuphy-air75 out.ihex

Report back with a screenshot of your full window.

IMG_20230813_094806_074.jpg

Looks like the tool doesn't support air 75

@donn
Copy link
Owner

donn commented Aug 13, 2023

Try nuphy-air60, I got the Air75 support merged but it's not in a release version yet and it's just a copy of Air60's data anyway

Also, while you're there, I'd like you to run .\sinowealth-kb-tool.exe -r --part nuphy-air60 bootloader.ihex as well.

@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

Try nuphy-air60, I got the Air75 support merged but it's not in a release version yet and it's just a copy of Air60's data anyway

Also, while you're there, I'd like you to run .\sinowealth-kb-tool.exe -r --part nuphy-air60 bootloader.ihex as well.

 No KB found. Trying bootloader directly...
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\isp.rs:60:93
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

image

@donn
Copy link
Owner

donn commented Aug 13, 2023

Assuming this isn't a permissions issue, that means the firmware flasher cannot find either the keyboard or the bootloader. Can you check device manager to see what pops up when the keyboard is plugged in? Also, can you try a different USB-C cable?

@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

image
when connect to another port I saw the error, it's means that unknown device

Windows stopped this device because it reported problems. (Code 43)

Request for USB device descriptor failed.

@donn
Copy link
Owner

donn commented Aug 13, 2023

I need two items called the Product ID and Vendor ID in one of these tabs so I can diagnose further:
Screenshot at 2023-08-13 11:35:43

If they do not exist, then I would ask you to email NuPhy and just tell them that the keyboard is not responding to the firmware updater, as I am at a loss.

Out of curiosity- is your Macbook also in Ukrainian? I'm wondering if this is a locale thing.

@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

Here is what I found:

Error Log

Имя журнала:   Microsoft-Windows-Kernel-PnP/Configuration
Источник:      Microsoft-Windows-Kernel-PnP
Дата:          13.08.2023 10:48:13
Код события:   411
Категория задачи:Отсутствует
Уровень:       Ошибка
Ключевые слова:
Пользователь:  SYSTEM
Компьютер:     DESKTOP-GJI6BCH
Описание:
Возникла проблема с запуском устройства USB\VID_0000&PID_0002\5&84e935&1&2.

Имя драйвера: usb.inf
GUID класса: {36fc9e60-c465-11cf-8056-444553540000}
Служба: 
Нижние фильтры: 
Верхние фильтры: 
Проблема: 0x2B
Состояние проблемы: 0x0
Xml события:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Kernel-PnP" Guid="{9c205a39-1250-487d-abd7-e831c6290539}" />
    <EventID>411</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2023-08-13T07:48:13.1295374Z" />
    <EventRecordID>3135</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="6260" />
    <Channel>Microsoft-Windows-Kernel-PnP/Configuration</Channel>
    <Computer>DESKTOP-GJI6BCH</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="DeviceInstanceId">USB\VID_0000&amp;PID_0002\5&amp;84e935&amp;1&amp;2</Data>
    <Data Name="DriverName">usb.inf</Data>
    <Data Name="ClassGuid">{36fc9e60-c465-11cf-8056-444553540000}</Data>
    <Data Name="ServiceName">
    </Data>
    <Data Name="LowerFilters">
    </Data>
    <Data Name="UpperFilters">
    </Data>
    <Data Name="Problem">0x2b</Data>
    <Data Name="Status">0x0</Data>
  </EventData>
</Event>

and one more
Details

Имя журнала:   Microsoft-Windows-Kernel-PnP/Configuration
Источник:      Microsoft-Windows-Kernel-PnP
Дата:          13.08.2023 10:48:13
Код события:   400
Категория задачи:Отсутствует
Уровень:       Сведения
Ключевые слова:
Пользователь:  SYSTEM
Компьютер:     DESKTOP-GJI6BCH
Описание:
Устройство USB\VID_0000&PID_0002\5&84e935&1&2 настроено.

Имя драйвера: usb.inf
GUID класса: {36fc9e60-c465-11cf-8056-444553540000}
Дата драйвера: 06/21/2006
Версия драйвера: 10.0.19041.2546
Поставщик драйвера: Microsoft
Раздел драйвера: BADDEVICE.Dev.NT
Ранг драйвера: 0xFF0000
Соответствующий ИД устройства: USB\DEVICE_DESCRIPTOR_FAILURE
Драйверы с более низким рангом: usb.inf:USB\DEVICE_DESCRIPTOR_FAILURE:00FF2000
Устройство обновлено: false
Родительское устройство: USB\ROOT_HUB30\4&1dc62523&0&0
Xml события:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Kernel-PnP" Guid="{9c205a39-1250-487d-abd7-e831c6290539}" />
    <EventID>400</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000000000000000</Keywords>
    <TimeCreated SystemTime="2023-08-13T07:48:13.0959383Z" />
    <EventRecordID>3134</EventRecordID>
    <Correlation />
    <Execution ProcessID="4" ThreadID="6260" />
    <Channel>Microsoft-Windows-Kernel-PnP/Configuration</Channel>
    <Computer>DESKTOP-GJI6BCH</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="DeviceInstanceId">USB\VID_0000&amp;PID_0002\5&amp;84e935&amp;1&amp;2</Data>
    <Data Name="DriverName">usb.inf</Data>
    <Data Name="ClassGuid">{36fc9e60-c465-11cf-8056-444553540000}</Data>
    <Data Name="DriverDate">06/21/2006</Data>
    <Data Name="DriverVersion">10.0.19041.2546</Data>
    <Data Name="DriverProvider">Microsoft</Data>
    <Data Name="DriverInbox">true</Data>
    <Data Name="DriverSection">BADDEVICE.Dev.NT</Data>
    <Data Name="DriverRank">0xff0000</Data>
    <Data Name="MatchingDeviceId">USB\DEVICE_DESCRIPTOR_FAILURE</Data>
    <Data Name="OutrankedDrivers">usb.inf:USB\DEVICE_DESCRIPTOR_FAILURE:00FF2000</Data>
    <Data Name="DeviceUpdated">false</Data>
    <Data Name="Status">0x0</Data>
    <Data Name="ParentDeviceInstanceId">USB\ROOT_HUB30\4&amp;1dc62523&amp;0&amp;0</Data>
  </EventData>
</Event>

I'm not sure if the laptop is Ukrainian because it's a work laptop, not my personal one. Although most likely yes, I think I can somehow check for 100% if necessary.

As I understand it, it’s no longer possible to restore and I should contact the reseller from whom I bought and clarify whether it will be possible to make a replacement (3 days have passed since the purchase), although I doubt that it will be possible

@WinkelCode
Copy link

WinkelCode commented Aug 13, 2023

@donn
@pashkes

FYI!!! From my experience, the sinowealth-kb-tool may not work under Windows. I was unable to dump my Air96 firmware using it on Windows (couldn't get into "ISP" mode), but it worked flawlessly on Linux. From my understanding, Windows has extra restrictions on input devices like keyboards, presumably for security (keylogging) reasons, which can cause issues communicating with the keyboard.

@WinkelCode
Copy link

WinkelCode commented Aug 13, 2023

@pashkes In Linux, run lsusb and check with/without the keyboard plugged in, if it is detected we may still be able to get it to work.

The error comes from here: let isp_device = HidDevice::open(GAMING_KB_VENDOR_ID, GAMING_KB_PRODUCT_ID).unwrap(); (It is not able to find a device with the pre-configured ID)

I am not familiar with USB at this level, but given that Windows is able to detect something, maybe it still has a USB device path we can talk to. The question is if it has actually loaded into the SinoWealth bootloader, or if we are able to get it to do that.

@pashkes
Copy link
Author

pashkes commented Aug 13, 2023

@WinkelCode is it ok if i will try this on liveusb fedora?

@WinkelCode
Copy link

@WinkelCode is it ok if i will try this on liveusb fedora?

I think it might be easier to do this in a Discord chat, I sent you a message on the NuPhy server.

@donn
Copy link
Owner

donn commented Aug 14, 2023

@pashkes To be clear, I was asking about the language of macOS, not the model of the computer. Was the language set to Ukrainian?

@pashkes
Copy link
Author

pashkes commented Aug 14, 2023

@pashkes To be clear, I was asking about the language of macOS, not the model of the computer. Was the language set to Ukrainian?

No, Language of the System was English

@donn
Copy link
Owner

donn commented Aug 15, 2023

So that rules out a locale issue. We've had another report of a brick from a user from Ukraine, so I'm wondering if it's just a bad batch

@pashkes
Copy link
Author

pashkes commented Aug 15, 2023

So that rules out a locale issue. We've had another report of a brick from a user from Ukraine, so I'm wondering if it's just a bad batch

that's probably my reseller asking the question because the nickname is very similar to his name.

@donn
Copy link
Owner

donn commented Aug 15, 2023

ah.

@samiparken
Copy link

Trying for remapping with Nudelta completely ruined my keyboard.... RIP my Nuphy air75. I cannot see my keyboard from Device Manager... No way to revive it?

@WinkelCode
Copy link

WinkelCode commented Aug 23, 2024

Trying for remapping with Nudelta completely ruined my keyboard.... RIP my Nuphy air75. I cannot see my keyboard from Device Manager... No way to revive it?

I mean... it's not like it's physically broken, you just need to install a working firmware. The easiest way is to get your hands on a "SinoLink" programmer, they are available on AliExpress, but cost a bit over $100. There is also this program for Arduinos, but it doesn't support writing (yet): https://github.com/gashtaan/sinowealth-8051-dumper

@carlossless shared a dump of the SinoLink device programming the chip: gashtaan/sinowealth-8051-dumper#5 (comment) - so I believe the information for how to do it is technically out there.

Honorable mention to https://github.com/carlossless/sinowealth-kb-tool - although I believe that would require the device to be enumerated (which is exactly what's not happening if I understand correctly).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🍎 Silicon Issues related to running Nudelta on Apple Silicon-based macs
Projects
None yet
Development

No branches or pull requests

4 participants