# Installing 13.0-RELEASE on a new laptop



## astyle (Mar 2, 2022)

I got my hands on a nice new laptop, and I'm trying to install 13.0-RELEASE on it. But I'm experiencing weird issues that I have no idea how to troubleshoot (I last had any issues of that kind more than 5 years ago, so my brain has rusted on that topic since). The weird issue is: When I'm at the boot screen:




Laptop's keyboard *starts out working fine*. Escaping to loader prompt works fine. But when I try option 1 (Boot Multi user), the laptop's keyboard stops functioning. The weird thing is, if I plug in a USB keyboard and a USB mouse, that solves the problem. The mouse even works in bsdinstall, and I was able to install a barebones 13.0-RELEASE that way, and am able to use a USB keyboard to get around.

I have a USB->RJ45 adapter on the way (ordered it from Amazon), so I'm not worried too much about networking at this point.

I guess my question is: Is there a way to troubleshoot that kind of issue? As in, built-in keyboard not working, but USB keyboard working fine) I'm sure it cropped up before on older laptops - which is why I'm not sharing the brand of my laptop just yet. Can someone please share their troubleshooting experiences/solutions? I'd also appreciate pointers to info.


----------



## richardtoohey2 (Mar 2, 2022)

astyle said:


> the laptop's keyboard stops functioning. The weird thing is, if I plug in a USB keyboard and a USB mouse, that solves the problem.


Can you clarify that - "that solves the problem" means the laptop's keyboard starts working?  Or do you mean that at least you end up with a working keyboard - the USB one?

I think you mean the latter, and that you still have the real problem - the laptop keyboard doesn't work.


----------



## astyle (Mar 2, 2022)

richardtoohey2 said:


> Can you clarify that - "that solves the problem" means the laptop's keyboard starts working?  Or do you mean that at least you end up with a working keyboard - the USB one?
> 
> I think you mean the latter, and that you still have the real problem - the laptop keyboard doesn't work.


Yeah, I end up with a working keyboard - the USB one.


----------



## grahamperrin@ (Mar 2, 2022)

astyle said:


> … a nice new laptop …



Can you describe the hardware? Thanks. Troubleshooting hardware _does_ benefit from knowing the hardware.

init(8)

Does the hardware work in single user mode? Safe mode? Single user safe mode?

FreeBSD bug 260812 – Safe boot (safe mode): improve documentation


----------



## Profighost (Mar 2, 2022)

astyle said:


> I last had any issues of that kind more than 5 years ago, so my brain has rusted on that topic since


I'm in the exact same situation at the moment 

So - back to basics - first things first: _ALWAYS _get everything about your hardware, distinguishing marketing names from the real thing.
You may run into the next funny surprise about the GPU...

As far as I know is that many internal laptop keyboards are internally connected via PS/2, which is forced to be outdated, since everbody thinks it's a good idea to connect Keyboard and Mouse via USB instead of where they belong to...

Another point I'm suspicious about and trying to check out is the SSD.
For the last couple of weeks trying to install 13 on two machines on M.2 SSDs I observe "funny" things I have not observed with neither FreeBSD installation and I yet have no fair explanation actually, such as the success of installation depends on the order of the packages are installed...
After I first thought hackers, malware bugs in 13... at the moment I blame the SSD (nvd).
So my additional - unproven, not on facts ... _esoteric _based - recommondation is, if deciding to start over with a new installation on a SSD, make sure the SSD has been cleaned completely first (secure data-erase by a tool, BIOS, or in worst case dd if=/dev/zero...)


----------



## Friend Of Jolly Devil (Mar 2, 2022)

I have the opposite problem, new USB keyboard is not working at the boot screen, pressing 1 just pauses booting process, it works fine later.


----------



## Erichans (Mar 2, 2022)

I'm curious what happens when you boot from a live 12.3-RELEASE USB stick.
Try finding out how your laptop keyboard is connected internally.
And specify what BIOS option settings for USB you have.


----------



## covacat (Mar 2, 2022)




----------



## grahamperrin@ (Mar 2, 2022)

astyle said:


> … new … the boot screen …



Is that _truly_ the screen of your new computer? Or an image from elsewhere, pasted here for convenience? 

