xuwd1 / mechrevo-wujie14-kmod

Linux powermode and keyboard backlight kernel module for Mechrevo wujie14 laptop
GNU General Public License v3.0
9 stars 0 forks source link

Works acpi profile switch works well on 14 pro #2

Open mingzym opened 2 months ago

mingzym commented 2 months ago

Yeah, after installed on 14 pro version, works perfect on this ubuntu 2404 gnome. although Fn+F1 not working anymore.

and here is my dmidecode result FYI:

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: MECHREVO
        Product Name: WUJIE14 PRO
        Version: WUJIE14
        Serial Number: 
        UUID: 
        Wake-up Type: Power Switch
        SKU Number: WUJIE14
        Family: MECHREVO WUJIE Series

Handle 0x0002, DMI type 2, 16 bytes
Base Board Information
        Manufacturer: MECHREVO
        Product Name: WUJIE14 Series-HPT
        Version: Base Board Version
        Serial Number: 
        Asset Tag: Base Board Asset Tag
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Base Board Chassis Location
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0

Handle 0x0003, DMI type 3, 23 bytes
Chassis Information
        Manufacturer: MECHREVO
        Type: Notebook
        Lock: Not Present
        Version: Chassis Version

thanks for your nice work on this project, again

xuwd1 commented 2 months ago

Yeah, after installed on 14 pro version, works perfect on this ubuntu 2404 gnome. although Fn+F1 not working anymore.

and here is my dmidecode result FYI:

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: MECHREVO
        Product Name: WUJIE14 PRO
        Version: WUJIE14
        Serial Number: 
        UUID: 
        Wake-up Type: Power Switch
        SKU Number: WUJIE14
        Family: MECHREVO WUJIE Series

Handle 0x0002, DMI type 2, 16 bytes
Base Board Information
        Manufacturer: MECHREVO
        Product Name: WUJIE14 Series-HPT
        Version: Base Board Version
        Serial Number: 
        Asset Tag: Base Board Asset Tag
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Base Board Chassis Location
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0

Handle 0x0003, DMI type 3, 23 bytes
Chassis Information
        Manufacturer: MECHREVO
        Type: Notebook
        Lock: Not Present
        Version: Chassis Version

thanks for your nice work on this project, again

Hi,

A big thank you for your reply! But honestly I’m quite surprised that this kmod would work on 14pro models. I would like to ask if it’s possible for you to post the ACPI table(only the DSDT will be enough) dump of your laptop? I’m rather interested in investigating the 14pro model, and with the ACPI table I will be able to try to develop a specific kmod for it.

nikspyratos commented 2 months ago

Heyo! So, I might have the 14 Pro but I'm not 100% sure. I bought a rebranded machine from a local supplier, and they provided me with the OEM hardware model GX4HRXL from a manuall, which I've traced to be a Mechrevo 14 Pro (AMD one).


I'm actually having some trouble with the machine, and my search led me to this repo. Figured if I can help with gathering info if you're interested, you could maybe help me figure out what my problem is?

The issue I'm having is the keyboard and bluetooth are not working on Linux. fn+F10/F11 (brightness), fn+F6 (keyboard backlight), and fn+F1 (sleep) all work, but no other key works. fn+F2 does nothing. Keyboard works fine in boot menu and BIOS.


Anyway, here's the ACPI table dump I have: https://gist.github.com/nikspyratos/11a18a01ac951d685446f89e25f15191

EDIT:

I've come across what seems to be a bunch of Windows-only drivers for various hardware parts of the 14 & 15 Pro - basically most of this device is a brick without them. Can send a link if they're of interest for reverse engineering. It's for just about everything - Wifi, ethernet, SD card reader, etc etc.

xuwd1 commented 2 months ago

Heyo! So, I might have the 14 Pro but I'm not 100% sure. I bought a rebranded machine from a local supplier, and they provided me with the OEM hardware model GX4HRXL from a manuall, which I've traced to be a Mechrevo 14 Pro (AMD one).

