Trouble connecting ViewPixx to Linux Ubuntu laptop

NJU739EE- 2022520114942:01f960c54c9ad357c32d17714aaa8fa8ea0a07f592d5cd5afa54092162e72bb3

Hi all,

I am setting up my ViewPixx monitor with a Dell laptop (Dell Latitude 5490, processor Intel Core i7-8650U CPU @190Ghz x8, graphics NV118/Mesa Intel UHD Graphics 620) with Ubuntu installed (Ubuntu 22.04 LTS). I am running Psychtoolbox Version 3.0.18 (Flavour: Debian Package - psychtoolbox-3 (3.0.18.9.dfsgl-1-nd22.04+1)) on MATLAB R2022a.

The issue is that the system is not recognising the ViewPixx at all. (The ViewPixx works fine on my old Linux setup with the desktop - tested yesterday - so I know that is not the problem.) I think this is because the laptop has a dual graphics setup.

I ran XOrgConfCreator to try & create a configuration for the ViewPixx and got this output:

Detecting type of primary display graphics card (GPU) and driver to use...
Intel GPU detected. Primary display gpu type: intel
Uses the xf86-video-modesetting DDX video driver.
Found a total of 1 video output displays on 1 X-Screens.

This seems to be a hybrid graphics laptop. Let's check if i can use this.
This hardware + software setup should allow use of the discrete gpu for faster rendering.
Enabling DRI3/Present support is needed for that, i will do that for you.
You will also need to setup your system to use the powerful gpu with Matlab or Octave.
Check 'help HybridGraphics' and the Psychtoolbox website for instructions, how to do that.
While with most modern hybrid graphics laptops it should then just work, some more exotic
models may still not be able to output anything with good timing to external video outputs.
I can not detect myself if your laptop is such an exotic machine or not, so you will have to try.
Such models can then be set up in a dual-X-Screen configuration to make them work with
research grade timing, but this assistant can not set them up automatically, so you would
have to do it manually. See 'help HybridGraphics' and the Psychtoolbox website for instructions.

Only a single active display connected, so obviously you want a single-display setup.
Do you experience weird issues with display arrangements and want me to try to fix it? [y / n] y
Do you want to make use of the high-performance secondary discrete gpu (Optimus/Enduro)? [y / n] y
Do you want to configure special/advanced settings? [y/n] y


