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

It doesn't work on Asus Zenbook Flip 14 UN5401Q (AMD) #3

Closed
Mark12870 opened this issue Aug 13, 2022 · 21 comments
Closed

It doesn't work on Asus Zenbook Flip 14 UN5401Q (AMD) #3

Mark12870 opened this issue Aug 13, 2022 · 21 comments
Assignees
Labels
question Further information is requested

Comments

@Mark12870
Copy link
Contributor

Device: Asus Zenbook Flip 14 UN5401Q (ASUSTeK COMPUTER INC. Zenbook UN5401QAB_UN5401QA)
OS: Ubuntu 22.04.1 LTS

When I flip the device, nothing happens.

Debug log:

marek@marek-zenbook:~/Downloads/asus-fliplock-driver-master$ LOG=DEBUG sudo -E ./asus_fliplock.py
[sudo] password for marek: 
DEBUG:Asus fliplock:Detect wmi hotkeys from N: Name="Asus WMI hotkeys"
DEBUG:Asus fliplock:Set wmi hotkeys id 4 from H: Handlers=rfkill kbd event4
@ldrahnik
Copy link
Member

ldrahnik commented Aug 13, 2022

Hi, thank you for creating an issue.

Can you please run this command sudo libinput debug-events and do a flip with your laptop? Post the result here. You should see this as me (this driver reacts to these events):

$ sudo libinput debug-events
...
-event4   DEVICE_ADDED     Asus WMI hotkeys                  seat0 default group11 cap:k
...
-event4   KEYBOARD_KEY     +0.623s	KEY_PROG2 (149) pressed
 event4   KEYBOARD_KEY     +0.623s	KEY_PROG2 (149) released
-event29  DEVICE_ADDED     Intel HID switches                seat0 default group16 cap:S
 event29  SWITCH_TOGGLE    +0.722s	switch tablet-mode state 1
-event29  SWITCH_TOGGLE    +1.174s	switch tablet-mode state 0
-event4   KEYBOARD_KEY     +1.175s	KEY_PROG2 (149) pressed
 event4   KEYBOARD_KEY     +1.175s	KEY_PROG2 (149) released
...

@Mark12870
Copy link
Contributor Author

Ye, I was just debugging the problem and it looks like it doesn't emit the event at all. Probably the device is not supported properly in the kernel? I was thinking about this place: https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-nb-wmi.c

@ldrahnik
Copy link
Member

It might be a reason. Do you use intel as me or amd? I already met someone with amd but sorry, do not know if he solved / figured out what was the problem.

@ldrahnik
Copy link
Member

ldrahnik commented Aug 13, 2022

What you can do is check if the kernel module is installed / supported by your distro (I use Ubuntu 20.04 based distro), and is running without problems. If is amd not your case I recommend you try to enable module by yourself & disable module what your laptop is using atm and I believe it should work. Good luck. Stay in touch!

@ldrahnik
Copy link
Member

ldrahnik commented Aug 13, 2022

Atm your laptop when is flipped to tablet mode disable at least the keyboard or not?

@ldrahnik ldrahnik added the question Further information is requested label Aug 13, 2022
@Mark12870
Copy link
Contributor Author

Mark12870 commented Aug 13, 2022

I have AMD. It doesn't disable anything.
I think the kernel module is loaded. I see all these inputs:

marek@marek-zenbook:~$ ls /dev/input/by-path/
pci-0000:04:00.4-usb-0:2:1.0-event  platform-AMDI0010:03-event-mouse
platform-AMDI0010:00-event          platform-AMDI0010:03-mouse
platform-AMDI0010:00-event-mouse    platform-asus-nb-wmi-event
platform-AMDI0010:00-mouse          platform-i8042-serio-0-event-kbd
platform-AMDI0010:03-event-kbd

I think platform-asus-nb-wmi-event should be emitting the event.

(And sorry Im answering late, I don't see any notification anywhere)

@leaha00
Copy link

leaha00 commented Feb 7, 2023

Hey, did anyone ever get this fixed, I have the same laptop and have this problem?
Thanks

@beankylla
Copy link

I have a UN5401RA and am dying to see this fixed!
If there is anything i can do to help, glad to do it! Fedora 38 under the hood here.
Thanks a lot for the touchpad driver btw works like a charm!

@ldrahnik
Copy link
Member

ldrahnik commented Jun 30, 2023

@beankylla Hello there :)

Thanks a lot for the touchpad driver btw works like a charm!

Glad to hear that, put a star if you like and do not hesitate to create any issue in case you face something.

Please try to run this command $ sudo acpi_listen and then flip laptop. Do you see as output any row which contain something like video/tabletmode?

@ldrahnik ldrahnik added the bug Something isn't working label Jun 30, 2023
@ldrahnik ldrahnik changed the title It doesn't work on Asus Zenbook Flip 14 UN5401Q It doesn't work on Asus Zenbook Flip 14 UN5401Q (AMD) Jun 30, 2023
@ldrahnik ldrahnik reopened this Jun 30, 2023
@ldrahnik
Copy link
Member

