So you have started using i3 and somehow managed to open your browser and almost resumed your normal work.
But wait, the brightness is too much isn't it? Or is it too low? The mousepad used to work fine, but now all of a sudden tapping does not equal click?!
Don't worry. This blog series will tell you all about the essential setup commands and common shortcuts that I use to navigate my work in i3, and how you can too.
Changing the brightness
So you just started i3 and you just can't take this brightness setting. You go for your function keys, and damn! They aren't working.
Quick fix:
Run the following command if you need to change the brightness ASAP.
xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1
This will give an ouput that's the name of your monitor. Use that monitor name here and change the values of brightness to suit your needs.
xrandr --output <monitor-name> --brightness 0.7
Now that your eyes are comfortable, let me show you the permanent way.
Permanent fix:
Find your i3 config file
First, find your i3 config file. Here are 4 file paths:
- ~/.i3/config
- ~/.config/i3/config
- /etc/i3/config
- /etc/xdg/i3/config
Starting from the first path, run:
If you do not get an output like:
And instead get the actual path as output, that is the true path of your i3 config file. This is the file that i3 executes first everytime it is loaded.
Alright, now back to the brightness problems.
Test xbacklight
First, test what this command does:
Or
If this command works fine for you and the brightness changes, skip this part and scroll down to xbacklight works.
xbacklight gives "No outputs have backlight property"
Alright. Now run:
If the output is not intel_backlight, scroll down to output is not intel_backlight
The output is intel_backlight
Run this command:
And paste the following:
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "Backlight" "intel_backlight"
EndSection
Restart your PC, and it should work fine.
If you use anything other than Xorg, you might still need to go to output is not intel_backlight.
Doesn't Work?
Read on.
The output is not intel_backlight
Well, that's new. Go follow this forum. Don't worry if it still doesn't work, I've got a backup plan for you too. Scroll on to Nothing Works.
xbacklight works
Congratulations, the command for brightness works perfectly in your system. Now all you have to do is bind them to the right function keys.
1. Identify which function keys exist for brightness change by looking at the keyboard. Let's say it is F11 & F12.
2. Go to your i3 config file. Find a line that reads:
bindsym XF86MonBrightnessUp exec xbacklight -inc 20
Note: Only do this when you are sure the current keys do not work and the above instructions don't work for you.
There are 2 things you can do. Let's start with the simpler option:
1. Replace XF86... with $mod+F11
Nothing Works (or TL;DR)
Well, if absolutely nothing from the above list worked for you for brightness change, I have a jugaad (work-around).
Test this output:
xrandr --output <monitor-name> --brightness 0.5
The monitor-name can be obtained from the very first command I wrote on this page.
Now, assuming this command works, run:
And add the following line in the file:
alias bright="xrandr --output <monitor-name> --brightness $1"
Close the terminal, open the terminal again, and run bright 0.7.
Does the brightness change?
Say yes, baby!
Now your jugaad is that every time you have to change brightness, you will have to remember to execute the command alias:
bright <any decimal number from 0-1>
You can keep the name anything else too. Just change the alias name in .bashrc.
The End, but is it?
Comments
Post a Comment