Do you want to setup a 30 bit framebuffer for 10 bpc precision per color channel?
This will need a year 2018 or later Linux distribution, e.g., at least Ubuntu 18.04 LTS,
with Mesa 18.0 or later for Intel and AMD gpus, and Mesa 18.1 or later for NVidia gpus.
It may or may not work on hybrid-graphics laptops. Such configurations are so far untested.
If your desktop GUI fails to work, or Psychtoolbox gives lots of timing or page-flip related warnings,
then you know your system and hardware is not ready yet for this depth 30 mode. On AMD hardware sold from 2007 to ~2019, up to and including AMD Polaris, but *not* anymore for AMD Vega, Navi RX 5000 or AMD Ryzen processor integrated graphics or later models, depth 30 will always work even without the need to set it up here, at least for PsychImaging native 10 bit framebuffer tasks, albeit at potentially slightly lower performance. These slightly older AMD gpus have special support by PTB in this sense.
Also note that not all gpus can output true 10 bpc on all types of video outputs. Check carefully with a photometer etc.!
Use a 30 bpp, 10 bpc framebuffer [y for yes, n for no, d for don't care]? y


Do you want to allow use of so called VRR Variable Refresh Rate Mode?
This is also known as FreeSync or DisplayPort adaptive sync. It allows to control
visual stimulus onset with more fine-grained timing (see 'help VRRSupport' for more infos).
This currently only works on AMD Sea Islands gpus and later or Intel Gen-12 Tigerlake graphics and later, with suitable displays and cables. It also needs at least Linux 5.2 for AMD gpus or
at least Linux 5.12 for Intel gpus.
Allow use of VRR Variable Refresh Rate mode [y for yes, n for no, d for don't care]? y

Override: Enabling DRI3/Present, as this is needed for hybrid graphics Optimus/Enduro support.
Ready to write the config file. I propose this filename and location:
/home/parkinsons/.Psychtoolbox/XorgConfs/90-ptbconfig_single_xscreen_modesetting.conf
Type ENTER/RETURN to accept, or provide an alternative filename: 

We are done. Now you can run XOrgConfSelector any time to select this configuration
file to setup your system, or to switch back to the default setup of your system. Bye!

~~~~~~~~~~~~~~~~~

However, this seems to have not recognised the ViewPixx and only sees one screen. XOrgConfSelector gives this output: 

~~~~~~~~~~~~~~
XOrgConfSelector
You can choose from the following X11 configuration files:

1) 90-ptbconfig_single_xscreen_modesetting.conf

Which one should i use? (Choose 0 for remove the current active file): 1

Error using copyfile
Cannot write to destination: /etc/X11/xorg.conf.d.  Use the 'f' option to override.

Error in XOrgConfSelector (line 56)
    copyfile([sdir conffiles{answer}], '/etc/X11/xorg.conf.d/90-ptbxorg.conf');

~~~~~~~~~~~~~

I went into a bit more depth, as instructed by Mario, in the Terminal window: 

######################
lspci output: 

00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers (rev 08)
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
00:04.0 Signal processing controller: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem (rev 08)
00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
00:14.2 Signal processing controller: Intel Corporation Sunrise Point-LP Thermal subsystem (rev 21)
00:15.0 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #0 (rev 21)
00:15.1 Signal processing controller: Intel Corporation Sunrise Point-LP Serial IO I2C Controller #1 (rev 21)
00:16.0 Communication controller: Intel Corporation Sunrise Point-LP CSME HECI #1 (rev 21)
00:16.3 Serial controller: Intel Corporation Sunrise Point-LP Active Management Technology - SOL (rev 21)
00:17.0 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 21)
00:1c.0 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #1 (rev f1)
00:1c.2 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #3 (rev f1)
00:1c.4 PCI bridge: Intel Corporation Sunrise Point-LP PCI Express Root Port #5 (rev f1)
00:1f.0 ISA bridge: Intel Corporation Sunrise Point LPC Controller/eSPI Controller (rev 21)
00:1f.2 Memory controller: Intel Corporation Sunrise Point-LP PMC (rev 21)
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)
00:1f.4 SMBus: Intel Corporation Sunrise Point-LP SMBus (rev 21)
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (4) I219-LM (rev 21)
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
02:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
03:00.0 3D controller: NVIDIA Corporation GM108M [GeForce MX130] (rev a2)

xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x45 cap: 0x9, Source Output, Sink Offload crtcs: 3 outputs: 4 associated providers: 1 name:modesetting
Provider 1: id: 0xd9 cap: 0x4, Source Offload crtcs: 0 outputs: 0 associated providers: 1 name:modesetting


xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 309mm x 173mm
   1920x1080     60.01*+  60.01    59.97    59.96    59.93    48.00  
   1680x1050     59.95    59.88  
   1600x1024     60.17  
   1400x1050     59.98  
   1600x900      59.99    59.94    59.95    59.82  
   1280x1024     60.02  
   1440x900      59.89  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1440x810      60.00    59.97  
   1368x768      59.88    59.85  
   1360x768      59.80    59.96  
   1280x800      59.99    59.97    59.81    59.91  
   1152x864      60.00  
   1280x720      60.00    59.99    59.86    59.74  
   1024x768      60.04    60.00  
   960x720       60.00  
   928x696       60.05  
   896x672       60.01  
   1024x576      59.95    59.96    59.90    59.82  
   960x600       59.93    60.00  
   960x540       59.96    59.99    59.63    59.82  
   800x600       60.00    60.32    56.25  
   840x525       60.01    59.88  
   864x486       59.92    59.57  
   800x512       60.17  
   700x525       59.98  
   800x450       59.95    59.82  
   640x512       60.02  
   720x450       59.89  
   700x450       59.96    59.88  
   640x480       60.00    59.94  
   720x405       59.51    58.99  
   684x384       59.88    59.85  
   680x384       59.80    59.96  
   640x400       59.88    59.98  
   576x432       60.06  
   640x360       59.86    59.83    59.84    59.32  
   512x384       60.00  
   512x288       60.00    59.92  
   480x270       59.63    59.82  
   400x300       60.32    56.34  
   432x243       59.92    59.57  
   320x240       60.05  
   360x202       59.51    59.13  
   320x180       59.84    59.32  
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)

