Unable to get PRIME listed in Nvidia X Server Settings under Ubuntu Linux 18.10 on Thinkpad X1 Extreme

Hello, I am unable to make hybrid gpus working on my Thinkpad X1 Extreme (with Nvidia 1050 Ti Q-Max and iGPU) under Ubuntu Linux 18.10. I went to the BIOS to switch the Display from Hybrid Graphics to Discrete Graphics. (Otherwise, I got lots of errors during linux installation.) Then, I installed Linux. Under About - graphics, NV137 is shown. Could you please let me know the proper procedure to make hybrid grpahics work? There are some guides posted on the internet but they don’t work.

For example, I followed the procedure in:

But after “apt install nvidia-prime”, PRIME is still not listed in the NVIDIA X Server Settings control panel. I also tried other procedures posted on the net. Never be able to get PRIME listed.

Thanks.

In that post, the author used “apt install nvidia-340”. In my case, I used “apt install nvidia-390” as recommended by Ubuntu 18.10.

Please run nvidia-bug-report.sh as root and attach the resulting .gz file to your post. Hovering the mouse over an existing post of yours will reveal a paperclip icon.

Thanks. Here is the file.

Your notebook is still switched to ‘discrete’ in bios, PRIME is for the hybrid/Optimus setting. Switch to that, if you still have problems, attach a newly created log.

1 Like

Ubuntu was unstable (e.g. only showing purple desktop with nothing on it, crashed) after I changed to “Hybrid” mode. So, I changed it back to “discrete” mode. Anyway, I switched back to “Hybrid” in BIOS. PRIME is still not listed. Enclosed is the new file for your reference.

According to the logs, PRIME is active and working. If it is not displayed in the nvidia x server settings, it’s an ubuntu bug, not detecting it.
You should be able to switch between the gpus using
sudo prime-select intel
and
sudo prime-select nvidia

glxinfo |grep vendor
should then display either mesa or nvidia.

Thanks. Let’s hope that Ubuntu will fix the bug soon. Do I need to reboot after issuing each “sudo prime-select”?

Where can I learn how to use the Nvidia X Server setting control panel? In general, is it better to leave the settings as is?

A logout/login might suffice on switching, don’t know about the current state in Ubuntu, they’re currently reworking prime support.
There aren’t really any interesting settings in nvidia-settings, especially on hybrid notebooks.

Thanks. Will try it out when I am with the laptop.

I entered “sudo prime-select intel”. Something like: get Intel information showed up on the screen. I logged out and logged in. I went to About but it showed that Nvidia 1050 Ti was still being used. Next, I rebooted the machine. It showed a black screen with a blinking underline cursor on the top left. It stayed there foreover. I pressed the power button continuously. Then, the purple screen with Ubuntu in the middle showed up. After the few dots below Ubuntu turned on/off (don’t remember which), the laptop shut down. I turned on the machine again. Blank purpule screen showed up. Then a long list of sentences showed up on the screen quickly. Then, again the blinking cursor showed up on the top left. Could you please help to resolve the issue?

Went to BIOS to change to Hybrid. Could login again but when I did sudo prime-select nvidia and rebooted, system failed to work again. It was a dark screen with a long list of starting/started/stopping/stopped Nvidia Persistence Daemon and system halted.Force restarted and went to BIOS to change to Discrete again and got purple blank screen. Spent the entire night but couldn’t get it to work. At the end, just reinstalled Ubuntu. Could somebody please investigate this issue? Perhaps a bug? Shall I use Discrete mode with Nvidia 1050 for the time being until somebody got hybrid GPU switching working?

That’s definitly a horrible bug that has to be reported to Ubuntu. Like said, they’re currently redesigning their gpu switching framework and introduced more than one bug.

In this case, is it better not to try to get the hybrid switching working and just stay with Nvidia 1050 ti until they get these bugs fixed? There are some posts about Ubuntu/Nvidia Hybrid GPUs on the new Thinkpad X1 Extreme. Some said that in other distributions, they got hybrid GPUs working but some have no luck. Ideally, I want to get it working so that I can test the machine while it is still within return period.

Based on experience, switching between Hybrid and Discrete Graphics in the BIOS also broke the working of the brightness function keys.

If brightness control doesn’t work in discrete mode, see this:
[url]https://devtalk.nvidia.com/default/topic/1025559/linux/solus-nvidia-gtx-1070-brightness-control-not-working/post/5287812/#5287812[/url]
About the Thinkpad X1 Extreme:
a quick web search said that it has Linux compatibility issues which have been fixed with a bios update, [url]Page Not Found - Lenovo Support US
Regarding gpu switching on Ubuntu:
This worked fine up to and including 17.10 but was reworked for 18.04 to get rid of bbswitch as a dependency. That first rework wasn’t really useable, so people re-implemented the previous mechanism:
[url]https://devtalk.nvidia.com/default/topic/1032482/linux/optimus-on-ubuntu-18-04-is-a-step-backwards-but-i-found-the-first-good-solution/[/url]
So to have a working solution, you should try that.
BUT: Ubuntu backports the 18.10 mechanism to 18.04 so at one point, that probably won’t work either.
Whether you try to get switching to work or you prefer staying on discrete is up to you. Depends on you being able/willing to invest time to debug and report bugs to the Ubuntu bugzilla.
One hint: if switching has unexpected failures, see if the file
/lib/modprobe.d/nvidia-blacklist.conf
exists and delete it. That’s one bug that surfaced so far.

Thanks.

To make brightness control working, I only need to do?

$ sudo su
    $ mkdir -p /etc/kernel
    $ echo "nvidia.NVreg_EnableBacklightHandler=1" > /etc/kernel/cmdline
    $ clr-boot-manager update
    $ exit

I updated the BIOS to 1.12 last week already.

That procedure is for Solus.
You can either put the parameter nvidia.NVreg_EnableBacklightHandler=1 in grub:
https://askubuntu.com/questions/19486/how-do-i-add-a-kernel-boot-parameter
or create a file /etc/modprobe.d/99-nvidia-backlight.conf

options nvidia NVreg_EnableBacklightHandler=1

and run
sudo update-initramfs -u
afterwards

Thanks. Do you mean having the following in /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash nvidia.NVreg_EnableBacklightHandler=1”

and then type “sudo update-grub”?

It does not work on my machine. Just in case, I rebooted it but brightness keys still cannot be used to adjust the brightness of the screen. I also tried the 2nd approach but also does not work.

You might also have to add

Option         "RegistryDwords" "EnableBrightnessControl=1;"

to the device section of your xorg.conf