LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 03-17-2019, 06:25 PM   #1
Stefan42
LQ Newbie
 
Registered: Mar 2019
Posts: 8

Rep: Reputation: Disabled
Unhappy [Solved] Volume function keys (from laptop, external keyboard works) get stuck in X11/Wayland (but seem to work with kernel)


A friend has a new notebook, Medion Akoya P6685 with Ubuntu 18.10 (also tried Fedora, Manjaro and others). The bug appears independent of using X or Wayland. We also tried using a newer kernel (4.20.11).

When I click on the Mute or Increase/Decrease volume (Fn+F10..12) button, it appears to be stuck and triggered very often (i.e. mute flickers or volume goes to 0/100). After that, these buttons appear to be broken and the keyboard sometimes does no longer work (until reboot).
This only happens when I use the Fn Keys from the laptop. When I use an external USB keyboard (with dedicated volume buttons), the bug does not appear.

I think the keys seem to get recognized correctly by the kernel (see evtest) but not by X (see xev).

Does anyone have an idea how to fix this issue or at least to disable these function keys?

Here is a video where I press the keys with some logs open:
http://sendvid.com/8j4ofehd

I can update additional logs if you want, but all logs (journalctl, dmesg, xev, evtest, xorg in video) seem to show no problem. Some extra logs:

Last edited by Stefan42; 03-29-2019 at 09:20 AM.
 
Old 03-20-2019, 04:05 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
what does xev register, esp. when the "flickering" occurs?
 
Old 03-20-2019, 05:06 PM   #3
Stefan42
LQ Newbie
 
Registered: Mar 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
xev doesn't report anything (except the FocusOut event), c.f. top right terminal in the video :/
 
Old 03-20-2019, 05:08 PM   #4
Stefan42
LQ Newbie
 
Registered: Mar 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you for your answer

xev doesn't report anything except the FocusOut event, please see top right terminal in the video.

(Sorry for 2nd post, first one was not posted due to link I think.)

Last edited by Stefan42; 03-22-2019 at 03:58 PM.
 
Old 03-21-2019, 03:12 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Stefan42 View Post
xev doesn't report anything except the FocusOut event
sorry, i don't understand what that means.
can you show some representative output (probably not all of it)?
Quote:
c.f. top right terminal in the video.
i don't understand "c.f." and i do not see any video. sorry.

some general advice:
  • take your time to produce a meaningful problem description. this also helps you to understand the problem better and get 50% closer to a solution. videos don't usually help. you diligently posted some command output, but unless someone goes "aha, keyboards with that vendor/model ID always have this problem!" i don't see how it's going to help.
  • medion laptops are often rebranded form some other brand. try to find out which, that will help you to search better. maybe this helps.
  • why ubuntu 18.10??? it's a sort of beta version. the laptop isn't so new anymore, i believe 18.04 is totally sufficient

on a wild guess i'd say undo all the stuff you did and try to fix it as an ACPI issue.
tricky to give definite advice, but it usually boils down to adding a particular option to the kernel boot command (grub), sth like "acpi=vendor" maybe...
 
Old 03-22-2019, 04:31 PM   #6
Stefan42
LQ Newbie
 
Registered: Mar 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
sorry, i don't understand what that means.
can you show some representative output (probably not all of it)?
Ok, I start xev and move the cursor on the icon and then click the mute button (Fn+F10) on the keyboard. The only (new) output from xev is
Code:
FocusOut event, serial 37, synthetic NO, window 0x3000001,
    mode NotifyGrab, detail NotifyAncestor
and nothing else. I assume the FocusOut event comes from the sound icon that gets displayed because of the mute/unmute.