What's pictured is quite unlike what's expected with e.g. FreeBSD-13.0-RELEASE-amd64-disc1.iso on a modern computer with UEFI enabled (see the shot of the installer for 13.1-PRERELEASE at <https://forums.freebsd.org/posts/558363>). 


covacat the screw-hole at the foot of the photograph is unmistakably an Apple keyboard. I can tell by the shape (the hole being round) and the colour of the plastic (white). The third party modifications are amazing.


----------



## SirDice (Mar 2, 2022)

That rat's nest looks like the bottom of a keyboard PCB with a custom keyboard controller.


----------



## astyle (Mar 2, 2022)

The reason I'm interested in how a similar problem was solved on *older *hardware: 

My laptop is awfully new (Ryzen 6000, and no, that's not a typo), and I will be getting comments that it's too new to be supported by FreeBSD. However, FreeBSD was able to support USB-based keyboards and mice for a long time now, it's not a problem to plug a no-name keyboard/mouse and expect it to work fine with plug and play.



grahamperrin said:


> Is that _truly_ the screen of your new computer? Or an image from elsewhere, pasted here for convenience?


I just pasted it from the Handbook for convenience. My boot screen actually features a nice and shiny FreeBSD logo (not the text-based stuff). It's a result of installing 13.0-RELEASE with help of USB keyboard/mouse. This suggests to me that graphics won't be an issue.

Back to the topic: I strongly suspect there's some kind of sysctl(8) tunable to look at. I'm hoping that somebody who knows more about that kind of stuff than I do can point me in the right direction.


----------



## astyle (Mar 2, 2022)

Profighost said:


> For the last couple of weeks trying to install 13 on two machines on M.2 SSDs I observe "funny" things I have not observed with neither FreeBSD installation and I yet have no fair explanation actually, such as the success of installation depends on the order of the packages are installed...


As long as those SSD's have been formatted by the installer and set to be bootable during the install process, you'll be fine. Sometimes, you do need to enable those SSD's in the BIOS, and turn off 'Boot Security' in the BIOS, as well.

As for "Success of installation depending on order of packages installed" - that's always the case in UNIX/BSD/Linux world.   There's some help available in the form of automated dependency resolution by package managers, but it's not a panacea, it won't replace paying attention to installation logs.


----------



## mer (Mar 2, 2022)

dependency resolution of packages, much like ordering of service startup, requires that the packages have the dependencies correctly specified.


----------



## grahamperrin@ (Mar 2, 2022)

Cross-reference, also posted today:

Old laptop's keyboard doesn't work properly in FreeBSD - anyone know how to fix?
– in particular, "… will not work properly once the system is booted up. I can enter text just fine at the bootloader …". 



astyle said:


> … new (Ryzen 6000, …



Old ≠ new, but something there might help with something here, and vice versa.


----------



## astyle (Mar 2, 2022)

astyle said:


> I have a USB->RJ45 adapter on the way (ordered it from Amazon), so I'm not worried too much about networking at this point.


Once that arrives, I'll be able to slurp out `dmesg` into _termbin_ and see what else can be done.


----------



## Deleted member 30996 (Mar 2, 2022)

astyle said:


> But when I try option 1 (Boot Multi user), the laptop's keyboard stops functioning.


That's because you don't know what the hell you're doing.

But you read the Handbook to find out how to do it right.


----------



## astyle (Mar 3, 2022)

I do know what I'm doing, and I do read the Handbook. FWIW, I discovered that USB-C works without any special tweaking of 13.0-RELEASE's sysctl(8) tunables. So how come the internal keyboard gets lost between boot screen and booted kernel, while a USB-A keyboard doesn't have that issue?


----------



## grahamperrin@ (Mar 3, 2022)

astyle said:


> … I'll be able to slurp out `dmesg` into _termbin_ …



Whilst you're without networking, is there a spare USB port? For a USB drive to transfer information to a computer that _is_ networked.


----------



## Deleted member 30996 (Mar 3, 2022)

astyle said:


> I do know what I'm doing, and I do read the Handbook. FWIW, I discovered that USB-C works without any special tweaking of 13.0-RELEASE's sysctl(8) tunables. So how come the internal keyboard gets lost between boot screen and booted kernel, while a USB-A keyboard doesn't have that issue?


No, you don't. And it should be apparent to anyone that does why you don't.


astyle said:


> I got my hands on a nice new laptop, and I'm trying to install 13.0-RELEASE on it. But I'm experiencing weird issues that I have no idea how to troubleshoot (I last had any issues of that kind more than 5 years ago, so my brain has rusted on that topic since). The weird issue is: When I'm at the boot screen:
> 
> Laptop's keyboard *starts out working fine*. Escaping to loader prompt works fine. But when I try option 1 (Boot Multi user), the laptop's keyboard stops functioning.



Because if you knew what you were doing you wouldn't "try option 1" when you're installing the Base System.

You would sit quietly, close your eyes at the appearance of the boot screen and contemplate your navel for 10 seconds.
When you open your eyes something wondrous will have happened. You will have sat quietly for 10 seconds.

It would have continued on after 9 seconds anyway, but 10 seconds is 10 seconds.
And for 10 seconds I took your strings and you danced for me while we both laughed at the same joke.


----------



## astyle (Mar 3, 2022)

Trihexagonal said:


> No, you don't. And it should be apparent to anyone that does why you don't.
> 
> 
> Because if you knew what you were doing you wouldn't "try option 1" when you're installing the Base System.
> ...


I'm  looking for technical help, in the form of "Try this value for sysctl", not an analysis of one "Code 18" diagnosis provided by one user. There is such a thing as peer review.


----------



## SirDice (Mar 3, 2022)

astyle said:


> Can someone please share their troubleshooting experiences/solutions?


Check the settings in the BIOS/UEFI. Specifically support for "Legacy" keyboards. This provides an 'emulation' (for lack of a better word) of a PS/2 keyboard, this was/is intended for operating systems that don't have support for USB keyboards. In some cases you have to turn this on, in other cases you have to turn it off. Also be on the lookout for 60h/64h support, those are the old BIOS calls for keyboards and mice.


----------



## grahamperrin@ (Mar 3, 2022)

astyle also, the Reddit post was _answered_ a few minutes ago. Can the solution there help here?


----------



## astyle (Mar 3, 2022)

grahamperrin : Thanks, now that Reddit conversation looks like it does have something I can benefit from!  I'll be able to find out later tonight if it worked!


----------



## Deleted member 30996 (Mar 3, 2022)

Trihexagonal said:


> I'm going to guide you though the process of getting a fully functional FreeBSD 13.0-RELEASE desktop up and running, complete with system files and security settings, step-by-step as if you've never used UNIX or the command line. Now let's get started:
> 
> Insert your boot media and at the Welcome screen, choose the Install option and hit Enter. (You'll be using the Enter key to confirm all your choices.)


You are stuck right there. It's expected a complete n00b will let the installer run till it gets to the Welcome screen. You have yet to make it that far by your own account.

But go ahead and check reddit. Struggle is good for the character. I have an account there and will take a look at that conversation myself.



astyle said:


> There is such a thing as peer review.


You are not my peer and lack basic knowledge to be capable of reviewing my work. My work has already been reviewed by freebsdnews.org twice and bleepingcomputer.com once well before you arrived.


Since we're back in the black area of covert knowledge being overtly discussed I think it important for the whole community to hear the name of the member that had multiple accounts here this shadow figure divuldged as they maaterialized from  Dimension X when the forums were offline, for 3 whole days... 

An account of anarchy that frightened our hero to the extreme he was afraid. And, shades, "they" might even have taken down the forums in some nightmare scenario only grahm of craker could be trusted with, but put his life in jeopardy to know.

That would be a felony in the US of A. To conceal their identy to become complicit in the crime.

What a heavy burden to bear... Drop it.  
Name the villain and let the light of truth burn like the Sun to cleanse the darkness of treachery from our midst. .

Can I get an Amen!

Especially if it's me they named. This would surely be my end.  My IP easy to check for multiple accounts, my writing epic in nature and unnatural in nurture
Get a swat team in here fast. He's a karate expert and ninja most foul.

Or it's another pipe dream.


----------



## astyle (Mar 4, 2022)

Update: Got my USB to RJ45 adapter, and was able to SSH into the laptop, and even install editors/nano from quarterly packages. Legacy USB support is enabled (I actually did that before going ahead with the 13.0-RELEASE install, so I'm not sure if there's much to do in the BIOS any more. 
--
It looks like there's still something I'm not doing right... The reddit post provided by grahamperrin suggested that I edit /boot/device.hints, and add the line, `hint.atkbd.0.flags="4"`, which I did, rebooted, but no dice...  I even tried reading the atkbd(4) manpage for hints, and to grep my own dmesg for anything that looks promising. (Complete output of dmesg is attached if anyone is interested).

```
# dmesg | grep Keyboard
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x4 irq 1 on atkbdc0
ugen1.7: <SEM HCT Keyboard> at usbus1
ukbd4: <SEM HCT Keyboard, class 0/0, rev 1.10/1.10, addr 6> on usbus1
uhid0: <SEM HCT Keyboard, class 0/0, rev 1.10/1.10, addr 6> on usbus1
ugen1.7: <SEM HCT Keyboard> at usbus1 (disconnected)
# dmesg | grep kbd
WARNING: Device "kbd" is Giant locked and may be deleted before FreeBSD 14.0.
kbd1 at kbdmux0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> flags 0x4 irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbdc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 14.
ukbd0 on uhub4
ukbd0: <ASUSTeK Computer Inc.> on usbus0
kbd2 at ukbd0
ukbd1 on uhub4
ukbd1: <ASUSTeK Computer Inc.> on usbus0
kbd3 at ukbd1
ukbd2 on uhub4
ukbd2: <ASUSTeK Computer Inc.> on usbus0
kbd4 at ukbd2
ukbd3 on uhub4
ukbd3: <ASUSTeK Computer Inc.> on usbus0
kbd5 at ukbd3
ukbd4 on uhub5
ukbd4: <SEM HCT Keyboard, class 0/0, rev 1.10/1.10, addr 6> on usbus1
kbd6 at ukbd4
ukbd4: at uhub5, port 1, addr 6 (disconnected)
ukbd4: detached
```
Right now, I'm thinking, there may be some *old* instructions around on how to install a weird keyboard under FreeBSD - If somebody can point me to them (or help in  other ways), that would be great! I vaguely recall such documentation being around, but my mind is rusty...


----------



## astyle (Mar 4, 2022)

A few ideas I picked up elsewhere (Thread trying-to-install-freebsd-13-0-on-hp-zbook-15-g6.82016) suggested trying a few things:

-CURRENT image
non-uefi boot
From the reddit post, another troubleshooting idea was to install a Linux distro and see which driver can grab the keyboard. 

As always, ideas for other places to tinker and solve this stubborn issue welcome!


----------



## covacat (Mar 4, 2022)

what if you boot without usb legacy enabled ?


----------



## astyle (Mar 4, 2022)

covacat said:


> what if you boot without usb legacy enabled ?


Thanks, this is another idea for my troubleshooting list!


----------



## astyle (Mar 5, 2022)

OK, I messed around in the BIOS:

Tried UEFI/non-UEFI booting. No such option in my BIOS, but Secure Boot does need to be turned off, otherwise FreeBSD won't boot at all.
Turning off support for legacy USB made no difference.
Messing with sysctl variables:

Tried changing the line in /boot/device.hints from `hint.atkbdc.0.port="0x060"` to `hint.atkbdc.0.port="0x064"` - no difference.
Next up, trying a -CURRENT kernel for FreeBSD 14, the AMD64 ISO from Feb. 24.

Edit: Tried starting an installation with 14-CURRENT. It took two tries (Kernel panic first time) to get the installer going, but it's still not detecting the internal keyboard after the kernel starts to boot. Gonna see if eternal_noob 's pointer pans out.


----------



## eternal_noob (Mar 5, 2022)

Have you read








						Laptop keyboard and trackpad not working
					

Hi everyone.  I'm running FreeBSD 12.2, but my laptop keyboard and trackpad don't work. I can plug in a USB keyboard and mouse and they work fine. I found this in the log file, but couldn't find much to explain the error message or how to fix it.  I'm using a Surface Book. Intel Core i5-6300U...




					forums.freebsd.org
				



?
The guy says he needed to blacklist the uhid keyboard driver and some hw.usb.quirk magic in loader.conf.


----------



## astyle (Mar 5, 2022)

eternal_noob said:


> Have you read
> 
> 
> 
> ...


Followed that on my 13.0-RELEASE install. The only difference it made:
`WARNING: Device "vkbdctl" is Giant locked and may be deleted before FreeBSD 14.0.`
Used to be:
`WARNING: Device "atkbd0" is Giant locked and may be deleted before FreeBSD 14.0`.

I really appreciate the help, and disappointed to report from my end of things that it didn't work. 

FWIW, my laptop is Asus Rog Zephyrus g14, with a Ryzen 9 6900 HS, and RX 6700m. Specs can be confirmed from the attachment in this thread's post #25.


----------



## astyle (Mar 5, 2022)

But boot a Manjaro install stick (manjaro-kde-21.2.4-minimal-220301-linux515.iso), and it works perfect! Laptop Keyboard detected no problem, even the trackpad works! That's the frustrating part, I want FreeBSD to work.


----------



## astyle (Mar 5, 2022)

Following eternal_noob 's pointer, I ran `usbconfig` as suggested by that thread, and discovered that my keyboard is most likely an ASUSTek N-Key board at /dev/ugen0.2. Digging a bit deeper, I disovered a possibly related PR (PR 181425)... This is a LOT of rather far-flung dots to connect, but I'm stubborn. That PR actually shows the exact problem I'm having, but I doubt I can summon enough discipline to make myself go down the additional rabbit hole of figuring out the ropes of getting that PR re-opened. I'm lucky enough to find it, and will probably get to studying it after I get some sleep tonight.


----------



## skunk (Mar 5, 2022)

astyle said:


> Following eternal_noob 's pointer, I ran `usbconfig` as suggested by that thread, and discovered that my keyboard is most likely an ASUSTek N-Key board at /dev/ugen0.2. Digging a bit deeper, I disovered a possibly related PR (PR 181425)...


This PR is almost 9 years old. Back then, PS/2 keyboards were still widely available and being used by people who do more than two-finger-typing.
Real USB keyboards (eg those with N-key-rollover) were still a rare exotic thing.

Nowadays the situation is different. PS/2 hardware is no longer used/attachable in new products, and quality laptops get equipped with real USB keyboards with N-key-rollover. Over time, this will become common with desktops, too.
It would be a shame if FreeBSD users would have first to solve the hurdle to find out how to turn off quality hardware's features, only to make modern hardware work at all. This also affects multimedia keyboards, keyboards with extra function keys etc.
So it imho becomes a necessity to add full USB keyboard support.

For this reason, I'd suggest to make a feature request "Add USB N-key rollover keyboard support" instead of a "bug" report, linking to the old PR as "see also".


----------



## Erichans (Mar 5, 2022)

skunk said:


> [...] For this reason, I'd suggest to make a feature request "Add USB N-key rollover keyboard support" instead of a "bug" report, linking to the old PR as "see also".


That would be a good thing, in general. However:


astyle said:


> [...] Laptop's keyboard *starts out working fine*. Escaping to loader prompt works fine.


I'm trying to interpret the messages and behaviour that's been reported. That means to me that at that time  (during the boot process) OP has a working laptop keyboard. That means that the keyboard driver then active is functioning ok. When the system is up and running something has changed: other driver active or other settings active. I think its worthwhile to explore that option. Unfortunately I don't have an idea how to attack the problem from that angle, others might.

In the end it may very well be that using the same settings/driver as during the boot screen in message #1 is unsatisfactory and won't allow full use of all keyboard features but at least, for the moment, the internal keyboard could be fucntioning (until the PR or feature request is solved).


----------



## covacat (Mar 5, 2022)

Erichans said:


> I'm trying to interpret the messages and behaviour that's been reported. That means to me that at that time  (during the boot process) OP has a working laptop keyboard. That means that the keyboard driver then active seems to function ok. When the system is up and running something has changed: other driver active or other settings active. I think its worthwhile to explore that option. Unfortunately I don't have an idea how to attack the problem from that angle, others might.
> 
> In the end it may very well be that using the same settings/driver as during the boot screen in message #1 is unsatisfactory and won't allow full use of all keyboard features but at least, for the moment, the internal keyboard could be fucntioning (until the PR or feature request is solved).


at that time keyboard is driven by EFI, the loader (boot menu) does not talk directly to the hardware


----------



## Erichans (Mar 5, 2022)

astyle said:


> Following eternal_noob 's pointer, I ran `usbconfig` as suggested by that thread, and discovered that my keyboard is most likely an ASUSTek N-Key board at /dev/ugen0.2. Digging a bit deeper, I disovered a possibly related PR (PR 181425)... This is a LOT of rather far-flung dots to connect, but I'm stubborn. That PR actually shows the exact problem I'm having, but I doubt I can summon enough discipline to make myself go down the additional rabbit hole of figuring out the ropes of getting that PR re-opened. I'm lucky enough to find it, and will probably get to studying it after I get some sleep tonight.



astyle, reading through PR 181425 (yes, as mentioned also, it's old but your problem description is there)

 you can compile a FreeBSD kernel
 `# usbconfig -d ugen.0.2 dump_device_desc` will give you the idVendor & idProduct 

Perhaps try adding your own two lines after /sys/dev/usb/quirk/usb_quirk.c:

```
/* Holtek USB gaming keyboard */
	USB_QUIRK(HOLTEK, F85, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),

	/* Asus Rog Zephyrus g14 keyboard */
	USB_QUIRK( ...  UQ_KBD_BOOTPROTO),
```


----------



## astyle (Mar 5, 2022)

Erichans said:


> astyle, reading through PR 181425 (yes, as mentioned also, it's old but your problem description is there)
> 
> you can compile a FreeBSD kernel
> `# usbconfig -d ugen.0.2 dump_device_desc` will give you the idVendor & idProduct
> ...


Thanks, Erichans . I did try the usbconfig method, adjusting for my hardware. In the thread that eternal_noob was suggesting (Thread laptop-keyboard-and-trackpad-not-working.79163), the method was to edit /boot/loader.conf with those `USB_QUIRK` variables, rather than stuff them into /sys/dev/usb/quirk/usb_quirk.c... is there a benefit to recompiling the kernel over messing with /boot/loader.conf?


----------



## Erichans (Mar 5, 2022)

I did see this in the PR:


> Fix: The keyboard works fine in boot protocol. Running this
> 
> # usbconfig -d 0.4 add_quirk UQ_KBD_BOOTPROTO
> 
> ...


I deduced that `usbconfig` will only work after a new scan is initiated when the keyboard goes from unplugged to plugged; that scenario didn't seem feasible in your brandnew laptop case  

I am uncertain as to the exact difference between adding to /boot/loader.conf something like:

```
hw.usb.quirk=0x045e 0x07cd 0xffff UQ_KBD_BOOTPROTO
```
(as mentioned in Thread laptop-keyboard-and-trackpad-not-working.79163) and "compiling it in". I do not know where "0xffff" comes from; I'm going by the contents of the PR mentioned. Perhaps others can shine their light on this. In any case, unless someone states otherwise, trying this beats waiting for a solution of a PR or a feature request, but that's my look on things.


----------



## astyle (Mar 5, 2022)

Tried using a non-uefi image (12.3 STABLE, an iso from 3/3/22), that one showed a text-based beastie logo to prove it's non-uefi, but problem remains.


covacat said:


> at that time keyboard is driven by EFI, the loader (boot menu) does not talk directly to the hardware


I strongly suspect covacat's hunch is correct, and think that a solution will probably be based on that. But I'm still lost as to what I can try to verify that line of thinking.


----------



## Erichans (Mar 5, 2022)

Well, it was my oversight and covacat's statement of fact  In the very beginnings of the "good old MS DOS" era the BIOS was actually used as a Basic Input Output System to comminucate with the hardware. I suspect not with then 386BSD as the first PC based spin-off of BSD. Being simply a keyboard it should be possible to still get your keyboard kicks (ehh clicks) via the now UEFI firmware interface; the loader can ...   But that possibility has passed I'd think.

If you will not find an immediate solution, I hope the driver can be patched/upgraded for your NKRO keyboard. It could be of help for the driver developer if you can identify the keyboard controller chip that processes your keyboard, especially if more than a simple patch is needed. The appropriate mailing list might also give that a start.


----------



## grahamperrin@ (Mar 6, 2022)

iichid(4), maybe? 

Lazily based on a mention in NomadBSD Forum. 

astyle can you share the result of a hardware probe? 

`pkg install sysutils/hw-probe sysutils/pciutils sysutils/usbutils`
`hw-probe -all -upload`


----------



## astyle (Mar 6, 2022)

grahamperrin said:


> iichid(4), maybe?
> 
> Lazily based on a mention in NomadBSD Forum.
> 
> ...


Probe URL: https://bsd-hardware.info/?probe=20cdc9d999

This has been run on a 13.0-RELEASE install.




The N-KEY internal keyboard has been at least detected, so this has me thinking that it's not impossible to make it work, given proper fiddling with sysctl(8) variables and the like.

Edit: The USB external keyboard that works (listed right below the N-KEY Asus keyboard that does not) - it uses the ukbd driver. Exploring both - they both have the same message:


> We have not found anything related to this device in any FreeBSD versions up to 14-CURRENT. See FreeBSD hardware notes.


----------



## astyle (Mar 6, 2022)

grahamperrin said:


> USBc0f3:02a1 *»*
> / 03-01-01USBHCT Keyboardkeyboardukbddetected


That's the external keyboard that works. And, I actually edited my post...


----------



## covacat (Mar 6, 2022)

try this in /boot/loader.conf 
hw.usb.quirk.0="0x0b05 0x19b6 0 0xffff UQ_KBD_BOOTPROTO"


----------



## grahamperrin@ (Mar 6, 2022)

Oops! My bad. Previous post deleted. <https://bsd-hardware.info/?probe=20cdc9d999#usb:0b05-19b6> noted.


----------



## astyle (Mar 6, 2022)

covacat said:


> try this in /boot/loader.conf
> hw.usb.quirk.0="0x0b05 0x19b6 0 0xffff UQ_KBD_BOOTPROTO"


Thanks, I actually did try that earlier...


----------



## astyle (Mar 15, 2022)

Update: re-read the PR 181425, and tried to do some troubleshooting as suggested there. Results are attached:

A short summary: I added the line `hw.usb.ukbd.debug=1` to /boot/loader.conf to produce the files. A look through them suggests to me that the kernel actually sees the keyboard, and all the keys, but fails to attach it. It re-tries the attachment 3 times before giving up (see towards the end of attached dmesg_debug.txt)

Looking at uhidd_report.txt, it looks like something is up with how the USB bus is scanned - a lot of `UNKNOWN` values at the beginning, but towards the end, they get properly filled. 

Any ideas on what I can do to finish this?


----------



## astyle (Mar 15, 2022)

From uhidd_report.txt: Looks like the section titled `ugen0.2[2]` is the one for the keyboard, while the one titled `ugen0.2[3]` is for the mouse. 

Seems like my next step is to capture 3 versions of dmesg (but with `hw.usb.ukbd.debug=1`!)

with usb keyboard plugged in
without usb keyboard plugged in
on a different laptop where the built-in keyboard works under 13.0-RELEASE or later.
Reading the manpages is a good skill to have, but it still takes some brains to take notes and connect the dots and figure out how to approach the problem after all that reading.  Like what actually comes first, second, and why that is technically the case.


----------



## astyle (Mar 22, 2022)

Looked through bsd-hardware.info... My hardware scan is the only one there with an N-KEY keyboard. Compared that with information from linux-hardware.org. Both places list `device class` as  `03-01-01`.  And even `Device ID` looks similar: USB 0b05:`19b6` for bsd-hardware.info, vs USB 0b05:`1866` on linux-hardware.org... 

Which suggests to me that covacat 's line


covacat said:


> try this in /boot/loader.conf
> hw.usb.quirk.0="0x0b05 0x`19b6` 0 0xffff UQ_KBD_BOOTPROTO"



could be changed to:
hw.usb.quirk.0="0x0b05 0x`1866` 0 0xffff UQ_KBD_BOOTPROTO"

Does anyone think this just might work, or are there pitfalls to that idea?


----------



## astyle (Mar 22, 2022)

astyle said:


> Looked through bsd-hardware.info... My hardware scan is the only one there with an N-KEY keyboard. Compared that with information from linux-hardware.org. Both places list `device class` as  `03-01-01`.  And even `Device ID` looks similar: USB 0b05:`19b6` for bsd-hardware.info, vs USB 0b05:`1866` on linux-hardware.org...
> 
> Which suggests to me that covacat 's line
> 
> ...


Tried that, no go.


----------



## Noob Noob (Mar 23, 2022)

astyle said:


> ideas for other places


The first time I try GhostBSD I had a mouse problem doesn't click till I plug it out and plug it in when I decide to try it again I didn't download the same ISO I download the latest one and I didn't have that issue, I know it doesn't make sense but this is what happens to me ¯\_(ツ)_/¯ u you can try to install it with another ISO.


----------

