Xorg semi-autoconfiguration?

Latest response

Is there a way how to make Xorg configure the devices and screens based on the HW scenario (ie. without need to manually prepare whole xorg.conf) and automatically switch between them? We are using USB Displaylink devices and in case this device is not available it breaks the prepared configuration and user has to manually switch the xorg.conf for non-USBDP scenario and restart Xorg. It would be also great if we can prepare some "rule-them-all" configuration as user's are running on machines with different graphic cards.
Do we really need to script all this manually before we start the X server or do Xorg have some mechanism how to build xorg.conf file with respect to specified requirements eg. when USBDP is connected then add the Xinerama support into ServerLayout section etc?

Attachments

Responses

I saw a beginning of a discussion in this discussion. Looks like more might be posted later.

Just curious, do you have more than one manufacturer's graphics cards? The USB Display Link looks interesting but have not tried it's use with Linux yet. I did some searches but did not find much on this topic. Here's a small tiny bit from Fedora. Do you have support with displaylink? and also see this link, archlinux and displaylink.

Perhaps you could copy each of the working xorg.conf files once you had this configured in each of your scenarios to a safe and separate location. Then script the switch before restarting X. You could make this available to a non-privileged user by making a directory with a script that watches the directory (like once a minute). Then have a simple file touched in there and if the script detects the file (named after whatever scenario you have), it flips the xorg.conf and restarts X. You could have an ACL on that directory so only specific people could touch a file in it.

Wish you well with this. Perhaps someone here in the community might have some more info...

Mostly only workstations (laptops) with mix of intel/nvidia. USB displaylink works fine with some restrictions and limitations - we had to compile udlfb and displaylink modules manually and also there are some HW limitations (max screen size, USB3.0 devices are not supported etc).

I think we will use /proc/fb to check whether USB2DP is present (we are using udlfb) and prepare xorg.conf "template" which gets populated by init script during boot up.

Nice

Pavel, that will of course work if it's connected/registers right at init 5. If the device is plugged in later (after the init scripts execute), a cron might be more useful to trigger the change. RHEL 7 and no init scripts will make this a tad different.

We have decided to use udev for this with script changing the xorg.conf based on device availability (ie USB2DP add / remove)

I have attached template for our udev script that will change the xorg.conf and inform user in case anyone is interested...

Pavel, thank you for your work on this. I am interested but didn't see the template attachment. Was it stripped?

Donna, I have attached just the stripped script. We are generating whole xorg.conf using predefined sections and changing just primary graphic card. When displaylink device disconnects the customized xorg.conf is removed.

Pavel: Thank you. I found it up at the top of the discussion. I am new to using the DisplayLink with RH, is there something other than the xorg.conf settings needed?

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.