Quote:
Originally Posted by ondoho View Post
i don't understand "c.f." and i do not see any video. sorry.
Sorry, I made a video and linked it in the first post but I will try to describe it better: In the video, I open terminals with journalctl, dmesg, xev and evtest and then click the mute button. Then, the mute icon appears and flickers (sound also makes some noise). It appears to be pressed many times per second for multiple seconds (while I pressed only once of course). I often cannot use any other key after this happens (appear to be blocked), mouse works fine however.
The other relevant log I think is `evtest /dev/input/event3`. There, the reaction to be pressing the button is a single
Code:
-----SYN_REPORT----
type 4 (EV_MSC), code 4 (MSC_SCAN), value a0
type 1 ((EV_KEY), code 113 (KEY_MUTE), value 1
dmesg -w, journalctl -f and the xorg log do not output anything when I press the button.

Edit: Basically the same happens for F11 and F12 (audio increase/decrease). I can only do this with each button once, then they don't do anything anymore (until reboot).

What I concluded was that the kernel apparently correctly gets just one mute key signal but somehow the system receives hundreds of key presses at the end and I have no idea where to continue.

I will try some acpi kernel commandline options when I have access to the notebook on Monday again.

Last edited by Stefan42; 03-22-2019 at 04:32 PM.
 
Old 03-27-2019, 11:56 AM   #7
Stefan42
LQ Newbie
 
Registered: Mar 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello,

I tried multiple acpi commandline options today. With
Code:
acpi=vendor or acpi=on,
there was no change in the behaviour. With one of
Code:
acpi=off, acpi=noirq, acpi=rsdt,
the volume keys just did nothing (since acpi was (partially) disabled). So that seems not to help.

A friend also suggested to use evtest on
Code:
/dev/input/event1, /dev/input/event2, ..., /dev/input/event12
(all in separate terminal windows) and there were no additional outputs in the other events (only the single key message in event3).

Edit: If you have further ideas or can think of helpful logs, I would be happy of course. If you have no idea however, it's no problem - these functions keys are not the most important feature

Last edited by Stefan42; 03-27-2019 at 11:58 AM.
 
Old 03-27-2019, 02:06 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Stefan42 View Post
With one of
Code:
acpi=off, acpi=noirq, acpi=rsdt,
the volume keys just did nothing (since acpi was (partially) disabled). So that seems not to help.
au contraire, that's an important troubleshooting step:
disabling acpi makes the symptoms go away.

i would suggest you to continue doing web searches...
actually nevermind, i did it for you:
https://askubuntu.com/questions/1048...at-key-presses
 
Old 03-29-2019, 09:20 AM   #9
Stefan42
LQ Newbie
 
Registered: Mar 2019
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks a lot! I don't see why I did not find the askubuntu entry you linked before... The problem seems to be the same,
Quote:
Originally Posted by cousteau
It seems that the keyboard of these laptops only sends key press events and not key release events when pressing these three Fn keys.
and the solution here works:
Quote:
Originally Posted by cousteau
Create a text file containing:
Code:
# Fix for volume keys on Medion keyboards
evdev:atkbd:dmi:bvn*:bvr*:svnMEDION:pnP*:pvr*
evdev:atkbd:dmi:bvn*:bvr*:svnMedion:pnP*:pvr*
 KEYBOARD_KEY_a0=!mute
 KEYBOARD_KEY_ae=!volumedown
 KEYBOARD_KEY_b0=!volumeup
Save it to /lib/udev/hwdb.d/99-keyboard-medion-vol-fix.hwdb and run the following commands as root:
Code:
systemd-hwdb update
udevadm trigger --verbose --sysname-match="event*"
and done! Volume keys now work normally.

Last edited by Stefan42; 03-29-2019 at 09:22 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Wayland: Inaccessible and restrictive by design? (Aka, Wayland won't get out of my way and I don't want it in my future.) CajunCoder Linux - General 2 09-04-2017 12:32 PM
[SOLVED] X11 Forwarding-X11 Applications Works but startx Not Works gonny95 Linux - Newbie 4 07-27-2014 08:00 PM
IBM keyboard special keys not working - setkeycodes doesn't seem to work harmonator Linux - Hardware 0 03-19-2009 03:38 PM
USB keyboard function keys/numeric keys on boot raypen Linux - Hardware 4 04-17-2008 03:07 PM
function keys and gnome-terminal function keys and gnome-terminal fakie_flip Linux - Software 1 10-23-2007 11:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration