How to Adjust Brightness in Kali VM?

This might sound like an issue outside of qubes but i think it is a qubes issue. I cant change the brightness in my linux qube specifically kali linux. I have tried changing the brightness with xrandr and it didn’t work also with xbacklight. I think the problem is the virtual screen maybe it doesnt work with vm. Ultimately if it isnt possible to change from the qube could there be a solution from dom? Any help is appreciated.

1 Like

Here are two commands i tried :
xrandr --output [displayID] --brightness [X.XX]
xbacklight -set 50
Nothing changed

1 Like

You have to run the commands in the qube which controls the display, usually dom0 (alternatively sys-gui).

1 Like

How do i do that?

1 Like

You open a dom0 terminal! Easiest way to achieve this is to right-click on the Desktop and, from the menu that pops-up, select Open Terminal Here.

1 Like

Kinda of solved Thanks

2 Likes

ddcutil only - it sends command to monitor not to change gamma/contrast of the signal

first, install

sudo qubes-dom0-update install ddcutil

then detect monitors

ddcutil detect

that’s what is my report

Display 1
   I2C bus:  /dev/i2c-2
   DRM connector:           card0-HDMI-A-1
   EDID synopsis:
      Mfg id:               AOC - UNK
      Model:                AG275QXN
      Product code:         42244  (0xa504)
      Serial number:        VOKP1JA000899
      Binary serial number: 899 (0x00000383)
      Manufacture year:     2023,  Week: 5
   VCP version:         2.2

Invalid display
   I2C bus:  /dev/i2c-10
   DRM connector:           card0-eDP-1
   EDID synopsis:
      Mfg id:               AUO - UNK
      Model:                
      Product code:         64155  (0xfa9b)
      Serial number:        
      Binary serial number: 0 (0x00000000)
      Manufacture year:     2021,  Week: 0
   DDC communication failed
   This is an eDP laptop display. Laptop displays do not support DDC/CI.

as you can see I have one external monitor and one internal laptop - only external have DDC/CI capabilities

it’s best to address monitors by I2C bus because it’s constant - monitor number might change during boot

for my monitor, it’s I2C bus: /dev/i2c-2 - you interested in the number only → 2

now check for monitor capabilities, for my monitor it will be -b 2 option as it’s number 2 on I2C bus

ddcutil capabilities -b 2

result

Model: AG275QXN/EU
MCCS version: 2.2
Commands:
   Op Code: 01 (VCP Request)
   Op Code: 02 (VCP Response)
   Op Code: 03 (VCP Set)
   Op Code: 07 (Timing Request)
   Op Code: 0C (Save Settings)
   Op Code: E3 (Capabilities Reply)
   Op Code: F3 (Capabilities Request)
VCP Features:
   Feature: 02 (New control value)
   Feature: 04 (Restore factory defaults)
   Feature: 05 (Restore factory brightness/contrast defaults)
   Feature: 08 (Restore color defaults)
   Feature: 0C (Color temperature request)
   Feature: 10 (Brightness)
   Feature: 12 (Contrast)
   Feature: 14 (Select color preset)
      Values:
         01: sRGB
         05: 6500 K
         06: 7500 K
         08: 9300 K
         0b: User 1
   Feature: 16 (Video gain: Red)
   Feature: 18 (Video gain: Green)
   Feature: 1A (Video gain: Blue)
   Feature: 52 (Active control)
   Feature: 60 (Input Source)
      Values:
         0f: DisplayPort-1
         10: DisplayPort-2
         11: HDMI-1
         12: HDMI-2
   Feature: 62 (Audio speaker volume)
   Feature: 86 (Display Scaling)
      Values:
         01: No scaling
         02: Max image, no aspect ration distortion
         05: Max vertical image with aspect ratio distortion
         0b: Unrecognized value
         0c: Unrecognized value
         0d: Unrecognized value
         0e: Unrecognized value
         0f: Unrecognized value
         10: Unrecognized value
         11: Unrecognized value
         12: Unrecognized value
         13: Unrecognized value
   Feature: 8D (Audio mute/Screen blank)
   Feature: AC (Horizontal frequency)
   Feature: AE (Vertical frequency)
   Feature: B2 (Flat panel sub-pixel layout)
   Feature: B6 (Display technology type)
   Feature: C6 (Application enable key)
   Feature: C8 (Display controller type)
   Feature: CA (OSD/Button Control)
   Feature: CC (OSD Language)
      Values:
         01: Chinese (traditional, Hantai)
         02: English
         03: French
         04: German
         05: Italian
         06: Japanese
         07: Korean
         09: Russian
         0a: Spanish
         0b: Swedish
         0c: Turkish
         0d: Chinese (simplified / Kantai)
         0e: Portuguese (Brazil)
         12: Czech
         14: Dutch
         16: Finnish
         1e: Polish
   Feature: D6 (Power mode)
      Values:
         01: DPM: On,  DPMS: Off
         04: DPM: Off, DPMS: Off
         05: Write only value to turn off display
   Feature: DC (Display Mode)
      Values:
         00: Standard/Default mode
         0b: Unrecognized value
         0c: Unrecognized value
         0d: Unrecognized value
         0e: Unrecognized value
         0f: Unrecognized value
         10: Unrecognized value
   Feature: DF (VCP Version)
   Feature: ED (Manufacturer specific feature)
   Feature: FF (Manufacturer specific feature)

there is capability, named Feature: 10 (Brightness) in VCP Features: and ddcutil can set vcp features

so, for my monitor, setting brightness to 100% will be ddcutil for monitor -b 2 set feature brightness setvcp 10 to 100

ddcutil -b 2 setvcp 10 100

i’ve made alias in ~/.bashrc.d/aoc_brightness

alias aocbr="ddcutil -b 2 setvcp 10 $1"

and now I can change brightness of my monitor to 20% (don’t need more than 40% because my eyes are bleeding) by issue in dom0 terminal:

aocbr 20
2 Likes