3 ms·
The freebsd laptop I'm writing this on has: $ sysctl -a | grep brightness hw.acpi.video.lcd0.brightness: 50 compat.linuxkpi.i915_invert_brightness:
by asveikau 7y ago
The freebsd laptop I'm writing this on has:
$ sysctl -a | grep brightness
hw.acpi.video.lcd0.brightness: 50
compat.linuxkpi.i915_invert_brightness: 0
So if you want to write a script that works both, you need to put fujitsu-specific knowledge in your script. Vs. alternatively, an interface that works everywhere.
(Incidentally I think this sysctl doesn't do much and I instead use a utility called intel_backlight(1) from ports.)
- aphextron 7y agoWhat laptop are you using for freebsd? Also what desktop environment? I've tried forever to get a BSD laptop setup working.
- asveikau 7y agoLenovo X1 Carbon 6th gen. I don't use a big "desktop" like gnome, just a normal/light X setup resembling the 1990s. Lately it's dwm. Sometimes I do others. Some things that might save you some time in loader.conf: acpi_video_load="YES" acpi_ibm_load="YES" Also, had to set ACPI to "Linux" mode in bios. After that plus the two lines above, suspend works. Also, xf86-video-intel from ports. Wifi is slow but I'm ok with that. Long ago I used OpenBSD on a laptop, and in my experience, with thinkpads, it has a bit more of a "just works" feel than FreeBSD for hardware support. But I'm on freebsd because of a few things that don't work on openbsd these days [like linux binary emulation].
- jonhohle 7y agoFor what value of working? I have a Lenovo X220 that works mostly fine. Sleeps on lid close, WiFi, trackpad. I don’t use it often, I keep it as a disposable backup, but it works.
- ryanthedev 7y agoI like how the abstraction point is at LCD. It's abstracting a specific hardware type, not a hardware feature.
- clarry 7y agoAnd this is why we still have lots of applications where it's difficult or impossible to bind certain inputs. Someone had a mental image of a typical keyboard, then a typical mouse, and that's what we're stuck with. It's not like the sixth thumb button in my mouse is very different from the Print Screen key on my keyboard or the X button in my wireless gamepad. And that's why tools that make your input device X emulate a different type of input device Y are common (but annoying to set up since the setup is going to be application specific). I'm not aware of a single API that offers a sufficiently device-agnostic view of inputs that you can write the application code once and then let the user bind anything they can connect to their computer somehow. The USB spec actually comes close since it starts at the actual hardware inputs (toggle switch, button, relative motion, absolute motion, etc.) and their range, and then offers hints about their intended usage or meaning. It's the layers above that suck.
- mmis1000 7y agoI'm not aware of a single API that offers a sufficiently device-agnostic It looks like the goal of `Steam Controller Configurator` project by steam is doing this. (I think this should be done by a systeam level app instead.. but no one is doing this) The configurator api steam provides actually abstract the `real input device layout` away from the `the action user want to do`, which allows games to support `future` input device. The game itself longer needs to handle every input device layout one by one. Instead, it will have a general way to handle unknown device. The Configurator ask the game `which action you can do?` and the game response the actions (like jump, walk, sprint ...etc) to the api, and let the api bind the action to whatever key properly on the device(x on xbox one, square on ps4...etc).
- clarry 7y agoI haven't used that thing but if it is as you say, it sounds backwards and very rigid, and probably only good for games (with assumptions about how the application might want to use inputs). I don't think system level APIs should ask applications anything at all. Applications should be able to ask for inputs instead. Which is the status quo, with the caveat that there's no unified "input" API, instead there's a bunch of different APIs for keyboard, mouse, joystick, xinput gamepad, text input, midi, other kinds of input (lucky if you can find an existing API for them...). Some of these APIs multiplex a few different types of inputs, but still provide them as distinct types of events that need to be handled separately by each application.