Will be possible to use Manjaro on Amoled display notebook? Can brightness be controlled?
Did not found nothing on forum regarding Amoled…
Will be possible to use Manjaro on Amoled display notebook? Can brightness be controlled?
Did not found nothing on forum regarding Amoled…
The only one way to find out is a live ISO - but isn’t amoled just a variation - and the usual function keys could control it?
Out of the box it does not work.
However, Iam running on a Lenovo X1 Yoga with OLED display my own script which I hooked up to the brightness keys and it works without any issues.
I will post it as soon as Iam back on my laptop again this evening.
Here we go.
What you need to do:
Usage:
The script is called by either calling it with “up” or “down” in order to increase, decrease brightness. In addition to changing the OLED brightness, using xrandr, also external connected displays are changed accordingly.
What you might want to do else is to call the script on logon without any arguments. In this case it just sets the brightness back to the value it was set on the last time. If you do not do this you end up after each reboot with the brightness set to maximum until you adjust it with the Fn-Keys.
#!/bin/sh
# Where the backlight brightness is stored
BR_DIR="/sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight/"
MIN=0
MAX=$(cat "$BR_DIR/max_brightness")
VAL=$(cat "$BR_DIR/brightness")
if [ "$1" = down ]; then
VAL=$((VAL-71))
elif [ "$1" = up ]; then
VAL=$((VAL+71))
elif [ -z "$1" ]; then
VAL=$(cat "$BR_DIR/brightness")
elif [ "$1" -eq "$1" ] 2>/dev/null; then
VAL="$1"
fi
if [ "$VAL" -lt $MIN ]; then
VAL=$MIN
elif [ "$VAL" -gt $MAX ]; then
VAL=$MAX
fi
PERCENT=`echo "$VAL / $MAX" | bc -l`
export XAUTHORITY=/home/YOUR_USERNAME/.Xauthority
export DISPLAY=:0.0
# Get all connected Displays
DISPLAYS=$(xrandr | grep " connected " | awk '{ print$1 }')
# Set brightness for all other displays via xrandr which might be connected via HDMI, VGA, ... => does not work for OLED Displays !
for i in $DISPLAYS
do
xrandr --output $i --brightness $PERCENT
done
# Set brightness for the internal OLED display
echo $VAL > "$BR_DIR/brightness"
thanks, but not very easy for me to understand or do…
the machine I’m talking about is similar to this:
but is having the Nvidia GeForce GTX 1660 Ti + Amoled Samsung
the tuxedo-keyboard in the repos can give control of all the fn-keys
dunno if the linux-oled on the AUR may support brightness control
mmh okay. What exactly gives you the most trouble ?
As @linux-aarhus suggested I would boot up an live ISO and give the script a shot.
The only adaptation for it to work would be the correct BR_DIR and the username which in case of a live iso is “manjaro”.
Regarding the BR_DIR you can go even an easier way, just navigate to “/sys/class/backlight” and have a look what you find there. In my case it is a symlink to “intel_backlight”. In the end you can use that as well.
well, I can get keyboard backlit to work, sound is working, prime is working, only the display brightness does not
I don’t know what is a BR_DIR… and how to use that script too…
yes of course I can navigate to /sys/class/backlight and look what i find there, but how to use that symlink?
tomorrow I can try with live ISO, now is to late in my geolocation…
here screenshots from live usb
tomorrow i will get the ssd to install manjaro, maybe tomorrow or after tomorrow I can come bach with the installed system
Well, that looks promising.
So now you know that you can address your backlight via “/sys/class/backlight/intel_backlight”
If you have a look at the script I posted you have to replace the path under BR_DIR with the one you found.
Secondly you have to scroll down in the script till you reach the line “export XAUTHORITY=/home/YOUR_USERNAME/.Xauthority” here you need to replace YOUR_USERNAME with the actual login name you are using.
After that put the modified script into a file, make the file executable by calling “chmod +x filename.sh” and you are good to go. Execute the script entering ./filename.sh up or ./filename.sh down in the console to test it.
If that works go ahead and hook the script up with your brightness keys the way you described.
so if I understand well…
I will have to change the BR_DIR you provide with /sys/class/backlight/intel_backlight and copy the file there after changing the xautority line then make it executable from there
Am I right?
excuse me but you know I’m notageek
Almost right except that you do not need to copy the script there. The script can be located anywhere e.g. home-dir, /opt … it actually does not matter here.
thanks,
indeed I’ve made the script in /home/user/
saved as .txt and then to -sh before to make it executable
first time I tested in konsole it was dimming the screen but the the keys fn+brightness up and down deed not work
the last line with
echo $VAL > "$BR_DIR/brightness"
has to be unchanged?
PS
I’ve inserted the path as first screenshot maybe the path in the third was more suitable?
Good to hear that the script works for you in console which proofs that the path you inserted is correct.
The last line has to be unchanged as this line actually writes the new, by the script calculated, brightness value to the hardware.
The script itself does not have anything to do with the fn+brightness keys. Now that you have a script that is able to dim your screen you need to connect that script with the brightness keys so that everytime you press the key the script is executed with either up or down as argument.
In your second post you were referring to the tuxedo keyboard driver. Probably this is the way to go. However I am not familiar with it since I have a thinkpad which uses a different method of interaction with the keyboard events.
previous workaround didn’t work…
machine based on Clevo PC50DN2 + Samsung Amoled Display
inxi -F
System: Host: Manjaro Kernel: 5.12.0-1-MANJARO x86_64 bits: 64 Console: tty pts/1
Distro: Manjaro Linux
Machine: Type: Laptop System: SANTECH product: PCX0DX v: N/A serial: N/A
Mobo: SANTECH model: PCX0DX serial: N/A UEFI: INSYDE v: 1.07.09TSAS date: 09/14/2020
Battery: ID-1: BAT0 charge: 59.8 Wh (80.5%) condition: 74.3/70.7 Wh (105.1%)
CPU: Info: 8-Core model: Intel Core i7-10875H bits: 64 type: MT MCP cache: L2: 16 MiB
Speed: 800 MHz min/max: 800/5100 MHz Core speeds (MHz): 1: 800 2: 2288 3: 1459
4: 1025 5: 937 6: 800 7: 800 8: 800 9: 800 10: 800 11: 800 12: 800 13: 800 14: 800
15: 839 16: 900
Graphics: Device-1: Intel UHD Graphics driver: i915 v: kernel
Device-2: NVIDIA TU116M [GeForce GTX 1660 Ti Mobile] driver: nvidia v: 465.24.02
Device-3: Acer BisonCam NB Pro type: USB driver: uvcvideo
Display: server: X.Org 1.20.11 driver: loaded: modesetting,nvidia s-res: 3840x2160
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 21.0.1
Audio: Device-1: Intel Comet Lake PCH cAVS driver: snd_hda_intel
Sound Server-1: ALSA v: k5.12.0-1-MANJARO running: yes
Sound Server-2: PulseAudio v: 14.2 running: yes
Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
IF: eth0 state: up speed: 100 Mbps duplex: full mac:
Device-2: Intel Wi-Fi 6 AX200 driver: iwlwifi
IF: wlan0 state: down mac:
Bluetooth: Device-1: Intel AX200 Bluetooth type: USB driver: btusb
Report: bt-service: disabled note: bt-adapter can't run.
Drives: Local Storage: total: 931.52 GiB used: 14.41 GiB (1.5%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 970 EVO Plus 500GB size: 465.76 GiB
ID-2: /dev/nvme1n1 vendor: Samsung model: SSD 980 PRO 500GB size: 465.76 GiB
Partition: ID-1: / size: 418.71 GiB used: 14.41 GiB (3.4%) fs: ext4 dev: /dev/nvme1n1p2
ID-2: /boot/efi size: 299.4 MiB used: 152 KiB (0.0%) fs: vfat dev: /dev/nvme1n1p1
Swap: ID-1: swap-1 type: partition size: 8.01 GiB used: 0 KiB (0.0%) dev: /dev/nvme1n1p3
Sensors: System Temperatures: cpu: 61.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info: Processes: 298 Uptime: N/A Memory: 15.33 GiB used: 1.49 GiB (9.7%) Shell: Bash
inxi: 3.3.03
fixed, tried today with kernel 5.12.rc7, brightness control works with Fn + F8 - F9
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.