site  contact  subhomenews

Improved hardware profiling for Xorg

January 13, 2020 — BarryK

There was recently some discussion on the forum about the relative merits of EasyOS on a USB-stick versus an ISO. One comment was that the ISO has an advantage when booting on different PCs, as it creates a new save-file on each PC -- hence hardware, such as for Xorg, will be configured for the hardware of that PC. For example, the file /etc/X11/xorg.conf.

In the case of Xorg, Puppy Linux introduced something called the "PuppyHardwareProfile", that creates a /etc/X11/xorg.conf for each type of video graphics chip and monitor. So, booting the USB-stick on different PCs, each will have its own xorg.conf file.

Later on, after having left leadership of Puppy, I extended this hardware-profiling to /etc/X11/xorg.conf.d folder also, for Quirky Linux.

This morning, I checked that code, and tidied it up a bit -- it wasn't quite right in a few places. Running Easy 2.2, this is the content of /etc/X11:

img1

File xorg.conf.Intel_R_Sandybridge_Desktop_GraphicsLCDTV is the backup of xorg.conf, for the particular video chip and monitor I am running. The script that checks this is /usr/bin/xwin -- before starting Xorg, it checks the actual hardware-profile, and if it has changed, and if there is a matching xorg.conf.* backup for the new profile, that will be copied to xorg.conf.

The great thing is, this is automatic, you plug the USB-stick into any PC, and any configuration that you do with xorg.conf and xorg.conf.d, will be backup-up, and restored as required.

What was not quite right was backup of xorg.conf.d. In future releases of Easy, you will also see folder xorg.conf.d.Intel_R_Sandybridge_Desktop_GraphicsLCDTV (with your own hardware profile of course).

The modified scripts:

/usr/sbin/xorgwizard-automatic
/usr/sbin/xorgwizard-cli
/usr/sbin/xorgwizard
/usr/sbin/quicksetup
/usr/bin/xwin

I did a search of my archived blogs, to find out where PuppyHardwareprofile got introduced. The earliest post is this one, in 2010:

https://bkhome.org/archive/blog2/201004/woof-uploaded-april-16-2010.html

Searching the Murga Puppy Forum, the earliest PuppyHardwareProfile posts are in 2007, so that must have been when it was introduced.

There is an informative write-up on Xorg and PuppyHardwareProfile, by Forum member 'Flash', in 2012:

http://www.murga-linux.com/puppy/viewtopic.php?t=81856

Fast-forward to now, I looked in woof-CE on github, to find out how this hardware profiling has progressed. Gulp, it hasn't progressed, it has been totally removed. I looked in /usr/bin/xwin:

https://raw.githubusercontent.com/puppylinux-woof-CE/woof-CE/testing/woof-code/rootfs-skeleton/usr/bin/xwin

You can see the history of commits here, hardware profiling got taken out in 2016:

https://github.com/puppylinux-woof-CE/woof-CE/blob/testing/woof-code/rootfs-skeleton/usr/bin/xwin

Does that mean that Xorg hardware profiling is handled in some other way? Or is it gone from Puppy? 

Anyway, back onto EasyOS. Sound is another thing that also should be hardware-profiled. I have put that on the to-do list. 

Tags: easy