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

Touchbar is glitching #32

Open
Emirhankayar opened this issue Feb 13, 2024 · 7 comments
Open

Touchbar is glitching #32

Emirhankayar opened this issue Feb 13, 2024 · 7 comments

Comments

@Emirhankayar
Copy link

Model: Macbook Pro M1 2020, 8GB memory
Environment: hyprland with sway
OS: Asahi Fedora

glitch.mp4

When the problem occurs ?
It occurs in multiple cases,
case one : whenever the touchbar gets into sleeping mode, it occurs (after the lights of touchbar is off it starts glitching)
case two : while booting fedora (while booting macOS there is no glitch on the touchbar) i guess the touchbar isnt active yet so it occurs as it was in the sleep mode

Details
There is no major problem with it, let's say touchbar got into the sleeping mode then the glitch starts to occur, after a long while if the system is still inactive (that there is no user input) glitch stops then the touchbar also stops working i guess the tiny-dfr service shuts down itself.

When i reboot or shutdown the computer i see the error with tiny-dfr service for a little short amount of time, it is not being captured by asahi-diagnose so i do not know what is going on with it.

I uninstalled and installed asahi many times, tried with other desktop environments which are Gnome desktop with wayland, KDE with wayland, however, same issue persists.

How can i resolve this issue or will there be any updates on it ?

@WhatAmISupposedToPutHere
Copy link
Owner

I am not sure that the issue is fixable, since only apple code runs during the boot picker phase. Does it happen every time or just sometimes? And was it a cold boot of the machine.

Sleep might be fixable since i only command the display to turn off, instead of completely tearing down the MIPI link, however it is hard, since i can't reproduce it on my machine.

@Emirhankayar
Copy link
Author

Emirhankayar commented Feb 13, 2024

It happens every time, if it is a cold boot if the last OS used was Asahi, then it happens because it boots Fedora directly there is no such case with booting macOS. Disturbance of flashing lights is not a problem while booting since it takes a short time to boot.

The major problem is that, while using the OS it also happens every time whenever the user input is inactive, lets say you are watching a movie and you do not touch the computer, once the sleeping mode is activated it starts to flash.

There is no problem with the functioning of the touchbar

I wish, I could provide some information, checked the journalctl with -f flag while restarting the tiny-dfr service there is no info provided in journal, also tried asahi diagnose there is no info about tiny-dfr again but still I will attach my diagnosis.

EDIT: After I saved the journalctl it actually showed up some info about tiny-dfr sorry for misleading info before

asahi-diagnose-20240213-222915.txt
file.log

@WhatAmISupposedToPutHere
Copy link
Owner

Can you follow the following steps and tell me if glitches are still present?

  1. Download, compile and install the kernel from this branch https://github.com/WhatAmISupposedToPutHere/linux/tree/sleep
  2. Boot the machine to a normal state, ensure the touchbar is active and displaying an image.
  3. Enter sleep mode. (Full system sleep, not just touchbar idle timeout).

@Emirhankayar
Copy link
Author

Never done this kind of operation before, just to clarify, are these the steps to perform ?

git clone -b sleep https://github.com/WhatAmISupposedToPutHere/linux.git

cd linux

make defconfig

make -j$(nproc)

sudo make modules_install install

if these are the steps to perform then i got this error after performing the install command,

dracut-install: Failed to find module 'nvme_apple'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.8yiNZj/initramfs --kerneldir /lib/modules/6.6.0-asahi-g502bf25d37a1/ -m apple_mailbox nvme_apple pinctrl-apple-gpio macsmc macsmc-rtkit i2c-apple tps6598x apple-dart dwc3 dwc3-of-simple nvmem-apple-efuses phy-apple-atc xhci-plat-hcd xhci-pci pcie-apple gpio_macsmc spi-apple spi-hid-apple spi-hid-apple-of rtc-macsmc simple-mfd-spmi spmi-apple-controller nvmem_spmi_mfd apple-dockchannel dockchannel-hid apple-rtkit-helper

and when i am booting i select the new kernel option it doesnt run

@WhatAmISupposedToPutHere
Copy link
Owner

make defconfig is wrong, you should look for the distro kernel config in /boot (the file is named config-something), copy it to kernel build directory, rename it to .config and then build the kernel.

@Emirhankayar
Copy link
Author

Sorry for the late response, here is what happened,

6.6.3-413.asahi.fc39.aarch64+16k == as version of .config

I built and booted into the new kernel

  • While booting the system it still happens,
  • While touch bar is idle it still happens,
  • While full system is in sleep it still happens.

@Emirhankayar
Copy link
Author

New update on the touchbar,

It started to happen also on OSX, and I started do some research about it and seems like wast majority of people who has a macbook model with touchbar have had this flickering problem. Seems like its more apple kind of an issue that by the time it gets damaged by the humidity of the environment or some software level issues turns it into a hardware level problem. But I am not surely saying this 'hardware problem' because it functions well, just brings in some flicker. ( in OSX I tried to disable auto brightness of the display and the keyboard it affected a little bit in the good way)

So your code has no problems, I guess the problem is in my touchbar. How could i resolve this issue by disabling going idle when the system is up (I always use it on battery so do not care about power consumage ) or, if the system is not up then also tiny dfr can also go disabled but then how can it get activated.

Because on OSX it gets disabled completely when idled if you touch it, it comes back in it prevents that flicker while 'idling', so the flickering only happens while using it (but so rarely).

On the other hand while on Asahi it never happens while the touchbar is 'active', it only happens in the case when it goes idle. That what makes a conflict here.

That is the best information I could give if there is some extra things that I can do please tell me.
I can take all the instructions and execute them, would like to contribute in this community since everything is new, the device the OS so in the future it does not happen to anybody else.

Thanks for your patience and understanding.

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

No branches or pull requests

2 participants