ldrahnik commented Jun 30, 2023

@beankylla ping

In my case I see:

$ sudo acpi_listen
[sudo] password for ldrahnik:          
 video/tabletmode TBLT 0000008A 00000001 # flip to tablet mode
 ...
 video/tabletmode TBLT 0000008A 00000000 # flip back to laptop mode
 ...

What do you see on AMD device?

@beankylla
Copy link

beankylla commented Jun 30, 2023

Hi!

nope nothing happens :(
absolutely no feedback / line stay emtpy

@ldrahnik
Copy link
Member

ldrahnik commented Jul 1, 2023

@beankylla Try $ sudo libinput debug-events, do you receive any events during switching your laptop to tablet mode and back? (KEY_F22/F23 for example)

@beankylla
Copy link

beankylla commented Jul 1, 2023

@ldrahnik nope not if i don't accidently touche screen or keyboard, just tried again ^^'

edit: i just tried again with Fedora 39 and no dice. even kernel 6.5.10 does not seem to have what we need ^^'

@Esras
Copy link

Esras commented Aug 21, 2023

I've got similar issues to what's described here, the output of sudo libinput debug-events gets me:

-event14  DEVICE_ADDED            Video Bus                         seat0 default group1  cap:k
-event0   DEVICE_ADDED            Lid Switch                        seat0 default group2  cap:S
-event1   DEVICE_ADDED            Power Button                      seat0 default group3  cap:k
-event7   DEVICE_ADDED            ELAN9008:00 04F3:4065 Stylus      seat0 default group4  cap:T  size 300x190mm calib
-event4   DEVICE_ADDED            ELAN9008:00 04F3:4065             seat0 default group4  cap:t  size 312x191mm ntouches 10 calib
-event11  DEVICE_ADDED            ASUE140D:00 04F3:31B9 Mouse       seat0 default group5  cap:p left scroll-nat scroll-button
-event12  DEVICE_ADDED            ASUE140D:00 04F3:31B9 Touchpad    seat0 default group5  cap:pg  size 129x72mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on dwtp-on
-event13  DEVICE_ADDED            ASUE140D:00 04F3:31B9 Keyboard    seat0 default group5  cap:k
-event15  DEVICE_ADDED            Asus WMI hotkeys                  seat0 default group6  cap:k
-event2   DEVICE_ADDED            AT Translated Set 2 keyboard      seat0 default group7  cap:k
 event2   KEYBOARD_KEY            +0.000s	*** (-1) pressed
 event2   KEYBOARD_KEY            +0.146s	*** (-1) pressed

This was also after rotating the screen and flipping it to tablet mode. Model UN5401, AMD 6800H.

So, no "switch" event, or tablet mode callout.

Having done a lot of searching, it seems like this might be part of the "amd_sfh" module. I was also hoping to find a manual script for swapping to tablet mode, but it seems like that happens at a lower level, and relies on the libinput events.

I would love to report this upstream to the appropriate place to help debug, but I don't know where that would be. Can someone point me towards it?

@Buskebam
Copy link

Any luck finding the place where we should report/ try to fix this upstream? Having the same issue unfortunately.

@Sporknife
Copy link

Sporknife commented Nov 18, 2023

This bug has been open for some time now. I hope it gets more attention.
https://bugzilla.kernel.org/show_bug.cgi?id=214675

@Buskebam
Copy link

We got an update

AFAIK the issue rely on the fact that amd-sfh do not support lid angle sensors as of today, but I'm not sure if this laptop use that driver or ASUS has invented something else for handling it and therefore the driver is fully missing.

Not sure how we can continue our search towards the correct place to report a bug.

@Sporknife
Copy link

Sporknife commented Nov 21, 2023

Found some documentation. Go to https://docs.kernel.org/admin-guide/abi-testing.html and search for /sys/bus/surface_aggregator/devices/01:0e:01:00:01/state.

But as far as I understood, this is only for testing/debugging. I think.

@ldrahnik ldrahnik added help wanted Extra attention is needed and removed question Further information is requested labels Nov 28, 2023
@ldrahnik
Copy link
Member

ldrahnik commented Jan 7, 2024

I developed a driver for laptop Zenbook UN5401QAB (AMD), Vivobook TM420IA (AMD) and other laptops with this problem https://github.com/asus-linux-drivers/asus-accel-tablet-mode-driver using accelerometer

@ldrahnik
Copy link
Member

ldrahnik commented Jan 7, 2024

Closing as this issue is not related to this driver and exists mentioned solution

@ldrahnik ldrahnik closed this as completed Jan 7, 2024
@ldrahnik ldrahnik self-assigned this Jan 7, 2024
@ldrahnik ldrahnik added question Further information is requested and removed bug Something isn't working help wanted Extra attention is needed labels Jan 7, 2024
@ldrahnik
Copy link
Member

Discussion continues here

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

No branches or pull requests

7 participants