I'm actually having some trouble with the machine, and my search led me to this repo. Figured if I can help with gathering info if you're interested, you could maybe help me figure out what my problem is?

The issue I'm having is the keyboard and bluetooth are not working on Linux. fn+F10/F11 (brightness), fn+F6 (keyboard backlight), and fn+F1 (sleep) all work, but no other key works. fn+F2 does nothing. Keyboard works fine in boot menu and BIOS.

Anyway, here's the ACPI table dump I have: https://gist.github.com/nikspyratos/11a18a01ac951d685446f89e25f15191

EDIT:

I've come across what seems to be a bunch of Windows-only drivers for various hardware parts of the 14 & 15 Pro - basically most of this device is a brick without them. Can send a link if they're of interest for reverse engineering. It's for just about everything - Wifi, ethernet, SD card reader, etc etc.

Hi,

Thanks for your reply! I see that currently you are facing two major problems, about your laptop keyboard and the bluetooth. With the information you provided, I would like to make some discussions as the following:

  1. About your laptop model I did some digging with the hardware model you provided. I guess maybe your laptop would be a WootBook Y14? In that case, the Y14 is indeed a rebranded Mechrevo laptop, but it would corresponds to a FAIRLY new model, the WUJIE 14 X, and the WootBook Y15 would be WUJIE 15 X, both with AMD 8845HS CPU. I'm also quite interested in these two laptops, so I really appreciate the ACPI dump you provided, thank you!

  2. About the keyboard problem. I did have seen some reports about laptop keyboard not functioning in Linux, such as the ASUS TUF A15/A16 This is usually because of the GPIO resource not being correctly handled by the kernel drivers. More concretly, laptop integrated keyboards typically have a pin connected to the CPU's GPIO, and they send interrupt signal through GPIO notifying the CPU and the kernel it's being typed upon. However the kernel must have some knowledge about the keyboard hardware to correctly setup the GPIO and then "capture" that interrupt signal, such knowledge includes the signal's polarity (if it's active low or active high) and triggering type (if it's edge triggered or level triggered), etc. So, I guess your laptop keyboard's situation would be that the kernel could correctly load some driver for it, but the interrupt GPIO was not correctly set up. Judging from the ACPI table you provided, I guess your laptop keyboard would be a PS/2 keyboard which should be handled by the atkbd kernel module. But I would like to ask for your lsmod and ls -al /dev/input/by-path/ outputs to confirm this. Further, if my guess were true, I think I could try to provide you a kernel patch, which MAYBE could fix your laptop keyboard, but I'm not very confident since I don't have experience on this before.

  3. About the bluetooth AFAIK it's quite unusual for a PC running Linux to have its WIFI working while the bluetooth not working since they are usually integrated into a single wifi network card. Thus, firstly I would like to ask what network card your laptop is using? You could check it out by running lspci and looking for "Network controller". Secondly, I would advice you to check if your systemd service for bluetooth is enabled. You could check that by running systemctl status bluetooth. If that service is not running, you could try to enable it by sudo systemctl enable bluetooh --now.

nikspyratos commented 2 months ago

Appreciate the feedback so much! Yes it is a Wootbook Y14.

For the time being I did decide to use Windows just so I can get back to work, but I'll boot up from a live USB and try these out tomorrow - especially lspci. I was trying to run the service from the GUI toggles and it just crashed on Cinnamon or would never enable on Gnome.

Before I came to this issue I was trying to debug this myself with Anthropic Claude, and I did run lsmod then:

atkbd 40960 0
libps2 20480 2 atkbd,psmouse
vivaldi_fmap 12288 1 atkbd
serio 28672 6 amd_pmc,serio_raw,atkbd,pasmouse,i8042

Truthfully there may be more other broken things (e.g. Ethernet, SD Card reader, etc.) given the drivers available were for those, I just haven't tested the system on Linux beyond that.

xuwd1 commented 2 months ago

Appreciate the feedback so much! Yes it is a Wootbook Y14.

For the time being I did decide to use Windows just so I can get back to work, but I'll boot up from a live USB and try these out tomorrow - especially lspci. I was trying to run the service from the GUI toggles and it just crashed on Cinnamon or would never enable on Gnome.

Before I came to this issue I was trying to debug this myself with Anthropic Claude, and I did run lsmod then:

atkbd 40960 0
libps2 20480 2 atkbd,psmouse
vivaldi_fmap 12288 1 atkbd
serio 28672 6 amd_pmc,serio_raw,atkbd,pasmouse,i8042

Truthfully there may be more other broken things (e.g. Ethernet, SD Card reader, etc.) given the drivers available were for those, I just haven't tested the system on Linux beyond that.

Hi,

Thanks for your information. I think maybe the problem is indeed caused by the interrupt signal. I would investigate into it and try to make a kernel patch. But anyway, it would be much appreciated if you could also provide me the ls -al /dev/input/by-path/ output ;)

