Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Keyboard freezes when attaching audio jack
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Fri Oct 06, 2017 6:04 pm    Post subject: Keyboard freezes when attaching audio jack Reply with quote

This is a bug I also had on Archlinux.
Steps to reproduce:

  • Switch on the computer and let it boot up.
  • Plug in my HiFi system.
  • Switch on the HiFi system.
  • Attach the audio cable to either the front or rear line out.


Result: at least my keyboard (Trust GXT 18 with Holtek driver built in the kernel) does not respond anymore. At worse the entire system stops working, even the screen.

Log of the last freeze of my keyboard:
Code:
Oct  6 19:49:03 gentooser kernel: [19440.543614] usb 2-1.7: USB disconnect, device number 4
Oct  6 19:49:03 gentooser kernel: [19440.593417] BUG: unable to handle kernel paging request at 0000000000001bf8
Oct  6 19:49:03 gentooser kernel: [19440.593470] IP: holtek_kbd_input_event+0x3f/0x60
Oct  6 19:49:03 gentooser kernel: [19440.593495] PGD 0
Oct  6 19:49:03 gentooser kernel: [19440.593496] P4D 0
Oct  6 19:49:03 gentooser kernel: [19440.593508]
Oct  6 19:49:03 gentooser kernel: [19440.593529] Oops: 0000 [#1] SMP
Oct  6 19:49:03 gentooser kernel: [19440.593547] Modules linked in: x86_pkg_temp_thermal
Oct  6 19:49:03 gentooser kernel: [19440.593576] CPU: 0 PID: 43 Comm: kworker/0:1 Not tainted 4.12.12-gentoo #12
Oct  6 19:49:03 gentooser kernel: [19440.593611] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z77 Pro4, BIOS P1.80 07/11/2013
Oct  6 19:49:03 gentooser kernel: [19440.593661] Workqueue: usb_hub_wq hub_event
Oct  6 19:49:03 gentooser kernel: [19440.593684] task: ffff950d659e1a00 task.stack: ffffaa1b00dd0000
Oct  6 19:49:03 gentooser kernel: [19440.593716] RIP: 0010:holtek_kbd_input_event+0x3f/0x60
Oct  6 19:49:03 gentooser kernel: [19440.593743] RSP: 0018:ffffaa1b00dd38e0 EFLAGS: 00010046
Oct  6 19:49:03 gentooser kernel: [19440.593770] RAX: 0000000000000000 RBX: 0000000000000011 RCX: 0000000000000000
Oct  6 19:49:03 gentooser kernel: [19440.593806] RDX: 0000000000000000 RSI: 0000000000000011 RDI: 0000000000000002
Oct  6 19:49:03 gentooser kernel: [19440.593844] RBP: ffffaa1b00dd38f8 R08: 0000000000000000 R09: ffffffffffffffff
Oct  6 19:49:03 gentooser kernel: [19440.593880] R10: ffffaa1b00dd3a10 R11: 0000000000000000 R12: 0000000000000000
Oct  6 19:49:03 gentooser kernel: [19440.593915] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000003
Oct  6 19:49:03 gentooser kernel: [19440.593951] FS:  0000000000000000(0000) GS:ffff950d6f200000(0000) knlGS:0000000000000000
Oct  6 19:49:03 gentooser kernel: [19440.593992] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Oct  6 19:49:03 gentooser kernel: [19440.594021] CR2: 0000000000001bf8 CR3: 000000000c00a000 CR4: 00000000001406f0
Oct  6 19:49:03 gentooser kernel: [19440.594056] Call Trace:
Oct  6 19:49:03 gentooser kernel: [19440.594075]  input_handle_event+0x94/0x570
Oct  6 19:49:03 gentooser kernel: [19440.594098]  input_inject_event+0x84/0x90
Oct  6 19:49:03 gentooser kernel: [19440.594121]  input_leds_brightness_set+0x22/0x30
Oct  6 19:49:03 gentooser kernel: [19440.594147]  led_set_brightness_nopm+0xf/0x40
Oct  6 19:49:03 gentooser kernel: [19440.594170]  led_set_brightness+0x32/0x60
Oct  6 19:49:03 gentooser kernel: [19440.594192]  led_trigger_set+0xe7/0x1b0
Oct  6 19:49:03 gentooser kernel: [19440.594214]  led_classdev_unregister+0x2d/0xb0
Oct  6 19:49:03 gentooser kernel: [19440.594239]  input_leds_disconnect+0x39/0x70
Oct  6 19:49:03 gentooser kernel: [19440.594265]  __input_unregister_device+0xa5/0x140
Oct  6 19:49:03 gentooser kernel: [19440.594290]  input_unregister_device+0x42/0x60
Oct  6 19:49:03 gentooser kernel: [19440.594315]  hidinput_disconnect+0x5d/0xc0
Oct  6 19:49:03 gentooser kernel: [19440.594338]  hid_disconnect+0x5b/0x70
Oct  6 19:49:03 gentooser kernel: [19440.594358]  hid_device_remove+0xad/0xc0
Oct  6 19:49:03 gentooser kernel: [19440.594381]  device_release_driver_internal+0x150/0x210
Oct  6 19:49:03 gentooser kernel: [19440.594409]  device_release_driver+0xd/0x10
Oct  6 19:49:03 gentooser kernel: [19440.594431]  bus_remove_device+0xf3/0x140
Oct  6 19:49:03 gentooser kernel: [19440.594455]  device_del+0x1d3/0x2f0
Oct  6 19:49:03 gentooser kernel: [19440.594474]  hid_destroy_device+0x22/0x60
Oct  6 19:49:03 gentooser kernel: [19440.594496]  usbhid_disconnect+0x3f/0x60
Oct  6 19:49:03 gentooser kernel: [19440.594519]  usb_unbind_interface+0x6d/0x260
Oct  6 19:49:03 gentooser kernel: [19440.594544]  device_release_driver_internal+0x150/0x210
Oct  6 19:49:03 gentooser kernel: [19440.594572]  device_release_driver+0xd/0x10
Oct  6 19:49:03 gentooser kernel: [19440.594594]  bus_remove_device+0xf3/0x140
Oct  6 19:49:03 gentooser kernel: [19440.594616]  device_del+0x1d3/0x2f0
Oct  6 19:49:03 gentooser kernel: [19440.594635]  usb_disable_device+0x97/0x1f0
Oct  6 19:49:03 gentooser kernel: [19440.594658]  usb_disconnect+0x88/0x230
Oct  6 19:49:03 gentooser kernel: [19440.594679]  hub_event+0x5b6/0x11d0
Oct  6 19:49:03 gentooser kernel: [19440.594700]  ? dequeue_task_fair+0x755/0xd70
Oct  6 19:49:03 gentooser kernel: [19440.594724]  process_one_work+0x146/0x3e0
Oct  6 19:49:03 gentooser kernel: [19440.594747]  worker_thread+0x43/0x3e0
Oct  6 19:49:03 gentooser kernel: [19440.594767]  kthread+0x104/0x140
Oct  6 19:49:03 gentooser kernel: [19440.594786]  ? create_worker+0x190/0x190
Oct  6 19:49:03 gentooser kernel: [19440.594808]  ? kthread_create_on_node+0x40/0x40
Oct  6 19:49:03 gentooser kernel: [19440.594833]  ret_from_fork+0x22/0x30
Oct  6 19:49:03 gentooser kernel: [19440.594853] Code: 41 89 d4 41 89 cd 48 8b 80 e8 18 00 00 48 8b 38 48 81 ef 98 00 00 00 e8 50 ec f3 ff 48 8b 80 c8 00 00 00 44 89 e9 44 89 e2 89 de <48> 8b 80 f8 1b 00 00 48 8b 40 18 48 89 c7 ff 90 e0 01 00 00 5b
Oct  6 19:49:03 gentooser kernel: [19440.594974] RIP: holtek_kbd_input_event+0x3f/0x60 RSP: ffffaa1b00dd38e0
Oct  6 19:49:03 gentooser kernel: [19440.595007] CR2: 0000000000001bf8
Oct  6 19:49:03 gentooser kernel: [19440.608027] ---[ end trace c2235afa8c2bf842 ]---
Oct  6 19:50:10 gentooser shutdown[31557]: shutting down for system reboot


My Hi-Fi system is a Philips FW-C780. My motherboard is an AsRock Z77 Pro4 with Realtek HD Audio Output.

If you need any additional info, let me know.


Last edited by alogim on Sat Oct 07, 2017 8:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6316
Location: /usr/lib64/lv2

PostPosted: Sat Oct 07, 2017 4:17 pm    Post subject: Reply with quote

The fact that you've now seen this on two OS's tells me you might have wonky hardware that might need to be replaced. :(
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14169

PostPosted: Sat Oct 07, 2017 5:29 pm    Post subject: Reply with quote

Maybe, but since he showed a kernel oops, I think we cannot completely blame the hardware yet. If the CPU and memory are good, but a peripheral is misbehaving, the kernel ought to handle it gracefully. That oops is not graceful. If he had a bad CPU or bad memory, he would probably see more random failures.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Sat Oct 07, 2017 9:07 pm    Post subject: Reply with quote

Okay, here are some news related to this. With other distributions, such as Ubuntu, as far as I remember I have never had this problem.

Another thing is, sometimes this problem does not happen when I unplug the audio cable from the computer. I did some experiments, and the keyboard/the system sometimes stops responding immediately after I detach my audio cable, with the message above. However, some other times this does not happen, that is, I detach the audio cable and everything works just fine; here is the curious thing, however. If after detaching the cable my system is still good and I unplug my Hi-Fi system from the power plug, my computer responds with the above error. I also tried with a printer, and it looks that when I attach a new device to the power plug, something happens in such a way that the kernel is unable to properly deal with it.

I did also another experiment. I took a printer, put the power plug in without switching her on, connected her to the computer and switched her on. Everything was good. I switched it off, unplug it, and everything was still good, I waited for a few minutes to be sure. Then I unplugged my printer from the power plug, and here comes the kernel problem again.

Could it be a problem related to differences in power voltage/tension? This is, however, extremely weird from my point of view.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7258
Location: Saint Amant, Acadiana

PostPosted: Sat Oct 07, 2017 9:12 pm    Post subject: Reply with quote

It would not hurt to check voltages on ATX connector. Do you have a voltmeter?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Sun Oct 08, 2017 6:42 am    Post subject: Reply with quote

These symptoms sound like what happens when two systems each having a different idea of electrical "ground" are interconnected.

Does your HiFi system also receive signal from a cable box or receiver that is connected to the cable? Cable systems around "here" are notorious for having "grounds" that are quite a bit above the local ground potential. I've seen as much as 10-20V on the cable shield relative to local Earth ground. And when you plug in something that's connected to the cable, to something else that has the normal 3-prong electrical ground, significant ground currents can flow. Enough to disrupt operation, which might be what's happening to you.

Try disconnecting the cable from your equipment, and then try plugging in the audio to your computer. If that fixes the problem, then you know it is ground-loop currents. If that's the problem you can fix it with an isolating balun at the cable connector.

Poor quality or mis-wired electrical service grounds can be another source of problems. This type of problem shows up when you power equipment from outlets on different circuits, and at least one of them isn't properly grounded. (Using "neutral" as a "ground" is a shoddy (and highly unsafe and illegal) "fix" that's sometimes seen in old apartments.)
_________________
Many think that Dilbert is a comic. Unfortunately it is a documentary.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6316
Location: /usr/lib64/lv2

PostPosted: Sun Oct 08, 2017 1:58 pm    Post subject: Reply with quote

I'm wondering if a simple Furman power conditioner would help.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Tue Oct 10, 2017 4:05 pm    Post subject: Reply with quote

So, I did some additional tests. It looks like - in order to reproduce the problem - attaching the audio cable is not even needed. The situation is the following:
  • I have a double power socket in the wall near my desktop, a 16 A type L and a 10 A type L, exactly as shown in this picture.
  • I have this power strip connected to the 16A power socket. It has two Italian adapted Schukos and four Bipasso sockets (respectively 1 and 2 in this image).
  • I have an Asus monitor with a CEE 7/7 plug and my desktop PC with the same power plug connected to the above-mentioned power strip.
  • My Hi-Fi system has an Europlug, so it is the only thing attached to the power strip without ground.


If I connect my Hi-Fi system in a different power socket of my room, everything works perfectly. As soon as I attach it into the same power socket or in the power strip, the above problem starts to rise. The interesting point is that, while on Arch the whole system froze, on Gentoo only the keyboard stops responding. Maybe it is something related to the holtek driver built in the kernel?
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6316
Location: /usr/lib64/lv2

PostPosted: Tue Oct 10, 2017 4:21 pm    Post subject: Reply with quote

alogim wrote:

[*] My Hi-Fi system has an Europlug, so it is the only thing attached to the power strip without ground.
[/list]

If I connect my Hi-Fi system in a different power socket of my room, everything works perfectly. As soon as I attach it into the same power socket or in the power strip, the above problem starts to rise. The interesting point is that, while on Arch the whole system froze, on Gentoo only the keyboard stops responding. Maybe it is something related to the holtek driver built in the kernel?


Maybe, but you need everything on the same ground circuit. Rooms designed to run multiple pieces of electronics, such as recording studios, are designed this way to avoid the very problem you're having, in addition to other potential issues.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 127

PostPosted: Tue Oct 10, 2017 7:07 pm    Post subject: Reply with quote

The problem is, my Hi-Fi system does not have any ground. The cable is made of just two littler cables, so I really do not know how to add a ground cable.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6316
Location: /usr/lib64/lv2

PostPosted: Wed Oct 11, 2017 3:19 pm    Post subject: Reply with quote

Ah, I see. Well, for that, you've already found the solution - plug it into a different circuit.
_________________
Gentoo Studio: A Gentoo-based, professional digital audio workstation OS.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 6702
Location: &akkara

PostPosted: Wed Oct 11, 2017 8:35 pm    Post subject: Reply with quote

alogim wrote:
If I connect my Hi-Fi system in a different power socket of my room, everything works perfectly. As soon as I attach it into the same power socket or in the power strip, the above problem starts to rise. The interesting point is that, while on Arch the whole system froze, on Gentoo only the keyboard stops responding. Maybe it is something related to the holtek driver built in the kernel?


alogim wrote:
The problem is, my Hi-Fi system does not have any ground. The cable is made of just two littler cables, so I really do not know how to add a ground cable.

Something doesn't sound right here. It sounds like there might be a problem with Hi-Fi system. Maybe some component is leaking mains current where it should not be going. Maybe the unit itself is injecting electrical noise into the line (a bad rectifier would do that). Or maybe some other device is leaking a little bit of current and connecting the hi-fi system makes it noticable.

Does it matter which way you plug it in? Is your second outlet on the same circuit? How much power does it draw? Is your circuit overloaded?

Do you have a voltmeter? Try measuring the voltage between ground on the power strip and the case of your hi-fi unit. Pick a shiny screw in the back so you have a good connection. If it is a plastic case, use the outside "barrel" of one of the audio connectors instead. Measure both AC and DC.

Repeat that with the unit plugged into the other outlet.

Also measure the voltage from the ground on the other outlet to the ground on the power strip.

And just to be sure, check the voltage between the ground and your computer case. (If it's a laptop measure to the outer shell of a USB connector.)
_________________
Many think that Dilbert is a comic. Unfortunately it is a documentary.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum