Fly in the ointment in a Linux Mint honey barrel: or how I overcame the brightness
Good day to the Habrachians!
On the hub there were many reviews and articles with impressions of the transition to the Linux OS, which revealed all the pros and cons, opinions and solutions to some problems when working with this OS. I was no exception. About how I switched to Linux Mint and how I solved the problem with the brightness of the backlight, read under the cat.
In the life of every IT specialist, sometimes there comes a moment when he decides to try something new and, having collected his will, having made a backup of everything important, writes an image with a distro so long selected to the blank or flash drive (in my case, I chose Linux Mint 17 x64 Cinnamon) Linux And with the expectation of a miracle, it loads from it.
I will not describe the installation process, it is already described several times everywhere. I can only say that the installation was surprisingly painless. After reboots, I was greeted by a welcome screen with a prompt to enter the username and password of the user, which I did immediately. After entering, I was met by pleasant tones on the desktop and for a moment it seemed to me that I had been using it for a hundred years! Everything is so native and understandable that it makes you forget about the existence of Windows.
The first impression was very positive, I slowly began to develop a new OS for me. I read the manual, looked at a thematic forum, and began to research the system. On a habr there were reviews of this distribution kit and I had an idea about it. All components of the laptop earned the first time, wifi, bluetooth, a webcam, even a USB modem without installing drivers were immediately detected by the system, and after simple actions to indicate an access point it worked in full.
I liked the idea of repositories, a program manager with thousands of programs in one place. So I started to get used to it. First of all, I installed the necessary software so that it would not be boring; I turned on the music in the player (by the way, Audacious replaced me with AIMP) and at some point I wanted to increase the volume. I pressed the treasured combination Fn + cursor to the right and touched the finger down the cursor key, that is, lowering the brightness. To my surprise, this had no effect on the backlight level. I tried again, the indicator showed a change, but the brightness did not change.
Began to google this phenomenon. From the search results, I realized that not one of me does not change the brightness and began to look for a solution. By the way, the configuration of the Lenovo B570e laptop with a Core i5 2450m / 4Gb RAM / 500Gb HDD / Intel HD Graphics 3000 processor. As it turned out, other laptop models of this and other manufacturers also have a problem with adjusting the backlight brightness. The first solution I tried was editing the grub bootloader file. This was carried out in the following order:
In the terminal, I typed the command:
And in the window that opens, the text editor found two lines and brought them into this form:
I saved the changes made by me and performed the bootloader update:
After that, I rebooted and tried. After the reboot, the keys also refused to control the brightness, plus the brightness indicator disappeared, but it turned out to change the brightness using the brightness control applet.
The second method I tried the following command in the terminal:
Where xx is a value from zero to 100. The laptop did not react to this command in any way.
And finally, the third way, was to change the first two lines, but already to this form:
In this case, the brightness change indicator is displayed on the screen, but the brightness change itself still did not occur. Also, it was not possible to change the brightness through the brightness control applet. After these manipulations he returned everything as it was and continued to search for other solutions.
The second solution, which was found on the Internet, was the following.
In the home directory it was necessary to create a file with any name, but with the * .sh format and write the following values inside it:
Where 0 is the brightness, and / sys / class / backlight / acpi_video1 / brightness is the path to the file in which the current brightness value from the system parameters is stored. After saving the file, it was necessary to configure its access rights in this way:
And run this script from the terminal:
As a result, the brightness value changed, but this solution did not satisfy me with its complexity and extra body movements. Another solution was found, already on the hub , which also did not fit. In the end, I came across another solution, but from a foreign site, which suited me to the fullest. It stated that this is a solution for laptops with graphics solutions from Intel, which was more than completely suitable for me. I bring this solution:
Launch the terminal and run the following command:
As a result, we will see the following output from the command:
Then create a configuration file, if it does not exist, with the following command in the terminal:
Open the file we just created for editing:
It should be empty and write the following into it:
Save. Reboot. And - voila! As a result, the backlight brightness control keys work, the brightness level indicator is displayed.
Thus, with a little patience and perseverance, I solved this problem, in my opinion, in the most elegant way. I hope that my contribution to solving this problem will help other users.
On the hub there were many reviews and articles with impressions of the transition to the Linux OS, which revealed all the pros and cons, opinions and solutions to some problems when working with this OS. I was no exception. About how I switched to Linux Mint and how I solved the problem with the brightness of the backlight, read under the cat.
In the life of every IT specialist, sometimes there comes a moment when he decides to try something new and, having collected his will, having made a backup of everything important, writes an image with a distro so long selected to the blank or flash drive (in my case, I chose Linux Mint 17 x64 Cinnamon) Linux And with the expectation of a miracle, it loads from it.
I will not describe the installation process, it is already described several times everywhere. I can only say that the installation was surprisingly painless. After reboots, I was greeted by a welcome screen with a prompt to enter the username and password of the user, which I did immediately. After entering, I was met by pleasant tones on the desktop and for a moment it seemed to me that I had been using it for a hundred years! Everything is so native and understandable that it makes you forget about the existence of Windows.
The first impression was very positive, I slowly began to develop a new OS for me. I read the manual, looked at a thematic forum, and began to research the system. On a habr there were reviews of this distribution kit and I had an idea about it. All components of the laptop earned the first time, wifi, bluetooth, a webcam, even a USB modem without installing drivers were immediately detected by the system, and after simple actions to indicate an access point it worked in full.
I liked the idea of repositories, a program manager with thousands of programs in one place. So I started to get used to it. First of all, I installed the necessary software so that it would not be boring; I turned on the music in the player (by the way, Audacious replaced me with AIMP) and at some point I wanted to increase the volume. I pressed the treasured combination Fn + cursor to the right and touched the finger down the cursor key, that is, lowering the brightness. To my surprise, this had no effect on the backlight level. I tried again, the indicator showed a change, but the brightness did not change.
Began to google this phenomenon. From the search results, I realized that not one of me does not change the brightness and began to look for a solution. By the way, the configuration of the Lenovo B570e laptop with a Core i5 2450m / 4Gb RAM / 500Gb HDD / Intel HD Graphics 3000 processor. As it turned out, other laptop models of this and other manufacturers also have a problem with adjusting the backlight brightness. The first solution I tried was editing the grub bootloader file. This was carried out in the following order:
In the terminal, I typed the command:
sudo gedit /etc/default/grub
And in the window that opens, the text editor found two lines and brought them into this form:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
GRUB_CMDLINE_LINUX="acpi_osi=Linux"
I saved the changes made by me and performed the bootloader update:
sudo update-grub
After that, I rebooted and tried. After the reboot, the keys also refused to control the brightness, plus the brightness indicator disappeared, but it turned out to change the brightness using the brightness control applet.
The second method I tried the following command in the terminal:
sudo setpci -s 00:02.0 F4.B=xx
Where xx is a value from zero to 100. The laptop did not react to this command in any way.
And finally, the third way, was to change the first two lines, but already to this form:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="acpi_backlight=vendor"
In this case, the brightness change indicator is displayed on the screen, but the brightness change itself still did not occur. Also, it was not possible to change the brightness through the brightness control applet. After these manipulations he returned everything as it was and continued to search for other solutions.
The second solution, which was found on the Internet, was the following.
In the home directory it was necessary to create a file with any name, but with the * .sh format and write the following values inside it:
#!/bin/bash
sudo echo -n 0 >/sys/class/backlight/acpi_video1/brightness
Where 0 is the brightness, and / sys / class / backlight / acpi_video1 / brightness is the path to the file in which the current brightness value from the system parameters is stored. After saving the file, it was necessary to configure its access rights in this way:
chmod +x ~/bin/brightness.sh
And run this script from the terminal:
sudo sh ~/bin/brightness.sh
As a result, the brightness value changed, but this solution did not satisfy me with its complexity and extra body movements. Another solution was found, already on the hub , which also did not fit. In the end, I came across another solution, but from a foreign site, which suited me to the fullest. It stated that this is a solution for laptops with graphics solutions from Intel, which was more than completely suitable for me. I bring this solution:
Launch the terminal and run the following command:
ls /sys/class/backlight/
As a result, we will see the following output from the command:
kibis@kibis-Lenovo-B570e ~ $ ls /sys/class/backlight/
acpi_video0 intel_backlight
Then create a configuration file, if it does not exist, with the following command in the terminal:
sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf
Open the file we just created for editing:
sudo gedit /usr/share/X11/xorg.conf.d/20-intel.conf
It should be empty and write the following into it:
Section "Device"
Identifier "card0"
Driver "intel"
Option "Backlight" "intel_backlight"
BusID "PCI:0:2:0"EndSection
Save. Reboot. And - voila! As a result, the backlight brightness control keys work, the brightness level indicator is displayed.
Thus, with a little patience and perseverance, I solved this problem, in my opinion, in the most elegant way. I hope that my contribution to solving this problem will help other users.