TLDR:
How can I keep using my GPU for machine learning in the new stable update?
How can I make sure the GPU is actively being used by Manjaro?
Hello Everybody. I’ve recently updated to the last stable update. It changed the appearance in the Info Center quite a bit, but the GPU seems to be listed there. The problem is: my transformers module in PyCharm won’t recognize my GPU anymore. Here’s a snippet of the code I use to identify a usable GPU:
import tensorflow as tf
import transformers
# check if GPU is available
if checkgpu:
device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))
And in case it helps here is mwhd -l
(base) ➜ ~ mhwd -l
> 0000:03:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
network-r8168 2016.04.20 true PCI
> 0000:01:00.0 (0300:10de:25a2) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime 2021.12.18 false PCI
video-hybrid-intel-nvidia-470xx-prime 2021.12.18 false PCI
video-nvidia 2021.12.18 false PCI
video-nvidia-470xx 2021.12.18 false PCI
video-linux 2018.05.04 true PCI
video-modesetting 2020.01.13 true PCI
video-vesa 2017.03.12 true PCI
> 0000:00:02.0 (0300:8086:9bc4) Display controller Intel Corporation:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime 2021.12.18 false PCI
video-hybrid-intel-nvidia-470xx-prime 2021.12.18 false PCI
video-linux 2018.05.04 true PCI
video-modesetting 2020.01.13 true PCI
video-vesa 2017.03.12 true PCI
It worked before, now PyCharm won’t recognize the GPU. Running nvidia driver 510.68.02. I should note that Nvidia-Server-Settings declares the operating system as: “Linux-Unknown”
I still haven’t figured out how to make this work, which is why I would like to provide some more Information, so here’s mhwd -l && mhwd -li
(base) ➜ ~ mhwd -l && mhwd -li
> 0000:03:00.0 (0200:10ec:8168) Network controller Realtek Semiconductor Co., Ltd.:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
network-r8168 2016.04.20 true PCI
> 0000:01:00.0 (0300:10de:25a2) Display controller nVidia Corporation:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime 2021.12.18 false PCI
video-hybrid-intel-nvidia-470xx-prime 2021.12.18 false PCI
video-nvidia 2021.12.18 false PCI
video-nvidia-470xx 2021.12.18 false PCI
video-linux 2018.05.04 true PCI
video-modesetting 2020.01.13 true PCI
video-vesa 2017.03.12 true PCI
> 0000:00:02.0 (0300:8086:9bc4) Display controller Intel Corporation:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-hybrid-intel-nvidia-prime 2021.12.18 false PCI
video-hybrid-intel-nvidia-470xx-prime 2021.12.18 false PCI
video-linux 2018.05.04 true PCI
video-modesetting 2020.01.13 true PCI
video-vesa 2017.03.12 true PCI
> Installed PCI configs:
--------------------------------------------------------------------------------
NAME VERSION FREEDRIVER TYPE
--------------------------------------------------------------------------------
video-modesetting 2020.01.13 true PCI
video-hybrid-intel-nvidia-prime 2021.12.18 false PCI
Warning: No installed USB configs!
and here inxi -G
(base) ➜ ~ inxi -G
Graphics:
Device-1: Intel CometLake-H GT2 [UHD Graphics] driver: i915 v: kernel
Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] driver: nvidia
v: 510.73.05
Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
Display: x11 server: X.Org v: 21.1.3 driver: X:
loaded: modesetting,nvidia gpu: i915 resolution: 1920x1080~120Hz
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.4
Currently running Nvidia Driver Version: 510.73.05 and 5.15.41-1 LTS Kernel. I am unsure as to why mhwd displays two entries for the GPU.
(base) ➜ ~ mhwd-kernel -li
Currently running: 5.15.41-1-MANJARO (linux515)
The following kernels are installed in your system:
* linux510
* linux513
* linux515
s2458588:
linux513
Remove linux513 asap - it is no longer in the repo.
sudo mhwd-kernel -r linux513
Thank you for letting me know. Removed linux513 and rebooted. Issue still at hand.
If your monitor is working - so is your gpu.
Applications on the other hand
When it comes to Pycharm which is packaged by upstream Arch - I have no answer.
Remember there is several weeks between Arch and Manjaro stable - so it could be a version difference - but that is a guess - as I have really no idea.
Could be running on the onboard graphics too I guess. Application problems are a whole other thing, understandable. I will try reinstalling Pycharm and report back if anything changes.
Looks like your running Intel GPU, Could you try from terminal as this give a bit more detail:
inxi --admin --verbosity=7 --filter --no-host --width
and also:
mhwd -li -d
Gladly, very handy for it to filter personal data considering the length of the output
(base) ➜ ~ inxi --admin --verbosity=7 --filter --no-host --width
System:
Kernel: 5.15.41-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
root=UUID=36352224-c1a4-4f87-868a-fec6a711143e rw net.ifnames=0 quiet
apparmor=1 security=apparmor udev.log_priority=3
Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.4 wm: kwin_x11 vt: 1 dm: SDDM
Distro: Manjaro Linux base: Arch Linux
Machine:
Type: Laptop System: Dell product: Dell G15 5510 v: N/A
serial: <superuser required> Chassis: type: 10 serial: <superuser required>
Mobo: Dell model: 0FKTY5 v: A00 serial: <superuser required> UEFI: Dell
v: 1.4.0 date: 06/02/2021
Battery:
ID-1: BAT0 charge: 52.0 Wh (100.0%) condition: 52.0/54.9 Wh (94.8%)
volts: 12.9 min: 11.4 model: BYD DELL DVG8M17 type: Li-poly serial: <filter>
status: full
Memory:
RAM: total: 15.41 GiB used: 3.07 GiB (19.9%)
RAM Report:
permissions: Unable to run dmidecode. Root privileges required.
CPU:
Info: model: Intel Core i5-10500H bits: 64 type: MT MCP arch: Comet Lake
family: 6 model-id: 0xA5 (165) stepping: 2 microcode: 0xF0
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB desc: 6x256 KiB
L3: 12 MiB desc: 1x12 MiB
Speed (MHz): avg: 800 min/max: 800/4500 scaling: driver: intel_pstate
governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
8: 800 9: 800 10: 800 11: 800 12: 800 bogomips: 60014
Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
arch_capabilities arch_perfmon art avx avx2 bmi1 bmi2 bts clflush clflushopt
cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts
epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fxsr
ht hwp hwp_act_window hwp_epp hwp_notify ibpb ibrs ibrs_enhanced ida
intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear mmx monitor
movbe mpx msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq
pdcm pdpe1gb pebs pge pku pln pni popcnt pse pse36 pts rdrand rdseed
rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3
stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer vme vmx
vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl and seccomp
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 status: Vulnerable: eIBRS with unprivileged eBPF
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel CometLake-H GT2 [UHD Graphics] vendor: Dell driver: i915
v: kernel ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2
bus-ID: 00:02.0 chip-ID: 8086:9bc4 class-ID: 0300
Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: Dell
driver: nvidia v: 510.73.05 alternate: nouveau,nvidia_drm non-free: 515.xx+
status: current (as of 2022-05) arch: Ampere pcie: gen: 1 speed: 2.5 GT/s
lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 01:00.0
chip-ID: 10de:25a2 class-ID: 0300
Device-3: Microdia Integrated_Webcam_HD type: USB driver: uvcvideo
bus-ID: 1-5:3 chip-ID: 0c45:6720 class-ID: 0e02
Display: x11 server: X.Org v: 21.1.3 compositor: kwin_x11 driver: X:
loaded: modesetting,nvidia alternate: fbdev,nouveau,nv,vesa gpu: i915
display-ID: :0 screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
s-diag: 582mm (22.93")
Monitor-1: eDP-1 model: Najing CEC Panda 0x005f built: 2021 res: 1920x1080
hz: 120 dpi: 142 gamma: 1.2 size: 344x194mm (13.54x7.64")
diag: 395mm (15.5") ratio: 16:9 modes: 1920x1080
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.4
direct render: Yes
Audio:
Device-1: Intel Comet Lake PCH cAVS vendor: Dell
driver: sof-audio-pci-intel-cnl
alternate: snd_hda_intel,snd_soc_skl,snd_sof_pci_intel_cnl bus-ID: 00:1f.3
chip-ID: 8086:06c8 class-ID: 0401
Device-2: NVIDIA driver: snd_hda_intel v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 01:00.1 chip-ID: 10de:2291 class-ID: 0403
Sound Server-1: ALSA v: k5.15.41-1-MANJARO running: yes
Sound Server-2: JACK v: 1.9.21 running: no
Sound Server-3: PulseAudio v: 15.0 running: yes
Sound Server-4: PipeWire v: 0.3.51 running: yes
Network:
Device-1: Intel Comet Lake PCH CNVi WiFi driver: iwlwifi v: kernel
bus-ID: 00:14.3 chip-ID: 8086:06f0 class-ID: 0280
IF: wlan0 state: up mac: <filter>
IP v4: <filter> type: dynamic noprefixroute scope: global
broadcast: <filter>
IP v6: <filter> type: dynamic noprefixroute scope: global
IP v6: <filter> type: noprefixroute scope: link
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: Dell driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
port: 3000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
IF: eth0 state: down mac: <filter>
WAN IP: <filter>
Bluetooth:
Device-1: Intel AX201 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 1-14:4 chip-ID: 8087:0026 class-ID: e001
Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running
rfk-block: hardware: no software: yes address: see --recommends
Logical:
Message: No logical block device data found.
RAID:
Message: No RAID data found.
Drives:
Local Storage: total: 476.94 GiB used: 176.15 GiB (36.9%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 model: OM3PDP3-AD NVMe KDI 512GB
size: 476.94 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
lanes: 4 type: SSD serial: <filter> rev: 10100000 temp: 44.9 C scheme: GPT
Message: No optical or floppy data found.
Partition:
ID-1: / raw-size: 476.64 GiB size: 468.09 GiB (98.21%)
used: 176.15 GiB (37.6%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
label: N/A uuid: 36352224-c1a4-4f87-868a-fec6a711143e
ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
label: NO_LABEL uuid: 1767-0F5E
Swap:
Alert: No swap data was found.
Unmounted:
Message: No unmounted partitions found.
USB:
Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 16 rev: 2.0
speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
Device-1: 1-2:2 info: Shenzhen Rapoo E9260 Wireless Multi-mode Keyboard
type: Keyboard,Mouse driver: hid-generic,usbhid interfaces: 2 rev: 2.0
speed: 12 Mb/s power: 100mA chip-ID: 24ae:1813 class-ID: 0301
Device-2: 1-5:3 info: Microdia Integrated_Webcam_HD type: Video
driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
chip-ID: 0c45:6720 class-ID: 0e02
Device-3: 1-14:4 info: Intel AX201 Bluetooth type: Bluetooth driver: btusb
interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0026
class-ID: e001
Hub-2: 2-0:1 info: Super-speed hub ports: 8 rev: 3.1 speed: 10 Gb/s
chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
System Temperatures: cpu: 56.0 C pch: 50.0 C mobo: N/A
Fan Speeds (RPM): N/A
Info:
Processes: 355 Uptime: 1h 9m wakeups: 5113 Init: systemd v: 250
tool: systemctl Compilers: gcc: 12.1.0 clang: 13.0.1 Packages: 1409
pacman: 1399 lib: 353 flatpak: 0 snap: 10 Shell: Zsh v: 5.9
running-in: konsole inxi: 3.3.16
(base) ➜ ~ mhwd -li -d
NAME: video-modesetting
ATTACHED: PCI
VERSION: 2020.01.13
INFO: X.org modesetting video driver.
PRIORITY: 1
FREEDRIVER: true
DEPENDS: -
CONFLICTS: -
CLASSIDS: 0300
VENDORIDS: *
NAME: video-hybrid-intel-nvidia-prime
ATTACHED: PCI
VERSION: 2021.12.18
INFO: Hybrid prime solution for NVIDIA Optimus Technology - Closed source NVIDIA driver & open source intel driver.
PRIORITY: 8
FREEDRIVER: false
DEPENDS: video-modesetting
CONFLICTS: video*nvidia*
CLASSIDS: 0300 0302 0300
VENDORIDS: 10de 8086
Warning: no installed configs for USB devices found!
Mind pointing out what indicates this so I can check this myself in the future?
Here:
OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.4
Could you try this from terminal:
prime-run glxinfo | grep “OpenGL renderer”
Have you tried this:
Nvidia Optimus configs
And also look here:
Prime - Arch Linux
1 Like
It returns the dedicated GPU
(base) ➜ ~ prime-run glxinfo | grep "OpenGL renderer"
OpenGL renderer string: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2
Also thank you for the links provided, I’ll have a look.
Meanwhile, I was able to resolve the issue by uninstalling my standalone Pycharm installation following this page . After that I installed jetbrains-toolbox to a folder in my home directory. Reinstalled pycharm using the jetbrains-toolbox, pip upgraded the packages tensorflow and transformers. The last step was to install the cuda packages mentioned in this thread , where they used:
sudo pacman -S cuda cudnn
The GPU is being detected by Pycharm again. Thank you for your help!
Ps: to my understanding my OS provides conflicting information as to which hardware is used as OpenGL renderer
1 Like
Good to know it’s fixed, you can always use “prime-run” to force Nvidia card for any program.
Unless you force Nvidia it will always default to intel to save power/battery.
I figured, but running my IDE on the GPU might not be the same as telling my IDE to use the dGPU as device for processing
system
Closed
29 May 2022 07:06
13
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.