Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brightness and battery doesn't show #203

Closed
pandasoli opened this issue Sep 17, 2023 · 10 comments
Closed

Brightness and battery doesn't show #203

pandasoli opened this issue Sep 17, 2023 · 10 comments

Comments

@pandasoli
Copy link

Hi people.

image

As you can see in the right of polybar it doesn't show the battery and the brightness icons. I would like to know which packages it depends to show them.

@alphaprads
Copy link

see what the number of your battery is it has to be changed from the polybar config file in ~/.config/polybar//modules.ini

i believe you know how to see your battery name
if not try BAT0 i believe most computers have that name

if you still don't get where to change the name
cd ~/.config/polybar/

and then run
grep -R "BAT1"
you'll see modules.ini and bars.ini so change them with BAT0

tell me if you can do it so we can close this issue and if there is anything feel free to send me here

also please assign this issue to me

@pandasoli
Copy link
Author

pandasoli commented Sep 17, 2023

@alphaprads
The battery one will probably not work because I don't have one (maybe it would because xfce4-panel recognizes like if I had) but this is not import.

I would like to know more about the brightness.
It says:

...
error: Disabling module "brightness" (reason: The file '/sys/class/backlight/amdgpu_bl0/brightness' does not exist)
...

Maybe some lib missing on my system?
PS: I tried to change the card.

image
and it actually exists.
PS: I tried to reload the polybar.

@pandasoli
Copy link
Author

image
PS: ignore the network error

@alphaprads
Copy link

i tried few things i think i get what your problem might be
what is the output of find /sys/devices/pci0000:00 -name brightness

@alphaprads
Copy link

i think the symbolic link there is wrong one we just have to replace it

@alphaprads
Copy link

also try

sudo vim brightness and change the value by around 20 percent report what you get

along with that i would like to tell you this question can be sent to polybar because it depends on how polybar identifies these modules see if they have a forum and post on it

@pandasoli
Copy link
Author

Thank you!
I think the problem is something with my system.
I'll try to find it and say here if I find. If I don't find in some hours I close the issue.

@pandasoli
Copy link
Author

News!
I thought the problem was with my system bc I`ve made a script to change the brightness and now it was not working.

#!/bin/bash

# Check for the correct number of arguments
if [ "$#" -ne 1 ]; then
  echo "Usage: $0 <brightness_level>"
  exit 1
fi

# Verify that the brightness level is a positive integer
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
  echo "Error: Please provide a positive integer as the brightness level."
  exit 1
fi

# Path to the brightness control file
brightness_file="/sys/class/backlight/acpi_video0/brightness"

# Set the brightness level
# sudo su -c "echo $1 > $brightness_file"      # old
echo "$1" | sudo tee "$brightness_file"

echo "Brightness set to $1"

But my system is fine.

Did you notice that in the print I sent even changing the card property to the right one the error message says about the default card?

...
error: Disabling module "brightness" (reason: The file '/sys/class/backlight/amdgpu_bl0/brightness' does not exist)
...

Is really ~/.config/polybar/forest/modules.init where I should change it?

@alphaprads
Copy link

before changing and modifying anything just do one thing
cd ~/.config/polybar/forest

then do
vim bars.ini

go to line number 122

and rewrite the amdgpu_b10 to be acpi_video0
necessary change as it will never work without the above change
now ./launch.sh

i am quite confident that this should work
also i don't believe by the looks of it to be the case that it is a system issue however this is just a speculation

please try the above change and see what happens
i sadly didn't look at the screenshots well yesterday but i'm fairly certain now that you haven't changed the value of amdgpu_b10 to acpi_video0

don't try anything reckless before you have backup or it might take a bigger time fixing and might also stop your current running polybar turning into a bigger issue

@pandasoli
Copy link
Author

Sorry I stopped using this themes and decided making my own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants