linuxdeepin / developer-center

Deepin developer center, provide developer wiki and community forum.
452 stars 73 forks source link

Apple MacBook Touchpad maps wrong (Kernel 5.10), broadcom-sta-dkms fails building (low-prio) #3322

Closed arch-user-france1 closed 2 years ago

arch-user-france1 commented 2 years ago

1929

The Apple MacBook (Air) touchpad still doesn't work on Kernel 5.10.

  1. Moving the finger up and down is interpreted as scrolling and very slowly moving the finger as it should be.
  2. Moving the finger right or left moves the cursor up and down.
  3. Clicking does not work
  4. The whole GUI breaks if the touchpad is touched - external mouses do work but buttons get messed up etc.

Updating to Kernel 5.15 fixed it for me. The WLAN didn't work but I could fix that by installing firmware-bcm.... (now it works but is extremely slow).

I would post information about the touchpad if I knew how I could get that information.

Zeno-sole commented 2 years ago

What problems still exist after updating to the 5.15 kernel? WLAN not working properly?

arch-user-france1 commented 2 years ago

The WLAN driver was not compiled / not working on the Kernel 5.15. I manually installed it though and now it's working. I think the problem is that the uh Broadcom? Driver for 5.15 is not available yet, so I had to install a slower alternative.

Zeno-sole commented 2 years ago

I am very sorry that the BCM driver has not been well supported on linux. What is the model of your network card? Maybe you can find some open source BCM drivers to solve your problem.

arch-user-france1 commented 2 years ago

Did you read that: I manually installed it though and now it's working

I don't need help installing a driver. That here is about the MacBook touchpad not working on the LTS (5.10) kernel but on the 5.15 kernel

Zeno-sole commented 2 years ago

In subsequent versions, we use the 5.15 kernel by default, and the 5.10 kernel is not maintained.

arch-user-france1 commented 2 years ago

Then this issue will be fixed soon. Closing this...

arch-user-france1 commented 2 years ago

I am very sorry that the BCM driver has not been well supported on linux. What is the model of your network card? Maybe you can find some open source BCM drivers to solve your problem.

By the way:

arch-user-france1 commented 2 years ago

Building broadcom-sta-dkms fails. Log:

