You are not logged in.

#1 2022-05-26 10:25:23

Pop
Member
Registered: 2018-04-08
Posts: 11

How to make optimus work on Lenovo Laptop?

Dear all,

I have been using Archlinux for 5 years on different Lenovo laptops without any issues except for the fact that I cannot make work of an external monitor.

Lenovo laptops with a discrete card (such as my former Legion Y520 and current Thinkpad P1 gen2) connect the main monitor to the intel integrated graphics and the external port to the dedicated card.
This makes sense as when you have an external screen you are probably at a desk with a power source so the high consumption of the dedicated card is not an issue while when you are on the go you want to preserve the battery by using only the integrated graphics.
This is achieved on windows using intel's optimus prime technology which turns on the dedicated card when connecting to an external monitor and switch it off when disconnecting.
This works well on my windows partitions so I assume that I don't have a hardware issue

On Linux however, I was never able to make this works. I can either have the intel driver loaded at boot up and consume few energy or have the nvidia driver load at boot up and I am able to have my second screen.
But it is not convenient at all to have to reconfigure and reboot my computer, every time I have to make a presentation hmm.

I have been following the toturial for bumblebee : https://wiki.archlinux.org/title/Bumblebee.
I made the configuration of

/etc/bumblebee/xorg.conf.nvidia

and

/etc/X11/xorg.conf.d/20-intel.conf

as describe in https://wiki.archlinux.org/title/Bumble … VIDIA_chip.

But when I run

 optirun intel-virtual-output 

nothing happen. The command terminate with no errors.

The new screen does not appears on KDE configuration panels.

I get this warning from bumblebee :

● bumblebeed.service - Bumblebee C Daemon
     Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2022-05-26 12:00:36 CEST; 4min 14s ago
   Main PID: 879 (bumblebeed)
      Tasks: 3 (limit: 38174)
     Memory: 66.6M
        CPU: 6.823s
     CGroup: /system.slice/bumblebeed.service
             ├─ 879 /usr/bin/bumblebeed
             └─3793 /usr/lib/Xorg :8 -config /etc/bumblebee/xorg.conf.nvidia -configdir /etc/bumblebee/xorg.conf.d -sharevts -nolisten tcp -noreset -verbose 3 -isolateDevice PCI:01:00:0 -modulepath /usr/lib/nvidia/xorg,/usr/lib/xorg/modules

mai 26 12:00:36 HerbieHancock systemd[1]: Started Bumblebee C Daemon.
mai 26 12:00:36 HerbieHancock bumblebeed[879]: [    9.950799] [INFO]/usr/bin/bumblebeed 3.2.1 started
mai 26 12:03:23 HerbieHancock bumblebeed[879]: [  176.212304] [WARN][XORG] (WW) Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
mai 26 12:03:23 HerbieHancock bumblebeed[879]: [  176.212677] [WARN][XORG] (WW) NVIDIA: No DRM device: Direct render devices found but none could be
mai 26 12:03:23 HerbieHancock bumblebeed[879]: [  176.212743] [WARN][XORG] (WW) NVIDIA:     used.
mai 26 12:03:23 HerbieHancock bumblebeed[879]: [  176.212803] [WARN][XORG] (WW) NVIDIA(0): Option "NoLogo" is not used

And my second monitor appears in xrandr :

Screen 0: minimum 8 x 8, current 5760 x 2160, maximum 32767 x 32767
eDP1 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 340mm x 190mm
   3840x2160     60.00*+  59.97  
   3200x1800     59.96    60.00    59.94  
   2880x1620     60.00    59.96    59.97  
   2560x1600     59.99    59.97  
   2560x1440     59.96    60.00    59.95  
   2048x1536     60.00  
   1920x1440     60.00  
   1856x1392     60.01  
   1792x1344     60.01  
   2048x1152     60.00    59.90    59.91  
   1920x1200     59.88    59.95  
   1920x1080     59.96    60.00    59.93  
   1600x1200     60.00  
   1680x1050     59.95    59.88  
   1400x1050     59.98  
   1600x900      60.00    59.95    59.82  
   1280x1024     60.02  
   1400x900      59.96    59.88  
   1280x960      60.00  
   1368x768      60.00    59.88    59.85  
   1280x800      59.81    59.91  
   1280x720      59.86    60.00    59.74  
   1024x768      60.00  
   1024x576      60.00    59.90    59.82  
   960x540       60.00    59.63    59.82  
   800x600       60.32    56.25  
   864x486       60.00    59.92    59.57  
   640x480       59.94  
   720x405       59.51    60.00    58.99  
   640x360       59.84    59.32    60.00  
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
VIRTUAL2 disconnected (normal left inverted right x axis y axis)
VIRTUAL3 connected 1920x1080+3840+0 (normal left inverted right x axis y axis) 0mm x 0mm
   VIRTUAL3.543-1920x1080  60.00
   VIRTUAL3.544-1920x1080  59.94  
   VIRTUAL3.545-1920x1080  50.00  
   1680x1050     59.95  
   VIRTUAL3.547-1600x900  60.00  
   VIRTUAL3.548-1280x1024  75.02  
   1280x1024     60.02  
   1280x800      59.81  
   VIRTUAL3.551-1280x720  60.00  
   VIRTUAL3.552-1280x720  59.94  
   VIRTUAL3.553-1280x720  50.00  
   VIRTUAL3.554-1024x768  75.03  
   1024x768      60.00  
   VIRTUAL3.556-800x600  75.00  
   800x600       60.32  
   VIRTUAL3.558-720x576  50.00  
   VIRTUAL3.559-720x480  59.94  
   VIRTUAL3.560-640x480  75.00  
   640x480       59.94  
   VIRTUAL3.562-640x480  59.93  
