[arch-general] [RFC] Potentially deprecating primus, bumblebee, virtualGL and primus_vk

Archange archange at archlinux.org
Fri Jan 15 23:16:49 UTC 2021


Le 14/01/2021 à 19:15, Emil Velikov a écrit :
> On Wed, 13 Jan 2021 at 16:52, Archange <archange at archlinux.org> wrote:
>> Le 12/01/2021 à 21:45, Emil Velikov a écrit :
>>> On Tue, 12 Jan 2021 at 18:24, Archange <archange at archlinux.org> wrote:
>>>
>>>> OK, will try to check tomorrow with a friend that has an Optimus laptop.
>>>>
>>> Perfect, thanks in advance.
>>>
>>> To trigger the event one has to echo into a sysfs file... Don't recall
>>> exactly, some of the following should be it.
>>> a) If the nvidia module is driving an fbcon:
>>>    - echo "0" > /sys/class/vtconsole/vtconX/bind
>>> b) and/or a combination of the following
>>>    - echo "remove" (or was it "unbind") > /sys/class/drm/cardX/device/uevent
>>>    - echo "remove" (or was it "unbind") >
>>> /sys/class/drm/cardX/device/driver/uevent
>>>    - echo "1" > /sys/class/drm/cardX/device/driver/unbind
>>>
>> 2) If the driver is loaded before X, it works for PRIME. However, the
>> card refuse to unbind because it’s in use by X even if nothing is
>> actually running on it.
>>
> It just works here so I suspect that a command or the order was off.
>
> My setup:
> - Intel/Nvidia system, monitor plugged/powered by Intel GPU
> - Therefore fb0 is for Intel (alongside card0) and Nvidia does not
> have fb device only card1.

Same on the laptop of my friend.

> What I've done:
> - Toggle render offload ON via xrandr, try glxgears
> - Toggle render offload OFF via xrandr

Not sure how I’m supposed to do that, didn’t find any reference online.

> - Issue the removal - echo "remove" > /sys/class/drm/card1/uevent
This segfaults Xorg right away.
> - Confirm that it works - Xorg.0.log should list "removing GPU device
> ...blabla/card1"

It does appear, with the segfault:

[117777.574] (II) config/udev: removing GPU device 
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 /dev/dri/card1
[117777.575] xf86: remove device 0 
/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1
[117777.593] (II) UnloadModule: "nvidia"
[117777.593] (II) UnloadSubModule: "glxserver_nvidia"
[117777.593] (II) Unloading glxserver_nvidia
[117777.593] (II) UnloadSubModule: "wfb"
[117777.593] (II) UnloadSubModule: "fb"
[117777.594] (EE)
[117777.594] (EE) Backtrace:
[117777.594] (EE) 0: /usr/lib/Xorg (xorg_backtrace+0x53) [0x55efd7ad1f63]
[117777.594] (EE) 1: /usr/lib/Xorg (0x55efd798b000+0x151da5) 
[0x55efd7adcda5]
[117777.594] (EE) 2: /usr/lib/libc.so.6 (0x7f105e9f1000+0x3d6a0) 
[0x7f105ea2e6a0]
[117777.595] (EE) 3: /usr/lib/Xorg (RRTellChanged+0x969) [0x55efd7a3e3d9]
[117777.595] (EE) 4: /usr/lib/Xorg (0x55efd798b000+0x1bb9d4) 
[0x55efd7b469d4]
[117777.595] (EE) 5: /usr/lib/Xorg (0x55efd798b000+0x1bbb28) 
[0x55efd7b46b28]
[117777.595] (EE) 6: /usr/lib/Xorg (0x55efd798b000+0x14a331) 
[0x55efd7ad5331]
[117777.595] (EE) 7: /usr/lib/Xorg (WaitForSomething+0x250) 
[0x55efd7ad0c00]
[117777.595] (EE) 8: /usr/lib/Xorg (0x55efd798b000+0x39914) 
[0x55efd79c4914]
[117777.595] (EE) 9: /usr/lib/libc.so.6 (__libc_start_main+0xf2) 
[0x7f105ea19152]
[117777.595] (EE) 10: /usr/lib/Xorg (_start+0x2e) [0x55efd79c55de]
[117777.595] (EE)
[117777.595] (EE) Segmentation fault at address 0x34
[117777.595] (EE)
Fatal server error:
[117777.595] (EE) Caught signal 11 (Segmentation fault). Server aborting
[117777.595] (EE)
[117777.595] (EE)
Please consult the The X.Org Foundation support
      at http://wiki.x.org
  for help.
[117777.595] (EE) Please also check the log file at 
"/var/log/Xorg.0.log" for additional information.
[117777.595] (EE)
[117777.595] (II) AIGLX: Suspending AIGLX clients for VT switch
[117777.682] (EE) Server terminated with error (1). Closing log file

Maybe I missed a fb? Not sure…

I might try again tomorrow but really not sure, I have a plane to catch 
and my friend might not be available early enough.

Regards,
Bruno


More information about the arch-general mailing list