• Like 4

    nvidia-installer [ALPHA]


    Hi,

    We’ve developed a little python script that should help installing the proprietary nvidia driver. It also can be used to install bumblebee for nvidia optimus cards (it does not detect them, so you have to tell it if you have one of these cards).

    Package is in antergos-staging repo (http://repo.antergos.com/antergos-staging/x86_64/nvidia-installer-0.0.3-1-any.pkg.tar.xz)

    THIS IS ONLY FOR NVIDIA GRAPHICS CARD USERS

    Before using it, by all means, be sure you can revert its changes (that is, that you know perfectly how restore nouveau drivers or your previous nvidia setup).

    Check its options with
    nvidia-installer -h

    And remember to use sudo, as it needs administrative privileges.

    Please, handle with care as it could even eat your cat.

    Oh, and please report here if you test it.

    Cheers!

  • Like 0

    The first attempt was not quite successfull.

    $ sudo nvidia-installer --bumblebee
    Traceback (most recent call last):
      File "/usr/sbin/nvidia-installer", line 440, in <module>
        main()
      File "/usr/sbin/nvidia-installer", line 415, in main
        if cmd_line.nouveau:
    AttributeError: 'Namespace' object has no attribute 'nouveau'
    $ 
    

    I didn’t take a look at the script yet. It’s time to go to sleep here. Will try to study the program tomorrow.

    With respect

    Edit

    The testing environmente is:

    • freshly installed, to test the installer, Mate 64bit
    • from the latest available release, 2016-03-20
    • in defaullt configuration, with initial upgrade (only sudo was upgraded)
    • no additions, removals, tweaks or personalizations
    • Nvidia GeForce GT 555M
    • it’s the Optimus card
  • Like 0

    Thanks @just

    I’ve fixed it.

    You can grab the latest version from here:

    https://github.com/Antergos/nvidia-installer

    Thanks again.

  • Like 1

    @karasu Confirm that the AttributeError is fixed. Installation starts.

    It gives many confusing and meaningless messages for users without a BIOS that treats integrated and discrete video cards separately. Neither of three Optimus computers here have such a BIOS. This is not a problem for me, but not sure about others.

    The true criteria to be able to start installing Bumblebee is one only. The system must running on xf86-video-intel. Nothing else.

    I didn’t find installer’s log. Seems like all its output is displayed in terminal:

    $ sudo nvidia-installer --bumblebee
    BEFORE running this installer, make sure that you do NOT have Optimus and Discrete enabled.
    Go to your BIOS, find your display settings, and select 'Intel Integrated', or something similar.
    Make sure that the setting below it, 'Detection by OS' is DISABLED.
    
    Have you already selected 'Intel Integrated' in your BIOS (y/n)?y
    Installing bumblebee driver...
    Removing conflicting packages...
    Downloading and installing driver packages, please wait...
    WARNING:root:Cannot add user root to the bumblebee group: gpasswd: group 'bumblebee' does not exist in /etc/group
    
    WARNING:root:Cannot enable bumblebee service: Failed to execute operation: No such file or directory
    
    Setup is done. Now, start up your computer, and once again, enter your BIOS utility configuration.
    Find the Display configuration and change it from 'integrated graphics' to 'Optimus'.
    Leave the 'Detected by OS' in the 'Disabled' position.
    
    You need to reboot now.
    $
    

    After reboot I verified the warning messages.

    My user was not included in bumblebee group:

    $ groups
    lp wheel network video audio storage users autologin
    

    And bubmblebeed service (daemon) was not started:

    $ systemctl status bumblebeed
    ● bumblebeed.service
       Loaded: not-found (Reason: No such file or directory)
       Active: inactive (dead)
    $
    

    I’ve tried to add myself to bumblebee group by hand, but failed, because the group doesn’t exist at all:

    $ echo $USER
    just
    $ sudo gpasswd -a $USER bumblebee
    [sudo] password for just:*********
    gpasswd: group 'bumblebee' does not exist in /etc/group
    $
    

    I’ve created the group by hand and added myself to it, this time with success:

    $ sudo groupadd bumblebee
    $ sudo gpasswd -a $USER bumblebee
    Adding user just to group bumblebee
    $
    

    Finally, I’ve tried to enable and start the bumblebeed service by hand, but failed again:

    $ sudo systemctl enable bumblebeed
    Failed to execute operation: No such file or directory
    
    $ sudo systemctl enable bumblebeed.service
    Failed to execute operation: No such file or directory
    $
    

    Reading installer’s code, I’ve tried to find out what packages were installed and which ones are still missing. Some very specific for Bumblebee packages are actually installed, which is good. But others, very fundamental for Bumblebee, are missing. For example, misses the bumblebee package.

    Try to find a time to take a look at our updated Bumblebee wiki. I’ve updated it only 2 weeks ago, mainly to include an accurate, updated, complete list of all packages needed by Bumblebee.

    With respect

    Edit

    There’s no need to add the root user to bumblebee group. Only regular user(s) must be added to it (and to the video group) to be able to use Bumblebee.

  • Like 1

    Hi @just

    Sorry for the loooooong delay.

    I think I’ve fixed most of the things you commented. When you have the time, could you try it again? nvidia-installer is in the stagging repository (v0.0.4).

    Of course, there’s no rush.

    To try to install bumblebee with it: sudo nvidia-installer -b

    Thanks!

  • Like 1

    @karasu Ouch! The best post of the year! Thanks for not giving up!

    I’ll probably report back in a day or two - want to test it slowly and thoroughly.

    Thank you!

  • Like 2

    @karasu said in nvidia-installer [ALPHA]:

    …nvidia-installer is in the stagging repository (v0.0.4)…

    Short description: It works!

    Longer description: After preliminary checks I expected that it shouldn’t work. There are significant differences between the packages installed by you and by me. There are configuration differences. It’s hard to believe, but it works. I’m in very positive shock. Must understand, why differently installed Bumblebee works flawlessly :) .

    I can’t feel myself satisfied until I answer this question.

    Detailed report, if needed, will follow. I’m writing a detailed journal with all checks, doubts, tests results.

    Again: nvidia-installer 0.0.4 mystically :) installs a working Bumblebee and proprietary Nvidia driver. Good job.

  • Like 0

    There are significant differences between the packages installed by you and by me. There are configuration differences.

    When you have the time, give me these differences.

    Thanks for testing it!

    Cheers!

  • Like 0

    @karasu

    Long post ahead. Sorry.

    Even longer, the full text is on Paste2 here.

    1. @all Introduction

    Testing nvidia-installer 0.0.4 on NVIDIA GeForce GT 555M and NVIDIA GeForce GT 750M cards.

    Freshly installed, clean Antergos 17.1 Kde.

    Default Antergos repos only, in default order. No 3rd party repos, no additional packages installed.

    Max upgraded. Neither upgrades nor downgrades are available.

    No manual tweaks, interventions or corrections of any kind were applied after nvidia-installer’s execution.

    Antergos 17.1 Kde + nvidia-installer = working Bumblebee with proprietary Nvidia driver on Optimus

    2. @karasu Package differences

    I didn’t study nvidia-installer’s source on GitHub yet, and use nvidia-installer --test output:

    ┌──[just]─[alexatp]:~$
    └─> sudo nvidia-installer --test
    Installing nvidia driver...
    Removing conflicting packages...
    pacman -Rs --noconfirm --noprogressbar --nodeps --nodeps xf86-video-nouveau
    pacman -Rs --noconfirm --noprogressbar --nodeps --nodeps mesa-libgl
    pacman -Rs --noconfirm --noprogressbar --nodeps --nodeps lib32-mesa-libgl
    Downloading and installing driver packages, please wait...
    pacman -Sqy --noconfirm --noprogressbar nvidia nvidia-utils nvidia-libgl libvdpau lib32-nvidia-libgl lib32-libvdpau
    Creating /etc/X11/xorg.conf.d/20-nvidia.conf file...
    You need to reboot now.
    ┌──[just]─[alexatp]:~$
    └─>
    

    You want to explicitely install the packages (in alphabetic order):

    nvidia
    nvidia-libgl
    nvidia-utils
    lib32-libvdpau
    lib32-nvidia-libgl
    libvdpau
    

    I explicitely install by hand the following packages:

    bbswitch
    bumblebee
    mesa
    nvidia
    nvidia-settings
    lib32-mesa-libgl
    lib32-nvidia-utils
    lib32-virtualgl
    xf86-video-intel
    

    Installation goes well, no errors returned:

    ┌──[just]─[alexatp]:~$
    └─> sudo nvidia-installer --bumblebee
    Installing bumblebee driver...
    Removing conflicting packages...
    Downloading and installing driver packages, please wait...
    Adding user just to bumblebee group...
    Enabling bumblebeed service...
    You need to reboot now.
    ┌──[just]─[alexatp]:~$
    └─>
    

    Your Bumblebee works perfectly after that.

    Are all of your packages were installed? No, not all:

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q nvidia nvidia-libgl nvidia-utils lib32-libvdpau lib32-nvidia-libgl libvdpau
    nvidia 375.26-1
    error: package 'nvidia-libgl' was not found
    nvidia-utils 375.26-2
    error: package 'lib32-libvdpau' was not found
    error: package 'lib32-nvidia-libgl' was not found
    libvdpau 1.1.1-2
    ┌──[just]─[alexatp]:~$
    └─>
    

    Three not installed packages exist in the repos. Didn’t investigate why they were not installed. I do not install them, don’t know what they are needed for, so I’m not worried about three missing packages:

    ┌──[just]─[alexatp]:~$
    └─> pacman -Si nvidia-libgl lib32-libvdpau lib32-nvidia-libgl
    Repository      : extra
    Name            : nvidia-libgl
    Version         : 375.26-2
    Description     : NVIDIA drivers libraries symlinks
    Architecture    : x86_64
    URL             : http://www.nvidia.com/
    Licenses        : custom
    Groups          : None
    Provides        : libgl  libegl  libgles
    Depends On      : nvidia-utils
    Optional Deps   : None
    Conflicts With  : libgl  libegl  libgles
    Replaces        : None
    Download Size   : 2.35 KiB
    Installed Size  : 33.00 KiB
    Packager        : Sven-Hendrik Haase <[email protected]>
    Build Date      : Fri 16 Dec 2016 14:56:01 MSK
    Validated By    : MD5 Sum  SHA-256 Sum  Signature
    
    Repository      : multilib
    Name            : lib32-libvdpau
    Version         : 1.1.1-2
    Description     : Nvidia VDPAU library
    Architecture    : x86_64
    URL             : http://cgit.freedesktop.org/~aplattner/libvdpau
    Licenses        : custom
    Groups          : None
    Provides        : None
    Depends On      : lib32-gcc-libs  lib32-libxext  libvdpau
    Optional Deps   : None
    Conflicts With  : None
    Replaces        : None
    Download Size   : 19.96 KiB
    Installed Size  : 76.00 KiB
    Packager        : Florian Pritz <[email protected]>
    Build Date      : Sat 05 Dec 2015 21:06:53 MSK
    Validated By    : MD5 Sum  SHA-256 Sum  Signature
    
    Repository      : multilib
    Name            : lib32-nvidia-libgl
    Version         : 375.26-2
    Description     : NVIDIA drivers libraries symlinks (32-bit)
    Architecture    : x86_64
    URL             : http://www.nvidia.com/
    Licenses        : custom
    Groups          : None
    Provides        : lib32-libgl  lib32-libegl  lib32-libgles
    Depends On      : lib32-nvidia-utils  nvidia-libgl
    Optional Deps   : None
    Conflicts With  : lib32-libgl  lib32-libegl  lib32-libgles
    Replaces        : lib32-nvidia-utils<=313.26-1
    Download Size   : 2.64 KiB
    Installed Size  : 21.00 KiB
    Packager        : Sven-Hendrik Haase <[email protected]>
    Build Date      : Fri 16 Dec 2016 14:54:27 MSK
    Validated By    : MD5 Sum  SHA-256 Sum  Signature
    
    ┌──[just]─[alexatp]:~$
    └─>
    

    What about my packages, those installed by hand? Those listed in Antergos Wiki Bumblebee article? Do you install all of them?

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q bbswitch bumblebee mesa nvidia nvidia-settings lib32-mesa-libgl lib32-nvidia-utils lib32-virtualgl xf86-video-intel
    bbswitch 0.8-55
    bumblebee 3.2.1-12
    mesa 13.0.3-1
    nvidia 375.26-1
    nvidia-settings 375.26-1
    lib32-mesa-libgl 13.0.3-1
    lib32-nvidia-utils 375.26-2
    lib32-virtualgl 2.5.1-1
    xf86-video-intel 1:2.99.917+747+g028c946d-1
    ┌──[just]─[alexatp]:~$
    └─>
    

    Yes, you do!

    Is it good? Yes and no.

    Yes, because all really needed packages are installed.

    No, because at least one package needs to be explicitely reinstalled along with Bumblebee, to recreate correct dependencies. It is xf86-video-intel.

    At least, it was required 4-5 years ago, when I wrote the original Bumblebee article (it is not published in Antergos, nowhere). It may be changed since then, I didn’t check that. But continue to reinstall xf86-video-intel with Bumblebee for security

    So all needed packages are installed after nvidia-installer’s run on fresh Antergos 17.1 Kde installation. It answers my question “Why @karasu’s Bumblebee works flawlessly?” for 97%.

    3. @karasu Groups differences

    One remaining doubt per cent (98th) goes to USER groups.

    Bumblebee user must be included in two groups:

    • bumblebee
    • video

    You include a USER in bumblebee but not in video group. And your Bumblebee still works perfectly. Why?

    May it be because my USER is included in the wheel group?

    ┌──[just]─[alexatp]:~$
    └─> whoami
    just
    ┌──[just]─[alexatp]:~$
    └─> groups $USER
    wheel autologin bumblebee users
    ┌──[just]─[alexatp]:~$
    └─>
    

    I nave no answer to this question.

    4. @karasu Configuration differences

    Another remaining doubt per cent (99th) goes to .conf files.

    Bumblebee creates and uses its own configuration files, and keeps them in /etc/bumblebee directory. They substitute the classic /etc/X11/xorg.conf and similar in /etc/X11/xorg.conf.d. Do you - ehm, bumblebee package - create Bumblebee folder? Yes, you do:

    ┌──[just]─[alexatp]:~$
    └─> ls -lha /etc/bumblebee | sort
    drwxr-xr-x  2 root root 4.0K Jul 28 23:17 xorg.conf.d
    drwxr-xr-x  3 root root 4.0K Jul 28 23:17 .
    drwxr-xr-x 73 root root 4.0K Jan 16 13:40 ..
    -rw-r--r--  1 root root 1.4K Jul 28 23:17 xorg.conf.nvidia
    -rw-r--r--  1 root root 2.9K Jul 28 23:17 bumblebee.conf
    -rw-r--r--  1 root root  513 Jul 28 23:17 xorg.conf.nouveau
    total 24K
    ┌──[just]─[alexatp]:~$
    └─> ls -lha /etc/bumblebee/xorg.conf.d | sort
    drwxr-xr-x 2 root root 4.0K Jul 28 23:17 .
    drwxr-xr-x 3 root root 4.0K Jul 28 23:17 ..
    -rw-r--r-- 1 root root    0 Jul 28 23:17 10-dummy.conf
    total 8.0K
    ┌──[just]─[alexatp]:~$
    └─>
    

    All Bmb dirs and files exist. I checked three .conf files content by hand, and it is correct. Three Bmb .conf files are:

    - xorg.conf.nvidia  <-- Bmb for Nvidia prop driver
    - bumblebee.conf    <-- general Bmb config
    - xorg.conf.nouveau <-- Bmb for Nouveau free driver
    

    But nvidia-installer --test says it wants to create /etc/X11/xorg.conf.d/20-nvidia.conf file. What it is needed for? For me, it is not needed:

    ┌──[just]─[alexatp]:~$
    └─> ls -lha /etc/X11/xorg.conf.d/20-nvidia.conf
    ls: cannot access '/etc/X11/xorg.conf.d/20-nvidia.conf': No such file or directory
    ┌──[just]─[alexatp]:~$
    └─>
    

    The file was not created. And it’s OK for me. Don’t know, why do you want to create it.

    5. @karasu nvidia-settings

    The final (100th) doubt per cent goes to nvidia-settings utility.

    It is included in menu under NVIDIA X Server Settings title.

    The utility is never installed with correct Optimus settings, in no distro. It is always installed to be run on single-GPU, non-hybrid Nvidia cards. If not reconfigured, it returns the error on Optimus.

    So nvidia-settings is installed, and it is correct, but it’s not ready for immediate use. It will result in additional users confusion. It would be better either to remove it immediately after the installation, or to reconfigure it, to be ready to run on Optimus.

    6. @all Conclusion

    Even in its current, very early alpha state, @karasu’s nvidia-installer gives the excellent result. On fresh Antergos 17.1 it installs perfectly working Bumblebee and proprietary Nvidia driver.

    It’s 97% perfect.

    It may not work correctly on every and all Arch-based systems, because it doesn’t install explicitely all packages, required by Bumblebee. It tries to install some apparently unneeded packages, and tries to apply unusual configuration choices.

    It’s only 3 more per cent to reach a perfection.

    For now, I’ll continue to use Bumblebee article in Antergos Wiki. It’s more universal, works everywhere, in all true Arch systems. I feel myself more secure with it.

    With max respect

  • Like 0

    That was a perfect report! Expect a 0.0.5 version very soon.

    1. I’ll check the packages, it’s possible that you already had installed some needed packages, right?

    2. nvidia.conf is only created if (and only if) the proprietary driver is installed BUT you’re not installing bumblebee. That message is wrong.

    3. What has to be done to setup nvidia-settings? It’s in the Arch wiki?

    Thanks a million!!!

  • Like 0

    @karasu said in nvidia-installer [ALPHA]:

    That was a perfect report! Expect a 0.0.5 version very soon.

    1. I’ll check the packages, it’s possible that you already had installed some needed packages, right?

    No, it’s not right. I’ve installed only two packages after Cnchi, and prior to nvidia-installer’s run. They are:

    • inxi
    • mesa-demos

    They have no dependencies, so don’t install other pkgs.

    Inxi has absolutely no relation to Bumblebee. Neither mesa-demos has, AFAIK. mesa-demos is needed to fully unleash inxi’s power.

    1. nvidia.conf is only created if (and only if) the proprietary driver is installed BUT you’re not installing bumblebee. That message is wrong.

    Don’t follow you, sorry. For the 1000th time I’m watching Transformers in TV right now, so I’m a bit distracted.

    1. What has to be done to setup nvidia-settings? It’s in the Arch wiki?

    Yes, it’s in Arch Wiki here.

    Briefly: NVIDIA X Server Settings uses the default nvidia-settings invocation:

    /usr/bin/nvidia-settings
    

    It is wrong on Optimus. The correct command is:

    optirun -b none /usr/bin/nvidia-settings -c :8
    

    On Debian I was doing it with simple sed:

    sudo sed -i 's/Exec=nvidia-settings/Exec=optirun -b none nvidia-settings -c :8/' /usr/lib/nvidia/current/nvidia-settings.desktop
    

    On Arch I do it by hand, but nvidia-settings.desktop sits in /usr/share/applications, so it should be enough to:

    • check that /usr/share/applications/nvidia-settings.desktop exists
    • if exists, apply that sed to it

    Thanks a million!!!

    For nothing. Back to Transformers!

  • Like 1

    It’s not just a case that the best autobot is called Optimus Prime :) !

  • Like 1

    @karasu said in nvidia-installer [ALPHA]:

    1. I’ll check the packages, it’s possible that you already had installed some needed packages, right?

    Warning: Long post ahead.

    Trying to answer the question “Is there any Bmb package already installed before nvidia-installer execution?”

    Starting from Antergos 17.1 Kde backup, made right after a fresh installation. No pkgs were installed by hand, the system has only pkgs installed by Cnchi.

    In previous tests I installed three pkgs before nvidia-installer execution:

    • nvidia-installer
    • inxi
    • mesa-demos

    None of them should be present right now:

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q nvidia-installer inxi mesa-demos
    error: package 'nvidia-installer' was not found
    error: package 'inxi' was not found
    mesa-demos 8.3.0-2
    ┌──[just]─[alexatp]:~$
    └─>
    

    Oops, mesa-demos is installed.

    Repeating the query “Is there any of @karasu’s Bmb packages already installed before nvidia-installer execution?”

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q nvidia nvidia-libgl nvidia-utils lib32-libvdpau lib32-nvidia-libgl libvdpau
    error: package 'nvidia' was not found
    error: package 'nvidia-libgl' was not found
    error: package 'nvidia-utils' was not found
    error: package 'lib32-libvdpau' was not found
    error: package 'lib32-nvidia-libgl' was not found
    libvdpau 1.1.1-2
    ┌──[just]─[alexatp]:~$
    └─>
    

    None of @karasu’s Bmb pcks, except of libvdpau, is installed before nvidia-installer run.

    Where lbvdpau comes from?

    ┌──[just]─[alexatp]:~$
    └─> pactree --reverse libvdpau
    libvdpau
    ├─ffmpeg
    │ ├─chromaprint
    │ │ ├─clementine
    │ │ │ └─antergos-kde-setup
    │ │ └─gst-plugins-bad
    │ │   └─gstreamer-vaapi
    │ ├─chromium
    │ ├─ffmpegthumbnailer
    │ ├─ffmpegthumbs
    │ │ └─antergos-kde-setup
    │ ├─firefox
    │ ├─gst-libav
    │ ├─k3b
    │ │ └─antergos-kde-setup
    │ └─kfilemetadata
    │   └─baloo
    │     ├─baloo-widgets
    │     │ └─dolphin
    │     │   ├─antergos-kde-setup
    │     │   ├─dolphin-plugins
    │     │   │ └─antergos-kde-setup
    │     │   └─kde-servicemenus-rootactions
    │     │     └─antergos-kde-setup
    │     ├─gwenview
    │     │ └─antergos-kde-setup
    │     └─plasma-desktop
    │       └─antergos-kde-setup
    ├─ffmpeg2.8
    │ └─vlc
    │   └─antergos-kde-setup
    └─gstreamer0.10-bad-plugins <--comes from here
    ┌──[just]─[alexatp]:~$
    └─>
    

    Libvdpau comes from gstreamer0.10-bad-plugins package. That’s OK.

    Repeating the query “Is there any of @just’s Bmb packages already installed before nvidia-installer execution?”

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q bbswitch bumblebee mesa nvidia nvidia-settings lib32-mesa-libgl lib32-nvidia-utils lib32-virtualgl xf86-video-intel
    error: package 'bbswitch' was not found
    error: package 'bumblebee' was not found
    mesa 13.0.3-1
    error: package 'nvidia' was not found
    error: package 'nvidia-settings' was not found
    lib32-mesa-libgl 13.0.3-1
    error: package 'lib32-nvidia-utils' was not found
    error: package 'lib32-virtualgl' was not found
    xf86-video-intel 1:2.99.917+747+g028c946d-1
    ┌──[just]─[alexatp]:~$
    └─>
    

    Three of my Bmb pcks are already present:

    - mesa              <-- installed by default
    - lib32-mesa-libgl  <-- don't know where it comes from
    - xf86-video-intel  <-- by default, must be reinstalled
    

    Except only one package, lib32-mesa-libgl, none of Bmb pkgs exists in the system before nvidia-installer execution.

    It’s a good result. It means that everything needed for Bmb is somehow installed by nvidia-installer.

    But I’m still curious about lib32-mesa-libgl. Where it comes from?

    ┌──[just]─[alexatp]:~$
    └─> pactree --reverse lib32-mesa-libgl
    lib32-mesa-libgl
    ├─lib32-cairo
    │ ├─lib32-gtk2
    │ │ ├─lib32-libdbusmenu-gtk2
    │ │ │ └─lib32-libappindicator-gtk2
    │ │ │   └─steam-native-runtime
    │ │ ├─lib32-libindicator-gtk2
    │ │ │ └─lib32-libappindicator-gtk2
    │ │ └─steam-native-runtime
    │ ├─lib32-pango
    │ │ ├─lib32-gtk2
    │ │ └─steam-native-runtime
    │ └─steam-native-runtime
    ├─lib32-freeglut
    │ └─steam-native-runtime
    ├─lib32-glew1.10
    │ └─steam-native-runtime
    ├─lib32-glu
    │ ├─steam-native-runtime
    │ └─wine
    │   └─playonlinux
    ├─lib32-pango
    ├─lib32-sdl2
    │ ├─lib32-sdl2_image
    │ │ └─steam-native-runtime
    │ ├─lib32-sdl2_mixer
    │ │ └─steam-native-runtime
    │ ├─lib32-sdl2_ttf
    │ │ └─steam-native-runtime
    │ ├─lib32-smpeg2
    │ │ └─lib32-sdl2_mixer
    │ └─steam-native-runtime
    └─steam  <--it comes from steam, installed with Cnchi
    ┌──[just]─[alexatp]:~$
    └─>
    

    So lib32-mesa-libgl is installed by Cnchi during Antergos 17.1 Kde installation, as Steam’s dependency.

    Out of curiosity, I’ll install three pkgs now:

    • nvidia-installer
    • inxi
    • mesa-demos

    Will they add some Bmb pkgs?

    ┌──[just]─[alexatp]:~$
    └─> sudo pacman -Syyuu nvidia-installer inxi mesa-demos
    :: Synchronizing package databases...
     antergos-staging                              2.7 KiB   672K/s 00:00 [---------------------------------------] 100%
     antergos                                    139.5 KiB  2.72M/s 00:00 [---------------------------------------] 100%
     core                                        123.5 KiB  1691K/s 00:00 [---------------------------------------] 100%
     extra                                      1722.4 KiB  3.08M/s 00:01 [---------------------------------------] 100%
     community                                     3.7 MiB  2.94M/s 00:01 [---------------------------------------] 100%
     multilib                                    185.9 KiB  3.03M/s 00:00 [---------------------------------------] 100%
    warning: mesa-demos-8.3.0-2 is up to date -- reinstalling
    :: Starting full system upgrade...
    resolving dependencies...
    looking for conflicting packages...
    
    Package (3)                        Old Version  New Version  Net Change  Download Size
    
    community/inxi                                  2.3.8-1        0.51 MiB       0.12 MiB
    extra/mesa-demos                   8.3.0-2      8.3.0-2        0.00 MiB       1.40 MiB
    antergos-staging/nvidia-installer               0.0.4-1        0.03 MiB       0.01 MiB
    
    Total Download Size:   1.53 MiB
    Total Installed Size:  7.14 MiB
    Net Upgrade Size:      0.54 MiB
    
    :: Proceed with installation? [Y/n]
    :: Retrieving packages...
     nvidia-installer-0.0.4-1-any                  6.4 KiB  0.00B/s 00:00 [---------------------------------------]   0%
     mesa-demos-8.3.0-2-x86_64                  1438.9 KiB  2.64M/s 00:01 [---------------------------------------]  91%
     inxi-2.3.8-1-any                           1566.5 KiB  2.52M/s 00:01 [---------------------------------------] 100%
    (3/3) checking keys in keyring                                        [---------------------------------------] 100%
    (3/3) checking package integrity                                      [---------------------------------------] 100%
    (3/3) loading package files                                           [---------------------------------------] 100%
    (3/3) checking for file conflicts                                     [---------------------------------------] 100%
    (3/3) checking available disk space                                   [---------------------------------------] 100%
    :: Processing package changes...
    (1/3) installing nvidia-installer                                     [---------------------------------------] 100%
    (2/3) installing inxi                                                 [---------------------------------------] 100%
    Optional dependencies for inxi
        dmidecode: inxi -M if no sys machine data
        file: inxi -o unmounted file system [installed]
        hddtemp: inxi -Dx show hdd temp
        net-tools: inxi -i ip lan-deprecated [installed]
        iproute2: inxi -i ip lan [installed]
        lm_sensors: inxi -s sensors output [installed]
        usbutils: inxi -A usb audio;-N usb networking [installed]
        kmod: inxi -Ax,-Nx module version [installed]
        systemd-sysvcompat: inxi -I runlevel [installed]
        sudo: inxi -Dx hddtemp-user;-o file-user [installed]
        mesa-demos: inxi -G glx info [installed]
        xorg-xdpyinfo: inxi -G multi screen resolution [installed]
        xorg-xprop: inxi -S desktop data [installed]
        xorg-xrandr: inxi -G single screen resolution [installed]
    (3/3) reinstalling mesa-demos                                         [---------------------------------------] 100%
    ┌──[just]─[alexatp]:~$
    └─>
    

    Repeating two queries:

    Does nvidia-installer, inxi, mesa-demos installation add any @karasu’s Bmb package?

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q nvidia nvidia-libgl nvidia-utils lib32-libvdpau lib32-nvidia-libgl libvdpau
    error: package 'nvidia' was not found
    error: package 'nvidia-libgl' was not found
    error: package 'nvidia-utils' was not found
    error: package 'lib32-libvdpau' was not found
    error: package 'lib32-nvidia-libgl' was not found
    libvdpau 1.1.1-2
    ┌──[just]─[alexatp]:~$
    └─>
    

    No, it does not. Three pkgs don’t install anything related to Bmb by @karasu.

    Does nvidia-installer, inxi, mesa-demos installation add any @just’s Bmb package?

    ┌──[just]─[alexatp]:~$
    └─> pacman -Q bbswitch bumblebee mesa nvidia nvidia-settings lib32-mesa-libgl lib32-nvidia-utils lib32-virtualgl xf86-video-intel
    error: package 'bbswitch' was not found
    error: package 'bumblebee' was not found
    mesa 13.0.3-1
    error: package 'nvidia' was not found
    error: package 'nvidia-settings' was not found
    lib32-mesa-libgl 13.0.3-1
    error: package 'lib32-nvidia-utils' was not found
    error: package 'lib32-virtualgl' was not found
    xf86-video-intel 1:2.99.917+747+g028c946d-1
    ┌──[just]─[alexatp]:~$
    └─>
    

    No, it does not. Three pkgs don’t add anything new, related to Bmb by @just.

    Conclusion

    Freshly installed Antergos 17.1 Kde doesn’t contain Bmb-related packages.

    Even nvidia-installer, inxi, mesa-demos installation doesn’t add Bmb-related packages.

    A working Bumblebee with proprietary Nvidia driver is a pure merit of nvidia-installer execution.

    Regards

  • Like 0

    Hi,

    New version 0.0.5:

    • Adds user to video group
    • Adds colored logs to terminal and to /tmp/nvidia-installer.log file
    • New option -q or --quiet : do not log to the screen (terminal).

    To test bumblebee (does nothing to your system):
    sudo nvidia-installer -tb

    I’m planning to release this soon ;)

  • Like 0

    @karasu Yes, thanks. I already read your mods in the 0.0.5 source on Github, wanted to start testing it, but currently fighting against the tedious signature error:

    ...
    error: nvidia-installer: signature from "Antergos Build Server (Automated Package Build System) <[email protected]>" is invalid
    :: File /var/cache/pacman/pkg/nvidia-installer-0.0.5-2-any.pkg.tar.xz is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: failed to commit transaction (invalid or corrupted package)
    Errors occurred, no packages were upgraded.
    
  • Like 0

    @just It should work now (if you install from the build server) or in a couple hours if using a mirror. Cheers!

  • Like 1

    @lots.0.logs
    I didn’t check the mirrors yet, and installed the local package with pacman -U. Eager to start testing asap. Will check the signature later.

    @karasu
    nvidia-installer 0.0.5 is 99.9% perfect. Bmb + Nvidia works perfectly. Installed configuration is extremely polished. It simply shines, in every single, even minimal detail. I enjoyed enormously to study and to run it.

    The full, detailed report with all 12+ tests results is on Paste2 here. Nvidia-installer’s execution log is here.

    You may safely ignore it, except for some final suggestions it contains. They are about sed only. I briefly repeat them here.

    Everything in nvidia-installer 0.0.5 worked as it should, except only one thing. It’s sed, used to adjust nvidia-settings.desktop. It’s those 0.1% missing to absolute perfection.

    It’s my fault. I didn’t tell you the exact Exec= command it uses.

    sed returns the error:

    ...
    2017-01-18 14:31:45 [WARNING]: Cannot patch /usr/share/applications/nvidia-settings.desktop file : sed: -e expression #1, char 1: unknown command: `''
    ...
    

    Seems like it speaks about a syntax error, but I’m not sure. Can’t fully interpret the message.

    Anyway. Look at this piece of your code:

    # Fix nvidia-settings.desktop
    desktop_path = "/usr/share/applications/nvidia-settings.desktop"
    if os.path.exists(desktop_path):
        log_info("Patching {}...".format(desktop_path))
        cmd = ["sed", "-i", "'s/Exec=nvidia-settings/Exec=optirun -b none nvidia-settings -c :8/'", "/usr/share/applications/nvidia-settings.desktop"]
        if TEST:
            log_info(" ".join(cmd))
        else:
            try:
                subprocess.check_output(cmd, stderr=subprocess.STDOUT)
            except subprocess.CalledProcessError as err:
                log_warning("Cannot patch {0} file : {1}".format(desktop_path, err.output.decode()))
    else:
        log_info("Could not find {0} file. Is nvidia-settings installed?".format(desktop_path))
    

    sed looks for this string to substitute (my bad, incorrect info):

    Exec=nvidia-settings
    

    The actual string is fully qualified pathname:

    Exec=/usr/bin/nvidia-settings
    

    So sed fails in any case.

    How to repair?

    The incriminated sed instruction is:

    ..."'s/Exec=/usr/bin/nvidia-settings/Exec=optirun -b none nvidia-settings -c :8/'"...
    

    We can either use backslashes to quote slashes:

    ..."'s/Exec=\/usr\/bin\/nvidia-settings/Exec=optirun -b none \/usr\/bin\/nvidia-settings -c :8/'"...
    

    Or simply use another delimiter in sed. I like to use pipe, it’s more readable:

    ..."'s|Exec=/usr/bin/nvidia-settings|Exec=optirun -b none /usr/bin/nvidia-settings -c :8|'"...
    

    I applied in terminal both formats:

    • starting with unmodified nvidia-settings.desktop
    • running sed on it
    • obtaining modified nvidia-settings.desktop

    Using backslashes:

    ┌──[just]─[alexatp]:~$
    └─> sudo cat /usr/share/applications/nvidia-settings.desktop | grep Exec=
    Exec=/usr/bin/nvidia-settings
    ┌──[just]─[alexatp]:~$
    └─> sudo sed -i 's/Exec=\/usr\/bin\/nvidia-settings/Exec=optirun -b none \/usr\/bin\/nvidia-settings -c :8/' /usr/share/applications/nvidia-settings.desktop
    ┌──[just]─[alexatp]:~$
    └─> sudo cat /usr/share/applications/nvidia-settings.desktop | grep Exec=
    Exec=optirun -b none /usr/bin/nvidia-settings -c :8
    ┌──[just]─[alexatp]:~$
    └─>
    

    The file /usr/share/applications/nvidia-settings.desktop is modified as needed.

    Restoring the original /usr/share/applications/nvidia-settings.desktop.

    Using pipes:

    ┌──[just]─[alexatp]:~$
    └─> sudo cat /usr/share/applications/nvidia-settings.desktop | grep Exec=
    Exec=/usr/bin/nvidia-settings
    ┌──[just]─[alexatp]:~$
    └─> sudo sed -i 's|Exec=/usr/bin/nvidia-settings|Exec=optirun -b none /usr/bin/nvidia-settings -c :8|' /usr/share/applications/nvidia-settings.desktop
    ┌──[just]─[alexatp]:~$
    └─> sudo cat /usr/share/applications/nvidia-settings.desktop | grep Exec=
    Exec=optirun -b none /usr/bin/nvidia-settings -c :8
    ┌──[just]─[alexatp]:~$
    └─>
    

    The file /usr/share/applications/nvidia-settings.desktop is modified as expected again.

    Sorry for inconvenience.

  • Like 0

    It’s my fault. I didn’t tell you the exact Exec= command it uses.

    No, it is not. I should have checked and tested it first.

    I will use your pipes solution, thank you!

  • Like 0

    @lots.0.logs said in nvidia-installer [ALPHA]:

    …It should work now (if you install from the build server) or in a couple hours if using a mirror.

    Confirm that it works now:

    $ sudo pacman -Syyu nvidia-installer
    ...
    :: Processing package changes...                                                                                    
    (1/1) reinstalling nvidia-installer                                   [-------------] 100%
    $                                                                                              
    

    The signature problem with 0.0.5 is solved.

  • Like 0

    @karasu
    nvidia-installer can do more

    Bumblebee article in Antergos Wiki has foolproof and repairing capabilities. It may be applied multiple times on working or broken Bmb, without damaging it. or repairing a broken installation.

    Can nvidia-installer do the same?

    Q1. What happens, if nvidia-installer runs a 2nd, 3rd,… Nth time on a system with working Bmb? Will it break it?

    A1. No, it won’t. Multiple nvidia-installer’s runs on working Bmb doesn’t break it. Bmb continues to work normally. That’s good.

    Q2. What happens, if nvidia-installer runs a 2nd time on a system with broken Bmb? Will it fix Bmb?

    A2. I intentionally damaged Bmb by hand in four points, by:

    1. Stopping and disabling (deleting) bumblebeed service
    2. Messing up /etc/bumblebee/xorg.conf.nvidia file
    3. Uninstalling bbswitch package
    4. Removing myself from bumblebee group

    Will nvidia-installer repair these damages?

    Running nvidia-installer.

    Rebooting.

    A2.1. bumblebeed service is repaired and runs well. OK.
    A2.2. /etc/bumblebee/xorg.conf.nvidia is not repaired. KO.
    A2.3. bbswitch package is reinstalled. OK.
    A2.4. I was added back to bumblebee group. OK.

    Because of A2.2, Bmb doesn’t work right after the reboot.

    Fixing A2.2 - /etc/bumblebee/xorg.conf.nvidia file - by hand.

    Even without reboot, Bmb immediately turns to work correctly again.

    This point is not clear for me. The /etc/bumblebee/xorg.conf.nvidia file is not written by nvidia-installer. It is created during Bmb installation. Why it was not re-created, overwritten during the 2nd nvidia-installer’s execution? I don’t know. It happens during manual Bmb re-installations.

    A2.2.again. If /etc/bumblebee/xorg.conf.nvidia file was deleted, nvidia-installer creates it again, with correct content. OK. Bmb runs correctly after reboot.

    A2.2.more. If the whole /etc/bumblebee folder, which holds all Bmb configuration, is deleted, it is created again during nvidia-installer’s re-run, with correct content. Very good! Bmb runs correctly after reboot.

    Conclusion.

    It would be nice if nvidia-installer were capable to fully repair a broken Bmb configuration.

    Probably, nvidia-installer should unconditionally delete the whole /etc/bumblebee folder, if exists, before starting Bmb installation.

    With respect

  • Like 1

    Hi,
    Yes, you’re right. As you can see here
    https://www.archlinux.org/packages/community/x86_64/bumblebee/files/
    /etc/bumblebee/xorg.conf.nvidia is from the bumblebee package.

    But here
    https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/bumblebee
    you can see how that file is added in the backup array of the pkgbuild.

    From https://wiki.archlinux.org/index.php/PKGBUILD#backup

    backup

    An array of files that can contain user-made changes and should be preserved during upgrade or removal of a package, primarily intended for configuration files in /etc.

    Files in this array should use relative paths without the leading slash (/) (e.g. etc/pacman.conf, instead of /etc/pacman.conf).

    When updating, new versions may be saved as file.pacnew to avoid overwriting a file which already exists and was previously modified by the user. Similarly, when the package is removed, user-modified files will be preserved as file.pacsave unless the package was removed with the pacman -Rn command.

    See also Pacnew and Pacsave files.

    That’s why the package didn’t overwrite your changes. ;)

Posts 46Views 2648
Log in to reply