# Computer suddenly seems to think I'm pressing and holding a key.



## mikethe1wheelnut (Mar 30, 2021)

This happens, seemingly at random, both when visiting forums such as this one, and now, when in the blender console.  Most commonly it'll be as if I'm pressing and holding either the enter key or the back-space key.  ctrl-c seems to stop it.  Pressing other keys might also stop it, I'm usually rather frazzled when it happens.  So, I guess, the first question is, has anybody else reported anything similar?  Hard to search for if you're not sure how to describe it..


----------



## richardtoohey2 (Mar 30, 2021)

Not aware of anything similar, no.  Check cables, connectors.  Try with a different keyboard.

Does it happen under a particular environment/window manager?

Have you changed any keyboard settings, repeat rate anything like that?

Sounds more like hardware than software.


----------



## mikethe1wheelnut (Mar 30, 2021)

richardtoohey2 said:


> Not aware of anything similar, no.  Check cables, connectors.  Try with a different keyboard.
> 
> Does it happen under a particular environment/window manager?
> 
> ...



This is pretty much a basic install, xfce.  I downloaded firefox and blender to test blender.  I haven't even got round to changing the wallpaper.  I installed fuse (handbook section 18.8) because I thought I needed it to read my usb key..  This is a ~5-year-old dell laptop..


----------



## mikethe1wheelnut (Mar 30, 2021)

> root@ozzie:~ # dmesg | grep CPU
> CPU: Intel(R) Core(TM) i5-4310U CPU @ 2.00GHz (2594.06-MHz K8-class CPU)
> FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
> cpu0: <ACPI CPU> on acpi0


----------



## Snurg (Mar 30, 2021)

Swallowed keyup/keydown events can be related to USB keyboard problems, as some pack multiple of these events into a single data packet.
Did you try another keyboard?


----------



## pboehmer (Mar 30, 2021)

Snurg said:


> Swallowed keyup/keydown events can be related to USB keyboard problems, as some pack multiple of these events into a single data packet.
> Did you try another keyboard?


I concur... I have this issue when I plug in a USB Serial adapter.  I just end up unplugging/plugging in the USB keyboard to get it resolved.


----------



## mikethe1wheelnut (Mar 30, 2021)

Snurg said:


> Swallowed keyup/keydown events can be related to USB keyboard problems, as some pack multiple of these events into a single data packet.
> Did you try another keyboard?



This is a Dell Latitude E7440 laptop, so the keyboard is integrated.  Sorry I didn't make that clearer earlier.  Deactivating the touchpad (hate it..) is on my to-do list.  I've done it on linux installs, haven't got around to it here..


----------



## Snurg (Mar 30, 2021)

Do you experience this also without xorg running?

A thing to try could be setting this differently:
`sysctl -da` is instructive.


```
kern.evdev.rcpt_mask: Who is receiving events: bit0 - sysmouse, bit1 - kbdmux, bit2 - mouse hardware, bit3 - keyboard hardware
```

The FreeBSD default is 12, which means bit 2+3 on.
Maybe it could be better to use kbdmux instead of directly the hardware.
So I'd try 6 instead.


----------



## mikethe1wheelnut (Mar 30, 2021)

Snurg said:


> Do you experience this also without xorg running?
> 
> A thing to try could be setting this differently:
> `sysctl -da` is instructive.
> ...


Thanks for your response!  I'll get back to you as soon as I can (give it a day or two).  
[No, so far I haven't experienced this (I don't think) without xorg running.  My goal is to use this as a desktop computer for web-researching and design work using blender, so unless I get wayland working, my understanding is that I need xorg.  i3 is what I'm currently most interested in..]


----------



## richardtoohey2 (Mar 30, 2021)

mikethe1wheelnut said:


> so the keyboard is integrated


Yes, but you could try a USB keyboard to see if that gives the same behaviour.  If you are getting the same behaviour with the USB keyboard, then seems less likely a hardware problem.

If the USB keyboard works fine - maybe something wrong with the laptop's keyboard and you can check that.


----------



## decuser (Mar 31, 2021)

Beyond software issues, I've seen this with hair/dust under the keys and also with spills. You might want to try blowing it out with an electronic duster, or taking a look at the insides...


----------



## mikethe1wheelnut (Jun 27, 2021)

Snurg said:


> Swallowed keyup/keydown events can be related to USB keyboard problems, as some pack multiple of these events into a single data packet.
> Did you try another keyboard?