For the Bluetooth, I would recommend you try enabling it through CLI as the GUI toggles can be very buggy, both for KDE and GNOME.

As for the other devices you mentioned, I think you could give them a try. For the Ethernet, I think it would just be a RTL8111 or RTL8125 which is quite common these days and the kernel module for it is usually built into the kernel. For the SD card reader, I believe mechrevo usually uses USB protocol ones and they hardly need any special drivers to work.

nikspyratos commented 2 months ago

Went on my Linux Mint live USB and had a go:

ls -al /dev/input/by-path/:

lrwxrwxrwx 1 root root   9 May 13 08:19 pci-0000:65:00.3-usb-0:1.1:1.0-event-mouse -> ../event6
lrwxrwxrwx 1 root root   9 May 13 08:19 pci-0000:65:00.3-usb-0:1.1:1.0-mouse -> ../mouse2
lrwxrwxrwx 1 root root   9 May 13 08:19 pci-0000:65:00.3-usb-0:1.2:1.0-event-kbd -> ../event7
lrwxrwxrwx 1 root root   9 May 13 08:19 pci-0000:65:00.3-usb-0:1.2:1.1-event -> ../event9
lrwxrwxrwx 1 root root  10 May 13 08:19 pci-0000:65:00.4-usb-0:1:1.0-event -> ../event15
lrwxrwxrwx 1 root root  10 May 13 08:19 pci-0000:65:00.4-usb-0:1:1.2-event-ir -> ../event16
lrwxrwxrwx 1 root root   9 May 13 08:19 platform-AMDI0010:01-event-mouse -> ../event5
lrwxrwxrwx 1 root root   9 May 13 08:19 platform-AMDI0010:01-mouse -> ../mouse1

sudo lspci | grep Network:

02:00.0 Network controller: MEDIATEK Corp. Device 7922

As for bluetooth, systemctl status showed it was fine and active, enable had no errors, but opening up BT on the DE still crashed. This behaviour seemed consistent when I tried the Manjaro and Endeavour live USBs too, so I'm assuming that's either something that might work better on a live install or the issue is consistent across Linux in general.

EDIT: I'm having way too many issues with this machine even on Windows, so going to be returning it. Best of luck with this project!

mingzym commented 1 month ago

I am sorry I have made a false statement, the testing is fail in my case. The Fn+F1 does not work as expected and I can not switch mode in gnome power setting too, so as the /sys interface.

I am attaching the acpidump result incase, my label show the model is "无界14ProA-7BC4U", with dmidecode:

    BIOS Revision: 1.9
    Firmware Revision: 0.9

Handle 0x0001, DMI type 1, 27 bytes
System Information
    Manufacturer: MECHREVO
    Product Name: WUJIE14 PRO
    Version: WUJIE14
    Wake-up Type: Power Switch
    SKU Number: WUJIE14
    Family: MECHREVO WUJIE Series

Handle 0x0002, DMI type 2, 16 bytes
Base Board Information
    Manufacturer: MECHREVO
    Product Name: WUJIE14 Series-HPT

acpidump.txt