########################

From this, I think the VGA output just isn't connecting to the graphics display drivers. Maybe I need to find an HDMI to DVI converter? Or is there something more complex I need to do with the graphics drivers? 

Thanks! 

Deborah.

Side note: The output of XorgConfSelector suggests that the PsychLinuxConfiguration command wasn’t executed successfully and therefore the /etc/X11/xorg.conf.d/ directory has too strict permissions. Or maybe the current user was not added to the ‘psychtoolbox’ Unix user group when running PsychLinuxConfiguration? Try rerunning it and make sure to add all login names when it queries which user names it should add to various Unix groups.

So the laptop is indeed a dual-gpu NVidia Optimus laptop, but the output suggests that the NVidia gpu is purely for render-offload, and not connected to video outputs at all, because while lspci lists the Intel as “VGA compatible controller” => Can drive a monitor, the NVidia is only listed as “3D controller” => Can render pictures, but not display them without the help of the Intel.

This means the Intel chip alone apparently runs the show, including all externally connected display devices. Use of the NVidia is optional for speeding things up. As this is a 1st generation NVidia Maxwell gpu, the open-source nouveau driver likely won’t provide any meaningful speedups. You’d need to install the proprietary NVidia driver to get actual performance improvements from the NVidia, set it up for “on-demand” Prime renderoffload acceleration and follow further Intel + NVidia specific setup steps described in “help HybridGraphics”. But maybe you won’t need these steps for your paradigm and the Intel alone will do. In any case, this is unrelated to the problem of getting the Viewpixx to work in the first place, so this can be ignored for the moment.

My suspicion is that this might be a bandwidth problem, depending on the adapter you used:

Output of xrandr suggests there are Displayport and HDMI outputs and a VGA output?

I think VGA via VGA->DVI converter won’t generate a sufficient quality signal for a Viewpixx device, especially not if you want to use its special functions.

A passive DP->DVI or HDMI->DVI converter would not have the video bandwidth required for a Viewpixx, or only barely with lots of luck, for the Viewpixx minimum setting of 1920x1200@60Hz. These only have single-link DVI at best, for at most 165Mhz.

I’d try connecting the Viewpixx with an active USB-C → DVI dual-link converter, DisplayPort->DVI dual-link converter or HDMI->DVI dual-link converter and see if that brings some life to the display.

[Time used: 55 Minutes → Paid Support Membership exceeded by 25 minutes]

Let’s see if that helps. Otherwise you’d need to buy one of the extra support hours at a rate of 300 Euros + tax per additional started hour of work. I’ll give you the proper link to our store if you’d choose further support on this issue.

-mario

Hi all,

I just thought I’d update you on what I did in this situation.

Our IT person ended up liaising directly with the ViewPixx people, who recommended the solution of a USB-C to Display Port Adapter, accompanied by a DisplayPort to DVI Dual Link Active Adapter, as explained here:

https://vpixx.com/vocal/faq/ > Hardware > Can I use a video adapter if my graphics card does not have dual-link DVI output?

We purchased those cables, and this worked! At least, I now could see the ViewPixx as a second screen on my Ubuntu setup. Hooray! I then went ahead and did the XorgConfCreator setup in MATLAB/Psychtoolbox. This went DISASTROUSLY wrong because I foolishly said yes to all the extra things in the script (even though Mario told me not to - I know - my only excuse is that it was late on a Friday). READER, DO NOT DO THIS! When I ran XorgConfSelector and restarted the machine as instructed, I got the Black Screen of Death with some flickering error messages. My initial googling suggested I should be able to reinstall Ubuntu from the boot disk… unfortunately this did not work at all, and the system did not seem to recognise the disk.

