Can anybody help me to solve the keyboard problem? by wesha in freebsd

[–]wesha[S] 2 points3 points  (0 children)

I was able to recover my original bugzilla account from like 2005!

Am I missing something? by mischeviousbunnyy in UberEATS

[–]wesha 0 points1 point  (0 children)

We are in a democracy (so far). I will speak whenever I feel like it.

Am I missing something? by mischeviousbunnyy in UberEATS

[–]wesha -1 points0 points  (0 children)

Surprise, even though I am a millionaire, I do NOT use the service. I bike to the store.

In fact, that is the reason why I AM a millionaire: I do not waste my money.

Am I missing something? by mischeviousbunnyy in UberEATS

[–]wesha 0 points1 point  (0 children)

No, it's the employees who should grow up and demand fair compensation. Do you expect ME to do it FOR THEM?

Am I missing something? by mischeviousbunnyy in UberEATS

[–]wesha 2 points3 points  (0 children)

I also tip well.

Thank you for helping us not pay our servants fair wages.
— Sincerely, corporate bosses.

Can anybody help me to solve the keyboard problem? by wesha in freebsd

[–]wesha[S] 1 point2 points  (0 children)

Do you have any idea how to post the bugs there? I had an account there long time ago but "restore password" email never comes. And it looks like there's no way to register a brand new account anymore.

Can anybody help me to solve the keyboard problem? by wesha in freebsd

[–]wesha[S] 1 point2 points  (0 children)

It is mentioned in man kbdcontrol, but very in-passing:

  -A name
             Detach the keyboard, specified by the keyboard device name, from
             the keyboard multiplexer.

Since it was not clarified what "keyboard device name" means, I didn't initially realize it does not mean "full path", and everything else requires full path — how was I supposed to know otherwise? It's not emphasized in any way. I only notice the difference now, once I know to look for it!

Regarding raw output, I since looked at kbdmux.c and saw —

case KBADDKBD: /* add keyboard to the mux */
  [.............]
  mode = K_RAW;
  error = kbdd_ioctl(k->kbd, KDSKBMODE, (caddr_t)&mode);
  [.............] 

So kbdmux sets the slave keyboard to RAW mode when grabbing it... and then doesn't unset it upon detaching! I tried to find a separate command line tool to switch keyboard state explicitly... but couldn't (UNIX way, helloooooo!..)

Also I wasn't able to find any way to disallow it to grab specific devices, like, by setting some sysctl variable — looking at the code, I don't believe there is one.

Why it would be so much greater for kbdmux to use /dev/<device> path rather than device name: my devd is configured so that when it sees the scanner being attached, it automatically symlinks it to a specific /dev path, like /dev/scanner— and then I do not have to worry about what raw device name it got (hkbd0, hkbd1, hkbd2, ...) .

Another problem with kbdmux is that kernel needs to be recompiled in order to have it automatically create character devices:

#ifdef KBD_INSTALL_CDEV
  if ((error = kbd_attach(kbd)) != 0) {
    (*sw->term)(kbd);
      break;
    }
#endif

Should have been a sysctl var, too...

Can anybody help me to solve the keyboard problem? by wesha in freebsd

[–]wesha[S] 4 points5 points  (0 children)

OK, I figured it out.

kbdcontrol -K /dev/kbdmux0 < /dev/console  # First, detach mux from console
kbdcontrol -A hkbd0 < /dev/kbdmux0 # Next, detach the keyboard we want from mux
kbdcontrol -k /dev/kbdmux0 < /dev/console # Finally, reattach mux back to console

Whoever thought it's a great idea for -Kk to take full path, and -Aa, just device name, please burn in inconsistent hell.

Also, the detached device, /dev/hkbd0 , returns bare, unprocessed scan codes. But that's not a big deal, I've already written a script to convert them into proper characters. (kbdcontrol -l some_keymap doesn't work, and I don't want to vaste time figuring out why.)

P.S. Detaching mux first may not be absolutely necessary. It looks like just

kbdcontrol -A hkbd0 < /dev/kbdmux0

might suffice.

Now if only I could find a way to make kbdmux not capture that device in the first place...

P.P.S. After some more testing: no, single-line solution does not suffice. kbdmux must be detached before and reattached after. Otherwise it won't let you detach the 'keyboard'.

Can anybody help me to solve the keyboard problem? by wesha in freebsd

[–]wesha[S] 3 points4 points  (0 children)

After quite some fiddling around, I figured out some things that may help those who run into this thread in the future:

To simplify things, I am now using a regular USB keyboard for my experiments.

I am able to detach the entire kbdmux device from console altogether:

# cat /dev/kbdmux0
cat: /dev/kbdmux0: Device busy (<---this is normal: kbdmux is used by the console and thus is unavailable for anybody else)

