PRIME on Arch linux

I’ve recently got an Aero 15 laptop, which has Optimus graphics. The digital outputs (HDMI and DP) are wired to the 1060, the LCD is wired to the Intel chipset.

Under Ubuntu 18.04, PRIME works fine. In built LCD works, desktop is extended across the digital outputs when a monitor is plugged in. So far so good.

When I try to replicate the same setup in Arch linux, I can’t get it to work. I’ve got the nvidia drivers installed, and have enabled nvidia-drm.modeset=1 in grub. However, firing up X and then issuing:

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

crashes the X server:

72.691] (EE) modeset(G0): failed to set mode: No space left on device
[    72.691] (EE)
Fatal server error:
[    72.691] (EE) failed to create screen resources(EE)

The only reference to this message I can find on Google relates to Gentoo, where the X server is compiled without Glamor support. Glamor support is enabled in Arch, so it doesn’t seem like the same problem.

Anyone got any advice?
nvidia-bug-report.log.gz (85.2 KB)

Please run as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post will reveal a paperclip icon.

Whoops forgot to do that - output is now attached.

You need to disable glamor, create a file /etc/X11/xorg.conf.d/11-intel-prime.conf containing

Section "OutputClass"
    Identifier "Intel"
    MatchDriver "i915"
    Driver "modesetting"
    Option "AccelMethod" "none"

Unfortunately that doesn’t change anything. Glamor is disabled after creating that file:

[   199.300] (**) modeset(G0): Option "AccelMethod" "none"
[   199.300] (==) modeset(G0): RGB weight 888
[   199.300] (==) modeset(G0): Default visual is TrueColor
[   199.300] (**) modeset(G0): glamor disabled

But I still get the modeset error:

[   206.611] (EE) modeset(G0): failed to set mode: No space left on device
[   206.611] (EE)
Fatal server error:
[   206.611] (EE) failed to create screen resources(EE)

Updated nvidia bug report attached.
nvidia-bug-report.log.gz (85.2 KB)

edit: ignore that, misconfiguration. Problem is the same as before.

The new log was the old log but nevermind.
Looks like some strange bug in the xserver, at least I can’t see any misconfiguration.
Please try configuring it old-style with a xorg.conf:

Section "ServerLayout"
    Identifier     "layout"
    Screen      0  "nvidia" 0 0
    Inactive       "intel"

Section "Monitor"
    Identifier     "Monitor0"
    Modeline "1280x720_60.00"  74.48  1280 1336 1472 1664  720 721 724 746  -HSync +Vsync
    Modeline "1152x648_60.00" 59.91 1152 1200 1320 1488 648 649 652 671 -HSync +Vsync

Section "Module"
  Disable "glamoregl"

Section "Files"
  ModulePath   "/usr/lib/nvidia/xorg"
  ModulePath   "/usr/lib/xorg/modules"

Section "Device"
    Identifier     "intel"
    Driver         "modesetting"
    Option         "AccelMethod" "none"
    BusID          "PCI:0:2:0"

Section "Device"
  Identifier "nvidia"
  Driver "nvidia"
  BusID "PCI:1:0:0"
  Option "AllowEmptyInitialConfiguration"

Section "Screen"
    Identifier     "nvidia"
    Device         "nvidia"
    Monitor        "Monitor0"
    Option "ModeDebug" "true"
    SubSection     "Display"
        Virtual     1920 1080
        Modes      "1920x1080" "1280x720_60" "800x600"

Exactly the same problem when using the old style config. I also tried downgrading the kernel and various xserver packages to match the versions that work on Ubuntu, with no success.

Really strange. Did you try downgrading the nvidia driver to 390.59? 396.x has a bug with desktop gtx1060s of some brands, maybe this applies here as well though its rather unlikely.

Update on this: I did a complete clean reinstall of Arch and this time everything works. Odd!


xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

require a restart or just login/logout for you? What kernel are you using?

On Ubuntu 18.04, prime-select now requires a restart (at least this was the case up to a month ago).