Light requires sudo to run BIS

Hi,
I have the same problem as the person in the thread of same name, but the advise, running:
sudo usermod -aG video $USER
didn’t work, and I still need to sudo the command.

Here’s what happens:

log

/s/c/backlight> light -U 20 -v 3
helpers.c:27: Error: Couldn’t parse an unsigned integer from ‘/home/drm/.config/light/targets/sysfs/backlight/auto/minimum’
helpers.c:45: Error: could not open ‘/sys/class/backlight/intel_backlight/brightness’ for writing
helpers.c:45: Error: Verify it exists with the right permissions
impl/sysfs.c:133: Error: failed to write to sysfs device
light.c:944: Error: failed to write to target
main.c:20: Error: Execution failed

Please provide the link for your hardware and explain what your issue is. Is this an issue with backlighting on the keyboard? Just because this worked for someone else’s hardware doesn’t necessarily mean it is the proper way to address the issue on your hardware.

inxi -Faz | eos-sendlog

My hardware is fine as the aforementioned command works well when prefixed with “sudo”.
It controls the screen backlight/luminosity (btw, I find it counter-intuitive that the likes of wlsunset doesn’t include that feature).
It is not a hardware issue.

Log

System:
Kernel: 5.18.1-arch1-1 arch: x86_64 bits: 64 compiler: gcc
v: 12.1.0 parameters: BOOT_IMAGE=/boot/vmlinuz-linux
root=UUID=44b3f133-42c6-40df-a2ab-3cc5eabcb21e rw quiet
resume=UUID=d04d5ba5-1b62-49f0-8b04-2592f9f34fd3 loglevel=3
nowatchdog nvme_load=YES
Desktop: sway v: 1.7 info: waybar vt: 3 dm: Ly
v: 0.5.3.r0.g4094d21 Distro: EndeavourOS base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 80QR v: Lenovo B50-10
serial: Chassis: type: 10
v: Lenovo B50-10 serial:
Mobo: LENOVO model: Lenovo B50-10 v: No DPK
serial: UEFI-[Legacy]: LENOVO
v: CCCN18WW(V2.04) date: 11/11/2015
Battery:
ID-1: BAT1 charge: 19.6 Wh (100.0%)
condition: 19.6/23.8 Wh (82.6%) volts: 12.3 min: 10.8
model: LENOVO PABAS0241231 type: Li-ion serial:
status: full
CPU:
Info: model: Intel Celeron N2840 bits: 64 type: MCP
arch: Silvermont family: 6 model-id: 0x37 (55) stepping: 8
microcode: 0x838
Topology: cpus: 1x cores: 2 smt: cache:
L1: 112 KiB desc: d-2x24 KiB; i-2x32 KiB L2: 1024 KiB
desc: 1x1024 KiB
Speed (MHz): avg: 2346 high: 2583 min/max: 500/2582 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 2583
2: 2109 bogomips: 8671
Flags: ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds mitigation: Clear CPU buffers; SMT disabled
Type: meltdown mitigation: PTI
Type: spec_store_bypass status: Not affected
Type: spectre_v1 mitigation: usercopy/swapgs barriers and
__user pointer sanitization
Type: spectre_v2 mitigation: Retpolines, IBPB: conditional,
IBRS_FW, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel Atom Processor Z36xxx/Z37xxx Series Graphics &
Display
vendor: Lenovo driver: i915 v: kernel ports: active: eDP-1
empty: DP-1,HDMI-A-1,VGA-1 bus-ID: 00:02.0
chip-ID: 8086:0f31 class-ID: 0300
Device-2: Syntek Lenovo EasyCamera type: USB
driver: uvcvideo bus-ID: 1-3:3 chip-ID: 174f:1169
class-ID: 0e02 serial:
Display: wayland server: X.org v: 1.21.1.3 with: Xwayland
v: 22.1.2 compositor: sway v: 1.7 driver: X: loaded: intel
unloaded: modesetting alternate: fbdev,vesa gpu: i915
display-ID: 1
Monitor-1: eDP-1 model: ChiMei InnoLux 0x15c5 built: 2013
res: 1366x768 hz: 60 dpi: 101 gamma: 1.2 scale: 1
size: 344x193mm (13.54x7.6") diag: 394mm (15.5") ratio: 16:9
modes: 1366x768
OpenGL: renderer: Mesa Intel HD Graphics (BYT)
v: 4.2 Mesa 22.1.0 direct render: Yes
Audio:
Device-1: Intel Atom Processor Z36xxx/Z37xxx Series High
Definition Audio
vendor: Lenovo driver: snd_hda_intel v: kernel
bus-ID: 00:1b.0 chip-ID: 8086:0f04 class-ID: 0403
Sound Server-1: ALSA v: k5.18.1-arch1-1 running: yes
Sound Server-2: sndio v: N/A running: no
Sound Server-3: PulseAudio v: 16.0 running: no
Sound Server-4: PipeWire v: 0.3.51 running: yes
Network:
Device-1: Realtek RTL810xE PCI Express Fast Ethernet
vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 03:00.0
chip-ID: 10ec:8136 class-ID: 0200
IF: enp3s0 state: up speed: 100 Mbps duplex: full
mac:
Device-2: Realtek RTL8723BE PCIe Wireless Network Adapter
vendor: XAVi driver: rtl8723be v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 1000 bus-ID: 04:00.0
chip-ID: 10ec:b723 class-ID: 0280
IF: wlan0 state: down mac:
Bluetooth:
Device-1: Chicony Bluetooth (RTL8723BE) type: USB
driver: btusb v: 0.8 bus-ID: 1-4:4 chip-ID: 04f2:b49f
class-ID: e001 serial:
Report: rfkill ID: hci0 rfk-id: 19 state: down
bt-service: not found rfk-block: hardware: no software: yes
address: see --recommends
Drives:
Local Storage: total: 698.64 GiB used: 457.62 GiB (65.5%)
SMART Message: Unable to run smartctl. Root privileges
required.
ID-1: /dev/sda maj-min: 8:0 vendor: Samsung
model: ST750LM022 HN-M750MBB size: 698.64 GiB block-size:
physical: 4096 B logical: 512 B speed: 3.0 Gb/s type: HDD
rpm: 5400 serial: rev: 0001 scheme: MBR
Partition:
ID-1: / raw-size: 689.83 GiB size: 677.94 GiB (98.28%)
used: 457.55 GiB (67.5%) fs: ext4 dev: /dev/sda1 maj-min: 8:1
Swap:
Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 8.8 GiB
used: 71.3 MiB (0.8%) priority: -2 dev: /dev/sda2 maj-min: 8:2
Sensors:
System Temperatures: cpu: 57.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 152 Uptime: 1d 16h 51m wakeups: 39 Memory: 7.65 GiB
used: 2.48 GiB (32.5%) Init: systemd v: 251 tool: systemctl
Compilers: gcc: 12.1.0 clang: 13.0.1 Packages: note: see --pkg
pacman: 1311 lib: 276 Shell: fish v: 3.4.1 running-in: foot
inxi: 3.3.16