france1@deepin-mac:~$ sudo cat /var/lib/dkms/broadcom-sta/6.30.223.271/build/make.log
Verify your face or password:Verification successful
DKMS make.log for broadcom-sta-6.30.223.271 for kernel 5.15.24-amd64-desktop (x86_64)
Wed 27 Jul 22:42:12 CEST 2022
/bin/sh: 1: [: Illegal number: 
/bin/sh: 1: [: Illegal number: 
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
KBUILD_NOPEDANTIC=1 make -C /lib/modules/5.15.24-amd64-desktop/build M=`pwd`
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-5.15.24-amd64-desktop'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Uos 8.3.0.6-1+dde) 8.3.0
  You are using:           gcc (Uos 8.3.0.3-3+rebuild) 8.3.0
CFG80211 API is prefered for this kernel version
Using CFG80211 API
Kernel architecture is X86_64
  CC [M]  /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c: In function ‘osl_reg_map’:
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
          ^~~~~~~~~~~~~~~
          ioremap_cache
/var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.c:949:10: warning: returning ‘int’ from a function with return type ‘void *’ makes pointer from integer without a cast [-Wint-conversion]
  return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:277: /var/lib/dkms/broadcom-sta/6.30.223.271/build/src/shared/linux_osl.o] Error 1
make[1]: *** [Makefile:1868: /var/lib/dkms/broadcom-sta/6.30.223.271/build] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.24-amd64-desktop'
make: *** [Makefile:177: all] Error 2

It also says following in the log:

  The kernel was built by: gcc (Uos 8.3.0.6-1+dde) 8.3.0
  You are using:           gcc (Uos 8.3.0.3-3+rebuild) 8.3.0

Might this cause that issue or should we contact the broadcom-sta-dkms developers?

Zeno-sole commented 2 years ago

broadcom.zip The driver version you are using is not compatible with the current kernel, you can try this version

arch-user-france1 commented 2 years ago

broadcom.zip The driver version you are using is not compatible with the current kernel, you can try this version

From where does this come from? If it's not compatible, then the debian repository is outdated. I don't like debian.

Zeno-sole commented 2 years ago

broadcom.zip The driver version you are using is not compatible with the current kernel, you can try this version

From where does this come from? If it's not compatible, then the debian repository is outdated. I don't like debian.

The source code comes from the ubuntu repository, which is verified to support kernel 5.15

arch-user-france1 commented 2 years ago

Could someone update the repository? The deepin repo is badly outdated. Even htop is like from 2015. And fprint doesn't support the newest devices. I'm coming from Arch. It's a pain in the ass for me to see an outdated repository. Only causes problems.

arch-user-france1 commented 2 years ago

I guess that worked:

france1@deepin-mac:~/Downloads$ sudo apt install -f ./broadcom-sta-common_6.30.223.271-20_all.deb broadcom-sta-dkms_6.30.223.271-20_all.deb broadcom-sta-source_6.30.223.271-20_all.deb
Verify your face or password:
Face recognition verification failed, 2 chances left
Sorry, try again.
Verify your face or password:
Face recognition verification failed, only one chance left
Sorry, try again.
liVerify your face or password:Verification successful
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'broadcom-sta-common' instead of './broadcom-sta-common_6.30.223.271-20_all.deb'
E: Unable to locate package broadcom-sta-dkms_6.30.223.271-20_all.deb
E: Couldn't find any package by glob 'broadcom-sta-dkms_6.30.223.271-20_all.deb'
E: Couldn't find any package by regex 'broadcom-sta-dkms_6.30.223.271-20_all.deb'
E: Unable to locate package broadcom-sta-source_6.30.223.271-20_all.deb
E: Couldn't find any package by glob 'broadcom-sta-source_6.30.223.271-20_all.deb'
E: Couldn't find any package by regex 'broadcom-sta-source_6.30.223.271-20_all.deb'
france1@deepin-mac:~/Downloads$ sudo dp^Cf ./broadcom-sta-common_6.30.223.271-20_all.deb broadcom-sta-dkms_6.30.223.271-20_all.deb broadcom-sta-source_6.30.223.271-20_all.deb
france1@deepin-mac:~/Downloads$ sudo apt install -f ./broadcom-sta-common_6.30.223.271-20_all.deb ./broadcom-sta-dkms_6.30.223.271-20_all.deb ./broadcom-sta-source_6.30.223.271-20_all.deb
^C
france1@deepin-mac:~/Downloads$ sudo apt install ./broadcom-sta-common_6.30.223.271-20_all.deb ./broadcom-sta-dkms_6.30.223.271-20_all.deb ./broadcom-sta-source_6.30.223.271-20_all.deb
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'broadcom-sta-common' instead of './broadcom-sta-common_6.30.223.271-20_all.deb'
Note, selecting 'broadcom-sta-dkms' instead of './broadcom-sta-dkms_6.30.223.271-20_all.deb'
Note, selecting 'broadcom-sta-source' instead of './broadcom-sta-source_6.30.223.271-20_all.deb'
The following NEW packages will be installed:
  broadcom-sta-dkms
The following packages will be upgraded:
  broadcom-sta-common broadcom-sta-source
2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/4,453 kB of archives.
After this operation, 14.5 MB of additional disk space will be used.
Get:1 /home/france1/Downloads/broadcom-sta-common_6.30.223.271-20_all.deb broadcom-sta-common all 6.30.223.271-20 [13.6 kB]
Get:2 /home/france1/Downloads/broadcom-sta-dkms_6.30.223.271-20_all.deb broadcom-sta-dkms all 6.30.223.271-20 [2,207 kB]
Get:3 /home/france1/Downloads/broadcom-sta-source_6.30.223.271-20_all.deb broadcom-sta-source all 6.30.223.271-20 [2,232 kB]
(Reading database ... 303938 files and directories currently installed.)
Preparing to unpack .../broadcom-sta-common_6.30.223.271-20_all.deb ...
Unpacking broadcom-sta-common (6.30.223.271-20) over (6.30.223.271-10) ...
Selecting previously unselected package broadcom-sta-dkms.
Preparing to unpack .../broadcom-sta-dkms_6.30.223.271-20_all.deb ...
Unpacking broadcom-sta-dkms (6.30.223.271-20) ...
Preparing to unpack .../broadcom-sta-source_6.30.223.271-20_all.deb ...
Unpacking broadcom-sta-source (6.30.223.271-20) over (6.30.223.271-10) ...
Setting up broadcom-sta-common (6.30.223.271-20) ...
update-initramfs: deferring update (trigger activated)
Setting up broadcom-sta-dkms (6.30.223.271-20) ...
Loading new broadcom-sta-6.30.223.271 DKMS files...
Building for 5.15.24-amd64-desktop
Building initial module for 5.15.24-amd64-desktop
Done.

wl.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.15.24-amd64-desktop/updates/dkms/

depmod....

Backing up initrd.img-5.15.24-amd64-desktop to /boot/initrd.img-5.15.24-amd64-desktop.old-dkms
Making new initrd.img-5.15.24-amd64-desktop
(If next boot fails, revert to initrd.img-5.15.24-amd64-desktop.old-dkms image)
update-initramfs..............

DKMS: install completed.
Setting up broadcom-sta-source (6.30.223.271-20) ...
Processing triggers for initramfs-tools (0.137.35-1+dde) ...
update-initramfs: Generating /boot/initrd.img-5.15.24-amd64-desktop
cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries 
    nor crypto modules. If that's on purpose, you may want to uninstall the 
    'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs 
    integration and avoid this warning.
W: plymouth: The plugin label.so is missing, the selected theme might not work as expected.
W: plymouth: You might want to install the plymouth-themes package to fix this.
I: The initramfs will attempt to resume from /dev/sda7
I: (UUID=e44b3e01-20c5-4b22-b01d-1e334b02bbbc)
I: Set the RESUME variable to override this.
live-boot: core filesystems devices utils udev blockdev dns.
N: Download is performed unsandboxed as root as file '/home/france1/Downloads/broadcom-sta-common_6.30.223.271-20_all.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
arch-user-france1 commented 2 years ago

One thing. There doesn't seem to be a scheduled fstrim command running. Can you confirm that? It's important to run fstrim on every hard drive that supports discarding files like that once a week at least.

Ext4: /: 7.3 GiB (7817060352 bytes) trimmed Note: that is not accurate but indicates that it probably didn't run.

Zeno-sole commented 2 years ago

One thing. There doesn't seem to be a scheduled fstrim command running. Can you confirm that? It's important to run fstrim on every hard drive that supports discarding files like that once a week at least.

Ext4: /: 7.3 GiB (7817060352 bytes) trimmed Note: that is not accurate but indicates that it probably didn't run.

How does your fstrim work? Do you use system services?

arch-user-france1 commented 2 years ago

One thing. There doesn't seem to be a scheduled fstrim command running. Can you confirm that? It's important to run fstrim on every hard drive that supports discarding files like that once a week at least. Ext4: /: 7.3 GiB (7817060352 bytes) trimmed Note: that is not accurate but indicates that it probably didn't run.

How does your fstrim work? Do you use system services?

There's a disabled fstrim.timer systemd service, should be enabled. Please enable that by default, every proper distro does that too.

Zeno-sole commented 2 years ago

You can enable this service with sudo systemctl enable fstrim.timer

arch-user-france1 commented 2 years ago

You should enable it by default on every installed system...

arch-user-france1 commented 2 years ago

You said that Deepin is going to switch from kernel 5.10 to kernel 5.15. I think this issue can be closed, maybe should be pinned for new users.

3323 is still a problem (5.15 ISO not booting)

And #3324 should be fixed as soon as possible because the image cannot be downloaded from the official mirror anymore.