..this is a laptop with integrated keyboard..  -right, just saw richard's answer.  I don't happen to have a separate keyboard to test with.  I suppose it'll eventually become enough of a problem that I'll go out and invest in one just to do the test.  The same problem has now happened in the blender editor.  I can stop it by hitting backspace.  seems like that worked..  (and I've now deactivated the touch-pad)


----------



## mikethe1wheelnut (Jun 27, 2021)

richardtoohey2 said:


> Yes, but you could try a USB keyboard to see if that gives the same behaviour.  If you are getting the same behaviour with the USB keyboard, then seems less likely a hardware problem.
> 
> If the USB keyboard works fine - maybe something wrong with the laptop's keyboard and you can check that.


interesting.  I should note that I previously had windows (..squirm..) on this machine, and didn't have any of these problems (plenty of others..), so if it's a hardware problem, it's happened since.  (granted, this is an old machine, refurbished..)


----------



## mikethe1wheelnut (Jun 27, 2021)

decuser said:


> Beyond software issues, I've seen this with hair/dust under the keys and also with spills. You might want to try blowing it out with an electronic duster, or taking a look at the insides...


..these answers all seem to point toward hardware.  ..very interesting..


----------



## astyle (Jun 28, 2021)

mikethe1wheelnut said:


> Thanks for your response!  I'll get back to you as soon as I can (give it a day or two).
> [No, so far I haven't experienced this (I don't think) without xorg running.  My goal is to use this as a desktop computer for web-researching and design work using blender, so unless I get wayland working, my understanding is that I need xorg.  i3 is what I'm currently most interested in..]


Just so that you know, graphics/blender is awfully RAM-hungry, on par with AutoCAD. You would need to shell out for a Xeon or a Threadripper plus a Tesla (no, not the car) or an Instinct card to do any real work.  It's not the tiny 3d suite from 1990s any more. Oh, and a 32-inch screen. For Wayland - visit euroquis.nl/bobulate.


----------



## Geezer (Jun 28, 2021)

Turn the keyboard upside down. If it is integrated, turn the whole box upside down.

And tap firmly on the underside of the keyboard. Amazing what comes out.


----------



## ssw01 (Jun 29, 2021)

mikethe1wheelnut said:


> This happens, seemingly at random, both when visiting forums such as this one, and now, when in the blender console.  Most commonly it'll be as if I'm pressing and holding either the enter key or the back-space key.  ctrl-c seems to stop it.  Pressing other keys might also stop it, I'm usually rather frazzled when it happens.  So, I guess, the first question is, has anybody else reported anything similar?  Hard to search for if you're not sure how to describe it..


For what it's worth, yes, I'm randomly experiencing similar behavior on the built-in keyboard of my Dell XPS13.  I'll be typing something and one of the keys will take off in autorepeat mode.  Also only seen it while in X but I'm usually in X so that may not be definitive.

The machine is relatively new and I'm pretty OCD about not getting crap on it so don't think it's dirt in the keyboard.  Also, never saw this happen during the couple of months I had Gentoo on it.

Would love to track this down because it's really annoying.


----------



## mikethe1wheelnut (Jul 1, 2021)

ssw01 said:


> For what it's worth, yes, I'm randomly experiencing similar behavior on the built-in keyboard of my Dell XPS13.  I'll be typing something and one of the keys will take off in autorepeat mode.  Also only seen it while in X but I'm usually in X so that may not be definitive.
> 
> The machine is relatively new and I'm pretty OCD about not getting crap on it so don't think it's dirt in the keyboard.  Also, never saw this happen during the couple of months I had Gentoo on it.
> 
> Would love to track this down because it's really annoying.


wow.. the plot thickens..  ..have you tried shurg's suggestion above?  ..this is still only a "minor irritant" for me..


----------



## mikethe1wheelnut (Jul 2, 2021)

Geezer said:


> Turn the keyboard upside down. If it is integrated, turn the whole box upside down.
> 
> And tap firmly on the underside of the keyboard. Amazing what comes out.


..well, I finally did, and.. well.. nothing came out that I could see..  I didn't smash it or anything..


----------



## mikethe1wheelnut (Jul 3, 2021)

Snurg said:


> Do you experience this also without xorg running?
> 
> A thing to try could be setting this differently:
> `sysctl -da` is instructive.
> ...


ok, I've -finally- got round to looking into this.  And I haven't found the code you have shown, so I don't know how to make the change you're suggesting.  `sysctl -da` gives output that is so long that it won't fit in the screen buffer.  I tried exiting to command-line (is this how you test to see if it's xorg that's the problem?)  using 


> Ctrl + Alt + F[1,2,3,4,5,6,7,8]


..and got the same result..
the one part that looks relevant is:


> Bit 0 (0x01) will enable CORE messages (drm core code)
> Bit 1 (0x02) will enable DRIVER messages (drm controller code)
> Bit 2 (0x04) will enable KMS messages (modesetting code)
> Bit 3 (0x08) will enable PRIME messages (prime code)
> ...


----------



## astyle (Jul 3, 2021)

Just redirect the output into a text file, like this: `# sysctl -da > sysctl_da.txt` or `# sysctl -da | less` for scrollable text that you can study at your convenience.


----------



## mikethe1wheelnut (Jul 3, 2021)

Snurg said:


> Do you experience this also without xorg running?
> 
> A thing to try could be setting this differently:
> `sysctl -da` is instructive.
> ...


thisok, running the test now, following the further instructions in (the this at the beginning of this line, where the forum insisted on putting it..?) post.. ..meanwhile, somewhat off-topic, I stumbled across this: ..which made me blink.. but which I'll proceed to ignore..


----------



## mikethe1wheelnut (Jul 3, 2021)

.. is there perhaps a log-file somewhere that would record this kind of thing, give some indication of where it's coming from? (whether hardware or not?)  if and when it occurs again in the future, I can immediately go to said log file and look at it..


----------



## ssw01 (Jul 4, 2021)

So after executing

`sysctl kernel.evdev.rcpt_mask=6`

as suggested, so far, so good.  Still very early in the experiment though.  Keeping fingers crossed...


----------



## astyle (Jul 4, 2021)

Put that into /etc/sysctl.conf for good measure, then it will survive reboots.


----------



## ssw01 (Jul 12, 2021)

I'm not the OP, but just to provide a bit of feedback...

At this point, I'm prepared to conclude that setting rcpt_mask to 6 has fixed the problem for my XPS13.

Thanks Snurg for the tip!


----------

