0

I have a i7 10th with a MX230 GeForce. I have installed only Ubuntu 20.04. During Ubuntu's installation, I did this to install NVIDIA drivers. The current configuration is:

2

I can play video games and so on, but every time I try to use the brightness keyboard shortcuts, my entire UI is frozen for a little while(10s). Decreasing the brightness works fine (besides the 10s UI freeze), but trying to increase it freezes it longer than 10s and after it unfreezes, it behaves as nothing happened. I cannot fail any new attempt to solve this since I have important data into this machine. I've found these options:

But none of them are specific to Ubuntu 20.04 and Nvidia MX230. Before executing each one of them as 'try and error', is there any specific instruction for this specific setup?

rado
  • 205
  • ps: by settings > power > screen brightness slider everything works fine – rado Jul 03 '20 at 18:07
  • ps2: I also tried Ubuntu 18.04, had the same behavior. This seems to be Ubuntu version agnostic – rado Jul 05 '20 at 21:40

1 Answers1

1

I have the same issue on Ubuntu 21.04 with 465.19.01 driver.

Unfortunately, the native laptop controls can be used only across nouveau driver.

After several workarounds the following instructions works for me:

sudo apt install brightnessctl

This command only works as root. You can add your user to a group called video:

sudo gpasswd -a <user_name> video

After logout/login or reboot, copy and save this script:

 #!/bin/bash

#Selected option + or - COMMAND=$1

Current brightness value

CURRENT_VALUE=$(brightnessctl g)

Max supported brightness value

MAX_VALUE=$(brightnessctl m)

Min valid brightness percent

MIN_BRIGHTNESS=$(($MAX_VALUE*5/100))

Value used to increase or decrease brightness when - or + is passed as argument

BIAS="5%"

Increase laptop screen brightness according to $BIAS

if [ "$COMMAND" == "+" ]; then brightnessctl -s -q s +$BIAS fi

Decrease laptop screen brightness according to $BIAS

if [ "$COMMAND" == "-" ]; then

Limit minimum brightness to avoid black screen

if [ $CURRENT_VALUE -gt $MIN_BRIGHTNESS ]; then
    brightnessctl -s -q s $BIAS-
fi

fi

After saving this script, you can map your keyboard shortcut under Settings > Keyboard Shortcuts like this:

decrease brightness sample increase brightness sample

Enjoy

Zanna
  • 70,465