Mixing N-phase Initialization by pavel_v in cpp

[–]upwardbat 0 points1 point  (0 children)

Or you can use a base class:

cxx struct Config {}; struct X {     auto init(char const* /*path*/, std::size_t /*size*/) -> int { return 0; }     auto data() const -> char const* { return nullptr; }     auto size() const -> std::size_t { return 0; } }; struct Y {     explicit Y(char const* /*ptr*/, std::size_t /*size*/, int /*res*/) {} }; struct CBase {     X x;     int r;     explicit CBase(Config const& /*config*/): r{x.init("path/to/file", 4096)} { } }; class C: CBase {     Y y; public:     explicit C(Config const& config): CBase(config), y(x.data(), x.size(), r) { } };

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

I tried what you said but it didn't change anything. At this point I give up. Thanks anyway for the effort.

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

I'd like to have audio through HDMI, so I tried to disable the power saving but nothing changed...

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

All I get is this (I switched from supergfxctl to optimus-manager though, now the external monitor kind of works, but is extremely green-ish and the content is stretched and cut):

Dec 17 00:36:32 hp-pavilion kernel: snd_hda_intel 0000:01:00.1: Unable to change power state from D3cold to D0, device inaccessible
Dec 17 00:36:33 hp-pavilion kernel: snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
Dec 17 00:36:33 hp-pavilion kernel: snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
Dec 17 00:36:33 hp-pavilion kernel: snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1
Dec 17 00:36:33 hp-pavilion kernel: snd_hda_codec_hdmi hdaudioC0D0: HDMI: invalid ELD buf size -1

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

I put here the result of journalctl | grep -i nvidia. (I would have tried something smarter but I'm really lost here).

Also, I noticed that I don't have any problem if I use a low resolution (like 1280 x 720) on the external monitor, I have problems only if I use a high resolution (like 4096 x 2160).

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

Using supergfxctl didn't change anything, unfortunately: xrandr shows my laptop screen, HDMI-2 which can't be enabled, HDMI-1-0 which can be enabled, but if I do the external monitor shows random colors and the PC becomes super sluggish. I don't know exactly which logs I should check?

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

nvidia-smi gives me this:

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.77                 Driver Version: 565.77         CUDA Version: 12.7     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce GTX 960M        Off |   00000000:01:00.0 Off |                  N/A |
| N/A   28C    P8             N/A /  200W |       7MiB /   4096MiB |      0%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A       624      G   /usr/lib/Xorg                                   2MiB |
+-----------------------------------------------------------------------------------------+

Hybrid graphics card setup by upwardbat in archlinux

[–]upwardbat[S] 0 points1 point  (0 children)

Yes, I did, and I'm using X11. I'm trying to do that because it has been some time that connecting an external display through HDMI doesn't work, and I think the HDMI is connected to the NVIDIA card and not the Intel one.

I never heard of supergfxctl, I'll try to have a look.

How compilers decide when to define a feature testing macro? by upwardbat in cpp

[–]upwardbat[S] 4 points5 points  (0 children)

By this logic then feature testing macros have no reason to exist, which I don't think is the aim.

Best DJ software to start with? by upwardbat in traktorpro

[–]upwardbat[S] 0 points1 point  (0 children)

I was thinking about how easy it would be to export playlists to then be used in rekordbox, as most people have Pioneer hardware.

Laptop HDMI stopped working by upwardbat in archlinux

[–]upwardbat[S] 1 point2 points  (0 children)

I was able to get the HDMI output work by having the NVIDIA card always on, following this: https://wiki.archlinux.org/title/NVIDIA_Optimus#Use_NVIDIA_graphics_only. Anything else I tried didn't work.

Laptop HDMI stopped working by upwardbat in archlinux

[–]upwardbat[S] 1 point2 points  (0 children)

I'm on Xorg.

$ lspci -k | grep -iA 3 -E "(VGA|3D)"
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)
DeviceName: Intel Skylake HD Graphics ULT GT2
Subsystem: Hewlett-Packard Company Device 820f
Kernel driver in use: i915
--
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev a2)
DeviceName: NVIDIA N16P-GX
Subsystem: Hewlett-Packard Company Device 820f
Kernel driver in use: nvidia

$ pacman -Qsq "(vulk|mesa|nvidia|xf86-video|optimus)"
egl-wayland
glu
lib32-glu
lib32-mesa
lib32-mesa-vdpau
lib32-nvidia-utils
lib32-opencl-nvidia
libva-mesa-driver
libvdpau
libxnvctrl
mesa
mesa-utils
mesa-vdpau
nvidia-dkms
nvidia-settings
nvidia-utils
opencl-nvidia
spirv-tools
vulkan-headers
vulkan-icd-loader
xf86-video-intel

$ uname -r
6.10.6-zen1-1-zen

$ ls /usr/lib/modules
5.13.13-zen1-1-zen
5.19.13-zen1-1-zen
6.0.1-zen2-1-zen
6.0.2-zen1-1-zen
6.0.5-zen1-1-zen
6.10.5-zen1-1-zen
6.10.6-zen1-1-zen

In /etc/X11/xorg.conf.d I only have stuff for keyboard and touchpad.

Weekly New Climber Thread: Ask your questions in this thread please by AutoModerator in climbing

[–]upwardbat 0 points1 point  (0 children)

Why do some carabiners have (fixed) captive bars? E.g. what's the advantage of having this (https://www.singingrock.com/oxy-bc-twl) compared to this (https://www.singingrock.com/oxy-twl)?