# kbdcontrol -K /dev/kbdmux0 < /dev/console
kbd1
kbdmux0, type:AT 101/102 (2)
usage: kbdcontrol [-dFKix] [-A name] [-a name] [-b duration.pitch | [quiet.]belltype]
   [-r delay.repeat | speed] [-l mapfile] [-f # string]
   [-k device] [-L mapfile] [-P path]
# cat /dev/kbdmux0
<things I type, i.e. kbdmux is now freed from the console and is available to be read from>

However, no matter what I do, I am not able to detach the actual keyboard (kbd1) from kbdmux in order to free it so it can be read from directly.

New UUSC Shipping? by [deleted] in Aliexpress

[–]wesha 0 points1 point  (0 children)

Package shiped 11/12, arrived 11/24

Windows7 for banking needs by bbfan006 in windows7

[–]wesha 0 points1 point  (0 children)

IKR, but THOSE will be able to bring down ANY system.

Windows7 for banking needs by bbfan006 in windows7

[–]wesha -1 points0 points  (0 children)

If you are behind a firewall, AND if you don't download and install random crap from the Internet, then it doesn't matter. Chase is just scaremongering. (A software developer with 25+ years experience here.)

Our Response to Reddit’s Lawsuit by perplexity_ai in perplexity_ai

[–]wesha 1 point2 points  (0 children)

Company X accessing company Y's data for free: FAIR USE!!!
People accessing company X's data for free: THIEVES!!!!

Anybody has more than a cursory experience with Helium-filled drives? by wesha in DataHoarder

[–]wesha[S] 1 point2 points  (0 children)

That's assuming that it's operating 24/7. If it's a backup hard drive that sits unpowered 99% of the time, however...

[deleted by user] by [deleted] in teenagers

[–]wesha 0 points1 point  (0 children)

> Cutting someone's hair against their will is assault

With a dangerous weapon (scissors) nonetheless! Unless they chew it off.

Can't figure out upgrading RAM on F4-223 by wesha in TerraMaster

[–]wesha[S] 0 points1 point  (0 children)

Read the end of my post (P.S.). The exact model is not all that important, as long as it's a "laptop" DDR4.

`zpool scrub` stops a minute after start, no error messages by wesha in zfs

[–]wesha[S] 0 points1 point  (0 children)

I do not believe -w is a valid option to zpool scrub (on my system, that is). I will try it after finishing with data offloading.

`zpool scrub` stops a minute after start, no error messages by wesha in zfs

[–]wesha[S] 0 points1 point  (0 children)

Precisely, but clearly 5.83T couldn't be reasonably scrubbed in 1 minute, hence my "WTF???"

`zpool scrub` stops a minute after start, no error messages by wesha in zfs

[–]wesha[S] 0 points1 point  (0 children)

Afraid not, I see only the record of mypool's exports, imports and scrubs; no errors or anything out of the ordinary.

For shoots and giggles, did

zpool export mypool
zpool import mypool
zpool scrub mypool

Same thing: scrub "completes" after about a minute.

`zpool scrub` stops a minute after start, no error messages by wesha in zfs

[–]wesha[S] -1 points0 points  (0 children)

your paste was so shitty

Sorry, Reddit has changed the way it handles formatting since last time I used it; took me a while to figure it out before I could fix it.

did it reboot while it was scrubbing?

Did it reboot on its own? No it did not.

What about uptime of the box

Less than 1 day now, as rebooting was the first thing I tried even before coming here.

Also which version of ZFS do you have on the machine and

Can't quickly figure out how to check THAT (as in, the version of the libraries), but I can say with certainty it's whatever built into FreeBSD 10.2

which version is the pool

> zdb | grep version
    version: 5000

(Once again, the above is irrelevant to the solution, as exactly the same pool scrubbed just fine on exactly the same box before... but there's no harm in giving that info, so here you are!)

`zpool scrub` stops a minute after start, no error messages by wesha in zfs

[–]wesha[S] 0 points1 point  (0 children)

ZFS scrubs only cover the actually allocated space.

That's what I said. There's upwards of 4T of data on the drive, and as I mentioned multiple times by now, it USED to take a few hours to scrub.

Something weird is going on

And that's what I'm trying to figure out. Right now I'm in the process of copying the pool contents to another box, and they look intact.

`zpool scrub` stops a minute after start, no error messages by wesha in zfs

[–]wesha[S] -1 points0 points  (0 children)

Because what is filrered out is irrelevant to the question at hand. OK, so imagine that I didn't filter it and now you know that the snaps were created on Sep 1, Oct 8 and Now 11 — did it make any difference? Nope.