VIRTUAL4 disconnected (normal left inverted right x axis y axis)
VIRTUAL5 disconnected (normal left inverted right x axis y axis)

I am not familiar with xrandx though.

Does someone know how to get the new screen to turn up using xrandr ?
Does someone know why the screen doesn't appear in KDE configuration but does in xrandr ?


Thank you smile

Last edited by Pop (2022-05-26 10:29:42)

Offline

#2 2022-05-26 10:29:14

Pop
Member
Registered: 2018-04-08
Posts: 11

Re: How to make optimus work on Lenovo Laptop?

Actually. It seems that when I press "fn+f7" to select if i want to duplicate output or extend it activates the external monitor and then it appears in KDE configuration.

Does someone know why the screen doesn't turn up automatically?

I would like to take a step further and make a script that will run

  optirun intel-virtual-output 

when branching the cable.
I guess I have to listen to ACPI event and trigger it. Where can I find the documentation on that?

Thank you smile

Offline

#3 2022-05-26 11:25:04

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,196

Re: How to make optimus work on Lenovo Laptop?

bumblebee last release was in 2013 and the last commit to master was in nov 2020 .

Are you sure you want to invest in getting it to work ?

https://wiki.archlinux.org/title/NVIDIA_Optimus gives a decent overview of what can be achieved.

Optimus-manager may be more suited for you as it's supposed to require logout/login only to switch cards, not a reboot.


This works well on my windows partitions so I assume that I don't have a hardware issue

Hybrid graphics / optimus issues on linux are 99.9% of the time software/configuration related.


ADDED

Are your presentations graphics heavy and need the nvidia cards performance or could they be run on the intel gpu ?

Last edited by Lone_Wolf (2022-05-26 11:38:13)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2022-06-01 17:57:25

Pop
Member
Registered: 2018-04-08
Posts: 11

Re: How to make optimus work on Lenovo Laptop?

Lone_Wolf wrote:

Are your presentations graphics heavy and need the nvidia cards performance or could they be run on the intel gpu ?

No I don't need graphics heavy rendering but since the output is physically connected to the nvidia card and not the integrated graphic.
From my understanding it is not possible to get the external screen to work while the nvidia card is off, but maybe I am wrong ?

Offline

#5 2022-06-01 18:36:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,647

Re: How to make optimus work on Lenovo Laptop?

From my understanding it is not possible to get the external screen to work while the nvidia card is off, but maybe I am wrong ?

Not unless you can deactivate the GPU in the BIOS/UEFI and this way redirect the outputs there.

lspci

On a  GPU supported by at least the 470xx drivers you want to use https://wiki.archlinux.org/title/PRIME#Reverse_PRIME

Offline

#6 2022-06-02 04:10:45

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,362

Re: How to make optimus work on Lenovo Laptop?

seth wrote:

From my understanding it is not possible to get the external screen to work while the nvidia card is off, but maybe I am wrong ?

Not unless you can deactivate the GPU in the BIOS/UEFI and this way redirect the outputs there.

lspci

On a  GPU supported by at least the 470xx drivers you want to use https://wiki.archlinux.org/title/PRIME#Reverse_PRIME

Reverse Prime can work but is probably too much hassle. Optimus-manager works fine (with the right power-saving options, using the laptop standalone without an external display keeps dGPU off, but this won't work if you're using an external display). BIOS needs to be set to hybrid rather than discrete though.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB