site  contact  subhomenews

Further improved video hardware profiling

January 15, 2020 — BarryK

I posted about improving video hardware profiling:

https://bkhome.org/news/202001/improved-hardware-profiling-for-xorg.html

The generated hardware-profile uses a utility called 'ddcprobe', but this often does not work, and certainly doesn't on ARM boards. On my three desktop PCs and three laptops, ddcprobe does not work on two of them.

Here is alternative code for generating the hardware-profile:

#200114 improve video hardware profile...
GPU_IDS=''; EDIDsum=''
if which lspci >/dev/null;then #arm boards usually don't have pci bus.
GPU_IDS="$(lspci -d ::0300 -n | cut -f 3 -d ' ' | tr '\n' '_')" #ex: 8086:0102_ note: maybe more than one card.
fi
if [ -d /sys/class/drm ];then
for aCARD in /sys/class/drm/card*
do
if grep '^connected' ${aCARD}/status >/dev/null 2>&1;then
CARDname="${aCARD##*/}" #ex: card0-HDMI-A-2
if [ -e ${aCARD}/edid ];then
EDIDsum="$(xxd -p -c30 ${aCARD}/edid | cksum - | cut -f 1 -d ' ')"
break
fi
fi
done
fi
HARDWAREPROFILE="${GPU_IDS}+${EDIDsum}"

Here is an example:

HARDWAREPROFILE=8086:0102_+958937616

...the first part is the PCI ID (or IDs) of the GPU (or GPUs), and the second part is a checksum of the monitor EDID.

This will partly work on ARM boards. The ARM boards, at least the ones I have, do not have a PCI bus, so the hardware-profile will only be the monitor EDID checksum.

The previous post linked-to above, lists the scripts that have been edited. The XorgWizard still has 'ddcprobe' in it, used to probe screen resolutions. It is on the to-do list to completely remove ddcprobe. 

For anyone who is interested in this topic as applied to Puppy Linux, there is some discussion starting here:

http://murga-linux.com/puppy/viewtopic.php?p=1047605#1047605 

Tags: easy