x11-wm/xpra -video_cards_nvidia
x11-base/xorg-server xvfb
i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...
Showing posts with label nvidia. Show all posts
Showing posts with label nvidia. Show all posts
Tuesday, August 04, 2026
xpra: USE flags to install on gentoo without using nvidia
/etc/portage/package.use/xpra should be:
Friday, June 12, 2026
Gentoo and nvidia: open /dev/dri/card0: No such file or directory
Gentoo upgrade broke Xorg? It's probably your NVIDIA module.
After a Gentoo system upgrade that includes a new kernel, Xorg can fail to start with a cryptic error: "open /dev/dri/card0: No such file or directory". The display manager dies, XFCE never loads, and you're left staring at a TTY.
The cause is simple. The upgrade installed new kernel sources, but the /usr/src/linux symlink was left pointing at the old ones — or pointing nowhere useful. When nvidia-drivers tries to rebuild its kernel module against the new kernel, it can't find the sources and silently fails. No module, no /dev/dri/card0, no Xorg.
To fix it, first check which kernel you're running and which sources are available:
Then point the symlink at the matching sources:
Finally, rebuild the NVIDIA kernel module:
Restart your display manager and everything should be back to normal. The lesson: after any Gentoo kernel upgrade, always verify your /usr/src/linux symlink and run emerge @module-rebuild before rebooting.
After a Gentoo system upgrade that includes a new kernel, Xorg can fail to start with a cryptic error: "open /dev/dri/card0: No such file or directory". The display manager dies, XFCE never loads, and you're left staring at a TTY.
The cause is simple. The upgrade installed new kernel sources, but the /usr/src/linux symlink was left pointing at the old ones — or pointing nowhere useful. When nvidia-drivers tries to rebuild its kernel module against the new kernel, it can't find the sources and silently fails. No module, no /dev/dri/card0, no Xorg.
To fix it, first check which kernel you're running and which sources are available:
uname -r
eselect kernel list
Then point the symlink at the matching sources:
eselect kernel set 1
Finally, rebuild the NVIDIA kernel module:
emerge @module-rebuild
Restart your display manager and everything should be back to normal. The lesson: after any Gentoo kernel upgrade, always verify your /usr/src/linux symlink and run emerge @module-rebuild before rebooting.
Tuesday, June 02, 2026
Distrobox: failed to create task for container: failed to create shim task: OCI runtime create failed: cannot stat /usr/lib64/libEGL_nvidia.so.580.159.03: No such file or directory failed to start containers: fbox
I have distrobox container, fbox, which was created using the following command:
It was working for a while, and now, after I upgraded my gentoo host, I can't enter fbox. I get the error:
The solution was to regenerate nvidia.yaml:
And restart docker.
distrobox create -i quay.io/fedora/fedora:44-n fbox -H ~/home-fbox --additional-flags "--device=nvidia.com/gpu=all" '
It was working for a while, and now, after I upgraded my gentoo host, I can't enter fbox. I get the error:
Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: cannot stat /usr/lib64/libEGL_nvidia.so.580.159.03: No such file or directory
failed to start containers: fbox
The solution was to regenerate nvidia.yaml:
sudo nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
And restart docker.
Monday, June 01, 2026
Saturday, April 25, 2026
gentoo: mask the use of new nvidia drivers for legacy cards
Latest nvidia drivers (595.58.03) will not work with old GPUs, e.g. (GTX 960), giving error:
In this case you can mask the newest driver and force gentoo to use older one. You can do this as follows:
probe with driver nvidia failed
In this case you can mask the newest driver and force gentoo to use older one. You can do this as follows:
echo '>x11-drivers/nvidia-drivers-581' > /etc/portage/package.mask/nvidia-drivers
then
emerge -avtDUu @world
Sunday, April 12, 2026
gentoo with systemd and docker: use Nvidia runtime in distrobox through Nvidia container oolkit
Install nvidia container toolbox:
Create distrobox that uses nvidia (fedora 43 as an example):
Enter the distrobox container, fbox, in this example, and test using nvidia-smi:
If inside the distrobox container, nvidia is only avaiable for root user, you have to check what group number is nvidia on the host:
Then in the distrobox container, fbox in this example, you have to edit /etc/group and:
1. add yourself (i.e. normal user) to video group 2. Change video group number to match the one on the host, e.g. 27. For example, /etc/group in fbox
sudo emerge -av nvidia-container-toolkit
restart docker service:
sudo systemctl restart docker
Create and setup /etc/cdi:
mkdir -p /etc/cdi
nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml
Check if its working:
nvidia-ctk cdi list
Configure docker to use NVIDIA runtime:
sudo nvidia-ctk runtime configure --runtime=docker
Restart docker service again:
sudo systemctl restart docker
Before creating distrobox container, lets just perfrom basic check if nvidia is avaiable in docker:
docker run --rm --device=nvidia.com/gpu=all ubuntu nvidia-smi
If this shows your Nvidia driver and info about your gpu, than it works.
Create distrobox that uses nvidia (fedora 43 as an example):
distrobox create -i quay.io/fedora/fedora:43 -n fbox -H ~/home-fbox --additional-flags "--device=nvidia.com/gpu=all"
Enter the distrobox container, fbox, in this example, and test using nvidia-smi:
sudo nvidia-smi
This should also give info about your nvidia gpu and its driver.
If inside the distrobox container, nvidia is only avaiable for root user, you have to check what group number is nvidia on the host:
stat -c "%g" /dev/nvidia0
This will show a number, e.g. 27. Then in the distrobox container, fbox in this example, you have to edit /etc/group and:
1. add yourself (i.e. normal user) to video group 2. Change video group number to match the one on the host, e.g. 27. For example, /etc/group in fbox
video:x:27:your-user-name
distrobox with nvidia through NVIDIA Container Toolkit
First setup NVIDIA Container Toolkit and docker support for it based on your host's distrubution. Then you can:
distrobox create -i archlinux -n abox -H ~/home-abox --additional-flags "--device=nvidia.com/gpu=all" && distrobox enter abox -- bash -c "sudo pacman -Sy --noconfirm git base-devel && git clone https://aur.archlinux.org/yay-bin.git /tmp/yay-bin && cd /tmp/yay-bin && makepkg -si --noconfirm && rm -rf /tmp/yay-bin"
nixos: enable nvidia in distrobox container using Nvidia Container Toolkit
What worked for me on nixos with docker (check nixos wiki on Nvidia and Nvidia Container Toolkit) was:
Then in the distrobox container you can check if nvidia is detected, using for example glxinfo. It should show:
Put the following in nixos configuration file:
distrobox create -i archlinux -n archbox --additional-flags "--device=nvidia.com/gpu=all"
Then in the distrobox container you can check if nvidia is detected, using for example glxinfo. It should show:
name of display: :0.0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
Put the following in nixos configuration file:
hardware.nvidia-container-toolkit.enable = true;
virtualisation.docker.daemon.settings.features.cdi = true;
Friday, January 30, 2026
Fedora atomic (vauxite xfce4): install nvidia drivers
sudo rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia
sudo rpm-ostree kargs --append=rd.driver.blacklist=nouveau,nova_core --append=modprobe.blacklist=nouveau,nova_core --append=nvidia-drm.modeset=1
https://github.com/eoladil/Fedora-Silverblue-Guides?tab=readme-ov-file#4-install-nvidia-drivers-for-current-geforce-tesla-and-quadro-gpus
Wednesday, January 14, 2026
arch: Uninstall nvidia-open drivers due to second monitor being not detected
sudo pacman -Rd nvidia-open nvidia-utils
Tuesday, July 21, 2015
LG 43UF770 4K TV with gtx 960 running at 4K at 60Hz and chroma 4:4:4
This is complementary info to the one in here.
I have LG 43UF770T and Gigabyte GTX 960 G1 Gaming 4GB.
The PC is set to 4K@60Hz and connected to the tv using HDMI 1 port. Only this port supports HDMI ULTRA HD Deep Colour in this tv. By default HDMI 1 icon is HDMI and HDMI ULTRA HD Deep Colour is off as written above. This results in chroma 4:2:0. I changed the setting as per instructions here, i.e. HDMI 1 port icon to PC and HDMI ULTRA HD Deep Colour to On. The nvidia settings are shown below.
To test the chroma for the default setup and the new one I used chroma torture test.
The results are here:
As can be seen, the top red, middle blue and bottom text is unreadable with the default tv settings on HDMI 1 port. With the new settings, everything is clear.
To test the chroma for the default setup and the new one I used chroma torture test.
The results are here:
As can be seen, the top red, middle blue and bottom text is unreadable with the default tv settings on HDMI 1 port. With the new settings, everything is clear.
Subscribe to:
Posts (Atom)