You are not logged in.

#1 2019-12-20 18:15:10

Neubulae
Member
Registered: 2019-12-20
Posts: 3

[SOLVED]How to exactly swap on vram?

My laptop is a bit low on ram and I am not planning to buy some atm, thus I decided to create a swap space on my VRAM.
I have seen this wiki page before doing so:
https://wiki.archlinux.org/index.php/Swap_on_video_RAM
Method 2 is unusable for me since my GPU only supports OpenCL 1.1 so I have to fall back to Method 1, which tells me to select a region. However the method it's telling me to determine the region is quite unclear imo.
This is what it looks like when I type lspci -vvv:

01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M] (rev a1)
	Subsystem: Dell GeForce GT 630M
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 16
	Region 0: Memory at f0000000 (32-bit, non-prefetchable) [size=16M]
	Region 1: Memory at c0000000 (64-bit, prefetchable) [size=256M]
	Region 3: Memory at d0000000 (64-bit, prefetchable) [size=32M]
	Region 5: I/O ports at 4000 [size=128]
	Capabilities: [60] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
		Address: 0000000000000000  Data: 0000
	Capabilities: [78] Express (v2) Endpoint, MSI 00
		DevCap:	MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 75.000W
		DevCtl:	CorrErr- NonFatalErr- FatalErr- UnsupReq-
			RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 256 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit Latency L0s <512ns, L1 <16us
			ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
		LnkCtl:	ASPM L0s L1 Enabled; RCB 64 bytes Disabled- CommClk+
			ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s (downgraded), Width x8 (ok)
			TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Range AB, TimeoutDis+, LTR-, OBFF Not Supported
			 AtomicOpsCap: 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
			 AtomicOpsCtl: ReqEn-
		LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-, EqualizationPhase1-
			 EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
	Capabilities: [100 v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
			Status:	NegoPending- InProgress-
	Capabilities: [128 v1] Power Budgeting <?>
	Capabilities: [600 v1] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Kernel driver in use: nvidia
	Kernel modules: nouveau, nvidia_drm, nvidia

I want to allocate a total of 1GB out of 2 as part of the swap, but where should I start? Do I start at Region 1, 2 or 5? Or I can start at any place I want using the formula in the page if I just tweak the config for X.org?

Last edited by Neubulae (2019-12-21 10:17:24)

Offline

#2 2019-12-20 18:58:32

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED]How to exactly swap on vram?

Welcome to the forum. Please edit your post and use [ code ] tags (not quote tags) when posting output.

https://wiki.archlinux.org/index.php/Co … s_and_code
https://bbs.archlinux.org/help.php#bbcode

Offline

#3 2019-12-20 19:45:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,171

Re: [SOLVED]How to exactly swap on vram?

you wrote:

Kernel driver in use: nvidia

wiki wrote:

Warning: This will not work with binary drivers.

How much RAM do you have? Did you see https://wiki.archlinux.org/index.php/Im … m_or_zswap ?

Offline

#4 2019-12-21 02:24:46

Neubulae
Member
Registered: 2019-12-20
Posts: 3

Re: [SOLVED]How to exactly swap on vram?

seth wrote:
you wrote:

Kernel driver in use: nvidia

wiki wrote:

Warning: This will not work with binary drivers.

oof so that's the meaning of binary drivers? Do I switch to nouveau or something?

seth wrote:

How much RAM do you have? Did you see https://wiki.archlinux.org/index.php/Im … m_or_zswap ?

I am considering using Zram if I can't use this method. Currently I have only 4GB on this toaster.

Last edited by Neubulae (2019-12-21 02:45:02)

Offline

#5 2019-12-21 07:49:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,171

Re: [SOLVED]How to exactly swap on vram?

Do I switch to nouveau or something?

That's at least my understanding, yes (but this information is, as the entire concept, dated - I googled up a gentoo article about getting an additional 124MB of RAM because 4MB VRAM is more than enough…)

The next problem is that this method is very old (the wiki discussion suggests it was up for deletion in 2013) and the VRAM > 256MB is accessed indirectly, so you cannot map away portions. The biggest available chunk is region 1 (so you could acquire 256 more MB, what was awesome … in 2001) and since even the OSS X11 drivers have only a VideoRam value restriction (no offset etc.) you'd be left with 16MB actual video memory before you run into a collision (again: awesome… in 2001)

ZRAM should get you more RAM than that (on CPU expense)

Offline

#6 2019-12-21 10:17:00

Neubulae
Member
Registered: 2019-12-20
Posts: 3

Re: [SOLVED]How to exactly swap on vram?

seth wrote:

Do I switch to nouveau or something?

That's at least my understanding, yes (but this information is, as the entire concept, dated - I googled up a gentoo article about getting an additional 124MB of RAM because 4MB VRAM is more than enough…)

The next problem is that this method is very old (the wiki discussion suggests it was up for deletion in 2013) and the VRAM > 256MB is accessed indirectly, so you cannot map away portions. The biggest available chunk is region 1 (so you could acquire 256 more MB, what was awesome … in 2001) and since even the OSS X11 drivers have only a VideoRam value restriction (no offset etc.) you'd be left with 16MB actual video memory before you run into a collision (again: awesome… in 2001)

ZRAM should get you more RAM than that (on CPU expense)

Okay, problem solved by practically unachievable.

Offline

Board footer

Powered by FluxBB