I missed that aforementioned command you talk about… Can you repost it please?

Also post (in code block, if you please…):

groups | grep -wo video
ls -l /sys/class/backlight/intel_backlight/brightness
ls -l /sys/class/backlight/
grep "GROUP=\"video\""  /usr/lib/udev/rules.d/*.rules
grep "GROUP=\"video\""  /etc/udev/rules.d/*.rules

Have you read this wiki article?

1 Like

uh oh, true, one had to assemble both pieces.
I meant that
sudo light -U 20
works fine.
I did read the wiki but I do tend to forget the details

Fortunately, the wiki is still up, so you can refer to it whenever you forget something.

2 Likes

That isn’t the point. I’m trying to understand what the issue is that you are using the command for. You have the same problem you say as in the thread of the same name. This isn’t the way to post things. We aren’t mind readers and please don’t expect us to go looking through other posts to try to understand what the issue is you are having. This is just confusing. There may be some here that are familiar with what you are alluding to but not all of us.

I think I’ve being made a fool of…
I just want to change the luminosity of my bl**dy laptop’s screen, which is the point of the “light” program.
It works well when run by root, but doesn’t as a non-privileged user.

How? I can only see people trying to be helpful above.

You might want to check this out

Have a look towards the bottom, I think it may be what you are after

1 Like

Do you mean that perhaps ?

./configure --with-udev && make
sudo make install

It seems close indeed, but can’t I do the same post-installation ? Otherwise what’s the point in having a “light” package if I can’t use it from a normal user ?

That’s a valid question.
I think the developer is the one best suited to answer it.

Or perhaps it was just a rhetorical one…

2 Likes

The OP is pretty spot on actually. They come on regularly and create nearly impossible to solve threads with minimal information, demands a bunch of help, and rarely even answers most of the questions proposed to help them. I’ll take the Vegas odds they find a solution and mark their own post as the answer that doesn’t make any sense.

We call them a . . . Well. There’s a name,I cannot say because there’s a few who get in a tizzy about it.

3 Likes

@sentinel166
This is the information you need to look at. The first thing i would try is a kernel parameter in the default grub command line and then update grub and reboot.

This is the one i would try first.

acpi_backlight=vendor

Add to the default grub command line in /etc/default/grub using a text editor such as nano and save the file. Then update grub with

sudo grub-mkconfig -o /boot/grub/grub.cfg

Then reboot and see if there is any difference. You may want to uninstall the light package first though.

https://wiki.archlinux.org/title/backlight

It did not work.

~> sudo usermod -aG video drm
~> light -U 30
~ [1]> light -U 30 -v 3
helpers.c:27: Error: Couldn't parse an unsigned integer from '/home/***/.config/light/targets/sysfs/backlight/auto/minimum'
helpers.c:45: Error: could not open '/sys/class/backlight/intel_backlight/brightness' for writing
helpers.c:45: Error: Verify it exists with the right permissions
impl/sysfs.c:133: Error: failed to write to sysfs device
light.c:944: Error: failed to write to target
main.c:20: Error: Execution failed
~ [1]> sudo light -U 30 -v 3
helpers.c:21: Error: could not open '/etc/light/targets/sysfs/backlight/auto/minimum' for reading
helpers.c:21: Error: Verify it exists with the right permissions

The last command worked.

I disagree.
The system works exactly as it is configured to work. The system explains what is wrong and what you need to correct.

But, it seems you either don’t want to correct it, or you don’t understand what the system says.
In any case, you might want to ask for help from someone that can understand what the system says and do as he tells you to do.

Has the trolling period started in Europe already?.. :troll:

Approximately October 10, '21

1 Like