Comments (3)
My first guess would be that this part of the code hangs:
Lines 75 to 78 in 55d98fe
Could you run with RUST_LOG=trace
, to see for example if the ALS value is being read?
I'm not quite sure if a file read could even hang like this... But worth a try? Could you explore your /sys/bus/iio/devices
, find the folder where file name
would contain als
, and in that folder try to cat
these files (whatever exist) and see if this works?
Lines 85 to 101 in 55d98fe
from wluma.
Hello. Apologies for the late response as I switched distributions from Arch to Fedora Workstation on my Surface. Problem still persists.
Here is the output of wluma when ran with RUST_LOG=trace
:
[2023-08-27T19:28:01Z DEBUG wluma] Using Config {
als: Iio {
path: "/sys/bus/iio/devices",
thresholds: {
80: "dim",
0: "night",
20: "dark",
500: "bright",
800: "outdoors",
250: "normal",
},
},
output: [
Backlight(
BacklightOutput {
name: "eDP-1",
path: "/sys/class/backlight/intel_backlight",
capturer: None,
min_brightness: 1,
},
),
],
}
[2023-08-27T19:28:01Z INFO wluma] Continue adjusting brightness and wluma will learn your preference over time.
thread 'predictor-eDP-1' panicked at 'Did not receive initial ALS value in time', src/predictor/controller.rs:62:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I followed what you outlined; I first searched for name
file in /sys/bus/iio/devices
which contains als
(which in my case happened to be /sys/bus/iio/devices/iio:device5
), then I entered that directory and ran cat
on all the files mentioned within the code snippet you showed me. All where there except the last three
fn parse_intensity(path: PathBuf) -> Result<SensorType, Box<dyn Error>> {
Ok(Intensity {
r: Mutex::new(File::open(path.join("in_intensity_red_raw"))?),
g: Mutex::new(File::open(path.join("in_intensity_green_raw"))?),
b: Mutex::new(File::open(path.join("in_intensity_blue_raw"))?),
The 3 files specified in this snippet cease to exist.
from wluma.
Hello! Sorry, this entirely slipped my attention 😞 Are you still interested to debug this further? If so, given that you have the device files, can you actually read the values inside them?
cat /sys/bus/iio/devices/iio:deviceN/in_illuminance_raw
cat /sys/bus/iio/devices/iio:deviceN/in_illuminance_scale
cat /sys/bus/iio/devices/iio:deviceN/in_illuminance_offset
ls -al /sys/bus/iio/devices/iio:deviceN/in_illuminance_raw
ls -al /sys/bus/iio/devices/iio:deviceN/in_illuminance_scale
ls -al /sys/bus/iio/devices/iio:deviceN/in_illuminance_offset
groups
This would additionally list permissions and ownership of the files, to make sure that your user has the necessary access. Redact the sensitive info (e.g. groups) as necessary.
from wluma.
Related Issues (20)
- [Bug]: ALS data not parsed/calculated correctly HOT 2
- [Bug]: Can't find display, but shows up in ddcutil detect HOT 8
- [Bug]: Cargo failling to compile v4l-sys HOT 5
- [Bug]: Unable to start wluma from the command line HOT 3
- [Feature request]: gracefully disable capture when not wlroots HOT 2
- [Feature request]: be lenient with config file and assume defaults HOT 1
- [Feature request]: print more debug info HOT 3
- [Feature request]: Add timeout for keyboard backlight HOT 3
- How do I adjust the brightness HOT 2
- [Feature request]: Support Hyprland screen capturing (after its transition away from wlroots) HOT 18
- [Bug]: Panicked when running both with sudo and not HOT 6
- [Feature request]: Support monitor disconnect HOT 6
- [Bug]: Unable to initialize Vulkan: ERROR_EXTENSION_NOT_PRESENT HOT 4
- [Bug]: wluma refuses to read my config file HOT 2
- configuration question HOT 6
- [Feature request]: Add gamma control HOT 9
- [Bug]: `Backlight::new` returns early instead of using dbus
- [Bug]: No binary in Github artifacts HOT 3
- [Feature request]: Support custom external sources for luminance value HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wluma.