Klaus Knopper answers your Linux questions
Ask Klaus
Controlling brightness, forensic mode, and proprietary Broadcom WiFi drivers.
Controlling Brightness
On my laptop, the function key combinations that are supposed to change the display's brightness are not working with Linux. Is special software necessary in order to activate those function keys?
Most manufacturers of notebooks use a non-standard keyboard assignment for brightness, WiFi enable/disable, and so on – "non-standard" meaning that there really isn't much of a standard keycode available for the extra functionality. Proprietary operating systems use "drivers" to map extended keyboard events to certain actions, as is done similarly in most Linux distributions using the ACPI daemon with vendor-specific configuration files in /etc/acpi/events
and /etc/acpi/actions
provided by packages such as eeepc-acpi-scripts and acpi-support (which contain known mappings for different notebook brands). Finding the correct settings and writing your own scripts for handling events can be a very complex task, but in some cases, you have an easier way to solve this problem.
Boot options can change the default behavior in the Advanced Configuration and Power Interface (ACPI) firmware to handle requests for brightness internally, instead of passing the key event to the operating system. One example for Knoppix is:
knoppix64 acpi_osi=Linux acpi_backlight=vendor
The acpi_osi=Linux
option chooses some Linux-friendly settings (also concerning power management), and acpi_backlight=vendor
attempts to wire key presses of the "brightness" function keys directly with the backlight controller, which may or may not work better than the supplied acpi-support scripts.
If you can confirm that these boot command-line settings work as expected, you might want to add them to the APPEND
or KERNEL
boot options in your favorite bootloader.
Forensic Mode
What is "forensic mode" in Knoppix? Knoppix 7.1.1 has just been released, and I've read about a "forensic" mode that is only briefly described in the knoppix-cheatcodes.txt
file:
knoppix forensic Don't use swap and mount read-only
What does it really do?
Forensic mode was requested by experts that work in computer forensics (i.e., analysis and recovery of hard disk data – even previously deleted data – as part of rescuing lost data or for evidence in criminal prosecution). For this task, all changes to the stored data are absolutely unwanted. Knoppix does not normally write to hard disk, with two exceptions:
- Configured Linux swap partitions that are not currently used as hibernation space will be reused.
- Disk partitions containing filesystems that are mounted by user choice can be written to.
Adding the keyword forensic
to Knoppix boot options will automatically disable the use of existing swap partitions and write-protect all detected partitions on the block layer using:
blockdev --setro <partition>
Therefore, in forensic mode, attempts to mount partitions read/write will not work unless the user "unprotects" the partitions first using
blockdev --setrw <partition>
(e.g., when saving rescued data to an external hard disk). If certain filesystem types require being set read/write in order to attempt a repair of the superblock, a copy can first be made safely by means of dd_rescue
, so that the original data is never changed.
For normal usage scenarios (i.e., taking advantage of writable media for saving data transparently from the running system), forensic mode is rather impractical. ;-)
Broadcom WiFi Drivers
I can't help noticing that you changed the default driver for some Broadcom chipsets from the free, kernel-included drivers to the "non-free" broadcom-sta driver (wl) in Knoppix 7.7.1. What is the advantage or disadvantage over the free drivers?
Although the standard kernel drivers for Broadcom WiFi chipsets usually work well enough for daily use, some users have reported slow or unstable WiFi connections, even with the vendor-supplied firmware copied to /lib/firmware
. The broadcom-sta-dkms driver package, which is provided in Debian as a self-building package, contains code and firmware provided by the Broadcom chip manufacturer with some license restrictions that might disqualify the driver in Debian main, in the sense of not being "open source," even though partial source code is provided.
On the one hand, I can well understand that following regulations and legal restrictions for WiFi in different countries encourages "unchangeable" drivers. On the other hand, the closed source parts of the driver make it difficult to check for security flaws or unwanted functions, and it is also disallowed to modify the driver for supporting chipsets from other vendors, making it "proprietary," which I'm somewhat reluctant to accept in Knoppix.
Nevertheless, test results from some of the Knoppix beta testers report an enhancement of throughput and bandwidth gain – a download speed factor of up to 2x – using the broadcom-sta driver as a replacement for the kernel internal driver. Also, network disruptions because of weak signals seem to occur much less often.
For these practical reasons, we gave the broadcom-sta driver another try, but with the option to switch back to the free driver by changing preferences in /etc/modprobe.d/broadcom-sta-common.conf
.
Klaus Knopper
Klaus Knopper is an engineer, creator of Knoppix, and co-founder of LinuxTag expo. He works as a regular professor at the University of Applied Sciences, Kaiserslautern, Germany. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to: klaus@linux-magazine.com
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
News
-
Red Hat Migrates RHEL from Xorg to Wayland
If you've been wondering when Xorg will finally be a thing of the past, wonder no more, as Red Hat has made it clear.
-
PipeWire 1.0 Officially Released
PipeWire was created to take the place of the oft-troubled PulseAudio and has finally reached the 1.0 status as a major update with plenty of improvements and the usual bug fixes.
-
Rocky Linux 9.3 Available for Download
The latest version of the RHEL alternative is now available and brings back cloud and container images for ppc64le along with plenty of new features and fixes.
-
Ubuntu Budgie Shifts How to Tackle Wayland
Ubuntu Budgie has yet to make the switch to Wayland but with a change in approaches, they're finally on track to making it happen.
-
TUXEDO's New Ultraportable Linux Workstation Released
The TUXEDO Pulse 14 blends portability with power, thanks to the AMD Ryzen 7 7840HS CPU.
-
AlmaLinux Will No Longer Be "Just Another RHEL Clone"
With the release of AlmaLinux 9.3, the distribution will be built entirely from upstream sources.
-
elementary OS 8 Has a Big Surprise in Store
When elementary OS 8 finally arrives, it will not only be based on Ubuntu 24.04 but it will also default to Wayland for better performance and security.
-
OpenELA Releases Enterprise Linux Source Code
With Red Hat restricting the source for RHEL, it was only a matter of time before those who depended on that source struck out on their own.
-
StripedFly Malware Hiding in Plain Sight as a Cryptocurrency Miner
A rather deceptive piece of malware has infected 1 million Windows and Linux hosts since 2017.
-
Experimental Wayland Support Planned for Linux Mint 21.3
As with most Linux distributions, the migration to Wayland is in full force. While some distributions have already made the move, Linux Mint has been a bit slower to do so.