Setup graphics stack on an presumably hybrid laptop with intel and nvidia GPUs
by sairum from LinuxQuestions.org on (#55CB0)
My kid received an Asus VivoBook F512JP which has an I5-1035G1 with a 1Tb HDD, a 250 MVMe M.2 SDD and a Nvidia GeForce MX330. It comes with Windows 10, but being used to Slackware my kid asked for a clean Linux installation with Windows installed in VirtualBox.
As I didn't have an external CD reader at hand (the laptop comes without one) the first thing I made was a small USB pen with AlienBob's slacklive with XFCE just to test if everything was working. This step was successful. I was mostly afraid of the wireless card but it worked out of the box, just like much of the Asus specific stuff (keyboard backlight, LCD brightness, etc). Instead of my usual approach (install Slackware-current, multilib, ktown-plasma5) I decided to make an USB slacklive with plasma5 and install everything from there to the disk using the script "setup2hd". Everything went fine until the graphics stage. My kid always boot into runlevel 3 and uses startx to start Xwindows.
1) startx to Plasma5 doesn't work correctly. The regular colored background doesn't show up (black background) but the taskbar with the launcher appear. However, they are mostly useless. The mouse cannot select most of the things (which are not many) and the KDE menu is mostly empty and nothing can be selected. The icons in the tray (usually aligned towards the right lower side) are aligned to the left side, near the launcher icon! No signs of NVIDIA although the necessary modules are loaded (nvidia, nvidia_drm, nvidia_modeset) and nouveau is blacklisted! nvidia-settings doesn't work (quits without a sign). glxgears displays non-moving gears, and vkcube displays a trembling cube. Quake2 displays a black window, although the sound is working (meaning probably that it's running OK on the backstage).
2) startx to XFCE works more or less! nvidia-settings works and shows the GPU temperature, for example. But glxgears, vkcube and quake2 behave just like in plasma5.
3) sartkwayland with the nvidia modules loaded gets the best results. Everything works (glxgears, vkcube, but apparently using the intel iGPU, not nvidia).nvidia-settings does not work! Quake2 can be played. UT2004 also works but with some problems (looking down or up turns graphics rendering crazy).
The laptop model is fairly recent, and I've learned that this is a typical hybrid system with an intel GPU (iGPU) and an embedded dedicated NVIDIA (dGPU). However, after reading information from many sites, I'm not sure what is the best approach to get the whole system working. Some people advocate the use of bumblebee (there is a Slackbuild in github which is recent and uses the latest nvidia drivers). There is also an optimus-manager (no slackbuild for this, and apparently it depends on systemd), PRIME GPU offloading, or nvidia-xrun! Slackware docs suggest bumblebee or even crazybee.sh. What are your thoughts about this? Does anyone have any hints or suggestions before I dive into this hell?


As I didn't have an external CD reader at hand (the laptop comes without one) the first thing I made was a small USB pen with AlienBob's slacklive with XFCE just to test if everything was working. This step was successful. I was mostly afraid of the wireless card but it worked out of the box, just like much of the Asus specific stuff (keyboard backlight, LCD brightness, etc). Instead of my usual approach (install Slackware-current, multilib, ktown-plasma5) I decided to make an USB slacklive with plasma5 and install everything from there to the disk using the script "setup2hd". Everything went fine until the graphics stage. My kid always boot into runlevel 3 and uses startx to start Xwindows.
1) startx to Plasma5 doesn't work correctly. The regular colored background doesn't show up (black background) but the taskbar with the launcher appear. However, they are mostly useless. The mouse cannot select most of the things (which are not many) and the KDE menu is mostly empty and nothing can be selected. The icons in the tray (usually aligned towards the right lower side) are aligned to the left side, near the launcher icon! No signs of NVIDIA although the necessary modules are loaded (nvidia, nvidia_drm, nvidia_modeset) and nouveau is blacklisted! nvidia-settings doesn't work (quits without a sign). glxgears displays non-moving gears, and vkcube displays a trembling cube. Quake2 displays a black window, although the sound is working (meaning probably that it's running OK on the backstage).
2) startx to XFCE works more or less! nvidia-settings works and shows the GPU temperature, for example. But glxgears, vkcube and quake2 behave just like in plasma5.
3) sartkwayland with the nvidia modules loaded gets the best results. Everything works (glxgears, vkcube, but apparently using the intel iGPU, not nvidia).nvidia-settings does not work! Quake2 can be played. UT2004 also works but with some problems (looking down or up turns graphics rendering crazy).
The laptop model is fairly recent, and I've learned that this is a typical hybrid system with an intel GPU (iGPU) and an embedded dedicated NVIDIA (dGPU). However, after reading information from many sites, I'm not sure what is the best approach to get the whole system working. Some people advocate the use of bumblebee (there is a Slackbuild in github which is recent and uses the latest nvidia drivers). There is also an optimus-manager (no slackbuild for this, and apparently it depends on systemd), PRIME GPU offloading, or nvidia-xrun! Slackware docs suggest bumblebee or even crazybee.sh. What are your thoughts about this? Does anyone have any hints or suggestions before I dive into this hell?