Some further googling of the error messages led me to a key combination (which I now forget, it had a sequence with F10 and F11 in it - might it have been ctrl+alt+F10, ctrl+alt+F11?) that got the login screen up, but I could not initially log in at all. I had to log in to the non-xorg version of Ubuntu (using the little cogwheel at the bottom right of the screen). I then had to go to ./etc/X11/xorg.conf.d/ and delete the Psychtoolbox configuration file in there. After this, I could log back into the xorg Ubuntu version fine.

Phew!

After a weekend break, I ran the XorgConfCreator again, but this time saying no to all the extras. Out of caution, I thought I had better write down the steps above in case I bricked the machine again.

Running the XorgConfCreator again worked this time! I was able to get the whole setup working beautifully after remembering to rerun the BitsPlusImagingPipelineTest to set everything up with the ViewPixx. This will make life so much simpler for our portable setup for data collection. Thanks so much to Mario for his help and also to the folks over at ViewPixx, who have also gone above and beyond to help me with the trigger issues I was having with connecting the ViewPixx to my DSI-24 headset (a whole separate can of worms, but that’s now working too).

Deborah.

Glad it worked. Case closed. Now all the rendering and display is done on the Intel graphics, which should be enough for low to medium complexity visual stimuli. If you’d need more performance, “help HybridGraphics” would tell you how to get the NVidia working for the rendering. E.g., a setenv('DRI_PRIME', '1'); clear all before running your script would use the NVidia with the open-source nouveau driver. But with recent NVidia cards like yours, it might not give a large or meaningful performance boost, or a boost at all, and installing the proprietary NVidia driver for higher performance boosts would mean more fiddling again, due to the proprietary driver, so maybe avoid if you don’t really need it.

A bit surprising to me that answering yes to those XOrgConfCreator questions would make login impossible, but then XOrgConfCreator isn’t yet fully adapted for Ubuntu 22.04, or maybe it is some weird interaction with that Optimus hardware of yours. I’ll have to do some spring cleaning on it. In general - not in your case though - there are various Optimus/dual-gpu hardware setups that XOrgConfCreator would not be able to deal with automatically, due to the variety and complexity (and lack of suitable standards) of this stuff - every vendor does it different on different models. Often one needs to write a suitable config file by hand to deal with the peculiarities… While Psychtoolbox is most advanced to handle dual-gpu setups properly, no other vision science software comes close, it can still require quite a bit of tinkering for initial setup, not exactly plug and play. Therefore it is still advisable to avoid dual-gpu laptops if possible.

The procedure of getting out of such a black-screen mess like you had is printed by XOrgConfSelector for people to note down in case of trouble, but for reference:

  1. “CTRL+ALT+F3”, or sometimes “FN+CTRL+ALT+F3” (e.g., on Apple keyboards), whereas F3 can be replaced by F4,F5,…,F10. This switches to a pure text console. E.g., F3 selects virtual terminal number 3, and F1/F2 == Terminal 1 or 2 is usually occupied by the graphics login screen or graphical user session. That’s why one needs to use a number high enough to be not used.

  2. Login with usual username and password.

  3. rm /etc/X11/xorg.conf.d/* to delete the config file produced by Psychtoolbox which makes trouble.

  4. Reboot, e.g., by pressing “CTRL+ALT+DEL” or typing the reboot command. Sometimes it is also enough to “CTRL+ALT+F1” to the login screen and proceed normally.

There’s also the “Ubuntu (Recovery mode)” as a selectable boot option during machine startup to get into the recovery system, which allows to get a root login and execute the “rm” command. The rescue system provides various other repair/troubleshooting procedures as well for common cases. It’s hardly ever neccessary to reinstall a Ubuntu system from scratch. But then, given how fast a reinstall on modern SSD’s is, it can still be a viable or faster method on freshly installed and screwed up system.

-mario